Wireshark 4.5.0
The Wireshark network protocol analyzer
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
packet-cose.h
1/* packet-cose.h
2 * Definitions for CBOR Object Signing and Encryption (COSE) dissection
3 * References:
4 * RFC 9052: https://tools.ietf.org/html/rfc9052
5 *
6 * Copyright 2019-2021, Brian Sipos <brian.sipos@gmail.com>
7 *
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <gerald@wireshark.org>
10 * Copyright 1998 Gerald Combs
11 *
12 * SPDX-License-Identifier: LGPL-2.1-or-later
13 */
14#ifndef __PACKET_COSE_H__
15#define __PACKET_COSE_H__
16
17#include <ws_symbol_export.h>
18#include <glib.h>
19#include <stdint.h>
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
48// A header parameter or key-type parameter key
49typedef struct {
52 GVariant *principal;
53
56 GVariant *label;
58
60typedef struct {
62 GVariant *principal;
64 GVariant *label;
66
68typedef struct {
70 int64_t value;
77 unsigned out_len;
79
85WS_DLL_PUBLIC
86const cose_hash_props_t * cose_get_hash_props(int64_t alg);
87
89typedef struct {
91 int64_t value;
97 unsigned key_len;
99 unsigned iv_len;
101 unsigned tag_len;
103
109WS_DLL_PUBLIC
110const cose_aead_props_t * cose_get_aead_props(int64_t alg);
111
113typedef struct {
115 int64_t value;
117 unsigned pubkey_len;
119
125WS_DLL_PUBLIC
126const cose_ecc_props_t * cose_get_ecc_props(int64_t crv);
127
128#ifdef __cplusplus
129}
130#endif
131
132#endif /* __PACKET_COSE_H__ */
Derived properties of AEAD encryption algorithm.
Definition packet-cose.h:89
int gcry_mode
GCrypt mode enumeration.
Definition packet-cose.h:95
unsigned key_len
Key length in bytes.
Definition packet-cose.h:97
unsigned tag_len
Tag length in bytes.
Definition packet-cose.h:101
unsigned iv_len
IV length in bytes.
Definition packet-cose.h:99
int gcry_cipher
GCrypt cipher enumeration.
Definition packet-cose.h:93
int64_t value
The algorithm code point.
Definition packet-cose.h:91
Derived properties of AEAD encryption algorithm.
Definition packet-cose.h:113
unsigned pubkey_len
Public key encoded size in bytes.
Definition packet-cose.h:117
int64_t value
The algorithm code point.
Definition packet-cose.h:115
Derived properties of hash algorithm.
Definition packet-cose.h:68
unsigned out_len
Definition packet-cose.h:77
int gcry_hash
GCrypt hash enumeration.
Definition packet-cose.h:72
int64_t value
The algorithm code point.
Definition packet-cose.h:70
User data for header/key-parameter dissectors.
Definition packet-cose.h:60
GVariant * principal
Principal value (alg or kty) of the map, if defined.
Definition packet-cose.h:62
GVariant * label
Current label being processed.
Definition packet-cose.h:64
Definition packet-cose.h:49
GVariant * principal
Definition packet-cose.h:52
GVariant * label
Definition packet-cose.h:56