Releases: cool-japan/oxicrypto
Releases · cool-japan/oxicrypto
OxiCrypto 0.1.2 Release
[0.1.2] - 2026-06-10
Added
generate_hmac_key/generate_extractable_aes_key/extract_key_value(oxicrypto-adapter-pkcs11) — pure PKCS#11 HSM key-generation and extraction primitives relocated to a newhsm_keygen.rsmodule. All three methods arepubonPkcs11Providerand carry no cross-workspace dependencies:generate_hmac_keyprovisions a non-extractable HMAC-SHA-256 capableCKO_SECRET_KEYon the token;generate_extractable_aes_keyprovisions a 32-byte AES key withCKA_EXTRACTABLE=true;extract_key_valueretrieves the rawCKA_VALUEof an extractable key.- Hybrid KEM benchmarks (oxicrypto-bench) — new criterion groups for
XWing768andHybridKem1024P384key encapsulation, covering keygen, encapsulate, and decapsulate round-trips. oxicryptofacade integration tests (crates/oxicrypto/tests.rs) — end-to-end round-trip tests for the full facade: sign/verify (Ed25519, ECDSA P-256/P-384/P-521, RSA), AEAD (AES-GCM, ChaCha20-Poly1305), key exchange (X25519), KDF (HKDF), and password hashing (Argon2id).rustls/rustls-pki-typesworkspace dependency alignment (oxicrypto-adapter-pkcs11) — version pins moved to workspace[dependencies]for consistency;rustlsandrustls-pki-typesare now optional deps resolved from the single workspace declaration.
Changed
- Dependency inversion — oxicrypto is now a pure leaf — removed the
oxistorefeature and alloxistore_encrypt::KeyProviderimplementations fromoxicrypto-adapter-pkcs11. ThePkcs11KeyProvider/Pkcs11ExtractableKeyProviderbridge types that depended onoxistore-encryptare removed; the equivalent HSM key-generation primitives are now inhsm_keygen.rswithout cross-workspace ties. Cross-workspace integration testsoxistore_encrypt_compat.rsandoxitls_coexist.rshave been deleted fromoxicrypto-adapter-aws-lc— they will live on theoxistore/oxitlsside. - Dependency upgrades —
p256,p384,p521,k256bumped to0.14.0-rc.11;ed448-goldilocksto0.14.0-pre.13;x448to0.14.0-pre.10.
Fixed
oxicrypto-adapter-aws-lccompile fix — removed the stale cross-workspacedev-dependenciesonoxistore-encrypt,oxistore-core, andoxitls-adapter-aws-lcthat caused compilation failures after the dependency-inversion refactor.
Full Changelog: v0.1.1...v0.1.2
OxiCrypto 0.1.1 Release
[0.1.1] - 2026-06-04
Added
CommittingAead<'a>(oxicrypto-aead) — UtC/CMT-1 key-committing AEAD wrapper: prepends a 32-byte HKDF-SHA-256 commitment to every ciphertext, preventing invisible-salamander and partitioning-oracle attacks (Bellare & Hoang, EUROCRYPT 2022).bcrypt/BcryptKdf(oxicrypto-kdf) — OpenBSD-compatible$2b$bcrypt password hashing implemented from scratch in pure Rust (Blowfish + Eksblowfish key schedule; full$2b$cc$22-char-salt 31-char-hashstring format).StreamingHashHmac<H, F>(oxicrypto-mac) — generic RFC 2104 HMAC over anyStreamingHashimplementation, decouplingoxicrypto-macfrom specific digest crates.ed25519ctx_sign/ed25519ctx_verify(oxicrypto-sig) — Ed25519ctx context-variant signatures per RFC 8032 §5.1.5, providing protocol-level domain separation via adom2(0, ctx)prefix.ed25519ph_sign/ed25519ph_verify/ed25519ph_sign_prehash(oxicrypto-sig) — Ed25519ph prehash variant (RFC 8032 §5.1.6) for streaming large messages.- MuSig2 multi-signature (oxicrypto-sig) — two-round n-of-n multi-signature protocol for Ed25519 (Nick–Ruffing–Seurin 2021):
musig2_commit,musig2_sign,musig2_aggregate,musig2_verify,musig2_verify_ed25519, typesMuSig2SecretKey,MuSig2PublicKey,SecNonce(single-use, zeroized on drop),PubNonce,PartialSig,MuSig2Signature. negotiate_kex(oxicrypto-kex) — resolve TLS named group strings ("x25519","secp256r1","P-384", …) to a boxedKeyAgreementimplementation for TLS stack integration.X25519::agree_with_key/EcdhP256::agree_with_secret(oxicrypto-kex) — typed-key overloads acceptingSecretKey<N>/SecretVecfor compile-time type safety.NonceSequence::with_random_prefix(oxicrypto-aead,randfeature) — construct aNonceSequencewith a cryptographically secure random prefix drawn fromOxiRng.AlgorithmId::Blake2s256,Aes128Ocb3,Aes256Ocb3,RsaPssSha384,RsaPssSha512(oxicrypto-core) — new algorithm identifiers for previously-missing variants.AwsLcHkdf(oxicrypto-adapter-aws-lc) — HKDF-SHA-256/384/512 backed byaws-lc-rs, implementing theKdftrait.AwsLcHmac(oxicrypto-adapter-aws-lc) — HMAC-SHA-256/384/512 backed byaws-lc-rs, implementing theMactrait.Pkcs11KeyProvider/Pkcs11ExtractableKeyProvider(oxicrypto-adapter-pkcs11,oxistorefeature) —oxistore-encrypt::KeyProviderbridge: derives a 32-byte key via HMAC-SHA-256 on the HSM or extracts an AES key directly from aCKA_EXTRACTABLEtoken object; key bytes are zeroized on drop.- PKCS#11 session pool (oxicrypto-adapter-pkcs11) —
Pkcs11SessionPoolwith bounded slot reuse andPkcs11TlsProviderfor TLS-layer sign/verify offload to an HSM. SigningKey44/65/87::verifying_key(oxicrypto-pq) — ergonomic accessor returning the matchingVerifyingKey*without separate derivation.hash_fixedmethods (oxicrypto-hash) — alloc-free[u8; N]-returning hash helpers on all concrete hash types (Sha256,Sha384,Sha512,Sha512_256,Sha3_*,Blake2b*,Blake2s256,Blake3), recommended forno_std/embedded callers.OUTPUT_LENconstants (oxicrypto-hash) — addedOUTPUT_LEN: usizealias to all hash types alongsideDIGEST_LENfor use in generic const contexts.serdefeature forCryptoError(oxicrypto-core) —Serializederived and a hand-writtenDeserialize(avoids lifetime issues withInternal(&'static str); the payload is intentionally dropped on round-trip).serdeandoxicodeadded to workspace dependencies.- Wycheproof KAT tests (oxicrypto-hash, oxicrypto-mac) —
kat_wycheproof.rsfor hash algorithms;kat_cmac_nist.rs,kat_hmac_sha384.rs,kat_hmac_wycheproof.rs,kat_kmac_nist.rs,kat_poly1305_rfc8439.rsfor MAC algorithms. - ACVP/NIST KAT tests (oxicrypto-pq) —
kat_acvp_mldsa.rs,kat_nist_mldsa.rs,kat_mldsa.rswith FIPS 204 test vectors. ECDSA::sign_fmt/verify_fmt(oxicrypto-sig) —SignatureFormatenum (Der|Raw) on P-256/P-384/P-521 signers/verifiers to output rawr ‖ sor DER-encoded signatures.EcdsaP256Signer::sign_with_hash/EcdsaP256Verifier::verify_with_hash/verify_prehash(oxicrypto-sig) — hash-agnostic signing and pre-hash verification paths for P-256.- RSA PKCS#1 DER helpers (oxicrypto-sig) —
from_pkcs1_der/to_pkcs1_der/from_pkcs8_pem/to_pkcs8_pemshared helpers for RSA key import/export. - Benchmark scripts (oxicrypto-bench) —
bench_archive.sh,bench_compare.sh,bench_ratios.py,bench_simd_compare.sh,bench_summary.py; new criterion groups for RNG, factory overhead, and AEAD throughput. - Fuzz targets (oxicrypto-hash, oxicrypto-sig) —
fuzz_hash_no_panic,fuzz_streaming_equivalence,fuzz_xof_no_panic,fuzz_sig.
Changed
ml-kemworkspace dep — enabledallocfeature so ML-KEM and ML-DSA key structs (A_hatmatrix ~48 KB for ML-DSA-65) are heap-allocated viaMaybeBox, eliminating test-thread stack overflows.OxiRngRNG in ML-KEM/ML-DSA/hybrid KEMs — replaced ad-hocgetrandom + rand_chacha::from_seedpattern withOxiRng::new().map(rand_core::UnwrapErr)for consistent fork-safe entropy sourcing across the workspace.OxiRng/OxiRng8/OxiRng12thread-safety documentation — explicitly documentsSend+!Syncsemantics; added compile-time_assert_sendassertions for all three types.AlgorithmIdcategory routing —Blake2s256,Aes128Ocb3,Aes256Ocb3,RsaPssSha384,RsaPssSha512now route to the correctAlgorithmCategoryinAlgorithmId::category().Aeadtrait documentation — expanded with a key-length reference table and note ondebugfeature supertrait.EcdsaP256Signer::signing_key/EcdsaP256Verifier::verifying_keyvisibility — changed from private topub(crate)to enable intra-crate composition (e.g.sign_with_hash).serdeandoxicodeadded to workspace[dependencies]— available for all member crates with consistent versions.- Dev profile optimization —
[profile.dev.package."*"]set toopt-level = 3so crypto-heavy external deps (SLH-DSA, Keccak, SHAKE) compile fast in tests; workspace crates stay at opt-level 0.oxicrypto-pqexplicitly set to opt-level 3 to handle SLH-DSA monomorphization.
Fixed
- ML-DSA test-thread stack overflow — ML-DSA-65
A_hatkey matrix (~48 KB) previously lived on the stack; enablingml-kem'sallocfeature boxes it viaMaybeBox, fixing intermittent stack overflows in nextest. oxicrypto-hashno_stddoc comment — corrected misleading note aboutalloclinkage: the crate always linksalloc; theno_stdfeature flag is an API-guidance signal, not a link-time exclusion.
Full Changelog: v0.1.0...v0.1.1