00001
00023 #ifndef AES_WRAP_H
00024 #define AES_WRAP_H
00025
00026 int aes_wrap(const u8 *kek, int n, const u8 *plain, u8 *cipher);
00027 int aes_unwrap(const u8 *kek, int n, const u8 *cipher, u8 *plain);
00028 int omac1_aes_128(const u8 *key, const u8 *data, size_t data_len, u8 *mac);
00029 int aes_128_encrypt_block(const u8 *key, const u8 *in, u8 *out);
00030 int aes_128_ctr_encrypt(const u8 *key, const u8 *nonce,
00031 u8 *data, size_t data_len);
00032 int aes_128_eax_encrypt(const u8 *key, const u8 *nonce, size_t nonce_len,
00033 const u8 *hdr, size_t hdr_len,
00034 u8 *data, size_t data_len, u8 *tag);
00035 int aes_128_eax_decrypt(const u8 *key, const u8 *nonce, size_t nonce_len,
00036 const u8 *hdr, size_t hdr_len,
00037 u8 *data, size_t data_len, const u8 *tag);
00038 int aes_128_cbc_encrypt(const u8 *key, const u8 *iv, u8 *data,
00039 size_t data_len);
00040 int aes_128_cbc_decrypt(const u8 *key, const u8 *iv, u8 *data,
00041 size_t data_len);
00042
00043 #endif
00044