MCUX CLNS
MCUX Crypto Library Normal Secure
 
Loading...
Searching...
No Matches
mcuxClRsa_verify_NoVerify_example.c File Reference

Example of using function mcuxClRsa_verify to perform the RSA signature verification primitive RSAVP1 (public exponentiation and NO padding verification) according to PKCS #1 v2.2. 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 2048-bit key.
 
#define RSA_KEY_BYTE_LENGTH
 Converting the key-bitlength to bytelength.
 

Functions

 MCUXCLEXAMPLE_FUNCTION (mcuxClRsa_verify_NoVerify_example)
 Performs a session set-up; a call to function mcuxClRsa_verify 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 exponent [3]
 Example value for public RSA exponent e.
 
static const ALIGNED uint8_t signature [RSA_KEY_BYTE_LENGTH]
 Example value for RSA signature s.
 
static const ALIGNED uint8_t reference_result [RSA_KEY_BYTE_LENGTH]
 Reference output when calling mcuxClRsa_verify on signature s using the RSA public key pair (N,e) and choosing mode mcuxClRsa_Mode_Verify_NoVerify.
 

Detailed Description

Example of using function mcuxClRsa_verify to perform the RSA signature verification primitive RSAVP1 (public exponentiation and NO padding verification) according to PKCS #1 v2.2.

Macro Definition Documentation

◆ RSA_KEY_BIT_LENGTH

#define RSA_KEY_BIT_LENGTH

The example uses a 2048-bit key.

◆ RSA_KEY_BYTE_LENGTH

#define RSA_KEY_BYTE_LENGTH

Converting the key-bitlength to bytelength.

Function Documentation

◆ MCUXCLEXAMPLE_FUNCTION()

MCUXCLEXAMPLE_FUNCTION ( mcuxClRsa_verify_NoVerify_example  )

Performs a session set-up; a call to function mcuxClRsa_verify using mode mcuxClRsa_Mode_Verify_NoVerify; a session clean-up.

Return values
MCUXCLEXAMPLE_STATUS_OKThe example code completed successfully
MCUXCLEXAMPLE_STATUS_ERRORThe example code failed

Initialize ELS, Enable the ELS

Destroy Session and cleanup Session

Disable the ELS

Variable Documentation

◆ modulus

const ALIGNED uint8_t modulus[RSA_KEY_BYTE_LENGTH]
static

Example value for public RSA modulus N.

◆ exponent

const ALIGNED uint8_t exponent[3]
static

Example value for public RSA exponent e.

◆ signature

const ALIGNED uint8_t signature[RSA_KEY_BYTE_LENGTH]
static

Example value for RSA signature s.

◆ reference_result

const ALIGNED uint8_t reference_result[RSA_KEY_BYTE_LENGTH]
static

Reference output when calling mcuxClRsa_verify on signature s using the RSA public key pair (N,e) and choosing mode mcuxClRsa_Mode_Verify_NoVerify.

Examples
mcuxClRsa_verify_NoVerify_example.c.