3 * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
4 * Copyright (c) 2006 CACE Technologies, Davis (California)
7 * SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0-only)
10 #ifndef _DOT11DECRYPT_UTIL_H
11 #define _DOT11DECRYPT_UTIL_H
13 #include "dot11decrypt_int.h"
15 void dot11decrypt_construct_aad(
16 PDOT11DECRYPT_MAC_FRAME wh
,
21 dot11decrypt_prf(const uint8_t *key
, size_t key_len
,
23 const uint8_t *context
, size_t context_len
,
25 uint8_t *output
, size_t output_len
);
28 dot11decrypt_kdf(const uint8_t *key
, size_t key_len
,
30 const uint8_t *context
, size_t context_len
,
32 uint8_t *output
, size_t output_len
);
35 dot11decrypt_derive_pmk_r0(const uint8_t *xxkey
, size_t xxkey_len
,
36 const uint8_t *ssid
, size_t ssid_len
,
37 const uint8_t mdid
[2],
38 const uint8_t *r0kh_id
, size_t r0kh_id_len
,
39 const uint8_t s0kh_id
[DOT11DECRYPT_MAC_LEN
],
43 uint8_t pmk_r0_name
[16]);
46 dot11decrypt_derive_pmk_r1(const uint8_t *pmk_r0
, size_t pmk_r0_len
,
47 const uint8_t *pmk_r0_name
,
48 const uint8_t *r1kh_id
, const uint8_t *s1kh_id
,
50 uint8_t *pmk_r1
, size_t *pmk_r1_len
,
51 uint8_t *pmk_r1_name
);
54 dot11decrypt_derive_ft_ptk(const uint8_t *pmk_r1
, size_t pmk_r1_len
,
55 const uint8_t *pmk_r1_name
,
56 const uint8_t *snonce
, const uint8_t *anonce
,
57 const uint8_t *bssid
, const uint8_t *sta_addr
,
59 uint8_t *ptk
, const size_t ptk_len
, uint8_t *ptk_name
);
60 #endif /* _DOT11DECRYPT_UTIL_H */
68 * indent-tabs-mode: nil
71 * ex: set shiftwidth=4 tabstop=8 expandtab:
72 * :indentSize=4:tabSize=8:noTabs=true: