Mbed OS Reference
Loading...
Searching...
No Matches
mbedtls_cipher_base_t Struct Reference

Base cipher information. More...

#include <cipher_internal.h>

Data Fields

mbedtls_cipher_id_t cipher
 Base Cipher type (e.g. More...
 
int(* ecb_func )(void *ctx, mbedtls_operation_t mode, const unsigned char *input, unsigned char *output)
 Encrypt using ECB. More...
 
int(* ctr_func )(void *ctx, size_t length, size_t *nc_off, unsigned char *nonce_counter, unsigned char *stream_block, const unsigned char *input, unsigned char *output)
 Encrypt using CTR. More...
 
int(* setkey_enc_func )(void *ctx, const unsigned char *key, unsigned int key_bitlen)
 Set key for encryption purposes. More...
 
int(* setkey_dec_func )(void *ctx, const unsigned char *key, unsigned int key_bitlen)
 Set key for decryption purposes. More...
 
void *(* ctx_alloc_func )(void)
 Allocate a new context. More...
 
void(* ctx_free_func )(void *ctx)
 Free the given context. More...
 

Detailed Description

Base cipher information.

The non-mode specific functions and values.

Definition at line 46 of file cipher_internal.h.

Field Documentation

◆ cipher

Base Cipher type (e.g.

MBEDTLS_CIPHER_ID_AES)

Definition at line 49 of file cipher_internal.h.

◆ ecb_func

int(* ecb_func) (void *ctx, mbedtls_operation_t mode, const unsigned char *input, unsigned char *output)

Encrypt using ECB.

Definition at line 52 of file cipher_internal.h.

◆ ctr_func

int(* ctr_func) (void *ctx, size_t length, size_t *nc_off, unsigned char *nonce_counter, unsigned char *stream_block, const unsigned char *input, unsigned char *output)

Encrypt using CTR.

Definition at line 79 of file cipher_internal.h.

◆ setkey_enc_func

int(* setkey_enc_func) (void *ctx, const unsigned char *key, unsigned int key_bitlen)

Set key for encryption purposes.

Definition at line 98 of file cipher_internal.h.

◆ setkey_dec_func

int(* setkey_dec_func) (void *ctx, const unsigned char *key, unsigned int key_bitlen)

Set key for decryption purposes.

Definition at line 102 of file cipher_internal.h.

◆ ctx_alloc_func

void *(* ctx_alloc_func) (void)

Allocate a new context.

Definition at line 106 of file cipher_internal.h.

◆ ctx_free_func

void(* ctx_free_func) (void *ctx)

Free the given context.

Definition at line 109 of file cipher_internal.h.