regen pidl all: rm epan/dissectors/pidl/*-stamp; pushd epan/dissectors/pidl/ && make...
[wireshark-sm.git] / epan / crypt / dot11decrypt_util.h
blob2c29e105644babd226c9c7b44171de68f4ee780f
1 /** @file
3 * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
4 * Copyright (c) 2006 CACE Technologies, Davis (California)
5 * All rights reserved.
7 * SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0-only)
8 */
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,
17 uint8_t *aad,
18 size_t *aad_len);
20 bool
21 dot11decrypt_prf(const uint8_t *key, size_t key_len,
22 const char *label,
23 const uint8_t *context, size_t context_len,
24 int hash_algo,
25 uint8_t *output, size_t output_len);
27 bool
28 dot11decrypt_kdf(const uint8_t *key, size_t key_len,
29 const char *label,
30 const uint8_t *context, size_t context_len,
31 int hash_algo,
32 uint8_t *output, size_t output_len);
34 bool
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],
40 int hash_algo,
41 uint8_t *pmk_r0,
42 size_t *pmk_r0_len,
43 uint8_t pmk_r0_name[16]);
45 bool
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,
49 int hash_algo,
50 uint8_t *pmk_r1, size_t *pmk_r1_len,
51 uint8_t *pmk_r1_name);
53 bool
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,
58 int hash_algo,
59 uint8_t *ptk, const size_t ptk_len, uint8_t *ptk_name);
60 #endif /* _DOT11DECRYPT_UTIL_H */
63 * Editor modelines
65 * Local Variables:
66 * c-basic-offset: 4
67 * tab-width: 8
68 * indent-tabs-mode: nil
69 * End:
71 * ex: set shiftwidth=4 tabstop=8 expandtab:
72 * :indentSize=4:tabSize=8:noTabs=true: