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

Example for the mcuxCRsa component. More...

#include <mcuxClSession.h>
#include <mcuxClKey.h>
#include <mcuxClRandom.h>
#include <mcuxClRandomModes.h>
#include <mcuxClRsa.h>
#include <mcuxClHash.h>
#include <mcuxClHashModes.h>
#include <mcuxClCipher.h>
#include <mcuxClBuffer.h>
#include <mcuxClCore_Examples.h>
#include <mcuxClCore_Macros.h>
#include <mcuxClExample_Session_Helper.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.
 
#define RSA_PUBLIC_EXP_BYTE_LENGTH
 The public exponent has a length of three bytes.
 
#define RSA_OAEP_LABEL_LENGTH
 The label length is set to 0 in this example.
 
#define INPUT_MESSAGE_LENGTH
 Arbitrary size of the message to be encrypted/decrypted.
 
#define CPU_WA_BUFFER_SIZE
 
#define PKC_WA_BUFFER_SIZE
 

Functions

static const uint8_t modulus[RSA_KEY_BYTE_LENGTH__attribute__ ((aligned(4)))
 Example value for public RSA modulus N.
 
 MCUXCLEXAMPLE_FUNCTION (mcuxClRsa_Cipher_Crypt_RSAES_OAEP_example)
 

Variables

static const uint8_t plainData [INPUT_MESSAGE_LENGTH]
 Example plaintext to be encrypted.
 

Detailed Description

Example for the mcuxCRsa component.

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.

◆ RSA_PUBLIC_EXP_BYTE_LENGTH

#define RSA_PUBLIC_EXP_BYTE_LENGTH

The public exponent has a length of three bytes.

◆ RSA_OAEP_LABEL_LENGTH

#define RSA_OAEP_LABEL_LENGTH

The label length is set to 0 in this example.

Examples
mcuxClRsa_Cipher_Crypt_RSAES_OAEP_1000b_example.c, and mcuxClRsa_Cipher_Crypt_RSAES_OAEP_example.c.

◆ INPUT_MESSAGE_LENGTH

#define INPUT_MESSAGE_LENGTH

Function Documentation

◆ __attribute__()

static const uint8_t modulus[RSA_KEY_BYTE_LENGTH] __attribute__ ( (aligned(4))  )
static

Example value for public RSA modulus N.

Example value for public RSA exponent e.

Example value for private RSA exponent d.

◆ MCUXCLEXAMPLE_FUNCTION()

MCUXCLEXAMPLE_FUNCTION ( mcuxClRsa_Cipher_Crypt_RSAES_OAEP_example  )

Initialize ELS, Enable the ELS

Disable the ELS

Variable Documentation

◆ plainData