diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-08-03 17:26:16 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-08-03 17:26:16 +0200 |
commit | 8b4d25630e965c6831d009f9948a10bf9bb346ee (patch) | |
tree | e18b071cb1dde4ac6894e5629e5389249cb86f50 /gnunet-signatures | |
parent | 969e2b3b796a805b4954ea38d8a409c27f861883 (diff) | |
download | gana-8b4d25630e965c6831d009f9948a10bf9bb346ee.tar.gz gana-8b4d25630e965c6831d009f9948a10bf9bb346ee.zip |
begin signature registry
Diffstat (limited to 'gnunet-signatures')
-rw-r--r-- | gnunet-signatures/.gitignore | 2 | ||||
-rw-r--r-- | gnunet-signatures/Makefile | 15 | ||||
-rw-r--r-- | gnunet-signatures/README | 7 | ||||
-rw-r--r-- | gnunet-signatures/h.footer | 13 | ||||
-rw-r--r-- | gnunet-signatures/h.header | 35 | ||||
-rw-r--r-- | gnunet-signatures/h.template | 6 | ||||
-rw-r--r-- | gnunet-signatures/registry.rec | 162 |
7 files changed, 240 insertions, 0 deletions
diff --git a/gnunet-signatures/.gitignore b/gnunet-signatures/.gitignore new file mode 100644 index 0000000..8afd4e7 --- /dev/null +++ b/gnunet-signatures/.gitignore | |||
@@ -0,0 +1,2 @@ | |||
1 | gnunet_signatures.h | ||
2 | gnunet_signatures.h.tmp | ||
diff --git a/gnunet-signatures/Makefile b/gnunet-signatures/Makefile new file mode 100644 index 0000000..32640e6 --- /dev/null +++ b/gnunet-signatures/Makefile | |||
@@ -0,0 +1,15 @@ | |||
1 | FILES=registry.rec gnunet_signatures.h | ||
2 | all: check $(FILES) | ||
3 | check: registry.rec | ||
4 | recfix --check registry.rec | ||
5 | distclean: | ||
6 | rm -f *.tmp | ||
7 | clean: | ||
8 | rm -f $(FILES) *.tmp | ||
9 | gnunet_signatures.h.tmp: registry.rec h.template | ||
10 | ../format.sh h.template < registry.rec > $@ | ||
11 | |||
12 | gnunet_signatures.h: h.header gnunet_signatures.h.tmp h.footer | ||
13 | cat $^ > $@ | ||
14 | |||
15 | .PHONY: check clean distclean | ||
diff --git a/gnunet-signatures/README b/gnunet-signatures/README new file mode 100644 index 0000000..99587b7 --- /dev/null +++ b/gnunet-signatures/README | |||
@@ -0,0 +1,7 @@ | |||
1 | GNUnet signature purpose registry. | ||
2 | |||
3 | Every time a signature is created or verified with libgnunetutil's | ||
4 | signature functions, the signer must provide a "purpose" that provides | ||
5 | the context for the signature. By signing over the "purpose", it is | ||
6 | not possible for an adversary to use a signature made in one context | ||
7 | in another context. | ||
diff --git a/gnunet-signatures/h.footer b/gnunet-signatures/h.footer new file mode 100644 index 0000000..5d32ee9 --- /dev/null +++ b/gnunet-signatures/h.footer | |||
@@ -0,0 +1,13 @@ | |||
1 | |||
2 | |||
3 | }; | ||
4 | |||
5 | |||
6 | #if 0 /* keep Emacsens' auto-indent happy */ | ||
7 | { | ||
8 | #endif | ||
9 | #ifdef __cplusplus | ||
10 | } | ||
11 | #endif | ||
12 | |||
13 | #endif | ||
diff --git a/gnunet-signatures/h.header b/gnunet-signatures/h.header new file mode 100644 index 0000000..57fced0 --- /dev/null +++ b/gnunet-signatures/h.header | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet | ||
3 | Copyright (C) 2012-2020 GNUnet e.V. | ||
4 | |||
5 | GNUnet is free software: you can redistribute it and/or modify it | ||
6 | under the terms of the GNU General Public License as published | ||
7 | by the Free Software Foundation, either version 3 of the License, | ||
8 | or (at your option) any later version. | ||
9 | |||
10 | GNUnet is distributed in the hope that it will be useful, but | ||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License | ||
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | |||
18 | SPDX-License-Identifier: GPL3.0-or-later | ||
19 | */ | ||
20 | #ifndef GNUNET_SIGNATURES_H | ||
21 | #define GNUNET_SIGNATURES_H | ||
22 | |||
23 | #ifdef __cplusplus | ||
24 | extern "C" { | ||
25 | #if 0 /* keep Emacsens' auto-indent happy */ | ||
26 | } | ||
27 | #endif | ||
28 | #endif | ||
29 | |||
30 | |||
31 | /** | ||
32 | * Network signature purpose definitions. Note that all values | ||
33 | * must be uint32_t and encoded in network byte order in the structs. | ||
34 | */ | ||
35 | enum GNUNET_SignaturePurpose { | ||
diff --git a/gnunet-signatures/h.template b/gnunet-signatures/h.template new file mode 100644 index 0000000..5fb7cf4 --- /dev/null +++ b/gnunet-signatures/h.template | |||
@@ -0,0 +1,6 @@ | |||
1 | |||
2 | |||
3 | /** | ||
4 | * {{Description}} ({{Subsystem}}) | ||
5 | */ | ||
6 | GNUNET_SIGNATURE_PURPOSE_{{Identifier}} = {{Value}}, | ||
diff --git a/gnunet-signatures/registry.rec b/gnunet-signatures/registry.rec new file mode 100644 index 0000000..36ea5f4 --- /dev/null +++ b/gnunet-signatures/registry.rec | |||
@@ -0,0 +1,162 @@ | |||
1 | # -*- mode: rec -*- | ||
2 | # | ||
3 | # Registry for GNUnet Signature purposes | ||
4 | # | ||
5 | |||
6 | %rec: SignaturePurpose | ||
7 | %key: Number | ||
8 | %type: Number int | ||
9 | %mandatory: Number | ||
10 | %typedef: Name_t regexp /^[ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_][ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*$/ | ||
11 | %type: Name Name_t | ||
12 | %unique: Name | ||
13 | %mandatory: Name | ||
14 | %mandatory: Comment | ||
15 | %allowed: Subsystem | ||
16 | %sort: Number Name | ||
17 | |||
18 | |||
19 | Number: 0 | ||
20 | Name: TEST | ||
21 | Comment: Test signature, not valid for anything other than writing a test. (Note that the signature verification code will accept this value). | ||
22 | Subsystem: GNUnet | ||
23 | |||
24 | Number: 1 | ||
25 | Name: TRANSPORT_PONG_OWN | ||
26 | Comment: Signature for confirming that this peer uses a particular address. | ||
27 | Subsystem: GNUnet-TRANSPORT | ||
28 | |||
29 | Number: 2 | ||
30 | Name: TRANSPORT_DISCONNECT | ||
31 | Comment: Signature for confirming that this peer intends to disconnect. | ||
32 | Subsystem: GNUnet-TRANSPORT | ||
33 | |||
34 | Number: 3 | ||
35 | Name: REVOCATION | ||
36 | Comment: Signature for confirming a key revocation. | ||
37 | Subsystem: GNUnet-Revocation | ||
38 | |||
39 | Number: 4 | ||
40 | Name: NAMESPACE_ADVERTISEMENT | ||
41 | Comment: Signature for a namespace/pseudonym advertisement (by the namespace owner). | ||
42 | Subsystem: GNUnet-FS | ||
43 | |||
44 | Number: 5 | ||
45 | Name: PEER_PLACEMENT | ||
46 | Comment: Signature by which a peer affirms that it is providing a certain bit of content for use in LOCation URIs. | ||
47 | Subsystem: GNUnet-FS | ||
48 | |||
49 | Number: 11 | ||
50 | Name: DNS_RECORD | ||
51 | Comment: Signature on a GNUNET_DNS_Advertisement. | ||
52 | Subsystem: GNUnet-DNS+Exit | ||
53 | |||
54 | Number: 14 | ||
55 | Name: NSE_SEND | ||
56 | Comment: Signature of a network size estimate message. | ||
57 | Subsystem: GNUnet-NSE | ||
58 | |||
59 | Number: 15 | ||
60 | Name: GNS_RECORD_SIGN | ||
61 | Comment: Signature of a gnunet naming system record block | ||
62 | Subsystem: GNUnet-GNSRECORD | ||
63 | |||
64 | Number: 16 | ||
65 | Name: SET_ECC_KEY | ||
66 | Comment: Purpose is to set a session key. | ||
67 | Subsystem: GNUnet-CORE | ||
68 | |||
69 | Number: 17 | ||
70 | Name: FS_UBLOCK | ||
71 | Comment: UBlock Signature, done using DSS, not ECC | ||
72 | Subsystem: GNUnet-FS | ||
73 | |||
74 | Number: 18 | ||
75 | Name: REGEX_ACCEPT | ||
76 | Comment: Accept state in regex DFA. Peer affirms that it offers the matching service. | ||
77 | Subsystem: GNUnet-REGEX | ||
78 | |||
79 | Number: 20 | ||
80 | Name: CONVERSATION_RING | ||
81 | Comment: Signature of a conversation ring. | ||
82 | Subsystem: GNUnet-CONVERSATION | ||
83 | |||
84 | Number: 21 | ||
85 | Name: SECRETSHARING_DKG1 | ||
86 | Comment: Signature for the first round of distributed key generation. | ||
87 | Subsystem: GNUnet-SECRETSHARING | ||
88 | |||
89 | Number: 22 | ||
90 | Name: SECRETSHARING_DKG2 | ||
91 | Comment: Signature for the second round of distributed key generation. | ||
92 | Subsystem: GNUnet-SECRETSHARING | ||
93 | |||
94 | Number: 23 | ||
95 | Name: SECRETSHARING_DECRYPTION | ||
96 | Comment: Signature for the cooperative decryption. | ||
97 | Subsystem: GNUnet-SECRETSHARING | ||
98 | |||
99 | Number: 27 | ||
100 | Name: RECLAIM_CODE_SIGN | ||
101 | Comment: Signature for a GNUid Ticket | ||
102 | Subsystem: Reclaim | ||
103 | |||
104 | Number: 28 | ||
105 | Name: DELEGATE | ||
106 | Comment: Signature for a GNUnet credential | ||
107 | Subsystem: Reclaim | ||
108 | |||
109 | Number: 29 | ||
110 | Name: TRANSPORT_ADDRESS | ||
111 | Comment: Signature by a peer affirming that this is one of its addresses for the given time period. | ||
112 | Subsystem: GNUnet-TRANSPORT | ||
113 | |||
114 | Number: 30 | ||
115 | Name: TRANSPORT_EPHEMERAL | ||
116 | Comment: Signature by a peer affirming that the given ephemeral key is currently in use by that peer's transport service. | ||
117 | Subsystem: GNUnet-TRANSPORT | ||
118 | |||
119 | Number: 31 | ||
120 | Name: COMMUNICATOR_TCP_HANDSHAKE | ||
121 | Comment: Signature used by TCP communicator handshake. | ||
122 | Subsystem: GNUnet-TRANSPORT-TCP | ||
123 | |||
124 | Number: 32 | ||
125 | Name: COMMUNICATOR_TCP_REKEY | ||
126 | Comment: Signature used by TCP communicator rekey. | ||
127 | Subsystem: GNUnet-TRANSPORT-TCP | ||
128 | |||
129 | Number: 33 | ||
130 | Name: COMMUNICATOR_UDP_HANDSHAKE | ||
131 | Comment: Signature used by UDP communicator handshake. | ||
132 | Subsystem: GNUnet-TRANSPORT-UDP | ||
133 | |||
134 | Number: 34 | ||
135 | Name: COMMUNICATOR_UDP_BROADCAST | ||
136 | Comment: Signature used by UDP broadcasts. | ||
137 | Subsystem: GNUnet-TRANSPORT-UDP | ||
138 | |||
139 | Number: 35 | ||
140 | Name: TRANSPORT_CHALLENGE | ||
141 | Comment: 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). | ||
142 | Subsystem: GNUnet-TRANSPORT | ||
143 | |||
144 | Number: 36 | ||
145 | Name: TRANSPORT_DV_HOP | ||
146 | Comment: Signature by a peer affirming that it is on a DV path. | ||
147 | Subsystem: GNUnet-TRANSPORT | ||
148 | |||
149 | Number: 37 | ||
150 | Name: TRANSPORT_DV_INITIATOR | ||
151 | Comment: Signature by a peer affirming that it originated the DV path. | ||
152 | Subsystem: GNUnet-TRANSPORT | ||
153 | |||
154 | Number: 38 | ||
155 | Name: CADET_CONNECTION_INITIATOR | ||
156 | Comment: Signature by a peer that like to create a connection. | ||
157 | Subsystem: GNUnet-CADET | ||
158 | |||
159 | Number: 39 | ||
160 | Name: COMMUNICATOR_TCP_HANDSHAKE_ACK | ||
161 | Comment: Signature by a peer sending back the nonce received at initial handshake. | ||
162 | Subsystem: GNUnet-TRANSPORT-TCP | ||