Types Creation

This commit is contained in:
Alex Emmet 2026-06-21 22:57:50 +02:00
commit 8337fa3d8f
22 changed files with 1141 additions and 202 deletions

View file

@ -198,7 +198,6 @@ pub fn decrypt_multi(
Err(CryptoError::DecryptionFailed)
}
/// Verify an Ed25519 signature against a public key.
#[cfg(feature = "ed25519-dalek")]
pub fn verify_ed25519_sig(
public_key: &crate::keypair::SignaturePublicKey,
@ -208,7 +207,6 @@ pub fn verify_ed25519_sig(
crate::sign::verify_ed25519(public_key, msg, signature)
}
/// Verify an ML-DSA signature against a public key.
#[cfg(feature = "ml-dsa")]
pub fn verify_ml_dsa_sig(
public_key: &crate::keypair::SignaturePqPublicKey,

View file

@ -351,10 +351,12 @@ impl Keyring {
}
}
/// Serialize the full keyring (all six keys) into a byte vector.
///
/// Format: for each key, a 2-byte length prefix followed by the key bytes,
/// in the order: kem_pk, kem_sk, sig_pq_pk, sig_pq_sk, sig_cl_pk, sig_cl_sk.
/*
* Serialize the full keyring (all six keys) into a byte vector.
*
* Format: for each key, a 2-byte length prefix followed by the key bytes,
* in the order: kem_pk, kem_sk, sig_pq_pk, sig_pq_sk, sig_cl_pk, sig_cl_sk.
*/
pub fn to_bytes(&self) -> Vec<u8> {
let fields: &[&[u8]] = &[
self.kem_public_key.as_bytes(),