Example of using function mcuxClRsa_sign to perform the RSA signature generation primitive RSASP1 (private exponentiation and NO padding) according to PKCS #1 v2.2, using a key in plain format. More...
#include <mcuxClToolchain.h>
#include <mcuxClSession.h>
#include <mcuxClExample_Session_Helper.h>
#include <mcuxCsslFlowProtection.h>
#include <mcuxClCore_FunctionIdentifiers.h>
#include <mcuxClRandom.h>
#include <mcuxClBuffer.h>
#include <mcuxClRsa.h>
#include <mcuxClCore_Examples.h>
#include <mcuxClEls.h>
#include <mcuxClExample_ELS_Helper.h>
Macros | |
#define | RSA_KEY_BIT_LENGTH |
The example uses a 1024-bit key. | |
#define | RSA_KEY_BYTE_LENGTH |
Converting the key-bitlength to bytelength. | |
Functions | |
MCUXCLEXAMPLE_FUNCTION (mcuxClRsa_sign_NoEncode_example) | |
Performs a session set-up; a call to function mcuxClRsa_sign using mode mcuxClRsa_Mode_Verify_NoVerify; a session clean-up. | |
Variables | |
static const ALIGNED uint8_t | modulus [RSA_KEY_BYTE_LENGTH] |
Example value for public RSA modulus N. | |
static const ALIGNED uint8_t | d [RSA_KEY_BYTE_LENGTH] |
Example value for private RSA exponent d. | |
static const ALIGNED uint8_t | message [RSA_KEY_BYTE_LENGTH] |
Input message. | |
static const ALIGNED uint8_t | referenceSignature [RSA_KEY_BYTE_LENGTH] |
Expected signature. | |
Example of using function mcuxClRsa_sign to perform the RSA signature generation primitive RSASP1 (private exponentiation and NO padding) according to PKCS #1 v2.2, using a key in plain format.
#define RSA_KEY_BIT_LENGTH |
The example uses a 1024-bit key.
#define RSA_KEY_BYTE_LENGTH |
Converting the key-bitlength to bytelength.
MCUXCLEXAMPLE_FUNCTION | ( | mcuxClRsa_sign_NoEncode_example | ) |
Performs a session set-up; a call to function mcuxClRsa_sign using mode mcuxClRsa_Mode_Verify_NoVerify; a session clean-up.
MCUXCLEXAMPLE_STATUS_OK | The example code completed successfully |
MCUXCLEXAMPLE_STATUS_ERROR | The example code failed |
Initialize ELS, Enable the ELS
Destroy Session and cleanup Session
Disable the ELS
|
static |
Example value for public RSA modulus N.
|
static |
Example value for private RSA exponent d.
|
static |
Input message.
|
static |
Expected signature.