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. | |
Example for the mcuxCRsa component.
| #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.
|
static |
Example value for public RSA modulus N.
Example value for public RSA exponent e.
Example value for private RSA exponent d.
| MCUXCLEXAMPLE_FUNCTION | ( | mcuxClRsa_Cipher_Crypt_RSAES_OAEP_example | ) |
Initialize ELS, Enable the ELS
Disable the ELS
|
static |
Example plaintext to be encrypted.