Skip to main content

sign

Function sign 

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

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).

ยงErrors

SignError::Rng when the CSPRNG fails.