STCRYPTOLIB_CHACHAPOLY_ALT

MBEDTLS IMPLEMENTATION STCRYPTOLIB CHACHAPOLY ALT FUNCTIONS

group MBEDTLS_IMPLEMENTATION_STCRYPTOLIB_CHACHAPOLY_ALT_FUNCTIONS

Public API functions for STCRYPTOLIB CHACHAPOLY alternate implementation.

This file implements ST ChachaPoly services based on API from mbed TLS

Functions

void mbedtls_chachapoly_init ( mbedtls_chachapoly_context * ctx )

Initialize a context.

int mbedtls_chachapoly_setkey ( mbedtls_chachapoly_context * ctx , const unsigned char key [ 32 ] )
int mbedtls_chachapoly_starts ( mbedtls_chachapoly_context * ctx , const unsigned char nonce [ 12 ] , mbedtls_chachapoly_mode_t mode )
int mbedtls_chachapoly_update_aad ( mbedtls_chachapoly_context * ctx , const unsigned char * aad , size_t aad_len )
int mbedtls_chachapoly_update ( mbedtls_chachapoly_context * ctx , size_t len , const unsigned char * input , unsigned char * output )
int mbedtls_chachapoly_finish ( mbedtls_chachapoly_context * ctx , unsigned char mac [ 16 ] )
int mbedtls_chachapoly_encrypt_and_tag ( mbedtls_chachapoly_context * ctx , size_t length , const unsigned char nonce [ 12 ] , const unsigned char * aad , size_t aad_len , const unsigned char * input , unsigned char * output , unsigned char tag [ 16 ] )
int mbedtls_chachapoly_auth_decrypt ( mbedtls_chachapoly_context * ctx , size_t length , const unsigned char nonce [ 12 ] , const unsigned char * aad , size_t aad_len , const unsigned char tag [ 16 ] , const unsigned char * input , unsigned char * output )
void mbedtls_chachapoly_free ( mbedtls_chachapoly_context * ctx )

MBEDTLS IMPLEMENTATION STCRYPTOLIB CHACHAPOLY ALT TYPES

group MBEDTLS_IMPLEMENTATION_STCRYPTOLIB_CHACHAPOLY_ALT_TYPES

ChaChaPoly context structure definitions for STCRYPTOLIB.

struct mbedtls_chachapoly_context
#include <stcryptolib_chachapoly_alt.h>

chachapoly context structure

Public Members

uint8_t aes_key [ 32 ]

Encryption/Decryption key

cmox_cipher_handle_t * cipher_ctx

Cipher ctx

cmox_chachapoly_handle_t cha_ctx

Chachapoly ctx

int mode

Mode : encrypt or decrypt