Skip to content

Function crypto::sign

zaun_community_protocol::crypto::sign · Function

pub fn sign(sk: &SecretKey, ctx: Context, message: &[u8]) -> Result<Signature, SignError>

Signs message (the canonical bytes B) with context ctx, hedged: ML-DSA draws 32 fresh bytes from the OS CSPRNG (FIPS 204 Algorithm 2 with the context prefix built here).

SignError::Rng when the CSPRNG fails.

Full rustdoc page