MCUX CLNS
MCUX Crypto Library Normal Secure
mcuxClEls_Tls_Master_Key_Session_Keys_example.c File Reference

TLS key derivation example. 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>

Functions

 MCUXCLEXAMPLE_FUNCTION (mcuxClEls_Tls_Master_Key_Session_Keys_example)
 Performs key derivation for TLS protocol. More...
 

Variables

static mcuxClEls_EccByte_t ecc_public_key_client [MCUXCLELS_ECC_PUBLICKEY_SIZE]
 Destination buffer to receive the public key of the mcuxClEls_EccKeyGen_Async operation. More...
 
static mcuxClEls_EccByte_t ecc_public_key_server [MCUXCLELS_ECC_PUBLICKEY_SIZE]
 
static uint8_t derivation_data [MCUXCLELS_TLS_DERIVATIONDATA_SIZE]
 
static uint8_t client_random [MCUXCLELS_TLS_RANDOM_SIZE]
 
static uint8_t server_random [MCUXCLELS_TLS_RANDOM_SIZE]
 
static uint8_t master_key_string []
 
static uint8_t key_expansion_string []
 

Detailed Description

TLS key derivation example.

Function Documentation

◆ MCUXCLEXAMPLE_FUNCTION()

MCUXCLEXAMPLE_FUNCTION ( mcuxClEls_Tls_Master_Key_Session_Keys_example  )

Performs key derivation for TLS protocol.

Return values
MCUXCLEXAMPLE_STATUS_OKThe example code completed successfully
MCUXCLEXAMPLE_STATUS_ERRORThe example code failed

Initialize ELS, Enable the ELS

< [in] The TLS derivation data

< [in] Desired key properties. Only mcuxClEls_KeyProp_t::upprot_priv and mcuxClEls_KeyProp_t::upprot_sec are used, the rest are ignored.

< [in] The index of the TLS pre-master key, which is overwritten with the master key

< [in] The TLS derivation data

< [in] Desired key properties. Only mcuxClEls_KeyProp_t::upprot_priv and mcuxClEls_KeyProp_t::upprot_sec are used, the rest are ignored.

< [in] The index of the TLS master key, which is overwritten with one of the session keys.

deleted keyIdxPrivClient keySlot

deleted keyIdxPrivServer keySlot

deleted i keySlot

Examples
mcuxClEls_Tls_Master_Key_Session_Keys_example.c.

Variable Documentation

◆ ecc_public_key_client

mcuxClEls_EccByte_t ecc_public_key_client[MCUXCLELS_ECC_PUBLICKEY_SIZE]
static

Destination buffer to receive the public key of the mcuxClEls_EccKeyGen_Async operation.

Examples
mcuxClEls_Tls_Master_Key_Session_Keys_example.c.