FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/wolfcrypt/src/rsa.c
/* Verify the message signed with RSA-PSS.
 * The input buffer is reused for the output buffer.
 *
 * in       Buffer holding encrypted data.
 * inLen    Length of data in buffer.
 * out      Pointer to address containing the PSS data.
 * hash     Hash algorithm.
 * mgf      Mask generation function.
 * key      Public RSA key.
 * saltLen  Length of salt used. RSA_PSS_SALT_LEN_DEFAULT (-1) indicates salt
 *          length is the same as the hash length. RSA_PSS_SALT_LEN_DISCOVER
 *          indicates salt length is determined from the data.
 * returns the length of the PSS data on success and negative indicates failure.
 */
Verify the message signed with RSA-PSS.
The input buffer is reused for the output buffer.

in       Buffer holding encrypted data.
inLen    Length of data in buffer.
out      Pointer to address containing the PSS data.
hash     Hash algorithm.
mgf      Mask generation function.
key      Public RSA key.
saltLen  Length of salt used. RSA_PSS_SALT_LEN_DEFAULT (-1) indicates salt
length is the same as the hash length. RSA_PSS_SALT_LEN_DISCOVER
indicates salt length is determined from the data.
returns the length of the PSS data on success and negative indicates failure.
Verify the message signed with RSA - PSS . The input buffer is reused for the output buffer . in Buffer holding encrypted data . inLen Length of data in buffer . out Pointer to address containing the PSS data . hash Hash algorithm . mgf Mask generation function . key Public RSA key . saltLen Length of salt used . RSA_PSS_SALT_LEN_DEFAULT ( - 1 ) indicates salt length is the same as the hash length . RSA_PSS_SALT_LEN_DISCOVER indicates salt length is determined from the data . returns the length of the PSS data on success and negative indicates failure .
int wc_RsaPSS_VerifyInline_ex(byte* in, word32 inLen, byte** out,
                              enum wc_HashType hash, int mgf, int saltLen,
                              RsaKey* key)
{
    WC_RNG* rng;
#ifdef WC_RSA_BLINDING
    rng = key->rng;
#else
    rng = NULL;
#endif
    return RsaPrivateDecryptEx(in, inLen, in, inLen, out, key,
        RSA_PUBLIC_DECRYPT, RSA_BLOCK_TYPE_1, WC_RSA_PSS_PAD,
        hash, mgf, NULL, 0, saltLen, rng);
}
int wc_RsaPSS_VerifyInline_ex ( byte * in , word32 inLen , byte * * out , enum wc_HashType hash , int mgf , int saltLen , RsaKey * key ) { WC_RNG * rng ; #ifdef WC_RSA_BLINDING rng = key -> rng ; #else rng = NULL ; #endif return RsaPrivateDecryptEx ( in , inLen , in , inLen , out , key , RSA_PUBLIC_DECRYPT , RSA_BLOCK_TYPE_1 , WC_RSA_PSS_PAD , hash , mgf , NULL , 0 , saltLen , rng ) ; }
Verify the message signed with RSA-PSS.
Verify the message signed with RSA - PSS .