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

Example of ECC for key generation, signing and verification using the CSSv2 (CLNS component mcuxClCss) More...

#include <mcuxClCss.h>
#include <mcuxCsslFlowProtection.h>
#include <stdbool.h>

Functions

bool ecc_keygen_sign_verify (void)
 Performs SHA2-256 hashing using mcuxClCss functions. More...
 

Variables

static uint8_t const ecc_digest [MCUXCLCSS_HASH_OUTPUT_SIZE_SHA_256]
 Pre-hashed data to be signed. More...
 
static mcuxClCss_EccByte_t ecc_public_key [MCUXCLCSS_ECC_PUBLICKEY_SIZE]
 Destination buffer to receive the public key of the mcuxClCss_EccKeyGen_Async operation. More...
 
static mcuxClCss_EccByte_t ecc_signature [MCUXCLCSS_ECC_SIGNATURE_SIZE]
 Destination buffer to receive the signature of the mcuxClCss_EccSign_Async operation. More...
 
static mcuxClCss_EccByte_t ecc_signature_r [MCUXCLCSS_ECC_SIGNATURE_R_SIZE]
 Destination buffer to receive the signature part r of the VerifyOptions operation. More...
 
static mcuxClCss_EccByte_t ecc_signature_and_public_key [MCUXCLCSS_ECC_SIGNATURE_SIZE+MCUXCLCSS_ECC_PUBLICKEY_SIZE]
 Concatenation of the ECC signature and public key, needed for the mcuxClCss_EccVerify_Async operation. More...
 

Detailed Description

Example of ECC for key generation, signing and verification using the CSSv2 (CLNS component mcuxClCss)

Function Documentation

◆ ecc_keygen_sign_verify()

bool ecc_keygen_sign_verify ( void  )

Performs SHA2-256 hashing using mcuxClCss functions.

Return values
trueThe example code completed successfully
falseThe example code failed
Examples
ecc_keygen_sign_verify.c.

Variable Documentation

◆ ecc_digest

uint8_t const ecc_digest[MCUXCLCSS_HASH_OUTPUT_SIZE_SHA_256]
static

Pre-hashed data to be signed.

Examples
ecc_keygen_sign_verify.c.

◆ ecc_public_key

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

Examples
ecc_keygen_sign_verify.c.

◆ ecc_signature

Destination buffer to receive the signature of the mcuxClCss_EccSign_Async operation.

Examples
ecc_keygen_sign_verify.c.

◆ ecc_signature_r

Destination buffer to receive the signature part r of the VerifyOptions operation.

Examples
ecc_keygen_sign_verify.c.

◆ ecc_signature_and_public_key

Concatenation of the ECC signature and public key, needed for the mcuxClCss_EccVerify_Async operation.

Examples
ecc_keygen_sign_verify.c.