aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2022-01-04 15:53:29 +0100
committerMartin Schanzenbach <schanzen@gnunet.org>2022-01-04 15:53:29 +0100
commita5ca7d5975c65bdfdc02087cf54ea88f1fdf4bd7 (patch)
tree9b7e2698b29380c6cd5eb3cfc3b0666649dd2b5d /src/include
parent7b6e0eb4f6e731a2e22509aa846da58f0553a866 (diff)
downloadgnunet-a5ca7d5975c65bdfdc02087cf54ea88f1fdf4bd7.tar.gz
gnunet-a5ca7d5975c65bdfdc02087cf54ea88f1fdf4bd7.zip
BUILD: gnunet-signatures from gana
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_signatures.h164
1 files changed, 49 insertions, 115 deletions
diff --git a/src/include/gnunet_signatures.h b/src/include/gnunet_signatures.h
index 7c0c1d104..ef38e3b1e 100644
--- a/src/include/gnunet_signatures.h
+++ b/src/include/gnunet_signatures.h
@@ -1,6 +1,6 @@
1/* 1/*
2 This file is part of GNUnet. 2 This file is part of GNUnet
3 Copyright (C) 2009 GNUnet e.V. 3 Copyright (C) 2012-2022 GNUnet e.V.
4 4
5 GNUnet is free software: you can redistribute it and/or modify it 5 GNUnet is free software: you can redistribute it and/or modify it
6 under the terms of the GNU Affero General Public License as published 6 under the terms of the GNU Affero General Public License as published
@@ -17,250 +17,184 @@
17 17
18 SPDX-License-Identifier: AGPL3.0-or-later 18 SPDX-License-Identifier: AGPL3.0-or-later
19 */ 19 */
20
21/**
22 * @author Christian Grothoff
23 *
24 * @file
25 * Constants for network signatures
26 *
27 * @defgroup signatures Network signature definitions
28 * @{
29 */
30
31#ifndef GNUNET_SIGNATURES_H 20#ifndef GNUNET_SIGNATURES_H
32#define GNUNET_SIGNATURES_H 21#define GNUNET_SIGNATURES_H
33 22
34#ifdef __cplusplus 23#ifdef __cplusplus
35extern "C" 24extern "C" {
36{ 25#if 0 /* keep Emacsens' auto-indent happy */
37#if 0 /* keep Emacsens' auto-indent happy */
38} 26}
39#endif 27#endif
40#endif 28#endif
41 29
42/**
43 * Test signature, not valid for anything other than writing
44 * a test. (Note that the signature verification code will
45 * accept this value).
46 */
47#define GNUNET_SIGNATURE_PURPOSE_TEST 0
48
49/**
50 * Signature for confirming that this peer uses a particular address.
51 */
52#define GNUNET_SIGNATURE_PURPOSE_TRANSPORT_PONG_OWN 1
53 30
54/** 31/**
55 * Signature for confirming that this peer intends to disconnect. 32 * Network signature purpose definitions. Note that all values
33 * must be uint32_t and encoded in network byte order in the structs.
56 */ 34 */
57#define GNUNET_SIGNATURE_PURPOSE_TRANSPORT_DISCONNECT 2
58 35
59/**
60 * Signature for confirming a key revocation.
61 */
62#define GNUNET_SIGNATURE_PURPOSE_REVOCATION 3
63 36
64/**
65 * Signature for a namespace/pseudonym advertisement (by
66 * the namespace owner).
67 */
68#define GNUNET_SIGNATURE_PURPOSE_NAMESPACE_ADVERTISEMENT 4
69 37
70/** 38/**
71 * Signature by which a peer affirms that it is 39 * Test signature, not valid for anything other than writing a test. (Note that the signature verification code will accept this value). (GNUnet)
72 * providing a certain bit of content (used
73 * in LOCation URIs).
74 */ 40 */
75#define GNUNET_SIGNATURE_PURPOSE_PEER_PLACEMENT 5 41#define GNUNET_SIGNATURE_PURPOSE_TEST 0
76 42
77/** 43/**
78 * Obsolete, legacy value. 44 * Signature for confirming that this peer uses a particular address. (GNUnet-TRANSPORT)
79 */ 45 */
80#define GNUNET_SIGNATURE_PURPOSE_FS_KBLOCK 6 46#define GNUNET_SIGNATURE_PURPOSE_TRANSPORT_PONG_OWN 1
81 47
82/** 48/**
83 * Obsolete, legacy value. 49 * Signature for confirming that this peer intends to disconnect. (GNUnet-TRANSPORT)
84 */ 50 */
85#define GNUNET_SIGNATURE_PURPOSE_FS_SBLOCK 7 51#define GNUNET_SIGNATURE_PURPOSE_TRANSPORT_DISCONNECT 2
86 52
87/** 53/**
88 * Obsolete, legacy value. 54 * Signature for confirming a key revocation. (GNUnet-Revocation)
89 */ 55 */
90#define GNUNET_SIGNATURE_PURPOSE_FS_NBLOCK 8 56#define GNUNET_SIGNATURE_PURPOSE_REVOCATION 3
91 57
92/** 58/**
93 * Obsolete, legacy value. 59 * Signature for a namespace/pseudonym advertisement (by the namespace owner). (GNUnet-FS)
94 */ 60 */
95#define GNUNET_SIGNATURE_PURPOSE_FS_NBLOCK_KSIG 9 61#define GNUNET_SIGNATURE_PURPOSE_NAMESPACE_ADVERTISEMENT 4
96 62
97/** 63/**
98 * 64 * Signature by which a peer affirms that it is providing a certain bit of content for use in LOCation URIs. (GNUnet-FS)
99 */ 65 */
100#define GNUNET_SIGNATURE_PURPOSE_RESOLVER_RESPONSE 10 66#define GNUNET_SIGNATURE_PURPOSE_PEER_PLACEMENT 5
101 67
102/** 68/**
103 * Signature of an GNUNET_DNS_Advertisement 69 * Signature on a GNUNET_DNS_Advertisement. (GNUnet-DNS+Exit)
104 */ 70 */
105#define GNUNET_SIGNATURE_PURPOSE_DNS_RECORD 11 71#define GNUNET_SIGNATURE_PURPOSE_DNS_RECORD 11
106 72
107/** 73/**
108 * Signature of a chat message. 74 * Signature of a chat message. (GNUnet-MESSENGER)
109 */ 75 */
110#define GNUNET_SIGNATURE_PURPOSE_CHAT_MESSAGE 12 76#define GNUNET_SIGNATURE_PURPOSE_CHAT_MESSAGE 12
111 77
112/** 78/**
113 * Signature of confirmation receipt for a chat message. 79 * Signature of confirmation receipt for a chat message. (GNUnet-MESSENGER)
114 */ 80 */
115#define GNUNET_SIGNATURE_PURPOSE_CHAT_RECEIPT 13 81#define GNUNET_SIGNATURE_PURPOSE_CHAT_RECEIPT 13
116 82
117/** 83/**
118 * Signature of a network size estimate message. 84 * Signature of a network size estimate message. (GNUnet-NSE)
119 */ 85 */
120#define GNUNET_SIGNATURE_PURPOSE_NSE_SEND 14 86#define GNUNET_SIGNATURE_PURPOSE_NSE_SEND 14
121 87
122/** 88/**
123 * Signature of a gnunet naming system record block 89 * Signature of a gnunet naming system record block (GNUnet-GNSRECORD)
124 */ 90 */
125#define GNUNET_SIGNATURE_PURPOSE_GNS_RECORD_SIGN 15 91#define GNUNET_SIGNATURE_PURPOSE_GNS_RECORD_SIGN 15
126 92
127/** 93/**
128 * Purpose is to set a session key. 94 * Purpose is to set a session key. (GNUnet-CORE)
129 */ 95 */
130#define GNUNET_SIGNATURE_PURPOSE_SET_ECC_KEY 16 96#define GNUNET_SIGNATURE_PURPOSE_SET_ECC_KEY 16
131 97
132/** 98/**
133 * UBlock Signature, done using DSS, not ECC 99 * UBlock Signature, done using DSS, not ECC (GNUnet-FS)
134 */ 100 */
135#define GNUNET_SIGNATURE_PURPOSE_FS_UBLOCK 17 101#define GNUNET_SIGNATURE_PURPOSE_FS_UBLOCK 17
136 102
137/** 103/**
138 * Accept state in regex DFA. Peer affirms that 104 * Accept state in regex DFA. Peer affirms that it offers the matching service. (GNUnet-REGEX)
139 * it offers the matching service.
140 */ 105 */
141#define GNUNET_SIGNATURE_PURPOSE_REGEX_ACCEPT 18 106#define GNUNET_SIGNATURE_PURPOSE_REGEX_ACCEPT 18
142 107
143/** 108/**
144 * Signature of a multicast message sent by the origin. 109 * Signature of a conversation ring. (GNUnet-CONVERSATION)
145 */
146#define GNUNET_SIGNATURE_PURPOSE_MULTICAST_MESSAGE 19
147
148/**
149 * Signature of a conversation ring.
150 */ 110 */
151#define GNUNET_SIGNATURE_PURPOSE_CONVERSATION_RING 20 111#define GNUNET_SIGNATURE_PURPOSE_CONVERSATION_RING 20
152 112
153/** 113/**
154 * Signature for the first round of distributed key generation. 114 * Signature for the first round of distributed key generation. (GNUnet-SECRETSHARING)
155 */ 115 */
156#define GNUNET_SIGNATURE_PURPOSE_SECRETSHARING_DKG1 21 116#define GNUNET_SIGNATURE_PURPOSE_SECRETSHARING_DKG1 21
157 117
158/** 118/**
159 * Signature for the second round of distributed key generation. 119 * Signature for the second round of distributed key generation. (GNUnet-SECRETSHARING)
160 */ 120 */
161#define GNUNET_SIGNATURE_PURPOSE_SECRETSHARING_DKG2 22 121#define GNUNET_SIGNATURE_PURPOSE_SECRETSHARING_DKG2 22
162 122
163/** 123/**
164 * Signature for cooperatice decryption. 124 * Signature for the cooperative decryption. (GNUnet-SECRETSHARING)
165 */ 125 */
166#define GNUNET_SIGNATURE_PURPOSE_SECRETSHARING_DECRYPTION 23 126#define GNUNET_SIGNATURE_PURPOSE_SECRETSHARING_DECRYPTION 23
167 127
168/** 128/**
169 * Signature of a multicast request sent by a member. 129 * Signature for a GNUid Ticket (Reclaim)
170 */
171#define GNUNET_SIGNATURE_PURPOSE_MULTICAST_REQUEST 24
172
173/**
174 * Signature for a sensor anomaly report message.
175 */
176#define GNUNET_SIGNATURE_PURPOSE_SENSOR_ANOMALY_REPORT 25
177
178/**
179 * Signature for a GNUid Token
180 */
181#define GNUNET_SIGNATURE_PURPOSE_GNUID_TOKEN 26
182
183/**
184 * Signature for a GNUid Ticket
185 */ 130 */
186#define GNUNET_SIGNATURE_PURPOSE_RECLAIM_CODE_SIGN 27 131#define GNUNET_SIGNATURE_PURPOSE_RECLAIM_CODE_SIGN 27
187 132
188/** 133/**
189 * Signature for a GNUnet credential 134 * Signature for a GNUnet credential (Reclaim)
190 */ 135 */
191#define GNUNET_SIGNATURE_PURPOSE_DELEGATE 28 136#define GNUNET_SIGNATURE_PURPOSE_DELEGATE 28
192 137
193/** 138/**
194 * Signature by a peer affirming that this is one of its 139 * Signature by a peer affirming that this is one of its addresses for the given time period. (GNUnet-TRANSPORT)
195 * addresses (for the given time period).
196 */ 140 */
197#define GNUNET_SIGNATURE_PURPOSE_TRANSPORT_ADDRESS 29 141#define GNUNET_SIGNATURE_PURPOSE_TRANSPORT_ADDRESS 29
198 142
199/** 143/**
200 * Signature by a peer affirming that the given ephemeral 144 * Signature by a peer affirming that the given ephemeral key is currently in use by that peer's transport service. (GNUnet-TRANSPORT)
201 * key is currently in use by that peer's transport service.
202 */ 145 */
203#define GNUNET_SIGNATURE_PURPOSE_TRANSPORT_EPHEMERAL 30 146#define GNUNET_SIGNATURE_PURPOSE_TRANSPORT_EPHEMERAL 30
204 147
205/** 148/**
206 * Signature used by TCP communicator handshake, 149 * Signature used by TCP communicator handshake. (GNUnet-TRANSPORT-TCP)
207 */ 150 */
208#define GNUNET_SIGNATURE_COMMUNICATOR_TCP_HANDSHAKE 31 151#define GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_HANDSHAKE 31
209 152
210/** 153/**
211 * Signature used by TCP communicator rekey. 154 * Signature used by TCP communicator rekey. (GNUnet-TRANSPORT-TCP)
212 */ 155 */
213#define GNUNET_SIGNATURE_COMMUNICATOR_TCP_REKEY 32 156#define GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_REKEY 32
214 157
215/** 158/**
216 * Signature used by UDP communicator handshake 159 * Signature used by UDP communicator handshake. (GNUnet-TRANSPORT-UDP)
217 */ 160 */
218#define GNUNET_SIGNATURE_COMMUNICATOR_UDP_HANDSHAKE 33 161#define GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_UDP_HANDSHAKE 33
219 162
220/** 163/**
221 * Signature used by UDP broadcasts. 164 * Signature used by UDP broadcasts. (GNUnet-TRANSPORT-UDP)
222 */ 165 */
223#define GNUNET_SIGNATURE_COMMUNICATOR_UDP_BROADCAST 34 166#define GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_UDP_BROADCAST 34
224 167
225/** 168/**
226 * Signature by a peer affirming that it received a 169 * Signature by a peer affirming that it received a challenge (and stating how long it expects the address on which the challenge was received to remain valid). (GNUnet-TRANSPORT)
227 * challenge (and stating how long it expects the
228 * address on which the challenge was received to
229 * remain valid).
230 */ 170 */
231#define GNUNET_SIGNATURE_PURPOSE_TRANSPORT_CHALLENGE 35 171#define GNUNET_SIGNATURE_PURPOSE_TRANSPORT_CHALLENGE 35
232 172
233/** 173/**
234 * Signature by a peer affirming that it is on a DV path. 174 * Signature by a peer affirming that it is on a DV path. (GNUnet-TRANSPORT)
235 */ 175 */
236#define GNUNET_SIGNATURE_PURPOSE_TRANSPORT_DV_HOP 36 176#define GNUNET_SIGNATURE_PURPOSE_TRANSPORT_DV_HOP 36
237 177
238/** 178/**
239 * Signature by a peer affirming that it originated the 179 * Signature by a peer affirming that it originated the DV path. (GNUnet-TRANSPORT)
240 * DV path.
241 */ 180 */
242#define GNUNET_SIGNATURE_PURPOSE_TRANSPORT_DV_INITIATOR 37 181#define GNUNET_SIGNATURE_PURPOSE_TRANSPORT_DV_INITIATOR 37
243 182
244/** 183/**
245 * Signature by a peer that like to create a connection. 184 * Signature by a peer that like to create a connection. (GNUnet-CADET)
246 */ 185 */
247#define GNUNET_SIGNATURE_PURPOSE_CADET_CONNECTION_INITIATOR 38 186#define GNUNET_SIGNATURE_PURPOSE_CADET_CONNECTION_INITIATOR 38
248 187
249/** 188/**
250 * Signature by a peer sending back the nonce received at initial handshake. 189 * Signature by a peer sending back the nonce received at initial handshake. (GNUnet-TRANSPORT-TCP)
251 */ 190 */
252#define GNUNET_SIGNATURE_COMMUNICATOR_TCP_HANDSHAKE_ACK 39 191#define GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_HANDSHAKE_ACK 39
253 192
254#if 0 /* keep Emacsens' auto-indent happy */ 193#if 0 /* keep Emacsens' auto-indent happy */
255{ 194{
256#endif 195#endif
257#ifdef __cplusplus 196#ifdef __cplusplus
258} 197}
259#endif 198#endif
260 199
261/* ifndef GNUNET_SIGNATURES_H */
262#endif 200#endif
263
264/** @} */ /* end of group */
265
266/* end of gnunet_signatures.h */