WINC3400 Crypto API.
Copyright (c) 2016-2019 Microchip Technology Inc. and its subsidiaries.
|
sint8 | m2m_rsa_sign_gen (uint8 *pu8N, uint16 u16NSize, uint8 *pu8d, uint16 u16dSize, uint8 *pu8SignedMsgHash, uint16 u16HashLength, uint8 *pu8RsaSignature) |
| RSA Signature Generation. More...
|
|
sint8 | m2m_rsa_sign_verify (uint8 *pu8N, uint16 u16NSize, uint8 *pu8E, uint16 u16ESize, uint8 *pu8SignedMsgHash, uint16 u16HashLength, uint8 *pu8RsaSignature) |
| RSA Signature Verification. More...
|
|
sint8 | m2m_sha256_hash_finish (tstrM2mSha256Ctxt *psha256Ctxt, uint8 *pu8Sha256Digest) |
| SHA256 hash finalization. More...
|
|
sint8 | m2m_sha256_hash_init (tstrM2mSha256Ctxt *psha256Ctxt) |
| SHA256 hash initialization. More...
|
|
sint8 | m2m_sha256_hash_update (tstrM2mSha256Ctxt *psha256Ctxt, uint8 *pu8Data, uint16 u16DataLength) |
| SHA256 hash update. More...
|
|
RSA Signature Generation.
The function shall request the RSA Signature generation from the WINC Firmware for the given message. The signed message shall be
compressed to the corresponding hash algorithm before calling this function.
The hash type is identified by the given hash length. For example, if the hash length is 32 bytes, then it is SHA256.
- Parameters
-
[in] | pu8N | RSA Key modulus n. |
[in] | u16NSize | Size of the RSA modulus n in bytes. |
[in] | pu8d | RSA private exponent. |
[in] | u16dSize | Size of the RSA private exponent in bytes. |
[in] | pu8SignedMsgHash | The hash digest of the signed message. |
[in] | u16HashLength | The length of the hash digest. |
[out] | pu8RsaSignature | Pointer to a user buffer allocated by teh caller shall hold the generated signature. |
The function shall request the RSA Signature generation from the WINC Firmware for the given message. The signed message shall be
compressed to the corresponding hash algorithm before calling this function.
The hash type is identified by the given hash length. For example, if the hash length is 32 bytes, then it is SHA256.
- Parameters
-
[in] | pu8N | RSA Key modulus n. |
[in] | u16NSize | Size of the RSA modulus n in bytes. |
[in] | pu8d | RSA private exponent. |
[in] | u16dSize | Size of the RSA private exponent in bytes. |
[in] | pu8SignedMsgHash | The hash digest of the signed message. |
[in] | u16HashLength | The length of the hash digest. |
[out] | pu8RsaSignature | Pointer to a user buffer allocated by the caller shall hold the generated signature. |
- Returns
- The function returns M2M_SUCCESS for successful operation and a negative value otherwise.
RSA Signature Verification.
The function shall request the RSA Signature verification from the WINC Firmware for the given message. The signed message shall be
compressed to the corresponding hash algorithm before calling this function.
The hash type is identified by the given hash length. For example, if the hash length is 32 bytes, then it is SHA256.
- Parameters
-
[in] | pu8N | RSA Key modulus n. |
[in] | u16NSize | Size of the RSA modulus n in bytes. |
[in] | pu8E | RSA public exponent. |
[in] | u16ESize | Size of the RSA public exponent in bytes. |
[in] | pu8SignedMsgHash | The hash digest of the signed message. |
[in] | u16HashLength | The length of the hash digest. |
[out] | pu8RsaSignature | Signature value to be verified. |
The function shall request the RSA Signature verification from the WINC Firmware for the given message. The signed message shall be
compressed to the corresponding hash algorithm before calling this function.
The hash type is identified by the given hash length. For example, if the hash length is 32 bytes, then it is SHA256.
- Parameters
-
[in] | pu8N | RSA Key modulus n. |
[in] | u16NSize | Size of the RSA modulus n in bytes. |
[in] | pu8E | RSA public exponent. |
[in] | u16ESize | Size of the RSA public exponent in bytes. |
[in] | pu8SignedMsgHash | The hash digest of the signed message. |
[in] | u16HashLength | The length of the hash digest. |
[out] | pu8RsaSignature | Signature value to be verified. |
- Returns
- The function returns M2M_SUCCESS for successful operation and a negative value otherwise.