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

: Example OSCCA SM2 key agreement More...

#include <mcuxClSession.h>
#include <mcuxClRandom.h>
#include <mcuxClRandomModes.h>
#include <mcuxClKey.h>
#include <mcuxClOsccaSm2.h>
#include <mcuxClOsccaSm3.h>
#include <mcuxClOsccaSm2_CommonParams.h>
#include <mcuxCsslFlowProtection.h>
#include <mcuxClOscca_FunctionIdentifiers.h>
#include <mcuxClExample_Session_Helper.h>
#include <mcuxClCore_Examples.h>
#include <mcuxClExample_ELS_Helper.h>
#include <mcuxClMemory.h>
#include <mcuxClCore_FunctionIdentifiers.h>

Macros

#define SIZE_WA_CPU
 Maximum of the CPU workarea.
 
#define SIZE_WA_PKC
 Maximum of the pkc workarea.
 

Functions

 MCUXCLEXAMPLE_FUNCTION (mcuxClOsccaSm2_Keyagreement_example)
 : Example OSCCA SM2 key agreement
 

Variables

static const uint8_t Z_A []
 
static const uint8_t Z_B []
 
static const uint8_t rand_A []
 
static const uint8_t pri_key_A []
 
static const uint8_t ephemeral_point_A []
 
static const uint8_t ephemeral_point_B []
 
static const uint8_t public_key_B []
 
static const uint8_t expected_common_secret []
 
static const uint8_t S1 []
 
static const uint8_t SA []
 

Detailed Description

: Example OSCCA SM2 key agreement

Macro Definition Documentation

◆ SIZE_WA_CPU

#define SIZE_WA_CPU

Maximum of the CPU workarea.

◆ SIZE_WA_PKC

#define SIZE_WA_PKC

Maximum of the pkc workarea.

Function Documentation

◆ MCUXCLEXAMPLE_FUNCTION()

MCUXCLEXAMPLE_FUNCTION ( mcuxClOsccaSm2_Keyagreement_example  )

: Example OSCCA SM2 key agreement

Returns
  • true if selected algorithm processed successfully
  • false if selected algorithm caused an error
Precondition
none
Postcondition
the mcuxClOsccaSm2_Keyagreement_example function will be triggered
Note
none
Warning
none

Initialize ELS, Enable the ELS

Destroy Session and cleanup Session

Disable the ELS