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 Affero 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.
15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 * @author Christian Grothoff
21 * @file revocation/revocation.h
22 * @brief messages for key revocation
27 #include "gnunet_util_lib.h"
29 GNUNET_NETWORK_STRUCT_BEGIN
32 * Query key revocation status.
37 * Type: #GNUNET_MESSAGE_TYPE_REVOCATION_QUERY
39 struct GNUNET_MessageHeader header;
44 uint32_t reserved GNUNET_PACKED;
49 struct GNUNET_CRYPTO_EcdsaPublicKey key;
55 * Key revocation response.
57 struct QueryResponseMessage
60 * Type: #GNUNET_MESSAGE_TYPE_REVOCATION_QUERY_RESPONSE
62 struct GNUNET_MessageHeader header;
65 * #GNUNET_NO if revoked, #GNUNET_YES if valid.
67 uint32_t is_valid GNUNET_PACKED;
73 * Revoke key. These messages are exchanged between peers (during
74 * flooding) but also sent by the client to the service. When the
75 * client sends it to the service, the message is answered by a
76 * #GNUNET_MESSAGE_TYPE_REVOCATION_REVOKE_RESPONSE (which is just
77 * in a `struct GNUNET_MessageHeader`.
82 * Type: #GNUNET_MESSAGE_TYPE_REVOCATION_REVOKE
84 struct GNUNET_MessageHeader header;
89 uint32_t reserved GNUNET_PACKED;
92 * Number that causes a hash collision with the @e public_key.
94 uint64_t proof_of_work GNUNET_PACKED;
97 * Signature confirming revocation.
99 struct GNUNET_CRYPTO_EcdsaSignature signature;
102 * Must have purpose #GNUNET_SIGNATURE_PURPOSE_REVOCATION,
103 * size expands over the public key.
105 struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
110 struct GNUNET_CRYPTO_EcdsaPublicKey public_key;
116 * Key revocation response.
118 struct RevocationResponseMessage
121 * Type: #GNUNET_MESSAGE_TYPE_REVOCATION_REVOKE_RESPONSE
123 struct GNUNET_MessageHeader header;
126 * #GNUNET_NO if revoked, #GNUNET_YES if valid.
128 uint32_t is_valid GNUNET_PACKED;
133 GNUNET_NETWORK_STRUCT_END