mbedtls_gcm_setkey() is only used within mbedTLS.
 
Symbols
loading...
Files
loading...

mbedtls_gcm_setkey() function

This function associates a GCM context with a cipher algorithm and a key.

Syntax

int mbedtls_gcm_setkey( mbedtls_gcm_context *ctx,     mbedtls_cipher_id_t cipher,     const unsigned char *key,     unsigned int keybits );
Implemented in gcm.c:167

Arguments

ctx

The GCM context. This must be initialized.

cipher

The 128-bit block cipher to use.

key

The encryption key. This must be a readable buffer of at least \p keybits bits.

keybits

The key size in bits. Valid options are: 128 bits 192 bits 256 bits

Return value

\c 0 on success. A cipher-specific error code on failure.

References

Call Tree

Functions calling mbedtls_gcm_setkey()
Functions called by mbedtls_gcm_setkey()
mbedtls_gcm_setkey()
Data read by mbedtls_gcm_setkey()
Data written by mbedtls_gcm_setkey()
mbedtls_gcm_setkey()
mbedtls_gcm_setkey()::ret
mbedtls_gcm_setkey()::cipher_info
all items filtered out
Type of mbedtls_gcm_setkey()
mbedtls_gcm_setkey()
all items filtered out