Skip to main content

pss_sign_with_salt

Function pss_sign_with_salt 

Source
pub fn pss_sign_with_salt<H: Hasher>(
    sk: &RsaSecretKey,
    m_hash: &[u8],
    salt: &[u8],
) -> Option<Vec<u8>>
Expand description

RSASSA-PSS sign with a caller-supplied salt (RFC 8017 §8.1.1).

Primarily useful for tests (pinning against external vectors that report a specific salt) and for reproducible signatures in deterministic / audit contexts. Production callers should use pss_sign with a fresh random salt.

m_hash is the precomputed H(message) digest. H is the hash function used for both the message digest and the internal MGF1 / H(M') – PSS requires the same hash throughout.