• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #ifndef WLANCRYPTO_WRAP_H
10 #define WLANCRYPTO_WRAP_H
11 
12 int sha256_vector(size_t num_elem, const u8 *addr[], const size_t *len,
13 	u8 *mac);
14 
15 u8* ccmp_decrypt(_adapter *padapter, const u8 *tk, const struct ieee80211_hdr *hdr,
16 	const u8 *data, size_t data_len, size_t *decrypted_len);
17 u8* ccmp_encrypt(_adapter *padapter, const u8 *tk, u8 *frame, size_t len, size_t hdrlen, u8 *qos,
18 	u8 *pn, int keyid, size_t *encrypted_len);
19 u8* ccmp_encrypt_pv1(const u8 *tk, const u8 *a1, const u8 *a2, const u8 *a3,
20 	const u8 *frame, size_t len,
21 	size_t hdrlen, const u8 *pn, int keyid,
22 	size_t *encrypted_len);
23 u8* ccmp_256_decrypt(_adapter *padapter, const u8 *tk, const struct ieee80211_hdr *hdr,
24 	const u8 *data, size_t data_len, size_t *decrypted_len);
25 u8* ccmp_256_encrypt(_adapter *padapter, const u8 *tk, u8 *frame, size_t len, size_t hdrlen,
26 	u8 *qos, u8 *pn, int keyid, size_t *encrypted_len);
27 
28 u8* gcmp_decrypt(_adapter *padapter, const u8 *tk, size_t tk_len, const struct ieee80211_hdr *hdr,
29 	const u8 *data, size_t data_len, size_t *decrypted_len);
30 u8* gcmp_encrypt(_adapter *padapter, const u8 *tk, size_t tk_len, const u8 *frame, size_t len,
31 	size_t hdrlen, const u8 *qos,
32 	const u8 *pn, int keyid, size_t *encrypted_len);
33 
34 #endif /* WLANCRYPTO_WRAP_H */
35