wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
aes-cbc.c File Reference

AES-128 CBC. More...

#include "includes.h"
#include "common.h"
#include "aes.h"
#include "aes_wrap.h"

Functions

int aes_128_cbc_encrypt (const u8 *key, const u8 *iv, u8 *data, size_t data_len)
 AES-128 CBC encryption. More...
 
int aes_128_cbc_decrypt (const u8 *key, const u8 *iv, u8 *data, size_t data_len)
 AES-128 CBC decryption. More...
 

Detailed Description

AES-128 CBC.

Function Documentation

int aes_128_cbc_decrypt ( const u8 *  key,
const u8 *  iv,
u8 *  data,
size_t  data_len 
)

AES-128 CBC decryption.

Parameters
keyDecryption key
ivDecryption IV for CBC mode (16 bytes)
dataData to decrypt in-place
data_lenLength of data in bytes (must be divisible by 16)
Returns
0 on success, -1 on failure
int aes_128_cbc_encrypt ( const u8 *  key,
const u8 *  iv,
u8 *  data,
size_t  data_len 
)

AES-128 CBC encryption.

Parameters
keyEncryption key
ivEncryption IV for CBC mode (16 bytes)
dataData to encrypt in-place
data_lenLength of data in bytes (must be divisible by 16)
Returns
0 on success, -1 on failure