3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
7 * SPDX-License-Identifier: GPL-2.0-or-later
12 #include <epan/packet.h>
13 #include <epan/oids.h>
14 #include <epan/asn1.h>
15 #include <wsutil/array.h>
17 #include "packet-nist-csor.h"
18 #include "packet-ber.h"
19 #include "packet-pkix1explicit.h"
20 #include "packet-pkix1implicit.h"
22 #define PNAME "NIST_CSOR"
23 #define PSNAME "NIST_CSOR"
24 #define PFNAME "nist_csor"
26 void proto_register_nist_csor(void);
27 void proto_reg_handoff_nist_csor(void);
29 /* Initialize the protocol and registered fields */
30 static int proto_nist_csor
;
31 #include "packet-nist-csor-hf.c"
33 /* Initialize the subtree pointers */
34 #include "packet-nist-csor-ett.c"
35 #include "packet-nist-csor-fn.c"
38 /*--- proto_register_nist-csor ----------------------------------------------*/
39 void proto_register_nist_csor(void) {
42 static hf_register_info hf
[] = {
43 #include "packet-nist-csor-hfarr.c"
46 /* List of subtrees */
48 #include "packet-nist-csor-ettarr.c"
51 /* Register protocol */
52 proto_nist_csor
= proto_register_protocol(PNAME
, PSNAME
, PFNAME
);
54 /* Register fields and subtrees */
55 proto_register_field_array(proto_nist_csor
, hf
, array_length(hf
));
56 proto_register_subtree_array(ett
, array_length(ett
));
60 /*--- proto_reg_handoff_nist_csor -------------------------------------------*/
61 void proto_reg_handoff_nist_csor(void) {
62 #include "packet-nist-csor-dis-tab.c"
63 oid_add_from_string("id-data","1.2.840.113549.1.7.1");
66 oid_add_from_string("aes","2.16.840.1.101.3.4.1");
68 /* 128-bit AES information OIDs */
69 oid_add_from_string("id-aes128-ECB","2.16.840.1.101.3.4.1.1");
70 oid_add_from_string("id-aes128-wrap","2.16.840.1.101.3.4.1.5");
71 oid_add_from_string("id-aes128-GCM","2.16.840.1.101.3.4.1.6");
72 oid_add_from_string("id-aes128-CCM","2.16.840.1.101.3.4.1.7");
73 oid_add_from_string("id-aes128-wrap-pad","2.16.840.1.101.3.4.1.8");
75 /* 192-bit AES information OIDs */
76 oid_add_from_string("id-aes192-ECB","2.16.840.1.101.3.4.1.21");
77 oid_add_from_string("id-aes192-wrap","2.16.840.1.101.3.4.1.25");
78 oid_add_from_string("id-aes192-GCM","2.16.840.1.101.3.4.1.26");
79 oid_add_from_string("id-aes192-CCM","2.16.840.1.101.3.4.1.27");
80 oid_add_from_string("id-aes192-wrap-pad","2.16.840.1.101.3.4.1.28");
82 /* 256-bit AES information OIDs */
83 oid_add_from_string("id-aes256-ECB","2.16.840.1.101.3.4.1.41");
84 oid_add_from_string("id-aes256-wrap","2.16.840.1.101.3.4.1.45");
85 oid_add_from_string("id-aes256-GCM","2.16.840.1.101.3.4.1.46");
86 oid_add_from_string("id-aes256-CCM","2.16.840.1.101.3.4.1.47");
87 oid_add_from_string("id-aes256-wrap-pad","2.16.840.1.101.3.4.1.48");
89 /* Secure Hash Algorithms */
90 oid_add_from_string("hashAlgs","2.16.840.1.101.3.4.2");
93 oid_add_from_string("id-sha256","2.16.840.1.101.3.4.2.1");
94 oid_add_from_string("id-sha384","2.16.840.1.101.3.4.2.2");
95 oid_add_from_string("id-sha512","2.16.840.1.101.3.4.2.3");
96 oid_add_from_string("id-sha224","2.16.840.1.101.3.4.2.4");
97 oid_add_from_string("id-sha512-224","2.16.840.1.101.3.4.2.5");
98 oid_add_from_string("id-sha512-256","2.16.840.1.101.3.4.2.6");
101 oid_add_from_string("id-sha3-224","2.16.840.1.101.3.4.2.7");
102 oid_add_from_string("id-sha3-256","2.16.840.1.101.3.4.2.8");
103 oid_add_from_string("id-sha3-384","2.16.840.1.101.3.4.2.9");
104 oid_add_from_string("id-sha3-512","2.16.840.1.101.3.4.2.10");
106 oid_add_from_string("id-shake128","2.16.840.1.101.3.4.2.11");
107 oid_add_from_string("id-shake256","2.16.840.1.101.3.4.2.12");
109 /* HMAC with SHA-3 family */
110 oid_add_from_string("id-hmacWithSHA3-224","2.16.840.1.101.3.4.2.13");
111 oid_add_from_string("id-hmacWithSHA3-256","2.16.840.1.101.3.4.2.14");
112 oid_add_from_string("id-hmacWithSHA3-384","2.16.840.1.101.3.4.2.15");
113 oid_add_from_string("id-hmacWithSHA3-512","2.16.840.1.101.3.4.2.16");
115 /* Digital Signature Algorithms */
116 oid_add_from_string("sigAlgs","2.16.840.1.101.3.4.3");
118 /* DSA with SHA-2 family */
119 oid_add_from_string("id-dsa-with-sha224","2.16.840.1.101.3.4.3.1");
120 oid_add_from_string("id-dsa-with-sha256","2.16.840.1.101.3.4.3.2");
121 oid_add_from_string("id-dsa-with-sha384","2.16.840.1.101.3.4.3.3");
122 oid_add_from_string("id-dsa-with-sha512","2.16.840.1.101.3.4.3.4");
124 /* DSA with SHA-3 family */
125 oid_add_from_string("id-dsa-with-sha3-224","2.16.840.1.101.3.4.3.5");
126 oid_add_from_string("id-dsa-with-sha3-256","2.16.840.1.101.3.4.3.6");
127 oid_add_from_string("id-dsa-with-sha3-384","2.16.840.1.101.3.4.3.7");
128 oid_add_from_string("id-dsa-with-sha3-512","2.16.840.1.101.3.4.3.8");
130 /* ECDSA with SHA-3 family */
131 oid_add_from_string("id-ecdsa-with-sha3-224","2.16.840.1.101.3.4.3.9");
132 oid_add_from_string("id-ecdsa-with-sha3-256","2.16.840.1.101.3.4.3.10");
133 oid_add_from_string("id-ecdsa-with-sha3-384","2.16.840.1.101.3.4.3.11");
134 oid_add_from_string("id-ecdsa-with-sha3-512","2.16.840.1.101.3.4.3.12");
136 /* RSA PKCS#1 v1.5 Signature with SHA-3 family */
137 oid_add_from_string("id-rsassa-pkcs1-v1_5-with-sha3-224","2.16.840.1.101.3.4.3.13");
138 oid_add_from_string("id-rsassa-pkcs1-v1_5-with-sha3-256","2.16.840.1.101.3.4.3.14");
139 oid_add_from_string("id-rsassa-pkcs1-v1_5-with-sha3-384","2.16.840.1.101.3.4.3.15");
140 oid_add_from_string("id-rsassa-pkcs1-v1_5-with-sha3-512","2.16.840.1.101.3.4.3.16");