Skip to content

Feature/officialfrancismendoza/49 no std default#54

Draft
officialfrancismendoza wants to merge 42 commits into
bcgit:mainfrom
officialfrancismendoza:feature/officialfrancismendoza/49-no-std-default
Draft

Feature/officialfrancismendoza/49 no std default#54
officialfrancismendoza wants to merge 42 commits into
bcgit:mainfrom
officialfrancismendoza:feature/officialfrancismendoza/49-no-std-default

Conversation

@officialfrancismendoza

@officialfrancismendoza officialfrancismendoza commented Jul 10, 2026

Copy link
Copy Markdown

Draft pull request on handling (#49), but rebased off changes from (#48) at least part of the way through. Main missing items are to backfill features to allow an "std" option that keeps the original while also retaining the optimized under feature named "alloc" (which is basically our no_std default).

ounsworth and others added 30 commits June 4, 2026 11:56
- 출력 슬라이스를 받는 _out 계열 함수 진입부에서 out fill(0) 선-초기화
- 오버사이즈 버퍼 뒤쪽이나 조기 반환 시 남는 이전 데이터 노출 방지
- digest 출력 버퍼 뒤쪽까지 0이 되도록 sha3 테스트 1건 갱신
- 행 단위 부분 기록 함수는 다른 행을 지우므로 제외
- 비공개 mlkem compress 함수 fill(0) 제거 (성능)
- ct conditional_copy_bytes fill(0) 제거 (constant-time 가정 위반 가능)
- core traits의 _out 함수 docstring에 출력 버퍼 zeroize 명시
- sha3 테스트 주석에서 이름과 변경 이력 제거
- 릴리즈 노트의 완료된 TODO 항목을 changelog로 이동
* removed nightly feature from mldsa
* Split the Signature trait into Signer and SignatureVerifier
* Split the KEM trait into KEMEncapsulator and KEMDecapsulator
* Touched up some documentation
…ory defaults

Replace the three pub DEFAULT_*_HASH_NAME constants with direct enum
variant construction in Default, default_128_bit(), and
default_256_bit(). The constants were only used internally to drive
Self::new().unwrap() calls — removing them makes the defaults
infallible at compile time and reduces the public surface area of the
factory.

Signed-off-by: Nikola Pajkovsky <nikolap@openssl.org>
…y defaults

Same pattern as the HashFactory cleanup: replace the three pub DEFAULT_*_KDF_NAME
constants with direct enum variant construction in Default, default_128_bit(), and
default_256_bit(). The constants were only used internally to drive unwrap() calls
on Self::new() — removing them makes the defaults infallible at compile time and
shrinks the public API surface.

Signed-off-by: Nikola Pajkovsky <nikolap@openssl.org>
…y defaults

Replace pub DEFAULT_KDF_NAME, DEFAULT_128BIT_KDF_NAME, and DEFAULT_256BIT_KDF_NAME
with direct enum variant construction in Default, default_128_bit(), and
default_256_bit(). The constants existed solely to feed Self::new().unwrap() —
constructing the variants directly makes the defaults infallible at compile time
and removes three unnecessary items from the public API.

Signed-off-by: Nikola Pajkovsky <nikolap@openssl.org>
Replace manual length checks followed by unwrap() with
try_into().map_err() to coerce the signature slice to a fixed-size
array in one step. Replace assert!() + unwrap() on the streaming
verifier's optional public key with ok_or(), returning a proper
SignatureError::GenericError instead of panicking. Use
.then_some().ok_or() to convert the boolean verify result into a
Result without an if/else branch.

Signed-off-by: Nikola Pajkovsky <nikolap@openssl.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants