2 This file is part of GNUnet.
3 Copyright (C) 2013 GNUnet e.V.
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.
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 Affero General Public License for more details.
17 * @author Christian Grothoff
18 * @file revocation/revocation.h
19 * @brief messages for key revocation
24 #include "gnunet_util_lib.h"
26 GNUNET_NETWORK_STRUCT_BEGIN
29 * Query key revocation status.
34 * Type: #GNUNET_MESSAGE_TYPE_REVOCATION_QUERY
36 struct GNUNET_MessageHeader header;
41 uint32_t reserved GNUNET_PACKED;
46 struct GNUNET_CRYPTO_EcdsaPublicKey key;
52 * Key revocation response.
54 struct QueryResponseMessage
57 * Type: #GNUNET_MESSAGE_TYPE_REVOCATION_QUERY_RESPONSE
59 struct GNUNET_MessageHeader header;
62 * #GNUNET_NO if revoked, #GNUNET_YES if valid.
64 uint32_t is_valid GNUNET_PACKED;
70 * Revoke key. These messages are exchanged between peers (during
71 * flooding) but also sent by the client to the service. When the
72 * client sends it to the service, the message is answered by a
73 * #GNUNET_MESSAGE_TYPE_REVOCATION_REVOKE_RESPONSE (which is just
74 * in a `struct GNUNET_MessageHeader`.
79 * Type: #GNUNET_MESSAGE_TYPE_REVOCATION_REVOKE
81 struct GNUNET_MessageHeader header;
86 uint32_t reserved GNUNET_PACKED;
89 * Number that causes a hash collision with the @e public_key.
91 uint64_t proof_of_work GNUNET_PACKED;
94 * Signature confirming revocation.
96 struct GNUNET_CRYPTO_EcdsaSignature signature;
99 * Must have purpose #GNUNET_SIGNATURE_PURPOSE_REVOCATION,
100 * size expands over the public key.
102 struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
107 struct GNUNET_CRYPTO_EcdsaPublicKey public_key;
113 * Key revocation response.
115 struct RevocationResponseMessage
118 * Type: #GNUNET_MESSAGE_TYPE_REVOCATION_REVOKE_RESPONSE
120 struct GNUNET_MessageHeader header;
123 * #GNUNET_NO if revoked, #GNUNET_YES if valid.
125 uint32_t is_valid GNUNET_PACKED;
130 GNUNET_NETWORK_STRUCT_END