libosmogsm 1.11.0.26-c59d
Osmocom GSM library
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
aes.h File Reference

AES functions. More...

Go to the source code of this file.

Macros

#define AES_BLOCK_SIZE   16
 

Functions

void * aes_encrypt_init (const u8 *key, size_t len)
 aes_encrypt_init - Initialize AES for encryption @key: Encryption key @len: Key length in bytes (usually 16, i.e., 128 bits) Returns: Pointer to context data or NULL on failure More...
 
void aes_encrypt (void *ctx, const u8 *plain, u8 *crypt)
 aes_encrypt - Encrypt one AES block @ctx: Context pointer from aes_encrypt_init() @plain: Plaintext data to be encrypted (16 bytes) @crypt: Buffer for the encrypted data (16 bytes) More...
 
void aes_encrypt_deinit (void *ctx)
 aes_encrypt_deinit - Deinitialize AES encryption @ctx: Context pointer from aes_encrypt_init() More...
 
void * aes_decrypt_init (const u8 *key, size_t len)
 
void aes_decrypt (void *ctx, const u8 *crypt, u8 *plain)
 
void aes_decrypt_deinit (void *ctx)
 

Detailed Description

AES functions.

Macro Definition Documentation

◆ AES_BLOCK_SIZE

#define AES_BLOCK_SIZE   16

Function Documentation

◆ aes_decrypt()

void aes_decrypt ( void *  ctx,
const u8 crypt,
u8 plain 
)

◆ aes_decrypt_deinit()

void aes_decrypt_deinit ( void *  ctx)

◆ aes_decrypt_init()

void * aes_decrypt_init ( const u8 key,
size_t  len 
)

◆ aes_encrypt()

void aes_encrypt ( void *  ctx,
const u8 plain,
u8 crypt 
)

aes_encrypt - Encrypt one AES block @ctx: Context pointer from aes_encrypt_init() @plain: Plaintext data to be encrypted (16 bytes) @crypt: Buffer for the encrypted data (16 bytes)

◆ aes_encrypt_deinit()

void aes_encrypt_deinit ( void *  ctx)

aes_encrypt_deinit - Deinitialize AES encryption @ctx: Context pointer from aes_encrypt_init()

◆ aes_encrypt_init()

void * aes_encrypt_init ( const u8 key,
size_t  len 
)

aes_encrypt_init - Initialize AES for encryption @key: Encryption key @len: Key length in bytes (usually 16, i.e., 128 bits) Returns: Pointer to context data or NULL on failure