MCUX CLNS
MCUX Crypto Library Normal Secure
mcuxClEls_Ecc.h File Reference

ELS header for elliptic curve cryptography This header exposes functions that enable using the ELS for elliptic curve cryptography. More...

#include <mcuxClConfig.h>
#include <mcuxClEls_Common.h>

Go to the source code of this file.

Data Structures

union  mcuxClEls_EccSignOption_t
 Command option bit field for #mcuxClEls_EccSign_Async Bit field to configure #mcuxClEls_EccSign_Async. More...
 
union  mcuxClEls_EccVerifyOption_t
 Command option bit field for #mcuxClEls_EccVerify_Async Bit field to configure mcuxClEls_EccVerifyOption_t. More...
 
union  mcuxClEls_EccKeyGenOption_t
 Command option bit field for #mcuxClEls_EccKeyGen_Async Bit field to configure mcuxClEls_EccKeyGenOption_t. More...
 
union  mcuxClEls_EccKeyExchOption_t
 Command option bit field for #mcuxClEls_EccKeyExchange_Async, for internal use only. More...
 

Macros

#define MCUXCLELS_ECC_VALUE_HASHED
 Set this option at mcuxClEls_EccSignOption_t.value or mcuxClEls_EccVerifyOption_t.value to specify input is the hash of the message. More...
 
#define MCUXCLELS_ECC_VALUE_NOT_HASHED
 Set this option at mcuxClEls_EccSignOption_t.value or mcuxClEls_EccVerifyOption_t.value to specify input is the plain message. More...
 
#define MCUXCLELS_ECC_VALUE_RTF
 Set this option at mcuxClEls_EccSignOption_t.value to include the RTF in the signature, only for mcuxClEls_EccSignOption_t. More...
 
#define MCUXCLELS_ECC_VALUE_NO_RTF
 Set this option at mcuxClEls_EccSignOption_t.value to not include the RTF in the signature, only for mcuxClEls_EccSignOption_t. More...
 
#define MCUXCLELS_KEYGEN_VALUE_SIGN_PUBLICKEY
 Set this option at mcuxClEls_EccKeyGenOption_t.value to sign the public key. More...
 
#define MCUXCLELS_KEYGEN_VALUE_TYPE_SIGN
 Set this option at mcuxClEls_EccKeyGenOption_t.value to specify output key will be a signing key usable by #mcuxClEls_EccSign_Async. More...
 
#define MCUXCLELS_KEYGEN_VALUE_TYPE_KEYEXCHANGE
 Set this option at mcuxClEls_EccKeyGenOption_t.value to specify output key will be a Diffie Helman key usable by #mcuxClEls_EccKeyExchange_Async. More...
 
#define MCUXCLELS_KEYGEN_VALUE_DETERMINISTIC
 Set this option at mcuxClEls_EccKeyGenOption_t.value to specify output key is deterministic. More...
 
#define MCUXCLELS_KEYGEN_VALUE_RANDOM
 Set this option at mcuxClEls_EccKeyGenOption_t.value to specify output key is random. More...
 
#define MCUXCLELS_KEYGEN_VALUE_GEN_PUB_KEY
 Set this option at mcuxClEls_EccKeyGenOption_t.value to generate a public key. More...
 
#define MCUXCLELS_KEYGEN_VALUE_NO_PUB_KEY
 Set this option at mcuxClEls_EccKeyGenOption_t.value to not generate a public key. More...
 
#define MCUXCLELS_KEYGEN_VALUE_NO_RANDOM_DATA
 Set this option at mcuxClEls_EccKeyGenOption_t.value to not use random data for signing the public key. More...
 
#define MCUXCLELS_KEYGEN_VALUE_USE_RANDOM_DATA
 Set this option at mcuxClEls_EccKeyGenOption_t.value to use random data for signing the public key. More...
 
#define MCUXCLELS_ECC_HASHED
 Set this option at mcuxClEls_EccSignOption_t.echashchl or mcuxClEls_EccVerifyOption_t.echashchl to specify input is the hash of the message. More...
 
#define MCUXCLELS_ECC_NOT_HASHED
 Set this option at mcuxClEls_EccSignOption_t.echashchl or mcuxClEls_EccVerifyOption_t.echashchl to specify input is the plain message. More...
 
#define MCUXCLELS_ECC_RTF
 Set this option at mcuxClEls_EccSignOption_t.signrtf to include the RTF in the signature. More...
 
#define MCUXCLELS_ECC_NO_RTF
 Set this option at mcuxClEls_EccSignOption_t.signrtf to not include the RTF in the signature. More...
 
#define MCUXCLELS_ECC_PUBLICKEY_SIGN_ENABLE
 Set this option at mcuxClEls_EccKeyGenOption_t.kgsign to sign the public key (signature will be concatenated to the output public key) More...
 
