GNUnet debian-0.24.3-23-g589b01d60
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
40{
45
50
54 uint32_t block_len;
55
59};
60
61
62
69//struct GNUNET_PILS_SignRequest
70//{
71// /**
72// * Type: GNUNET_MESSAGE_TYPE_PILS_SIGN_REQUEST
73// */
74// struct GNUNET_MessageHeader header;
75//
76// /**
77// * For alignment.
78// */
79// uint32_t reserved GNUNET_PACKED;
80//
81// /**
82// * The hash over the data to be signed
83// */
84// struct GNUNET_HashCode hash GNUNET_PACKED;
85//};
86
87
93//struct GNUNET_PILS_Signature
94//{
95// /**
96// * Type: GNUNET_MESSAGE_TYPE_PILS_SIGNATURE
97// */
98// struct GNUNET_MessageHeader header;
99//
100// /**
101// * For alignment.
102// */
103// uint32_t reserved GNUNET_PACKED;
104//
105// /**
106// * The hash over the data to be signed
107// */
108// struct GNUNET_HashCode hash GNUNET_PACKED;
109//
110// /**
111// * The signature over the hashed data
112// */
113// struct GNUNET_CRYPTO_EddsaSignature signature GNUNET_PACKED;
114//};
115
116
123{
128
133
137};
138
143{
148
153
157 uint32_t rid;
158};
159
164{
169
174
178 uint32_t rid;
179};
180
185{
190
195
200
204 uint32_t rid;
205
206};
207
208
213{
218
222 uint32_t rid;
223
224 // Followed by the signature purpose
225};
226
227
232{
237
242
247
248};
249
251
252#endif
253
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:143
uint32_t rid
Request ID.
Definition: pils.h:157
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_PILS_DECAPS.
Definition: pils.h:147
struct GNUNET_CRYPTO_HpkeEncapsulation c
Encapsulation to decapsulate.
Definition: pils.h:152
Message containing the decapsulated key.
Definition: pils.h:164
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_PILS_DECAPS_RESULT.
Definition: pils.h:168
uint32_t rid
Request ID.
Definition: pils.h:178
struct GNUNET_ShortHashCode key
The decapsulated key.
Definition: pils.h:173
Message requesting a signature on data with the current peer id.
Definition: pils.h:123
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_PILS_FEED_ADDRESSES.
Definition: pils.h:127
uint32_t block_len
For alignment.
Definition: pils.h:132
header of what an ECC signature signs this must be followed by "size - 8" bytes of the actual signed ...
an ECC signature using EdDSA.
HPKE DHKEM encapsulation (X25519) See RFC 9180.
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_EccSignaturePurpose purpose
Purpose must be GNUNET_SIGNATURE_PURPOSE_HELLO.
Definition: hello-uri.c:54
Message to request a signature from PILS.
Definition: pils.h:213
uint32_t rid
Request ID.
Definition: pils.h:222
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_PILS_SIGN_REQUEST.
Definition: pils.h:217
Message containing the signature.
Definition: pils.h:185
uint32_t rid
Request ID.
Definition: pils.h:204
struct GNUNET_PeerIdentity peer_id
The peer identity that produces the signature.
Definition: pils.h:194
struct GNUNET_CRYPTO_EddsaSignature sig
The signature.
Definition: pils.h:199
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_PILS_SIGN_RESULT.
Definition: pils.h:189