GNUnet 0.25.2-11-g84e94e98c
 
Loading...
Searching...
No Matches
pils.h
Go to the documentation of this file.
1/*
2 This file is part of GNUnet.
3 Copyright (C) 2024 GNUnet e.V.
4
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.
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 Affero General Public License for more details.
14
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/>.
17
18 SPDX-License-Identifier: AGPL3.0-or-later
19 */
20
27#ifndef PILS_H
28#define PILS_H
29
30#include "gnunet_common.h"
31#include "gnunet_util_lib.h"
32
34
60
61
68// struct GNUNET_PILS_SignRequest
69// {
70// /**
71// * Type: GNUNET_MESSAGE_TYPE_PILS_SIGN_REQUEST
72// */
73// struct GNUNET_MessageHeader header;
74//
75// /**
76// * For alignment.
77// */
78// uint32_t reserved GNUNET_PACKED;
79//
80// /**
81// * The hash over the data to be signed
82// */
83// struct GNUNET_HashCode hash GNUNET_PACKED;
84// };
85
86
92// struct GNUNET_PILS_Signature
93// {
94// /**
95// * Type: GNUNET_MESSAGE_TYPE_PILS_SIGNATURE
96// */
97// struct GNUNET_MessageHeader header;
98//
99// /**
100// * For alignment.
101// */
102// uint32_t reserved GNUNET_PACKED;
103//
104// /**
105// * The hash over the data to be signed
106// */
107// struct GNUNET_HashCode hash GNUNET_PACKED;
108//
109// /**
110// * The signature over the hashed data
111// */
112// struct GNUNET_CRYPTO_EddsaSignature signature GNUNET_PACKED;
113// };
114
115
137
158
163{
168
173
177 uint32_t rid;
178};
179
206
207
212{
217
221 uint32_t rid;
222
223 // Followed by the signature purpose
224};
225
226
231{
236
241
246
247};
248
250
251#endif
commonly used definitions; globals in this file are exempt from the rule that the module name ("commo...
#define GNUNET_NETWORK_STRUCT_BEGIN
Define as empty, GNUNET_PACKED should suffice, but this won't work on W32.
#define GNUNET_NETWORK_STRUCT_END
Define as empty, GNUNET_PACKED should suffice, but this won't work on W32;.
#define GNUNET_PACKED
gcc-ism to get packed structs.
Message to request a decapsulation from PILS.
Definition pils.h:142
uint32_t rid
Request ID.
Definition pils.h:156
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_PILS_DECAPS.
Definition pils.h:146
struct GNUNET_CRYPTO_HpkeEncapsulation c
Encapsulation to decapsulate.
Definition pils.h:151
Message containing the decapsulated key.
Definition pils.h:163
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_PILS_DECAPS_RESULT.
Definition pils.h:167
uint32_t rid
Request ID.
Definition pils.h:177
struct GNUNET_ShortHashCode key
The decapsulated key.
Definition pils.h:172
Message requesting a signature on data with the current peer id.
Definition pils.h:122
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_PILS_FEED_ADDRESSES.
Definition pils.h:126
uint32_t block_len
For alignment.
Definition pils.h:131
an ECC signature using EdDSA.
HPKE DHKEM encapsulation (X25519) See RFC 9180.
header of what an ECC signature signs this must be followed by "size - 8" bytes of the actual signed ...
A 512-bit hashcode.
Header for all communications.
The identity of the host (wraps the signing key of the peer).
A 256-bit hashcode.
Time for absolute time used by GNUnet, in microseconds and in network byte order.
Message containing the current peer id and the hash from which it was generated.
Definition pils.h:40
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_PILS_PEER_ID.
Definition pils.h:44
struct GNUNET_HashCode hash
The hash from which the peer id was generated.
Definition pils.h:49
uint32_t block_len
Length of the HELLO block in bytes.
Definition pils.h:54
Message signed as part of a HELLO block/URL.
Definition hello-uri.c:50
struct GNUNET_HashCode h_addrs
Hash over all addresses.
Definition hello-uri.c:64
struct GNUNET_TIME_AbsoluteNBO expiration_time
When does the signature expire?
Definition hello-uri.c:59
struct GNUNET_CRYPTO_SignaturePurpose purpose
Purpose must be GNUNET_SIGNATURE_PURPOSE_HELLO.
Definition hello-uri.c:54
Message to request a signature from PILS.
Definition pils.h:212
uint32_t rid
Request ID.
Definition pils.h:221
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_PILS_SIGN_REQUEST.
Definition pils.h:216
Message containing the signature.
Definition pils.h:184
uint32_t rid
Request ID.
Definition pils.h:203
struct GNUNET_PeerIdentity peer_id
The peer identity that produces the signature.
Definition pils.h:193
struct GNUNET_CRYPTO_EddsaSignature sig
The signature.
Definition pils.h:198
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_PILS_SIGN_RESULT.
Definition pils.h:188