ave-identity
ave-identity is the cryptographic crate of the Ave workspace.
It provides a small, explicit API for hashing, key management, signing and signature verification. Public values carry an algorithm identifier so they can be serialized and parsed without extra metadata.
This crate is free software and is distributed under the AGPL-3.0-only
license.
What it includes
- Blake3 digests with compact string encoding
- Ed25519 key generation, signing and verification
- Public key and signature wrappers with algorithm identifiers
- Signed payloads with timestamp and content hash
- PKCS#8 DER import and export for secret keys
Supported algorithms
- Hash: Blake3 (
B) - Signature: Ed25519 (
E)
Basic example
use ;
let keypair = generate?;
let digest = BLAKE3_HASHER.hash;
let signature = keypair.sign?;
keypair.public_key.verify?;
# Ok::
Data model
DigestIdentifier: hash bytes plus algorithmPublicKey: public key bytes plus algorithmSignatureIdentifier: signature bytes plus algorithmSignature: signer, timestamp, content hash and signature valueSigned<T>: content bundled withSignature
String encodings use URL-safe Base64 without padding. The first character is the algorithm identifier.
Security notes
- Secret keys are stored in encrypted memory through
memsecurity. - Secret keys are decrypted only when signing.
KeyPair::to_bytes()andKeyPair::to_secret_der()expose secret key material. Use them only when persistence or key transport is required.Ed25519Signer::derive_from_data()is deterministic, but it is not a password-hard KDF.
Development
Run the crate tests:
Run the example: