Repository navigation
0.4.3
Performance
- ML-KEM:
- The PRFs now run 8 Keccak-f permutations at once (8x Keccak), and
Shake256::one_shot_sextetuses 8-wide AVX-512. - Single-block SHAKE256: there's a specialised 8-wide version, so input formatting and transposition happen in SIMD.
- Single-state Keccak-f: a new AVX512VL version is used in place of the scalar one when the CPU supports it.
- SHA-3 squeeze: permutations are reordered so the final unused ones are skipped, and whole words are squeezed more efficiently.
- ML-KEM EncapsKey: the transposed matrix Âᵀ is now cached outside
EncapsKey. This makes the key smaller and lets the Keccak work run in parallel with encapsulation.
- The PRFs now run 8 Keccak-f permutations at once (8x Keccak), and
ct_compare_bytes: faster, and better tested.
Stricter input checks
- P-256/P-384: public keys must now be canonical. A coordinate at or above the field prime is rejected with NotOnCurve; before, it was silently reduced, so one point could have two encodings.
- RSA signature length: for both PKCS#1 v1.5 and PSS verification, the signature must be exactly the modulus length (RFC 8017). Before, shorter signatures were accepted, such as one with its leading zero byte removed.
- ECDSA PKCS#8 v2 import: if the file includes a public key, it is checked against the one derived from the private key. A mismatch yields
KeyFormatError::MismatchedPkcs8PublicKey.
What's Changed
- Optimise MLKEM PRF invocations by @ctz in #236
- Require that p256/p384 public keys are canonical by @ctz in #237
- Tighten RSA verification and public key import by @ctz in #238
- Tighten ECDSA PKCS#8v2 import to check pubkey by @ctz in #239
- Improve
ct_compare_bytesperformance by @ctz in #242 - Further keccak-oriented improvements to ML-KEM performance by @ctz in #243
- Prepare graviola 0.4.3 by @ctz in #244
Full Changelog: v/0.4.2...v/0.4.3