Repository navigation
v0.4.0 — Security Hardening
·
1813 commits
to main
since this release
v0.4.0 — Security Hardening
Full remediation of all HIGH and MEDIUM findings from the March 2026 security audit. All 62 ACVP test vectors pass across both C++ and Rust WASM engines (31 per engine, zero failures, zero skips).
Security fixes
| Severity | Count | Status |
|---|---|---|
| Critical | 3 | ✅ Fixed in prior releases |
| High | 10 | ✅ All fixed |
| Medium | 14 | ✅ All fixed |
| Low / Info | 10 | Accepted / architectural |
HIGH fixes:
- RSA X.509 integer underflow guard (
ulDataLen > size → CKR_DATA_LEN_RANGE) - AES-CBC IV length enforcement (exactly 16 bytes, not just non-NULL)
- WrapKeySym/UnwrapKeySym mode variable left unset for AES-CBC/CBC-PAD
- pValue NULL dereference on required object creation attributes
MEDIUM fixes:
- GcmMsgCtx param zeroization before
free()inSession::resetOp File::readString64 MiB OOM cap- Path traversal + symlink rejection in
Directory::refresh - ML-KEM shared secret and stored value wiped after encapsulate/decapsulate
- RSA-PSS salt length bounded to 512 bytes at all 20 PSS parameter sites
HandleManagercounter seeded with random 20-bit offset (non-predictable handles)CKM_SLH_DSApure mode: reject non-NULLpParameter- Rust NULL output pointer guards in 6 FFI entry points
- HMAC constant-time comparison via
subtle::ConstantTimeEq - KMAC constant-time comparison via
subtle::ConstantTimeEq SymDecryptUpdateinteger overflow guard- IV
ByteStringzeroization on all error paths inOSSLEVPSymmetricAlgorithm
Build / supply chain:
- Default CMake build type → Release
package-lock.jsoncommitted- Optional GPG verification for OpenSSL source
cargo auditCI job-fstack-protector-strong+ Linux relro/now/noexecstack flags- WASM maximum memory 512 MiB
ACVP validation — 62/62 PASS
Both C++ and Rust engines tested in dual mode:
| Algorithm | Engine | Result |
|---|---|---|
| AES-GCM-256 Decrypt KAT | C++ + Rust | ✅ PASS |
| AES-CBC-256 Decrypt KAT | C++ + Rust | ✅ PASS |
| AES-CTR-256 Decrypt KAT | C++ + Rust | ✅ PASS |
| AES-KW-256 Wrap KAT | C++ + Rust | ✅ PASS |
| AES-KWP-256 Wrap+Unwrap RT | C++ + Rust | ✅ PASS |
| HMAC-SHA256/384/512 Verify KAT | C++ + Rust | ✅ PASS (×3) |
| SHA-256 Digest KAT (3 vectors) | C++ + Rust | ✅ PASS (×3) |
| RSA-PSS-2048 SigVer KAT | C++ + Rust | ✅ PASS |
| ECDSA P-256 SigVer KAT | C++ + Rust | ✅ PASS |
| ECDSA P-384 SigVer KAT | C++ + Rust | ✅ PASS |
| EdDSA Ed25519 Functional | C++ + Rust | ✅ PASS |
| ML-DSA-44/65/87 SigVer KAT | C++ + Rust | ✅ PASS (×3) |
| ML-DSA-44/65/87 Functional | C++ + Rust | ✅ PASS (×3) |
| ML-KEM-512/768/1024 Decap KAT | C++ + Rust | ✅ PASS (×3) |
| ML-KEM-512/768/1024 RT | C++ + Rust | ✅ PASS (×3) |
| SLH-DSA-SHA2-128s Functional | C++ + Rust | ✅ PASS |
| SLH-DSA-SHAKE-256f Functional | C++ + Rust | ✅ PASS |
| PBKDF2-HMAC-SHA512 Derivation | C++ + Rust | ✅ PASS |
| HKDF-SHA256 Derivation | C++ + Rust | ✅ PASS |
Full security audit report attached below.