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

AES-128 CTR. More...

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

Functions

int aes_128_ctr_encrypt (const u8 *key, const u8 *nonce, u8 *data, size_t data_len)
 AES-128 CTR mode encryption. More...
 

Detailed Description

AES-128 CTR.

Function Documentation

int aes_128_ctr_encrypt ( const u8 *  key,
const u8 *  nonce,
u8 *  data,
size_t  data_len 
)

AES-128 CTR mode encryption.

Parameters
keyKey for encryption (16 bytes)
nonceNonce for counter mode (16 bytes)
dataData to encrypt in-place
data_lenLength of data in bytes
Returns
0 on success, -1 on failure