aboutsummaryrefslogtreecommitdiff
path: root/gnunet-signatures
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-08-03 17:26:16 +0200
committerChristian Grothoff <christian@grothoff.org>2020-08-03 17:26:16 +0200
commit8b4d25630e965c6831d009f9948a10bf9bb346ee (patch)
treee18b071cb1dde4ac6894e5629e5389249cb86f50 /gnunet-signatures
parent969e2b3b796a805b4954ea38d8a409c27f861883 (diff)
downloadgana-8b4d25630e965c6831d009f9948a10bf9bb346ee.tar.gz
gana-8b4d25630e965c6831d009f9948a10bf9bb346ee.zip
begin signature registry
Diffstat (limited to 'gnunet-signatures')
-rw-r--r--gnunet-signatures/.gitignore2
-rw-r--r--gnunet-signatures/Makefile15
-rw-r--r--gnunet-signatures/README7
-rw-r--r--gnunet-signatures/h.footer13
-rw-r--r--gnunet-signatures/h.header35
-rw-r--r--gnunet-signatures/h.template6
-rw-r--r--gnunet-signatures/registry.rec162
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 @@
1gnunet_signatures.h
2gnunet_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 @@
1FILES=registry.rec gnunet_signatures.h
2all: check $(FILES)
3check: registry.rec
4 recfix --check registry.rec
5distclean:
6 rm -f *.tmp
7clean:
8 rm -f $(FILES) *.tmp
9gnunet_signatures.h.tmp: registry.rec h.template
10 ../format.sh h.template < registry.rec > $@
11
12gnunet_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 @@
1GNUnet signature purpose registry.
2
3Every time a signature is created or verified with libgnunetutil's
4signature functions, the signer must provide a "purpose" that provides
5the context for the signature. By signing over the "purpose", it is
6not possible for an adversary to use a signature made in one context
7in 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
24extern "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 */
35enum 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
19Number: 0
20Name: TEST
21Comment: Test signature, not valid for anything other than writing a test. (Note that the signature verification code will accept this value).
22Subsystem: GNUnet
23
24Number: 1
25Name: TRANSPORT_PONG_OWN
26Comment: Signature for confirming that this peer uses a particular address.
27Subsystem: GNUnet-TRANSPORT
28
29Number: 2
30Name: TRANSPORT_DISCONNECT
31Comment: Signature for confirming that this peer intends to disconnect.
32Subsystem: GNUnet-TRANSPORT
33
34Number: 3
35Name: REVOCATION
36Comment: Signature for confirming a key revocation.
37Subsystem: GNUnet-Revocation
38
39Number: 4
40Name: NAMESPACE_ADVERTISEMENT
41Comment: Signature for a namespace/pseudonym advertisement (by the namespace owner).
42Subsystem: GNUnet-FS
43
44Number: 5
45Name: PEER_PLACEMENT
46Comment: Signature by which a peer affirms that it is providing a certain bit of content for use in LOCation URIs.
47Subsystem: GNUnet-FS
48
49Number: 11
50Name: DNS_RECORD
51Comment: Signature on a GNUNET_DNS_Advertisement.
52Subsystem: GNUnet-DNS+Exit
53
54Number: 14
55Name: NSE_SEND
56Comment: Signature of a network size estimate message.
57Subsystem: GNUnet-NSE
58
59Number: 15
60Name: GNS_RECORD_SIGN
61Comment: Signature of a gnunet naming system record block
62Subsystem: GNUnet-GNSRECORD
63
64Number: 16
65Name: SET_ECC_KEY
66Comment: Purpose is to set a session key.
67Subsystem: GNUnet-CORE
68
69Number: 17
70Name: FS_UBLOCK
71Comment: UBlock Signature, done using DSS, not ECC
72Subsystem: GNUnet-FS
73
74Number: 18
75Name: REGEX_ACCEPT
76Comment: Accept state in regex DFA. Peer affirms that it offers the matching service.
77Subsystem: GNUnet-REGEX
78
79Number: 20
80Name: CONVERSATION_RING
81Comment: Signature of a conversation ring.
82Subsystem: GNUnet-CONVERSATION
83
84Number: 21
85Name: SECRETSHARING_DKG1
86Comment: Signature for the first round of distributed key generation.
87Subsystem: GNUnet-SECRETSHARING
88
89Number: 22
90Name: SECRETSHARING_DKG2
91Comment: Signature for the second round of distributed key generation.
92Subsystem: GNUnet-SECRETSHARING
93
94Number: 23
95Name: SECRETSHARING_DECRYPTION
96Comment: Signature for the cooperative decryption.
97Subsystem: GNUnet-SECRETSHARING
98
99Number: 27
100Name: RECLAIM_CODE_SIGN
101Comment: Signature for a GNUid Ticket
102Subsystem: Reclaim
103
104Number: 28
105Name: DELEGATE
106Comment: Signature for a GNUnet credential
107Subsystem: Reclaim
108
109Number: 29
110Name: TRANSPORT_ADDRESS
111Comment: Signature by a peer affirming that this is one of its addresses for the given time period.
112Subsystem: GNUnet-TRANSPORT
113
114Number: 30
115Name: TRANSPORT_EPHEMERAL
116Comment: Signature by a peer affirming that the given ephemeral key is currently in use by that peer's transport service.
117Subsystem: GNUnet-TRANSPORT
118
119Number: 31
120Name: COMMUNICATOR_TCP_HANDSHAKE
121Comment: Signature used by TCP communicator handshake.
122Subsystem: GNUnet-TRANSPORT-TCP
123
124Number: 32
125Name: COMMUNICATOR_TCP_REKEY
126Comment: Signature used by TCP communicator rekey.
127Subsystem: GNUnet-TRANSPORT-TCP
128
129Number: 33
130Name: COMMUNICATOR_UDP_HANDSHAKE
131Comment: Signature used by UDP communicator handshake.
132Subsystem: GNUnet-TRANSPORT-UDP
133
134Number: 34
135Name: COMMUNICATOR_UDP_BROADCAST
136Comment: Signature used by UDP broadcasts.
137Subsystem: GNUnet-TRANSPORT-UDP
138
139Number: 35
140Name: TRANSPORT_CHALLENGE
141Comment: 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).
142Subsystem: GNUnet-TRANSPORT
143
144Number: 36
145Name: TRANSPORT_DV_HOP
146Comment: Signature by a peer affirming that it is on a DV path.
147Subsystem: GNUnet-TRANSPORT
148
149Number: 37
150Name: TRANSPORT_DV_INITIATOR
151Comment: Signature by a peer affirming that it originated the DV path.
152Subsystem: GNUnet-TRANSPORT
153
154Number: 38
155Name: CADET_CONNECTION_INITIATOR
156Comment: Signature by a peer that like to create a connection.
157Subsystem: GNUnet-CADET
158
159Number: 39
160Name: COMMUNICATOR_TCP_HANDSHAKE_ACK
161Comment: Signature by a peer sending back the nonce received at initial handshake.
162Subsystem: GNUnet-TRANSPORT-TCP