CryptoAuthLib
Microchip CryptoAuthentication Library
mbedTLS Wrapper methods (atca_mbedtls_)

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

Functions

int atca_mbedtls_pk_init (struct mbedtls_pk_context *pkey, const uint16_t slotid)
 Initializes an mbedtls pk context for use with EC operations. More...
 
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. More...
 
int atca_mbedtls_ecdh_ioprot_cb (uint8_t secret[32])
 ECDH Callback to obtain the IO Protection secret from the application. More...
 

Detailed Description

These methods are for interfacing cryptoauthlib to mbedtls.

Function Documentation

◆ atca_mbedtls_cert_add()

int atca_mbedtls_cert_add ( struct mbedtls_x509_crt *  cert,
const struct atcacert_def_s cert_def 
)

◆ 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.