3 releases (breaking)
| 0.3.0 | Feb 24, 2026 |
|---|---|
| 0.2.0 | Jan 5, 2026 |
| 0.1.3 |
|
| 0.1.0 | Nov 29, 2025 |
#2436 in Cryptography
Used in 4 crates
93KB
1.5K
SLoC
Cryptographic primitives for Freebird
This module provides high-level APIs for VOPRF operations using the internal P-256 implementation in voprf/.
Memory Zeroization Security
Freebird implements comprehensive memory zeroization to protect cryptographic key material from memory dumps, cold boot attacks, and other extraction methods.
Automatic Zeroization
-
Scalar values (blinding factors, secret keys): The
Scalartype from RustCrypto'selliptic-curvecrate implementsDefaultIsZeroes, ensuring automatic memory zeroization when dropped. This applies to:- VOPRF blinding factors (
rinBlindState) - DLEQ proof ephemeral scalars (
rinprove()) - Secret keys in VOPRF operations
- VOPRF blinding factors (
-
Software provider secret keys: The
SoftwareCryptoProviderexplicitly zeroizes its secret key in theDropimplementation. -
PKCS11 provider MAC keys: The
Pkcs11CryptoProviderzeroizes themac_base_keyderived from the HSM in itsDropimplementation.
Explicit Zeroization (via Zeroizing wrapper)
- MAC keys: All MAC keys derived for token authentication are wrapped in
Zeroizing<[u8; 32]>to ensure they are erased immediately after use:- Issuer token MAC computation
- Verifier token MAC verification
- Batch issuance MAC operations
Non-Secret Values (No Zeroization)
- Elliptic curve points (
ProjectivePoint,AffinePoint): These are public values that do not require zeroization. - Token data: Tokens are meant to be shared and do not contain secrets.
- Public keys: Public keys are intentionally shareable.
Verification
To verify zeroization is working correctly, use memory analysis tools or run the zeroization tests in the test suite.
Dependencies
~4–6MB
~118K SLoC