aes_wrap.h
Go to the documentation of this file.
00001 /*
00002  * AES-based functions
00003  *
00004  * - AES Key Wrap Algorithm (128-bit KEK) (RFC3394)
00005  * - One-Key CBC MAC (OMAC1) hash with AES-128
00006  * - AES-128 CTR mode encryption
00007  * - AES-128 EAX mode encryption/decryption
00008  * - AES-128 CBC
00009  *
00010  * Copyright (c) 2003-2007, Jouni Malinen <j@w1.fi>
00011  *
00012  * This program is free software; you can redistribute it and/or modify
00013  * it under the terms of the GNU General Public License version 2 as
00014  * published by the Free Software Foundation.
00015  *
00016  * Alternatively, this software may be distributed under the terms of BSD
00017  * license.
00018  *
00019  * See README and COPYING for more details.
00020  */
00021 
00022 #ifndef AES_WRAP_H
00023 #define AES_WRAP_H
00024 
00025 int __must_check aes_wrap(const u8 *kek, int n, const u8 *plain, u8 *cipher);
00026 int __must_check aes_unwrap(const u8 *kek, int n, const u8 *cipher, u8 *plain);
00027 int __must_check omac1_aes_128_vector(const u8 *key, size_t num_elem,
00028                                       const u8 *addr[], const size_t *len,
00029                                       u8 *mac);
00030 int __must_check omac1_aes_128(const u8 *key, const u8 *data, size_t data_len,
00031                                u8 *mac);
00032 int __must_check aes_128_encrypt_block(const u8 *key, const u8 *in, u8 *out);
00033 int __must_check aes_128_ctr_encrypt(const u8 *key, const u8 *nonce,
00034                                      u8 *data, size_t data_len);
00035 int __must_check aes_128_eax_encrypt(const u8 *key,
00036                                      const u8 *nonce, size_t nonce_len,
00037                                      const u8 *hdr, size_t hdr_len,
00038                                      u8 *data, size_t data_len, u8 *tag);
00039 int __must_check aes_128_eax_decrypt(const u8 *key,
00040                                      const u8 *nonce, size_t nonce_len,
00041                                      const u8 *hdr, size_t hdr_len,
00042                                      u8 *data, size_t data_len, const u8 *tag);
00043 int __must_check aes_128_cbc_encrypt(const u8 *key, const u8 *iv, u8 *data,
00044                                      size_t data_len);
00045 int __must_check aes_128_cbc_decrypt(const u8 *key, const u8 *iv, u8 *data,
00046                                      size_t data_len);
00047 
00048 #endif /* AES_WRAP_H */


wpa_supplicant
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Apr 24 2014 15:34:33