#define MCUXCLELS_ECC_PUBLICKEY_SIGN_DISABLE
 Set this option at mcuxClEls_EccKeyGenOption_t.kgsign to not sign the public key. More...
 
#define MCUXCLELS_ECC_OUTPUTKEY_SIGN
 Set this option at mcuxClEls_EccKeyGenOption_t.kgtypedh to specify output key will be a signing key usable by #mcuxClEls_EccSign_Async. More...
 
#define MCUXCLELS_ECC_OUTPUTKEY_KEYEXCHANGE
 Set this option at mcuxClEls_EccKeyGenOption_t.kgtypedh to specify output key will be a Diffie Helman key usable by #mcuxClEls_EccKeyExchange_Async. More...
 
#define MCUXCLELS_ECC_OUTPUTKEY_DETERMINISTIC
 Set this option at mcuxClEls_EccKeyGenOption_t.kgsrc to specify output key is deterministic. More...
 
#define MCUXCLELS_ECC_OUTPUTKEY_RANDOM
 Set this option at mcuxClEls_EccKeyGenOption_t.kgsrc to specify output key is random. More...
 
#define MCUXCLELS_ECC_GEN_PUBLIC_KEY
 Set this option at mcuxClEls_EccKeyGenOption_t.skip_pbk to generate a public key. More...
 
#define MCUXCLELS_ECC_SKIP_PUBLIC_KEY
 Set this option at mcuxClEls_EccKeyGenOption_t.skip_pbk to not generate a public key. More...
 
#define MCUXCLELS_ECC_NO_RANDOM_DATA
 Set this option at mcuxClEls_EccKeyGenOption_t.kgsign_rnd to not include user provided random data for the signature. More...
 
#define MCUXCLELS_ECC_INCLUDE_RANDOM_DATA
 Set this option at mcuxClEls_EccKeyGenOption_t.kgsign_rnd to include user provided random data for the signature. More...
 
#define MCUXCLELS_ECC_REVERSEFETCH_ENABLE
 Reverse Fetch enabled. For internal use. More...
 
#define MCUXCLELS_ECC_REVERSEFETCH_DISABLE
 Reverse Fetch disabled. For internal use. More...
 
#define MCUXCLELS_ECC_PUBLICKEY_SIZE
 Size of the public key. More...
 
#define MCUXCLELS_ECC_SIGNATURE_SIZE
 Size of the signature. More...
 
#define MCUXCLELS_ECC_SIGNATURE_R_SIZE
 Size of the signature part r. More...
 

Typedefs

typedef uint8_t mcuxClEls_EccByte_t
 Data type for ECC parameters in ELS format. More...
 

Functions

MCUXCLELS_API MCUX_CSSL_FP_PROTECTED_TYPE (mcuxClEls_Status_t) mcuxClEls_EccKeyGen_Async(mcuxClEls_EccKeyGenOption_t options
 Generates an ECC key pair on the NIST P-256 curve. More...
 

Variables

MCUXCLELS_API mcuxClEls_KeyIndex_t signingKeyIdx
 
MCUXCLELS_API mcuxClEls_KeyIndex_t mcuxClEls_KeyIndex_t privateKeyIdx
 
MCUXCLELS_API mcuxClEls_KeyIndex_t mcuxClEls_KeyIndex_t mcuxClEls_KeyProp_t generatedKeyProperties
 
MCUXCLELS_API mcuxClEls_KeyIndex_t mcuxClEls_KeyIndex_t mcuxClEls_KeyProp_t uint8_t const * pRandomData
 
MCUXCLELS_API mcuxClEls_KeyIndex_t mcuxClEls_KeyIndex_t mcuxClEls_KeyProp_t uint8_t const uint8_t * pPublicKey
 
MCUXCLELS_API uint8_t const mcuxClEls_KeyIndex_t sharedSecretIdx
 
MCUXCLELS_API uint8_t const mcuxClEls_KeyIndex_t mcuxClEls_KeyProp_t sharedSecretProperties
 
MCUXCLELS_API mcuxClEls_KeyIndex_t keyIdx
 
MCUXCLELS_API mcuxClEls_KeyIndex_t uint8_t const * pInputHash
 
MCUXCLELS_API mcuxClEls_KeyIndex_t uint8_t const uint8_t const * pInputMessage
 
MCUXCLELS_API mcuxClEls_KeyIndex_t uint8_t const uint8_t const size_t inputMessageLength
 
MCUXCLELS_API mcuxClEls_KeyIndex_t uint8_t const uint8_t const size_t uint8_t * pOutput
 
MCUXCLELS_API uint8_t const uint8_t const size_t uint8_t const * pSignatureAndPubKey
 

Detailed Description

ELS header for elliptic curve cryptography This header exposes functions that enable using the ELS for elliptic curve cryptography.

All functions operate on the NIST P-256 curve. The ECC operations supported are:

  • ECC key generation
  • ECC Diffie-Hellman key exchange
  • ECDSA signature generation/verification