Functions | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Rsa_Verify (CRYPTOLITE_Type *base, uint16_t digestLength, uint8_t *digest, uint8_t *rsaSignature, uint16_t rsaLength, cy_stc_cryptolite_rsa_pub_key_t *key, uint8_t *processedDigest) |
RSA verification with checks for content, padding and signature format. More... | |
void | Cy_Cryptolite_Rsa_Coeff (CRYPTOLITE_Type *base, cy_stc_cryptolite_rsa_pub_key_t *key) |
This function calculates the RSA related coefficients. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Rsa_PssVerifyExt (CRYPTOLITE_Type *base, uint16_t digestLength, uint8_t *digest, uint16_t rsaLength, cy_stc_cryptolite_rsa_pub_key_t *key, uint8_t *processedDigest) |
This function is an extension to do RSA signature verification using EMSA-PSS Encoding method (RSASSA-PSS). More... | |
cy_en_cryptolite_status_t Cy_Cryptolite_Rsa_Verify | ( | CRYPTOLITE_Type * | base, |
uint16_t | digestLength, | ||
uint8_t * | digest, | ||
uint8_t * | rsaSignature, | ||
uint16_t | rsaLength, | ||
cy_stc_cryptolite_rsa_pub_key_t * | key, | ||
uint8_t * | processedDigest | ||
) |
RSA verification with checks for content, padding and signature format.
SHA digest of the message and decrypted message should be calculated before. Supports only PKCS1-v1_5 format, inside of this format supported padding using only SHA, cases with MD2 and MD5 are not supported.
The digest and decryptedSignature buffers must be 4 byte aligned
Returns the verification result
base | The pointer to the CRYPTOLITE instance. |
digestLength | SHA digest length (in bytes). |
digest | The pointer to the hash of the message or the message whose signature is to be verified. |
rsaSignature | The pointer to the encrypted RSA signature which is required to be decrypted. |
rsaLength | The length of the RSA signature (in bytes). |
key | Pointer to RSA Public key and additional coefficients information. |
processedDigest | Pointer to hold processed digest from RSA signature. |
void Cy_Cryptolite_Rsa_Coeff | ( | CRYPTOLITE_Type * | base, |
cy_stc_cryptolite_rsa_pub_key_t * | key | ||
) |
This function calculates the RSA related coefficients.
base | The pointer to the CRYPTOLITE instance. |
key | Pointer to RSA Public key and additional coefficients information. |
cy_en_cryptolite_status_t Cy_Cryptolite_Rsa_PssVerifyExt | ( | CRYPTOLITE_Type * | base, |
uint16_t | digestLength, | ||
uint8_t * | digest, | ||
uint16_t | rsaLength, | ||
cy_stc_cryptolite_rsa_pub_key_t * | key, | ||
uint8_t * | processedDigest | ||
) |
This function is an extension to do RSA signature verification using EMSA-PSS Encoding method (RSASSA-PSS).
This function requires the processed RSA signature using public key.
Reference: RFC 8017 (https://www.rfc-editor.org/rfc/rfc8017)
base | cryptolite base address. |
digestLength | SHA digest length (in bytes). |
digest | digest buffer pointer. |
rsaLength | RSA Signature length (in bytes). |
key | Pointer to Public key and RSA coefficients. |
processedDigest | Processed RSA signature using public key. |