CryptoAuthLib v3.7.9
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 *data, mbedtls_mpi *r, mbedtls_mpi *s, const unsigned char *msg, size_t msg_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_random_ctx (void *ctx, unsigned char *data, size_t data_size)
 mbedTLS f_rng callback interface to fill a buffer with random bytes
 
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)
 

Variables

const mbedtls_pk_info_t atca_mbedtls_eckey_info
 

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

◆ atca_mbedtls_random_ctx()

int atca_mbedtls_random_ctx ( void *  ctx,
unsigned char *  data,
size_t  data_size 
)

mbedTLS f_rng callback interface to fill a buffer with random bytes

Returns
ATCA_SUCCESS on success, otherwise an error code.