2 This file is part of GNUnet
3 Copyright (C) 2012-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/>.
18 SPDX-License-Identifier: AGPL3.0-or-later
22 * @brief IPC messages between ABD API and ABD service
23 * @author Martin Schanzenbach
28 #include "gnunet_abd_service.h"
30 GNUNET_NETWORK_STRUCT_BEGIN
33 * Message from client to Credential service to collect credentials.
38 * Header of type #GNUNET_MESSAGE_TYPE_ABD_VERIFY
40 struct GNUNET_MessageHeader header;
45 struct GNUNET_CRYPTO_EcdsaPrivateKey subject_key;
50 struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key;
53 * Length of the issuer attribute
55 uint16_t issuer_attribute_len;
58 * Direction of the resolution algo
60 uint16_t resolution_algo;
63 * Unique identifier for this request (for key collisions).
65 uint32_t id GNUNET_PACKED;
67 /* Followed by the zero-terminated attribute */
72 * Message from client to Credential service to verify attributes.
77 * Header of type #GNUNET_MESSAGE_TYPE_ABD_VERIFY
79 struct GNUNET_MessageHeader header;
84 struct GNUNET_CRYPTO_EcdsaPublicKey subject_key;
89 struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key;
97 * Length of the issuer attribute
99 uint16_t issuer_attribute_len;
102 * Direction of the resolution algo
104 uint16_t resolution_algo;
107 * Unique identifier for this request (for key collisions).
109 uint32_t id GNUNET_PACKED;
111 /* Followed by the zero-terminated attribute and credentials to look up */
116 * Message from ABD service to client: new results.
118 struct DelegationChainResultMessage
121 * Header of type #GNUNET_MESSAGE_TYPE_ABD_VERIFY_RESULT
123 struct GNUNET_MessageHeader header;
126 * Unique identifier for this request (for key collisions).
128 uint32_t id GNUNET_PACKED;
131 * Indicates if credential has been found at all
133 uint32_t del_found GNUNET_PACKED;
136 * The number of delegations in the response
138 uint32_t d_count GNUNET_PACKED;
141 * The number of credentials in the response
143 uint32_t c_count GNUNET_PACKED;
145 /* followed by ad_count GNUNET_ABD_RecordData structs*/
149 * Message from ABD service to client: new results.
151 struct DelegationChainIntermediateMessage
154 * Header of type #GNUNET_MESSAGE_TYPE_ABD_INTERMEDIATE_RESULT
156 struct GNUNET_MessageHeader header;
159 * Unique identifier for this request (for key collisions).
161 uint32_t id GNUNET_PACKED;
163 uint16_t is_bw GNUNET_PACKED;
165 uint32_t size GNUNET_PACKED;
168 struct DelegationRecordData
173 struct GNUNET_CRYPTO_EcdsaPublicKey subject_key;
178 uint32_t subject_attribute_len GNUNET_PACKED;
187 struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key;
192 struct GNUNET_CRYPTO_EcdsaPublicKey subject_key;
197 uint32_t issuer_attribute_len GNUNET_PACKED;
202 uint32_t subject_attribute_len GNUNET_PACKED;
206 struct CredentialEntry
210 * The signature for this credential by the issuer
212 struct GNUNET_CRYPTO_EcdsaSignature signature;
217 struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
220 * Public key of the issuer
222 struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key;
225 * Public key of the subject this credential was issued to
227 struct GNUNET_CRYPTO_EcdsaPublicKey subject_key;
230 * Expiration time of this credential
232 uint64_t expiration GNUNET_PACKED;
235 * Issuer attribute length
237 uint32_t issuer_attribute_len;
240 * Followed by the attribute string
250 struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
253 * The signature for this credential by the issuer
255 struct GNUNET_CRYPTO_EcdsaSignature signature;
258 * Public key of the issuer
260 struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key;
263 * Public key of the subject this credential was issued to
265 struct GNUNET_CRYPTO_EcdsaPublicKey subject_key;
268 * Expiration time of this credential
270 uint64_t expiration GNUNET_PACKED;
273 * Issuer subject attribute length
275 uint32_t issuer_attribute_len;
278 * Issuer attribute length
280 uint32_t subject_attribute_len;
283 * Followed by the subject attribute string
288 GNUNET_NETWORK_STRUCT_END