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

AES Key Wrap Algorithm (RFC3394) More...

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

Functions

int aes_wrap (const u8 *kek, size_t kek_len, int n, const u8 *plain, u8 *cipher)
 Wrap keys with AES Key Wrap Algorithm (RFC3394) More...
 

Detailed Description

AES Key Wrap Algorithm (RFC3394)

Function Documentation

int aes_wrap ( const u8 *  kek,
size_t  kek_len,
int  n,
const u8 *  plain,
u8 *  cipher 
)

Wrap keys with AES Key Wrap Algorithm (RFC3394)

Parameters
kekKey encryption key (KEK)
kek_lenLength of KEK in octets
nLength of the plaintext key in 64-bit units; e.g., 2 = 128-bit = 16 bytes
plainPlaintext key to be wrapped, n * 64 bits
cipherWrapped key, (n + 1) * 64 bits
Returns
0 on success, -1 on failure