Expand description
§baseid-crypto
Cryptographic primitives and key management for BaseID.
This crate provides:
- Key generation for Ed25519, P-256, P-384, and secp256k1
- Signing and verification via the
SignerandVerifiertraits - Key serialization (JWK, Multikey)
- Key storage abstraction via the
KeyStoretrait (planned)
§Cryptographic Agility
All operations go through traits, not hardcoded algorithms. This enables future migration to post-quantum algorithms (ML-DSA) when standardized.
§Security
- All secret key types implement
zeroize::Zeroizefor secure memory cleanup - No
unsafeblocks without documented justification - Key material never exposed in
Debugoutput
Re-exports§
pub use jwk::Jwk;pub use jwt::alg_to_str;pub use jwt::decode_jwt;pub use jwt::decode_jwt_unverified;pub use jwt::encode_jwt;pub use jwt::str_to_alg;pub use jwt::JwtHeader;pub use key::KeyPair;pub use key::PublicKey;pub use signer::MultiMessageSigner;pub use signer::ProofDeriver;pub use signer::ProofVerifier;pub use signer::Signer;pub use signer::Verifier;