Wireshark 4.5.0
The Wireshark network protocol analyzer
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
packet-mka.h
1/* packet-mka.h
2 * Routines for MKA packet dissection
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef __PACKET_MKA_H__
8#define __PACKET_MKA_H__
9
10#include <epan/packet.h>
11
12#define AES128_KEY_LEN 16
13#define AES256_KEY_LEN 32
14
15#define MACSEC_AN_COUNT 4
16
17#define MKA_CAK_AES_GCM_128_LEN (AES128_KEY_LEN)
18#define MKA_CAK_AES_GCM_256_LEN (AES256_KEY_LEN)
19#define MKA_MAX_CAK_LEN (MKA_CAK_AES_GCM_256_LEN)
20
21#define MKA_MAX_KEK_LEN (MKA_CAK_AES_GCM_256_LEN)
22#define MKA_MAX_ICK_LEN (MKA_CAK_AES_GCM_256_LEN)
23#define MKA_MAX_SAK_LEN (MKA_CAK_AES_GCM_256_LEN)
24
25typedef struct _mka_ckn_info_key {
26 /* The KEK derived from the CAK */
27 unsigned char kek[MKA_MAX_KEK_LEN];
28 unsigned kek_len;
29
30 /* The ICK derived from the CAK */
31 unsigned char ick[MKA_MAX_ICK_LEN];
32 unsigned ick_len;
33
34 /* the SAKs unwrapped by the KEK for each AN
35 * index is the AN to which the SAK belongs */
36 unsigned char saks[MACSEC_AN_COUNT][MKA_MAX_SAK_LEN];
37
39
40typedef struct _mka_ckn_info {
41 /* CKN: a byte array of 0 to 32 bytes. */
42 unsigned char *ckn;
43 unsigned ckn_len;
44
45 /* CAK: a byte array of 0 to 32 bytes. */
46 unsigned char *cak;
47 unsigned cak_len;
48
49 /* Identifier for the name of the entry. */
50 unsigned char *name;
51 unsigned name_len;
52
53 /* KEK/ICK/SAK data for this entry */
56
57/* access to the table data from macsec dissector */
58const mka_ckn_info_t * get_mka_ckn_table(void);
59unsigned get_mka_ckn_table_count(void);
60
61#endif
Definition packet-mka.h:25
Definition packet-mka.h:40