[5.22.1] - 2026-10-25
๐ Security
- Fix the RUSTSEC advisories published since 5.22.0:
h2(RUSTSEC-2026-0258, viaactix-web4.17),tokio(RUSTSEC-2026-0386),lru0.18 (RUSTSEC-2026-0253),tokio-postgres/postgres-protocol(RUSTSEC-2026-0178/0179/0180, withaes-kw0.3.1),quick-xml0.42 (RUSTSEC-2026-0194/0195) andmysql_async0.37 without thederivefeature (RUSTSEC-2026-0173) - Ignore RUSTSEC-2026-0387 (
crypto-bigint0.5.5, no 0.5.x patch) indeny.tomland.cargo/audit.toml, with its reason
๐ Bug Fixes
Hybrid KEM keys with an HSM key encryption key (#1329)
- Hybrid KEM keys (
ConfigurableKEMand nativeX25519MLKEM768/X448MLKEM1024) now work when the serverkey_encryption_keyis stored in an HSM:ckms pqc keys create -a ml-kem-768-p256no longer fails withUnsupported key format type: ConfigurableKEMSecretKey - Wrap:
ByteString-onlyRaw,ConfigurableKEM*andCoverCrypt*asymmetric keys are wrapped as raw bytes instead of going through OpenSSL (Create, Import, Export with aKeyWrappingSpecification) - Unwrap:
ConfigurableKEM*keys are decoded on unwrap (Encrypt/Decrypt after a restart,default_unwrap_type, Export/Import withNotWrapped) - Unwrapping with a KMS wrapping key now works when that wrapping key is itself wrapped (for example by the HSM KEK): it is unwrapped first and its stored usage mask is checked, as already done when wrapping
- Export: a PQC/hybrid KEM key can be exported with its own stored
KeyFormatType - TTLV:
ConfigurableKEM*key material can be deserialized from TTLV, so TTLV-wrapped keys (ckms keys export --wrap-key-id ... -f json-ttlv, then import) can be unwrapped and used - Backport of #1268: import and export skip the OpenSSL round-trip for
ConfigurableKEMand native hybrid KEM keys
ConfigurableKEM usage rules and algorithm policy (#1329)
ConfigurableKEMhybrid keys (ML-KEM + P-256/X25519) follow least privilege and the KMIP usage-mask rules: a requestedCryptographicUsageMaskis kept as is instead of being OR-ed withUnrestricted; without one, the private key getsDecryptand the public keyEncrypt.ckms pqc keys createno longer requestsUnrestricted, and existing keys keep their mask- Per-key
PrivateKeyAttributes/PublicKeyAttributesinherit theCommonAttributes(tags, curve, ML-KEM variant) instead of replacing them - KEM
Encrypt(ML-KEM, native hybrid,ConfigurableKEM) rejects non-emptyDatainstead of silently ignoring it - Algorithm policy: a
ConfigurableKEMkey is checked on every use, not only at creation, against both its ML-KEM variant and its curve, read from the serialized key rather than from its KMIP attributes, so an imported key with relabelled or stripped attributes cannot bypass the policy.X25519MLKEM768andX448MLKEM1024are in the policy scope and in theDEFAULTallowlist (non-FIPS), where they were previously always denied ckms bench: the configurable KEM decapsulation benchmark decapsulates the encapsulation component of the packed result instead of the whole tuple
๐งช Testing
- Add a SoftHSM2-backed hybrid KEM lifecycle test, TTLV-wrapped import tests (export wrapped by a software AES key, and client-side wrap by the HSM KEK), a wrap/unwrap unit test for
ByteString-only KEM keys and a TTLV round-trip test forConfigurableKEM*key values - Add
ConfigurableKEMserver tests (usage masks, encapsulation round trip, plaintext andSignrefusal,Locate, revocation, policy on use including relabelled and stripped imports); they also pin theEncryptresponse layout, unchanged since 5.22.0: the serialized(shared secret, encapsulation)tuple inDataand an emptyIVCounterNonce.ckms pqcKEM tests now compare the decapsulated secret with the encapsulated one - Fix the stale
test_tomlsnapshot (rate_limit_per_second,otlp_allow_insecure) incrate/server/src/main.rs
โ๏ธ Build
- Bump the workspace version to 5.22.1 and pin the internal path dependencies with
=5.22.1, so thatcargo publish --dry-runverifies the local 5.22.1 crates instead of newer 5.2x releases already on crates.io (a caret requirement matched them, andcosmian_kms_crypto5.25.0 does not compile againstopenssl0.10.79)