Example of PuK import from a DER-encoded certificate using the ELS (CLNS component mcuxClEls) More...
#include <mcuxClEls.h>
#include <mcuxClMemory.h>
#include <mcuxCsslFlowProtection.h>
#include <mcuxClCore_FunctionIdentifiers.h>
#include <mcuxClCore_Examples.h>
#include <mcuxClExample_ELS_Helper.h>
#include <mcuxClExample_ELS_Key_Helper.h>
#include <mcuxClExample_RFC3394_Helper.h>
Macros | |
#define | SHA256_BLOCK_SIZE |
Functions | |
static mcuxClEls_EccByte_t ecc_signature [MCUXCLELS_ECC_SIGNATURE_SIZE] | __attribute__ ((aligned(4))) |
Output buffer for the signature of the mcuxClEls_EccSign_Async operation. More... | |
MCUXCLEXAMPLE_FUNCTION (mcuxClEls_Key_Import_Puk_DER_example) | |
Example for PuK import from DER-encoded certificate using mcuxClEls functions. More... | |
Variables | |
static uint8_t const | der_certificate [450U] |
Key wrapping key. More... | |
static size_t | der_certificate_offset_pbk |
Offset of the public key that we want to import within the certificate. More... | |
static size_t | der_certificate_len_without_signature |
Total length of the certificate without signature. More... | |
static uint8_t | key_rfc3394 [MCUXCLELS_RFC3394_CONTAINER_SIZE_P256] |
Output buffer for the wrapped ECC public root key. More... | |
static uint8_t | der_certificate_import [sizeof(der_certificate)+SHA256_BLOCK_SIZE] |
Output buffer for the certificate and padding. More... | |
static mcuxClEls_EccByte_t | ecc_root_public_key [MCUXCLELS_ECC_PUBLICKEY_SIZE] |
Output buffers for the public key of the mcuxClEls_EccKeyGen_Async operation. More... | |
static mcuxClEls_EccByte_t | ecc_root_public_key_switched [MCUXCLELS_ECC_PUBLICKEY_SIZE] |
Example of PuK import from a DER-encoded certificate using the ELS (CLNS component mcuxClEls)
|
static |
Output buffer for the signature of the mcuxClEls_EccSign_Async operation.
Output buffer for the signature part r of the mcuxClEls_KeyImportPuk_Async operation.
Must be word-aligned!
MCUXCLEXAMPLE_FUNCTION | ( | mcuxClEls_Key_Import_Puk_DER_example | ) |
Example for PuK import from DER-encoded certificate using mcuxClEls functions.
MCUXCLEXAMPLE_STATUS_OK | The example code completed successfully |
MCUXCLEXAMPLE_STATUS_ERROR | The example code failed |
Initialize ELS, Enable the ELS
function that performs RFC3394 key wrapping
deleted key_idx_helper_key keySlot
deleted key_idx_ecc_root_private_key keySlot
deleted key_idx_ecc_root_public_key keySlot
deleted key_idx_ecc_import_public_key keySlot
Disable the ELS
|
static |
|
static |
Offset of the public key that we want to import within the certificate.
|
static |
Total length of the certificate without signature.
|
static |
Output buffer for the wrapped ECC public root key.
|
static |
Output buffer for the certificate and padding.
|
static |
Output buffers for the public key of the mcuxClEls_EccKeyGen_Async operation.