module PKCS1:sig..end
Keys must have a minimum of 11 + len(message) bytes.
val sig_encode : ?mask:Nocrypto.Rsa.mask -> key:Nocrypto.Rsa.priv -> Cstruct.t -> Cstruct.tsig_encode mask key message is the PKCS1-padded (type 1) message
signed by the key. Note that this operation performs only the padding
and RSA transformation steps of the PKCS 1.5 signature.Insufficient_key (see Insufficient_key)val sig_decode : key:Nocrypto.Rsa.pub -> Cstruct.t -> Cstruct.t optionsig_decode key signature is either Some message if the signature
was produced with the given key as per sign, or Noneval encrypt : ?g:Nocrypto.Rng.g -> key:Nocrypto.Rsa.pub -> Cstruct.t -> Cstruct.tencrypt g key message is a PKCS1-padded (type 2) and encrypted
message.Insufficient_key (see Insufficient_key)val decrypt : ?mask:Nocrypto.Rsa.mask ->
key:Nocrypto.Rsa.priv -> Cstruct.t -> Cstruct.t optiondecrypt mask key ciphertext is Some message if the ciphertext was
produced by the corresponding encrypt operation, or None
otherwise.