Example for the mcuxClFfdh component.
#include <mcuxClToolchain.h>
#include <mcuxClCore_Examples.h>
#include <mcuxClExample_Session_Helper.h>
#include <mcuxClExample_RNG_Helper.h>
#define MAX_CPUWA_SIZE (MCUXCLKEY_AGREEMENT_FFDH_WACPU_SIZE_3072)
#define MAX_PKCWA_SIZE (MCUXCLKEY_AGREEMENT_FFDH_WAPKC_SIZE_3072)
static const ALIGNED uint8_t pAlicePrivKeyData[MCUXCLFFDH_FFDHE3072_SIZE_PRIVATEKEY] = {
0x0DU, 0x3FU, 0x7DU, 0xD9U, 0xBEU, 0xE1U, 0x18U, 0x7AU, 0x07U, 0xA2U, 0xC3U, 0x9BU, 0x53U, 0xA0U, 0xE1U, 0xE3U,
0x3BU, 0x9FU, 0x0AU, 0x61U, 0x31U, 0xCFU, 0x15U, 0xA5U, 0x5EU, 0x8DU, 0x2FU, 0x2DU, 0xABU, 0xDAU, 0xE9U, 0x22U,
0x65U, 0x20U, 0xD8U, 0x19U, 0x5CU, 0x83U, 0xD5U, 0x90U, 0x8BU, 0xA2U, 0x98U, 0x9FU, 0x99U, 0x82U, 0x53U, 0x3BU,
0xD0U, 0x9BU, 0x50U, 0xF4U, 0xDAU, 0x03U, 0x72U, 0xD3U, 0x2EU, 0x01U, 0xA6U, 0x26U, 0xE3U, 0xA6U, 0x89U, 0xCDU,
0xD2U, 0xC7U, 0x9DU, 0xFCU, 0xE2U, 0x83U, 0xC4U, 0x5FU, 0xE9U, 0x04U, 0x0BU, 0x84U, 0x3AU, 0xDBU, 0x3EU, 0x1FU,
0x3FU, 0x7BU, 0x59U, 0xE4U, 0x11U, 0xE8U, 0xEEU, 0x1BU, 0x70U, 0x6EU, 0x74U, 0xA9U, 0xC2U, 0xA0U, 0x14U, 0x78U,
0x3FU, 0x40U, 0x8DU, 0xC5U, 0xBEU, 0xA4U, 0xB2U, 0x6DU, 0xA5U, 0x84U, 0xA2U, 0xFAU, 0x7EU, 0x8CU, 0xA6U, 0x91U,
0x92U, 0x60U,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xEDU, 0x88U, 0xBAU, 0x7DU, 0x31U, 0xD1U,
0x17U, 0x6CU, 0x9AU, 0xBDU, 0x6EU, 0xA5U, 0x63U, 0xE2U, 0x2DU, 0x46U, 0x7FU, 0x02U, 0x25U, 0xA7U, 0x43U, 0xEAU,
0x21U, 0x17U, 0xCDU, 0x4BU, 0x72U, 0x36U, 0xFDU, 0x1EU, 0xA2U, 0xA4U, 0xD0U, 0x52U, 0x79U, 0xDDU, 0x8FU, 0x56U,
0xCFU, 0x5DU, 0x8FU, 0xD1U, 0xDDU, 0x29U, 0x76U, 0xAAU, 0x0CU, 0x23U, 0x80U, 0xB7U, 0x2CU, 0x1FU, 0x7BU, 0xB9U
};
MCUXCLEXAMPLE_FUNCTION(mcuxClFfdh_KeyAgreement_ffdhe3072_example)
{
mcuxClSession_Descriptor_t sessionDesc;
MCUXCLEXAMPLE_ALLOCATE_AND_INITIALIZE_SESSION(session,
MAX_CPUWA_SIZE,
MAX_PKCWA_SIZE);
uint32_t alicePrivKeyDesc[MCUXCLKEY_DESCRIPTOR_SIZE_IN_WORDS];
MCUX_CSSL_ANALYSIS_START_PATTERN_REINTERPRET_MEMORY_OF_OPAQUE_TYPES()
MCUX_CSSL_ANALYSIS_STOP_PATTERN_REINTERPRET_MEMORY_OF_OPAQUE_TYPES()
session,
alicePrivKey,
pAlicePrivKeyData,
MCUXCLFFDH_FFDHE3072_SIZE_PRIVATEKEY));
{
return MCUXCLEXAMPLE_STATUS_ERROR;
}
uint32_t alicePubKeyDesc[MCUXCLKEY_DESCRIPTOR_SIZE_IN_WORDS];
MCUX_CSSL_ANALYSIS_START_PATTERN_REINTERPRET_MEMORY_OF_OPAQUE_TYPES()
MCUX_CSSL_ANALYSIS_STOP_PATTERN_REINTERPRET_MEMORY_OF_OPAQUE_TYPES()
session,
alicePubKey,
pAlicePubKeyData,
MCUXCLFFDH_FFDHE3072_SIZE_PUBLICKEY));
{
return MCUXCLEXAMPLE_STATUS_ERROR;
}
uint32_t bobPrivKeyDesc[MCUXCLKEY_DESCRIPTOR_SIZE_IN_WORDS];
MCUX_CSSL_ANALYSIS_START_PATTERN_REINTERPRET_MEMORY_OF_OPAQUE_TYPES()
MCUX_CSSL_ANALYSIS_STOP_PATTERN_REINTERPRET_MEMORY_OF_OPAQUE_TYPES()
session,
bobPrivKey,
pBobPrivKeyData,
MCUXCLFFDH_FFDHE3072_SIZE_PRIVATEKEY));
{
return MCUXCLEXAMPLE_STATUS_ERROR;
}
uint32_t bobPubKeyDesc[MCUXCLKEY_DESCRIPTOR_SIZE_IN_WORDS];
MCUX_CSSL_ANALYSIS_START_PATTERN_REINTERPRET_MEMORY_OF_OPAQUE_TYPES()
MCUX_CSSL_ANALYSIS_STOP_PATTERN_REINTERPRET_MEMORY_OF_OPAQUE_TYPES()
session,
bobPubKey,
pBobPubKeyData,
MCUXCLFFDH_FFDHE3072_SIZE_PUBLICKEY));
{
return MCUXCLEXAMPLE_STATUS_ERROR;
}
MCUXCLEXAMPLE_INITIALIZE_PRNG(session);
uint8_t aliceSharedSecret[MCUXCLFFDH_FFDHE3072_SIZE_SHAREDSECRET];
uint32_t aliceSharedSecretSize = 0u;
session,
alicePrivKey,
bobPubKey,
MCUX_CSSL_ANALYSIS_START_SUPPRESS_NULL_POINTER_CONSTANT("NULL is used in code")
NULL,
MCUX_CSSL_ANALYSIS_STOP_SUPPRESS_NULL_POINTER_CONSTANT()
0U,
aliceSharedSecret,
&aliceSharedSecretSize));
{
return MCUXCLEXAMPLE_STATUS_ERROR;
}
uint8_t bobSharedSecret[MCUXCLFFDH_FFDHE3072_SIZE_SHAREDSECRET];
uint32_t bobSharedSecretSize = 0u;
session,
bobPrivKey,
alicePubKey,
MCUX_CSSL_ANALYSIS_START_SUPPRESS_NULL_POINTER_CONSTANT("NULL is used in code")
NULL,
MCUX_CSSL_ANALYSIS_STOP_SUPPRESS_NULL_POINTER_CONSTANT()
0U,
bobSharedSecret,
&bobSharedSecretSize));
{
return MCUXCLEXAMPLE_STATUS_ERROR;
}
if(!mcuxClCore_assertEqual(bobSharedSecret, aliceSharedSecret, MCUXCLFFDH_FFDHE3072_SIZE_SHAREDSECRET))
{
return MCUXCLEXAMPLE_STATUS_ERROR;
}
if(!mcuxClExample_Session_Clean(session))
{
return MCUXCLEXAMPLE_STATUS_ERROR;
}
return MCUXCLEXAMPLE_STATUS_OK;
}
Definition of function identifiers for the flow protection mechanism.
Top level header of mcuxClFfdh component.
Top-level include file for the mcuxClKey component.
Top level header of mcuxClRandom component.
Top-level include file for the mcuxClSession component.
Provides the API for the CSSL flow protection mechanism.
static const mcuxClKey_Type_t mcuxClKey_Type_Ffdh_ffdhe3072_Pub
Key type pointer for public FFDHE3072 keys.
Definition mcuxClFfdh_KeyTypes.h:85
static const mcuxClKey_Type_t mcuxClKey_Type_Ffdh_ffdhe3072_Priv
Key type pointer for private FFDHE3072 keys.
Definition mcuxClFfdh_KeyTypes.h:99
static mcuxClKey_Agreement_t mcuxClKey_Agreement_FFDH
FFDH Key agreement algorithm.
Definition mcuxClFfdh_KeyTypes.h:222
#define MCUXCLKEY_STATUS_OK
Key operation successful.
Definition mcuxClKey_Constants.h:40
mcuxClKey_Status_t mcuxClKey_init(mcuxClSession_Handle_t session, mcuxClKey_Handle_t key, mcuxClKey_Type_t type, const uint8_t *pKeyData, uint32_t keyDataLength)
Initializes a key handle.
mcuxClKey_Status_t mcuxClKey_agreement(mcuxClSession_Handle_t session, mcuxClKey_Agreement_t agreement, mcuxClKey_Handle_t key, mcuxClKey_Handle_t otherKey, mcuxClKey_Agreement_AdditionalInput_t additionalInputs[], uint32_t numberOfInputs, uint8_t *pOut, uint32_t *const pOutLength)
Key agreement function.
mcuxClKey_Descriptor_t *const mcuxClKey_Handle_t
Key handle type.
Definition mcuxClKey_Types.h:91
mcuxClSession_Descriptor_t *const mcuxClSession_Handle_t
Type for mcuxClSession Handle.
Definition mcuxClSession_Types.h:98
#define MCUX_CSSL_FP_FUNCTION_CALL_BEGIN(...)
Call a flow protected function and check the protection token.
Definition mcuxCsslFlowProtection.h:623
#define MCUX_CSSL_FP_FUNCTION_CALLED(...)
Expectation of a called function.
Definition mcuxCsslFlowProtection.h:777
#define MCUX_CSSL_FP_FUNCTION_CALL_END(...)
End a function call section started by MCUX_CSSL_FP_FUNCTION_CALL_BEGIN.
Definition mcuxCsslFlowProtection.h:658