Skip to main content

sign_commitment

Function sign_commitment 

Source
pub fn sign_commitment(
    secret_key: &MlDsaSecretKey,
    root: &[u8; 32],
    key_count: u32,
    sender_peer_id: &[u8; 32],
    sender_public_key: &[u8],
) -> Result<Vec<u8>, CommitmentError>
Expand description

Sign a commitment’s (root, key_count, sender_peer_id, sender_public_key) with secret_key.

The signature is over the canonical signed payload (see commitment_signed_payload) under DOMAIN_COMMITMENT.

§Errors

Returns an error if the underlying ML-DSA-65 signer fails.