wpa_supplicant / hostapd 2.0
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.
int aes_128_cbc_decrypt (const u8 *key, const u8 *iv, u8 *data, size_t data_len)
 AES-128 CBC decryption.

Detailed Description

AES-128 CBC.

Copyright
Copyright (c) 2003-2007, Jouni Malinen <j@w1.fi>

This software may be distributed under the terms of the BSD license. See README for more details.


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
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines