aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am4
m---------contrib/gana0
-rw-r--r--src/include/gnunet_signatures.h164
-rw-r--r--src/namestore/gnunet-namestore-fcfsd.c2
-rw-r--r--src/transport/gnunet-communicator-tcp.c30
-rw-r--r--src/transport/gnunet-communicator-udp.c20
6 files changed, 76 insertions, 144 deletions
diff --git a/Makefile.am b/Makefile.am
index 338f44f37..30cc02bc9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -81,8 +81,6 @@ gana-gns:
81 @cd $(top_srcdir)/contrib/gana/gnu-name-system-default-tlds; make; cp tlds.conf ../../../src/gns 81 @cd $(top_srcdir)/contrib/gana/gnu-name-system-default-tlds; make; cp tlds.conf ../../../src/gns
82 82
83gana-gnunet-signatures: 83gana-gnunet-signatures:
84 @cd $(top_srcdir)/contrib/gana/gnunet-signatures; make 84 @cd $(top_srcdir)/contrib/gana/gnunet-signatures; make; cp gnunet_signatures.h ../../../src/include
85#FIXME: This is broken as we need legacy values?
86# cp gnunet_signatures.h ../../../src/include
87 85
88 86
diff --git a/contrib/gana b/contrib/gana
Subproject ecb597d6fb23e18a282059791c49716aa8ffd8c Subproject d2decfa7cb332c107c82e221f51cc13e336b206
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 */
diff --git a/src/namestore/gnunet-namestore-fcfsd.c b/src/namestore/gnunet-namestore-fcfsd.c
index 7ec9db156..56961deb5 100644
--- a/src/namestore/gnunet-namestore-fcfsd.c
+++ b/src/namestore/gnunet-namestore-fcfsd.c
@@ -789,7 +789,7 @@ create_response (void *cls,
789 "message", _ ("unable to process submitted data"), 789 "message", _ ("unable to process submitted data"),
790 NULL); 790 NULL);
791 rd->body_length = strlen (rd->body); 791 rd->body_length = strlen (rd->body);
792 rd->code = MHD_HTTP_PAYLOAD_TOO_LARGE; 792 rd->code = MHD_HTTP_CONTENT_TOO_LARGE;
793 return MHD_YES; 793 return MHD_YES;
794 case GNUNET_JSON_PR_JSON_INVALID: 794 case GNUNET_JSON_PR_JSON_INVALID:
795 rd->body = make_json ("error", "true", 795 rd->body = make_json ("error", "true",
diff --git a/src/transport/gnunet-communicator-tcp.c b/src/transport/gnunet-communicator-tcp.c
index 2a5e33e2b..3bfdeaa90 100644
--- a/src/transport/gnunet-communicator-tcp.c
+++ b/src/transport/gnunet-communicator-tcp.c
@@ -115,7 +115,7 @@ GNUNET_NETWORK_STRUCT_BEGIN
115struct TcpHandshakeSignature 115struct TcpHandshakeSignature
116{ 116{
117 /** 117 /**
118 * Purpose must be #GNUNET_SIGNATURE_COMMUNICATOR_TCP_HANDSHAKE 118 * Purpose must be #GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_HANDSHAKE
119 */ 119 */
120 struct GNUNET_CRYPTO_EccSignaturePurpose purpose; 120 struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
121 121
@@ -153,7 +153,7 @@ struct TcpHandshakeSignature
153struct TcpHandshakeAckSignature 153struct TcpHandshakeAckSignature
154{ 154{
155 /** 155 /**
156 * Purpose must be #GNUNET_SIGNATURE_COMMUNICATOR_TCP_HANDSHAKE_ACK 156 * Purpose must be #GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_HANDSHAKE_ACK
157 */ 157 */
158 struct GNUNET_CRYPTO_EccSignaturePurpose purpose; 158 struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
159 159
@@ -190,7 +190,7 @@ struct TCPConfirmation
190 struct GNUNET_PeerIdentity sender; 190 struct GNUNET_PeerIdentity sender;
191 191
192 /** 192 /**
193 * Sender's signature of type #GNUNET_SIGNATURE_COMMUNICATOR_TCP_HANDSHAKE 193 * Sender's signature of type #GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_HANDSHAKE
194 */ 194 */
195 struct GNUNET_CRYPTO_EddsaSignature sender_sig; 195 struct GNUNET_CRYPTO_EddsaSignature sender_sig;
196 196
@@ -225,7 +225,7 @@ struct TCPConfirmationAck
225 struct GNUNET_PeerIdentity sender; 225 struct GNUNET_PeerIdentity sender;
226 226
227 /** 227 /**
228 * Sender's signature of type #GNUNET_SIGNATURE_COMMUNICATOR_TCP_HANDSHAKE_ACK 228 * Sender's signature of type #GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_HANDSHAKE_ACK
229 */ 229 */
230 struct GNUNET_CRYPTO_EddsaSignature sender_sig; 230 struct GNUNET_CRYPTO_EddsaSignature sender_sig;
231 231
@@ -297,7 +297,7 @@ struct TCPRekey
297 struct GNUNET_CRYPTO_EcdhePublicKey ephemeral; 297 struct GNUNET_CRYPTO_EcdhePublicKey ephemeral;
298 298
299 /** 299 /**
300 * Sender's signature of type #GNUNET_SIGNATURE_COMMUNICATOR_TCP_REKEY 300 * Sender's signature of type #GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_REKEY
301 */ 301 */
302 struct GNUNET_CRYPTO_EddsaSignature sender_sig; 302 struct GNUNET_CRYPTO_EddsaSignature sender_sig;
303 303
@@ -315,7 +315,7 @@ struct TCPRekey
315struct TcpRekeySignature 315struct TcpRekeySignature
316{ 316{
317 /** 317 /**
318 * Purpose must be #GNUNET_SIGNATURE_COMMUNICATOR_TCP_REKEY 318 * Purpose must be #GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_REKEY
319 */ 319 */
320 struct GNUNET_CRYPTO_EccSignaturePurpose purpose; 320 struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
321 321
@@ -1313,7 +1313,7 @@ do_rekey (struct Queue *queue, const struct TCPRekey *rekey)
1313{ 1313{
1314 struct TcpRekeySignature thp; 1314 struct TcpRekeySignature thp;
1315 1315
1316 thp.purpose.purpose = htonl (GNUNET_SIGNATURE_COMMUNICATOR_TCP_REKEY); 1316 thp.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_REKEY);
1317 thp.purpose.size = htonl (sizeof(thp)); 1317 thp.purpose.size = htonl (sizeof(thp));
1318 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1318 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1319 "do_rekey size %u\n", 1319 "do_rekey size %u\n",
@@ -1340,7 +1340,7 @@ do_rekey (struct Queue *queue, const struct TCPRekey *rekey)
1340 GNUNET_TIME_absolute_ntoh (thp.monotonic_time))); 1340 GNUNET_TIME_absolute_ntoh (thp.monotonic_time)));
1341 GNUNET_assert (ntohl ((&thp)->purpose.size) == sizeof (*(&thp))); 1341 GNUNET_assert (ntohl ((&thp)->purpose.size) == sizeof (*(&thp)));
1342 if (GNUNET_OK != 1342 if (GNUNET_OK !=
1343 GNUNET_CRYPTO_eddsa_verify (GNUNET_SIGNATURE_COMMUNICATOR_TCP_REKEY, 1343 GNUNET_CRYPTO_eddsa_verify (GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_REKEY,
1344 &thp, 1344 &thp,
1345 &rekey->sender_sig, 1345 &rekey->sender_sig,
1346 &queue->target.public_key)) 1346 &queue->target.public_key))
@@ -1464,7 +1464,7 @@ send_challenge (struct ChallengeNonceP challenge, struct Queue *queue)
1464 tca.monotonic_time = 1464 tca.monotonic_time =
1465 GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get_monotonic (cfg)); 1465 GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get_monotonic (cfg));
1466 thas.purpose.purpose = htonl ( 1466 thas.purpose.purpose = htonl (
1467 GNUNET_SIGNATURE_COMMUNICATOR_TCP_HANDSHAKE_ACK); 1467 GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_HANDSHAKE_ACK);
1468 thas.purpose.size = htonl (sizeof(thas)); 1468 thas.purpose.size = htonl (sizeof(thas));
1469 thas.sender = my_identity; 1469 thas.sender = my_identity;
1470 thas.receiver = queue->target; 1470 thas.receiver = queue->target;
@@ -1527,7 +1527,7 @@ inject_rekey (struct Queue *queue)
1527 GNUNET_CRYPTO_ecdhe_key_get_public (&queue->ephemeral, &rekey.ephemeral); 1527 GNUNET_CRYPTO_ecdhe_key_get_public (&queue->ephemeral, &rekey.ephemeral);
1528 rekey.monotonic_time = 1528 rekey.monotonic_time =
1529 GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get_monotonic (cfg)); 1529 GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get_monotonic (cfg));
1530 thp.purpose.purpose = htonl (GNUNET_SIGNATURE_COMMUNICATOR_TCP_REKEY); 1530 thp.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_REKEY);
1531 thp.purpose.size = htonl (sizeof(thp)); 1531 thp.purpose.size = htonl (sizeof(thp));
1532 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1532 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1533 "inject_rekey size %u\n", 1533 "inject_rekey size %u\n",
@@ -1725,7 +1725,7 @@ try_handle_plaintext (struct Queue *queue)
1725 } 1725 }
1726 1726
1727 thas.purpose.purpose = htonl ( 1727 thas.purpose.purpose = htonl (
1728 GNUNET_SIGNATURE_COMMUNICATOR_TCP_HANDSHAKE_ACK); 1728 GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_HANDSHAKE_ACK);
1729 thas.purpose.size = htonl (sizeof(thas)); 1729 thas.purpose.size = htonl (sizeof(thas));
1730 thas.sender = tca->sender; 1730 thas.sender = tca->sender;
1731 thas.receiver = my_identity; 1731 thas.receiver = my_identity;
@@ -1733,7 +1733,7 @@ try_handle_plaintext (struct Queue *queue)
1733 thas.challenge = tca->challenge; 1733 thas.challenge = tca->challenge;
1734 1734
1735 if (GNUNET_SYSERR == GNUNET_CRYPTO_eddsa_verify ( 1735 if (GNUNET_SYSERR == GNUNET_CRYPTO_eddsa_verify (
1736 GNUNET_SIGNATURE_COMMUNICATOR_TCP_HANDSHAKE_ACK, 1736 GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_HANDSHAKE_ACK,
1737 &thas, 1737 &thas,
1738 &tca->sender_sig, 1738 &tca->sender_sig,
1739 &tca->sender.public_key)) 1739 &tca->sender.public_key))
@@ -2472,7 +2472,7 @@ transmit_kx (struct Queue *queue,
2472 GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE, 2472 GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE,
2473 &tc.challenge, 2473 &tc.challenge,
2474 sizeof(tc.challenge)); 2474 sizeof(tc.challenge));
2475 ths.purpose.purpose = htonl (GNUNET_SIGNATURE_COMMUNICATOR_TCP_HANDSHAKE); 2475 ths.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_HANDSHAKE);
2476 ths.purpose.size = htonl (sizeof(ths)); 2476 ths.purpose.size = htonl (sizeof(ths));
2477 ths.sender = my_identity; 2477 ths.sender = my_identity;
2478 ths.receiver = queue->target; 2478 ths.receiver = queue->target;
@@ -2625,7 +2625,7 @@ decrypt_and_check_tc (struct Queue *queue,
2625 sizeof(*tc), 2625 sizeof(*tc),
2626 &ibuf[sizeof(struct GNUNET_CRYPTO_EcdhePublicKey)], 2626 &ibuf[sizeof(struct GNUNET_CRYPTO_EcdhePublicKey)],
2627 sizeof(*tc))); 2627 sizeof(*tc)));
2628 ths.purpose.purpose = htonl (GNUNET_SIGNATURE_COMMUNICATOR_TCP_HANDSHAKE); 2628 ths.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_HANDSHAKE);
2629 ths.purpose.size = htonl (sizeof(ths)); 2629 ths.purpose.size = htonl (sizeof(ths));
2630 ths.sender = tc->sender; 2630 ths.sender = tc->sender;
2631 ths.receiver = my_identity; 2631 ths.receiver = my_identity;
@@ -2633,7 +2633,7 @@ decrypt_and_check_tc (struct Queue *queue,
2633 ths.monotonic_time = tc->monotonic_time; 2633 ths.monotonic_time = tc->monotonic_time;
2634 ths.challenge = tc->challenge; 2634 ths.challenge = tc->challenge;
2635 ret = GNUNET_CRYPTO_eddsa_verify ( 2635 ret = GNUNET_CRYPTO_eddsa_verify (
2636 GNUNET_SIGNATURE_COMMUNICATOR_TCP_HANDSHAKE, 2636 GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_HANDSHAKE,
2637 &ths, 2637 &ths,
2638 &tc->sender_sig, 2638 &tc->sender_sig,
2639 &tc->sender.public_key); 2639 &tc->sender.public_key);
diff --git a/src/transport/gnunet-communicator-udp.c b/src/transport/gnunet-communicator-udp.c
index 201e94e80..b6edff485 100644
--- a/src/transport/gnunet-communicator-udp.c
+++ b/src/transport/gnunet-communicator-udp.c
@@ -164,7 +164,7 @@ GNUNET_NETWORK_STRUCT_BEGIN
164struct UdpHandshakeSignature 164struct UdpHandshakeSignature
165{ 165{
166 /** 166 /**
167 * Purpose must be #GNUNET_SIGNATURE_COMMUNICATOR_UDP_HANDSHAKE 167 * Purpose must be #GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_UDP_HANDSHAKE
168 */ 168 */
169 struct GNUNET_CRYPTO_EccSignaturePurpose purpose; 169 struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
170 170
@@ -227,7 +227,7 @@ struct UDPConfirmation
227 struct GNUNET_PeerIdentity sender; 227 struct GNUNET_PeerIdentity sender;
228 228
229 /** 229 /**
230 * Sender's signature of type #GNUNET_SIGNATURE_COMMUNICATOR_UDP_HANDSHAKE 230 * Sender's signature of type #GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_UDP_HANDSHAKE
231 */ 231 */
232 struct GNUNET_CRYPTO_EddsaSignature sender_sig; 232 struct GNUNET_CRYPTO_EddsaSignature sender_sig;
233 233
@@ -284,7 +284,7 @@ struct UDPAck
284struct UdpBroadcastSignature 284struct UdpBroadcastSignature
285{ 285{
286 /** 286 /**
287 * Purpose must be #GNUNET_SIGNATURE_COMMUNICATOR_UDP_BROADCAST 287 * Purpose must be #GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_UDP_BROADCAST
288 */ 288 */
289 struct GNUNET_CRYPTO_EccSignaturePurpose purpose; 289 struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
290 290
@@ -315,7 +315,7 @@ struct UDPBroadcast
315 315
316 /** 316 /**
317 * Sender's signature of type 317 * Sender's signature of type
318 * #GNUNET_SIGNATURE_COMMUNICATOR_UDP_BROADCAST 318 * #GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_UDP_BROADCAST
319 */ 319 */
320 struct GNUNET_CRYPTO_EddsaSignature sender_sig; 320 struct GNUNET_CRYPTO_EddsaSignature sender_sig;
321}; 321};
@@ -2202,14 +2202,14 @@ verify_confirmation (const struct GNUNET_CRYPTO_EcdhePublicKey *ephemeral,
2202{ 2202{
2203 struct UdpHandshakeSignature uhs; 2203 struct UdpHandshakeSignature uhs;
2204 2204
2205 uhs.purpose.purpose = htonl (GNUNET_SIGNATURE_COMMUNICATOR_UDP_HANDSHAKE); 2205 uhs.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_UDP_HANDSHAKE);
2206 uhs.purpose.size = htonl (sizeof(uhs)); 2206 uhs.purpose.size = htonl (sizeof(uhs));
2207 uhs.sender = uc->sender; 2207 uhs.sender = uc->sender;
2208 uhs.receiver = my_identity; 2208 uhs.receiver = my_identity;
2209 uhs.ephemeral = *ephemeral; 2209 uhs.ephemeral = *ephemeral;
2210 uhs.monotonic_time = uc->monotonic_time; 2210 uhs.monotonic_time = uc->monotonic_time;
2211 return GNUNET_CRYPTO_eddsa_verify ( 2211 return GNUNET_CRYPTO_eddsa_verify (
2212 GNUNET_SIGNATURE_COMMUNICATOR_UDP_HANDSHAKE, 2212 GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_UDP_HANDSHAKE,
2213 &uhs, 2213 &uhs,
2214 &uc->sender_sig, 2214 &uc->sender_sig,
2215 &uc->sender.public_key); 2215 &uc->sender.public_key);
@@ -2350,7 +2350,7 @@ sock_read (void *cls)
2350 "received UDPBroadcast from %s\n", 2350 "received UDPBroadcast from %s\n",
2351 GNUNET_a2s ((const struct sockaddr *) addr_verify, salen)); 2351 GNUNET_a2s ((const struct sockaddr *) addr_verify, salen));
2352 ub = (const struct UDPBroadcast *) buf; 2352 ub = (const struct UDPBroadcast *) buf;
2353 uhs.purpose.purpose = htonl (GNUNET_SIGNATURE_COMMUNICATOR_UDP_BROADCAST); 2353 uhs.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_UDP_BROADCAST);
2354 uhs.purpose.size = htonl (sizeof(uhs)); 2354 uhs.purpose.size = htonl (sizeof(uhs));
2355 uhs.sender = ub->sender; 2355 uhs.sender = ub->sender;
2356 sender = ub->sender; 2356 sender = ub->sender;
@@ -2366,7 +2366,7 @@ sock_read (void *cls)
2366 GNUNET_i2s (&sender)); 2366 GNUNET_i2s (&sender));
2367 GNUNET_CRYPTO_hash ((struct sockaddr *) addr_verify, salen, &uhs.h_address); 2367 GNUNET_CRYPTO_hash ((struct sockaddr *) addr_verify, salen, &uhs.h_address);
2368 if (GNUNET_OK == 2368 if (GNUNET_OK ==
2369 GNUNET_CRYPTO_eddsa_verify (GNUNET_SIGNATURE_COMMUNICATOR_UDP_BROADCAST, 2369 GNUNET_CRYPTO_eddsa_verify (GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_UDP_BROADCAST,
2370 &uhs, 2370 &uhs,
2371 &ub->sender_sig, 2371 &ub->sender_sig,
2372 &ub->sender.public_key)) 2372 &ub->sender.public_key))
@@ -2699,7 +2699,7 @@ mq_send_kx (struct GNUNET_MQ_Handle *mq,
2699 uc.sender = my_identity; 2699 uc.sender = my_identity;
2700 uc.monotonic_time = 2700 uc.monotonic_time =
2701 GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get_monotonic (cfg)); 2701 GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get_monotonic (cfg));
2702 uhs.purpose.purpose = htonl (GNUNET_SIGNATURE_COMMUNICATOR_UDP_HANDSHAKE); 2702 uhs.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_UDP_HANDSHAKE);
2703 uhs.purpose.size = htonl (sizeof(uhs)); 2703 uhs.purpose.size = htonl (sizeof(uhs));
2704 uhs.sender = my_identity; 2704 uhs.sender = my_identity;
2705 uhs.receiver = receiver->target; 2705 uhs.receiver = receiver->target;
@@ -3644,7 +3644,7 @@ iface_proc (void *cls,
3644 bi->salen = addrlen; 3644 bi->salen = addrlen;
3645 bi->found = GNUNET_YES; 3645 bi->found = GNUNET_YES;
3646 bi->bcm.sender = my_identity; 3646 bi->bcm.sender = my_identity;
3647 ubs.purpose.purpose = htonl (GNUNET_SIGNATURE_COMMUNICATOR_UDP_BROADCAST); 3647 ubs.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_UDP_BROADCAST);
3648 ubs.purpose.size = htonl (sizeof(ubs)); 3648 ubs.purpose.size = htonl (sizeof(ubs));
3649 ubs.sender = my_identity; 3649 ubs.sender = my_identity;
3650 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 3650 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,