#[non_exhaustive]pub enum SignatureClass {
None,
Ed25519 {
signing_key: SigningKey,
verifying_key: VerifyingKey,
},
Hybrid {
ed25519_signing_key: SigningKey,
ed25519_verifying_key: VerifyingKey,
pqc_signer: Box<dyn PqcSigner>,
},
}Expand description
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
None
No signature path (chain integrity only).
Ed25519
RFC 8032 Ed25519 — deterministic per-record signatures.
Fields
signing_key: SigningKeyPrivate signing key. Never serialized; redacted in Debug.
verifying_key: VerifyingKeyVerifying key derived from the signing key. Pinned in the WAL header so post-hoc verification is self-contained.
Hybrid
Hybrid — Ed25519 + ML-DSA 65 dual-sign. Both signatures emitted per record. Verify path is AND-mode (both must pass).
Fields
ed25519_signing_key: SigningKeyEd25519 private signing key.
ed25519_verifying_key: VerifyingKeyEd25519 verifying key (pinned in WAL header verifying_key).
Implementations§
Source§impl SignatureClass
impl SignatureClass
Sourcepub fn new_ed25519_from_secret(secret: [u8; 32]) -> Self
pub fn new_ed25519_from_secret(secret: [u8; 32]) -> Self
Construct an Ed25519 class from a 32-byte secret seed. The verifying key is derived deterministically.
Sourcepub fn new_hybrid_from_secrets(
ed25519_secret: [u8; 32],
ml_dsa_seed: [u8; 32],
) -> Self
pub fn new_hybrid_from_secrets( ed25519_secret: [u8; 32], ml_dsa_seed: [u8; 32], ) -> Self
Construct a Hybrid class from independent Ed25519 and ML-DSA 65 secret seeds. Both keys derived deterministically from their respective 32-byte seeds. Use independent seeds (do not reuse the same seed for both schemes).
Sourcepub fn verifying_key_bytes(&self) -> Option<[u8; 32]>
pub fn verifying_key_bytes(&self) -> Option<[u8; 32]>
Bytes of the Ed25519 verifying (public) key, if Ed25519/Hybrid.
Returned bytes are the [u8; 32] form pinned in the WAL header
verifying_key field.
Sourcepub fn verifying_key_pqc_bytes(&self) -> Option<Vec<u8>>
pub fn verifying_key_pqc_bytes(&self) -> Option<Vec<u8>>
Bytes of the PQC verifying (public) key, if Hybrid (else None).
Returned bytes are the Vec<u8> form (1952 bytes for ML-DSA 65)
pinned in the WAL header verifying_key_pqc field.