wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
aes_wrap.h
Go to the documentation of this file.
1 
14 #ifndef AES_WRAP_H
15 #define AES_WRAP_H
16 
17 int __must_check aes_wrap(const u8 *kek, size_t kek_len, int n, const u8 *plain,
18  u8 *cipher);
19 int __must_check aes_unwrap(const u8 *kek, size_t kek_len, int n,
20  const u8 *cipher, u8 *plain);
21 int __must_check omac1_aes_vector(const u8 *key, size_t key_len,
22  size_t num_elem, const u8 *addr[],
23  const size_t *len, u8 *mac);
24 int __must_check omac1_aes_128_vector(const u8 *key, size_t num_elem,
25  const u8 *addr[], const size_t *len,
26  u8 *mac);
27 int __must_check omac1_aes_128(const u8 *key, const u8 *data, size_t data_len,
28  u8 *mac);
29 int __must_check omac1_aes_256(const u8 *key, const u8 *data, size_t data_len,
30  u8 *mac);
31 int __must_check aes_128_encrypt_block(const u8 *key, const u8 *in, u8 *out);
32 int __must_check aes_128_ctr_encrypt(const u8 *key, const u8 *nonce,
33  u8 *data, size_t data_len);
34 int __must_check aes_128_eax_encrypt(const u8 *key,
35  const u8 *nonce, size_t nonce_len,
36  const u8 *hdr, size_t hdr_len,
37  u8 *data, size_t data_len, u8 *tag);
38 int __must_check aes_128_eax_decrypt(const u8 *key,
39  const u8 *nonce, size_t nonce_len,
40  const u8 *hdr, size_t hdr_len,
41  u8 *data, size_t data_len, const u8 *tag);
42 int __must_check aes_128_cbc_encrypt(const u8 *key, const u8 *iv, u8 *data,
43  size_t data_len);
44 int __must_check aes_128_cbc_decrypt(const u8 *key, const u8 *iv, u8 *data,
45  size_t data_len);
46 int __must_check aes_gcm_ae(const u8 *key, size_t key_len,
47  const u8 *iv, size_t iv_len,
48  const u8 *plain, size_t plain_len,
49  const u8 *aad, size_t aad_len,
50  u8 *crypt, u8 *tag);
51 int __must_check aes_gcm_ad(const u8 *key, size_t key_len,
52  const u8 *iv, size_t iv_len,
53  const u8 *crypt, size_t crypt_len,
54  const u8 *aad, size_t aad_len, const u8 *tag,
55  u8 *plain);
56 int __must_check aes_gmac(const u8 *key, size_t key_len,
57  const u8 *iv, size_t iv_len,
58  const u8 *aad, size_t aad_len, u8 *tag);
59 int __must_check aes_ccm_ae(const u8 *key, size_t key_len, const u8 *nonce,
60  size_t M, const u8 *plain, size_t plain_len,
61  const u8 *aad, size_t aad_len, u8 *crypt, u8 *auth);
62 int __must_check aes_ccm_ad(const u8 *key, size_t key_len, const u8 *nonce,
63  size_t M, const u8 *crypt, size_t crypt_len,
64  const u8 *aad, size_t aad_len, const u8 *auth,
65  u8 *plain);
66 
67 #endif /* AES_WRAP_H */
int __must_check aes_gcm_ad(const u8 *key, size_t key_len, const u8 *iv, size_t iv_len, const u8 *crypt, size_t crypt_len, const u8 *aad, size_t aad_len, const u8 *tag, u8 *plain)
GCM-AD_K(IV, C, A, T)
Definition: aes-gcm.c:286
int __must_check omac1_aes_128_vector(const u8 *key, size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac)
One-Key CBC MAC (OMAC1) hash with AES-128.
Definition: aes-omac1.c:126
int __must_check aes_128_cbc_encrypt(const u8 *key, const u8 *iv, u8 *data, size_t data_len)
AES-128 CBC encryption.
Definition: aes-cbc.c:20
int __must_check aes_128_ctr_encrypt(const u8 *key, const u8 *nonce, u8 *data, size_t data_len)
AES-128 CTR mode encryption.
Definition: aes-ctr.c:20
int __must_check aes_wrap(const u8 *kek, size_t kek_len, int n, const u8 *plain, u8 *cipher)
Wrap keys with AES Key Wrap Algorithm (RFC3394)
Definition: aes-wrap.c:22
int __must_check aes_128_encrypt_block(const u8 *key, const u8 *in, u8 *out)
Perform one AES 128-bit block operation.
Definition: aes-encblock.c:19
int __must_check omac1_aes_128(const u8 *key, const u8 *data, size_t data_len, u8 *mac)
One-Key CBC MAC (OMAC1) hash with AES-128 (aka AES-CMAC)
Definition: aes-omac1.c:145
int __must_check omac1_aes_256(const u8 *key, const u8 *data, size_t data_len, u8 *mac)
One-Key CBC MAC (OMAC1) hash with AES-256 (aka AES-CMAC)
Definition: aes-omac1.c:163
int __must_check aes_128_eax_decrypt(const u8 *key, const u8 *nonce, size_t nonce_len, const u8 *hdr, size_t hdr_len, u8 *data, size_t data_len, const u8 *tag)
AES-128 EAX mode decryption.
Definition: aes-eax.c:88
int __must_check omac1_aes_vector(const u8 *key, size_t key_len, size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac)
One-Key CBC MAC (OMAC1) hash with AES.
Definition: aes-omac1.c:39
int __must_check aes_gcm_ae(const u8 *key, size_t key_len, const u8 *iv, size_t iv_len, const u8 *plain, size_t plain_len, const u8 *aad, size_t aad_len, u8 *crypt, u8 *tag)
GCM-AE_K(IV, P, A)
Definition: aes-gcm.c:251
int __must_check aes_128_cbc_decrypt(const u8 *key, const u8 *iv, u8 *data, size_t data_len)
AES-128 CBC decryption.
Definition: aes-cbc.c:53
int __must_check aes_128_eax_encrypt(const u8 *key, const u8 *nonce, size_t nonce_len, const u8 *hdr, size_t hdr_len, u8 *data, size_t data_len, u8 *tag)
AES-128 EAX mode encryption.
Definition: aes-eax.c:24
int __must_check aes_unwrap(const u8 *kek, size_t kek_len, int n, const u8 *cipher, u8 *plain)
Unwrap key with AES Key Wrap Algorithm (RFC3394)
Definition: aes-unwrap.c:22