Example program to test AES-GCM functionality. Used for a workshop

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

cipher_context_t Struct Reference

cipher_context_t Struct Reference

Generic cipher context. More...

#include <cipher.h>

Data Fields

const cipher_info_tcipher_info
 Information about the associated cipher.
int key_length
 Key length to use.
operation_t operation
 Operation that the context's key has been initialised for.
void(* add_padding )(unsigned char *output, size_t olen, size_t data_len)
 Padding functions to use, if relevant for cipher mode.
unsigned char unprocessed_data [POLARSSL_MAX_BLOCK_LENGTH]
 Buffer for data that hasn't been encrypted yet.
size_t unprocessed_len
 Number of bytes that still need processing.
unsigned char iv [POLARSSL_MAX_IV_LENGTH]
 Current IV or NONCE_COUNTER for CTR-mode.
size_t iv_size
 IV size in bytes (for ciphers with variable-length IVs)
void * cipher_ctx
 Cipher-specific context.

Detailed Description

Generic cipher context.

Definition at line 248 of file cipher.h.


Field Documentation

void(* add_padding)(unsigned char *output, size_t olen, size_t data_len)

Padding functions to use, if relevant for cipher mode.

Definition at line 259 of file cipher.h.

void* cipher_ctx

Cipher-specific context.

Definition at line 275 of file cipher.h.

Information about the associated cipher.

Definition at line 250 of file cipher.h.

unsigned char iv[POLARSSL_MAX_IV_LENGTH]

Current IV or NONCE_COUNTER for CTR-mode.

Definition at line 269 of file cipher.h.

size_t iv_size

IV size in bytes (for ciphers with variable-length IVs)

Definition at line 272 of file cipher.h.

Key length to use.

Definition at line 253 of file cipher.h.

operation_t operation

Operation that the context's key has been initialised for.

Definition at line 256 of file cipher.h.

unsigned char unprocessed_data[POLARSSL_MAX_BLOCK_LENGTH]

Buffer for data that hasn't been encrypted yet.

Definition at line 263 of file cipher.h.

Number of bytes that still need processing.

Definition at line 266 of file cipher.h.