Module Rsa.PSS

Parameters

module H : Hash.S

Signature

val sign : ?⁠g:Rng.g -> ?⁠slen:int -> key:priv -> Cstruct.t -> Cstruct.t

sign ~g ~slen ~key message the p PSS-padded digest of message, signed with the key. slen is the optional seed length and default to the size of the underlying hash function.

raises Insufficient_key

(see Insufficient_key)

val verify : ?⁠slen:int -> key:pub -> signature:Cstruct.t -> Cstruct.t -> bool

verify ~slen ~key ~signature message checks whether signature is a valid PSS signature of the message under the given key.