Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
packet-nts-ke.h
1/* packet-nts-ke.h
2 *
3 * Copyright (c) 2024 by Martin Mayer <[email protected]>
4 *
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <[email protected]>
7 * Copyright 1998 Gerald Combs
8 *
9 * SPDX-License-Identifier: GPL-2.0-or-later
10 */
11
12#ifndef __PACKET_NTS_KE_H__
13#define __PACKET_NTS_KE_H__
14
15#include <wsutil/wsgcrypt.h>
16
17#define NTS_KE_TLS13_KEY_MAX_LEN 64
18
19typedef struct _nts_aead {
20 uint16_t id; /* IANA assigned AEAD parameter ID */
21 uint16_t cipher; /* gcrypt cipher */
22 uint8_t mode; /* gcrypt cipher mode */
23 uint16_t key_len; /* Length of key for this cipher */
24 uint16_t tag_len; /* Length of authentication tag for this cipher */
25} nts_aead;
26
27typedef struct _nts_cookie_t {
28 uint32_t frame_received; /* Frame no. which provided the cookie */
29 wmem_list_t *frames_used; /* List of frame no. which used the cookie */
30 wmem_list_t *frames_used_uid; /* List of request UIDs which used the cookie */
31 uint16_t aead; /* AEAD parameter */
32 bool keys_present; /* Are keys present (export successful) */
33 uint8_t key_c2s[NTS_KE_TLS13_KEY_MAX_LEN]; /* Derived client to server key */
34 uint8_t key_s2c[NTS_KE_TLS13_KEY_MAX_LEN]; /* Derived server to client key */
36
37/* Helper structure to pass data to nts_append_used_frames_to_tree() */
39 tvbuff_t *tvb;
40 proto_tree *tree;
41 int hfindex;
43
51nts_cookie_t* nts_new_cookie(tvbuff_t *tvb, uint16_t aead, packet_info *pinfo);
52
60nts_cookie_t* nts_new_cookie_copy(tvbuff_t *tvb, nts_cookie_t *ref_cookie, packet_info *pinfo);
61
69nts_cookie_t* nts_use_cookie(tvbuff_t *tvb_cookie, tvbuff_t *tvb_uid, packet_info *pinfo);
70
76nts_cookie_t* nts_find_cookie_by_uid(tvbuff_t *tvb_uid);
77
83const nts_aead * nts_find_aead(uint16_t id);
84
89void nts_append_used_frames_to_tree(void *data, void *user_data);
90
91#endif
Definition packet-nts-ke.h:19
Definition packet-nts-ke.h:38
Definition packet_info.h:43
Definition proto.h:903
Definition wmem_list.c:23
Definition tvbuff-int.h:35