Method Crypto.RSA.PSSState()->pkcs_sign()


Method pkcs_sign

local string(8bit) pkcs_sign(string(8bit) message, .Hash h, string(8bit)|int(0..)|void salt)

Description

Signs the message with a RSASSA-PSS signature using hash algorithm h.

Parameter message

Message to sign.

Parameter h

Hash algorithm to use.

Parameter salt

Either of

int(0..)

Use a random salt of this length for the signature.

zero|void

Use a random salt of length salt_size().

string(8bit)

Use this specific salt.

Returns

Returns the signature on success, and 0 (zero) on failure (typically that the hash + salt combo is too large for the RSA modulo).

See also

pkcs_verify(), salt_size(), RFC 3447 section 8.1.1