CryptoAuthLib v3.7.6
Microchip CryptoAuthentication Library
 
Loading...
Searching...
No Matches
mbedTLS Wrapper methods (atca_mbedtls_)

These methods are for interfacing cryptoauthlib to mbedtls. More...

mbedtls directory - Purpose

This directory contains the interfacing and wrapper functions to integrate mbedtls as the software crypto library as well as provide eliptic curve cryptography (ECC) hardware acceleration.

Data Structures

struct  atca_mbedtls_eckey_s
 

Typedefs

typedef struct atca_mbedtls_eckey_s atca_mbedtls_eckey_t
 

Functions

int atca_mbedtls_ecdsa_sign (const mbedtls_mpi *d, mbedtls_mpi *r, mbedtls_mpi *s, const unsigned char *buf, size_t buf_len)
 
int atca_mbedtls_pk_init_ext (ATCADevice device, mbedtls_pk_context *pkey, const uint16_t slotid)
 Initializes an mbedtls pk context for use with EC operations.
 
int atca_mbedtls_pk_init (mbedtls_pk_context *pkey, const uint16_t slotid)
 Initializes an mbedtls pk context for use with EC operations.
 
int atca_mbedtls_cert_add (struct mbedtls_x509_crt *cert, const struct atcacert_def_s *cert_def)
 
int atca_mbedtls_ecdh_slot_cb (void)
 ECDH Callback to obtain the "slot" used in ECDH operations from the application.
 
int atca_mbedtls_ecdh_ioprot_cb (uint8_t secret[32])
 ECDH Callback to obtain the IO Protection secret from the application.
 
struct mbedtls_x509_crt * atcac_mbedtls_new (void)
 
struct atcac_x509_ctxatcac_x509_ctx_new (void)
 
void atcac_x509_ctx_free (struct atcac_x509_ctx *ctx)
 

Detailed Description

These methods are for interfacing cryptoauthlib to mbedtls.

Typedef Documentation

◆ atca_mbedtls_eckey_t

Structure to hold metadata - is written into the mbedtls pk structure as the private key bignum value 'd' which otherwise would be unused. Bignums can be any arbitrary length of bytes

Function Documentation

◆ atca_mbedtls_ecdh_ioprot_cb()

int atca_mbedtls_ecdh_ioprot_cb ( uint8_t  secret[32])

ECDH Callback to obtain the IO Protection secret from the application.

Parameters
[out]secret32 byte array used to store the secret
Returns
ATCA_SUCCESS on success, otherwise an error code.

◆ atca_mbedtls_ecdh_slot_cb()

int atca_mbedtls_ecdh_slot_cb ( void  )

ECDH Callback to obtain the "slot" used in ECDH operations from the application.

Returns
Slot Number

◆ atca_mbedtls_pk_init()

int atca_mbedtls_pk_init ( mbedtls_pk_context *  pkey,
const uint16_t  slotid 
)

Initializes an mbedtls pk context for use with EC operations.

Parameters
[in,out]pkeyptr to space to receive version string
[in]slotidAssociated with this key
Returns
0 on success, otherwise an error code.

◆ atca_mbedtls_pk_init_ext()

int atca_mbedtls_pk_init_ext ( ATCADevice  device,
mbedtls_pk_context *  pkey,
const uint16_t  slotid 
)

Initializes an mbedtls pk context for use with EC operations.

Parameters
[in,out]pkeyptr to space to receive version string
[in]slotidAssociated with this key
Returns
0 on success, otherwise an error code.