aboutsummaryrefslogtreecommitdiff
path: root/src/revocation
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-09-30 18:00:11 +0000
committerChristian Grothoff <christian@grothoff.org>2013-09-30 18:00:11 +0000
commit28018959b9afc2a8259f35e074869fd88b31b03e (patch)
tree5e779c55eab35f3887a82103fa0a0178117dfc27 /src/revocation
parent5aa6d40f357879fa5048161c8d8c689688c4c254 (diff)
downloadgnunet-28018959b9afc2a8259f35e074869fd88b31b03e.tar.gz
gnunet-28018959b9afc2a8259f35e074869fd88b31b03e.zip
adding skeleton for revocation service
Diffstat (limited to 'src/revocation')
-rw-r--r--src/revocation/Makefile.am20
-rw-r--r--src/revocation/revocation.conf.in18
-rw-r--r--src/revocation/revocation.h121
3 files changed, 159 insertions, 0 deletions
diff --git a/src/revocation/Makefile.am b/src/revocation/Makefile.am
new file mode 100644
index 000000000..cc0dfd15f
--- /dev/null
+++ b/src/revocation/Makefile.am
@@ -0,0 +1,20 @@
1AM_CPPFLAGS = -I$(top_srcdir)/src/include
2
3if MINGW
4 WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
5endif
6
7if USE_COVERAGE
8 AM_CFLAGS = --coverage -O0
9 XLIB = -lgcov
10endif
11
12pkgcfgdir= $(pkgdatadir)/config.d/
13
14libexecdir= $(pkglibdir)/libexec/
15
16pkgcfg_DATA = \
17 revocation.conf
18
19
20EXTRA_DIST = revocation.h \ No newline at end of file
diff --git a/src/revocation/revocation.conf.in b/src/revocation/revocation.conf.in
new file mode 100644
index 000000000..9c2485117
--- /dev/null
+++ b/src/revocation/revocation.conf.in
@@ -0,0 +1,18 @@
1[revocation]
2AUTOSTART = NO
3# not yet...
4@JAVAPORT@PORT = 2112
5HOSTNAME = localhost
6HOME = $SERVICEHOME
7BINARY = gnunet-service-revocation
8ACCEPT_FROM = 127.0.0.1;
9ACCEPT_FROM6 = ::1;
10UNIXPATH = /tmp/gnunet-service-revocation.unix
11UNIX_MATCH_UID = NO
12UNIX_MATCH_GID = YES
13
14# 2^25 hash operations take about 16-24h on a modern i7
15# (using only a single-core) with SCRYPT.
16# DO NOT CHANGE THIS VALUE, doing so will break the protocol!
17WORKBITS = 25
18
diff --git a/src/revocation/revocation.h b/src/revocation/revocation.h
new file mode 100644
index 000000000..aa15fd44a
--- /dev/null
+++ b/src/revocation/revocation.h
@@ -0,0 +1,121 @@
1/*
2 This file is part of GNUnet.
3 (C) 2013 Christian Grothoff (and other contributing authors)
4
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 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 GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
19*/
20
21/**
22 * @author Christian Grothoff
23 * @file revocation/revocation.h
24 * @brief messages for key revocation
25 */
26#ifndef REVOCATION_H
27#define REVOCATION_H
28
29#include "gnunet_util_lib.h"
30
31GNUNET_NETWORK_STRUCT_BEGIN
32
33/**
34 * Query key revocation status.
35 */
36struct GNUNET_REVOCATION_QueryMessage
37{
38 /**
39 * Type: #GNUNET_MESSAGE_TYPE_REVOCATION_QUERY
40 */
41 struct GNUNET_MessageHeader header;
42
43 /**
44 * For alignment.
45 */
46 uint32_t reserved GNUNET_PACKED;
47
48 /**
49 * Key to check.
50 */
51 struct GNUNET_CRYPTO_EccPublicSignKey key GNUNET_PACKED;
52
53};
54
55
56/**
57 * Key revocation response.
58 */
59struct GNUNET_REVOCATION_QueryResponseMessage
60{
61 /**
62 * Type: #GNUNET_MESSAGE_TYPE_REVOCATION_QUERY_RESPONSE
63 */
64 struct GNUNET_MessageHeader header;
65
66 /**
67 * #GNUNET_NO if revoked, #GNUNET_YES if valid.
68 */
69 uint32_t is_valid GNUNET_PACKED;
70
71};
72
73
74/**
75 * Revoke key. These messages are exchanged between peers (during
76 * flooding) but also sent by the client to the service. When the
77 * client sends it to the service, the message is answered by a
78 * #GNUNET_MESSAGE_TYPE_REVOCATION_REVOKE_RESPONSE (which is just
79 * in a `struct GNUNET_MessageHeader`.
80 */
81struct GNUNET_REVOCATION_RevokeMessage
82{
83 /**
84 * Type: #GNUNET_MESSAGE_TYPE_REVOCATION_REVOKE
85 */
86 struct GNUNET_MessageHeader header;
87
88 /**
89 * For alignment.
90 */
91 uint32_t reserved GNUNET_PACKED;
92
93 /**
94 * Signature confirming revocation.
95 */
96 struct GNUNET_CRYPTO_EccSignature signature GNUNET_PACKED;
97
98 /**
99 * Must have purpose #GNUNET_SIGNATURE_PURPOSE_REVOCATION,
100 * size expands over the key and the proof of work.
101 */
102 struct GNUNET_CRYPTO_EccSignaturePurpose purpose GNUNET_PACKED;
103
104 /**
105 * Key to revoke.
106 */
107 struct GNUNET_CRYPTO_EccPublicSignKey public_key GNUNET_PACKED;
108
109 /**
110 * Number that causes a hash collision with the @e public_key.
111 */
112 uint64_t proof_of_work GNUNET_PACKED;
113
114};
115
116
117GNUNET_NETWORK_STRUCT_END
118
119
120
121#endif