2 This file is part of GNUnet.
3 (C) 2013 Christian Grothoff (and other contributing authors)
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.
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.
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.
22 * @author Christian Grothoff
23 * @file revocation/revocation.h
24 * @brief messages for key revocation
29 #include "gnunet_util_lib.h"
31 GNUNET_NETWORK_STRUCT_BEGIN
34 * Query key revocation status.
39 * Type: #GNUNET_MESSAGE_TYPE_REVOCATION_QUERY
41 struct GNUNET_MessageHeader header;
46 uint32_t reserved GNUNET_PACKED;
51 struct GNUNET_CRYPTO_EcdsaPublicKey key;
57 * Key revocation response.
59 struct QueryResponseMessage
62 * Type: #GNUNET_MESSAGE_TYPE_REVOCATION_QUERY_RESPONSE
64 struct GNUNET_MessageHeader header;
67 * #GNUNET_NO if revoked, #GNUNET_YES if valid.
69 uint32_t is_valid GNUNET_PACKED;
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`.
84 * Type: #GNUNET_MESSAGE_TYPE_REVOCATION_REVOKE
86 struct GNUNET_MessageHeader header;
91 uint32_t reserved GNUNET_PACKED;
94 * Number that causes a hash collision with the @e public_key.
96 uint64_t proof_of_work GNUNET_PACKED;
99 * Signature confirming revocation.
101 struct GNUNET_CRYPTO_EcdsaSignature signature;
104 * Must have purpose #GNUNET_SIGNATURE_PURPOSE_REVOCATION,
105 * size expands over the public key.
107 struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
112 struct GNUNET_CRYPTO_EcdsaPublicKey public_key;
118 * Key revocation response.
120 struct RevocationResponseMessage
123 * Type: #GNUNET_MESSAGE_TYPE_REVOCATION_REVOKE_RESPONSE
125 struct GNUNET_MessageHeader header;
128 * #GNUNET_NO if revoked, #GNUNET_YES if valid.
130 uint32_t is_valid GNUNET_PACKED;
135 GNUNET_NETWORK_STRUCT_END