Function ring::signature::primitive::verify_rsa[][src]

pub fn verify_rsa(
    params: &RSAParameters,
    (n, e): (Input, Input),
    msg: Input,
    signature: Input
) -> Result<(), Unspecified>

Lower-level API for the verification of RSA signatures.

When the public key is in DER-encoded PKCS#1 ASN.1 format, it is recommended to use ring::signature::verify() with ring::signature::RSA_PKCS1_*, because ring::signature::verify() will handle the parsing in that case. Otherwise, this function can be used to pass in the raw bytes for the public key components as untrusted::Input arguments.

params determine what algorithm parameters (padding, digest algorithm, key length range, etc.) are used in the verification. msg is the message and signature is the signature.

n is the public key modulus and e is the public key exponent. Both are interpreted as unsigned big-endian encoded values. Both must be positive and neither may have any leading zeros.