1 /*
2  * wlantest - IEEE 802.11 protocol monitoring and testing tool
3  * Copyright (c) 2010-2013, Jouni Malinen <j@w1.fi>
4  *
5  * This software may be distributed under the terms of the BSD license.
6  * See README for more details.
7  */
8 
9 #ifdef CONFIG_IEEE80211W
10 #ifndef CCMP_H
11 #define CCMP_H
12 
13 u8 * ccmp_decrypt(const u8 *tk, const u8 *hdr, const u8 *data,
14 		  size_t data_len, size_t *decrypted_len, bool espnow_pkt);
15 u8 * ccmp_encrypt(const u8 *tk, u8 *frame, size_t len, size_t hdrlen,
16 		  u8 *pn, int keyid, size_t *encrypted_len);
17 u8 * ccmp_encrypt_pv1(const u8 *tk, const u8 *a1, const u8 *a2, const u8 *a3,
18 		      const u8 *frame, size_t len,
19 		      size_t hdrlen, const u8 *pn, int keyid,
20 		      size_t *encrypted_len);
21 void ccmp_get_pn(u8 *pn, const u8 *data);
22 u8 * ccmp_256_decrypt(const u8 *tk, const u8 *hdr, const u8 *data,
23 		      size_t data_len, size_t *decrypted_len);
24 u8 * ccmp_256_encrypt(const u8 *tk, u8 *frame, size_t len, size_t hdrlen,
25 		      u8 *pn, int keyid, size_t *encrypted_len);
26 
27 #endif /* CCMP_H */
28 #endif /* CONFIG_IEEE80211W */
29