GNUnet debian-0.24.3-23-g589b01d60
pils_api.c
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
33#include <string.h>
34#include <stdint.h>
35#include "platform.h"
36#include "gnunet_protocols.h"
37#include "gnunet_signatures.h"
38#include "gnunet_util_lib.h"
40#include "gnunet_pils_service.h"
41#include "pils.h"
42
43/* Shorthand for Logging */
44#define LOG(kind, ...) GNUNET_log_from (kind, "pils-api", __VA_ARGS__)
45
46
48{
49 // DLL
51
52 // DLL
54
55 // Service handle
57
58 // Decaps callback
60
61 // Decaps callback closure
63
64 // Sign callback
66
67 // Decaps callback closure
69
70 // Current message to send
72
73 // Op ID
74 uint32_t op_id;
75};
76
77
82{
83 /* The handle to the configuration */
85
86 /* Callback called with the new peer id */
88
89 /* Closure to the #pid_change_cb callback */
91
92 /* Task regularily trying to connect to the service */
94
95 /* Delay until the next reconnect */
97
98 /* Handle to the mq to communicate with the service */
100
101 /* The current peer_id */
103
104 /* The hash from the last set of addresses fed to PILS. */
106
111
116
121
122};
123
131static struct GNUNET_PILS_Operation *
132find_op (struct GNUNET_PILS_Handle *h, uint32_t rid)
133{
135
136 for (op = h->op_head; op != NULL; op = op->next)
137 if (op->op_id == rid)
138 return op;
140 "Finding request with id %u was unsuccessful\n",
141 rid);
142 return NULL;
143}
144
145
152static int
153check_peer_id (void *cls, const struct PeerIdUpdateMessage *msg)
154{
155 size_t msg_size;
156 uint32_t block_bytes;
157 (void) cls;
158
159 msg_size = ntohs (msg->header.size);
160 block_bytes = ntohl (msg->block_len);
161 if (msg_size != sizeof (*msg) + block_bytes)
162 {
164 "The msg_size (%lu) is not %lu (header) + %u (block)\n",
165 msg_size,
166 sizeof (*msg),
167 block_bytes);
168 return GNUNET_SYSERR;
169 }
170 return GNUNET_OK;
171
172}
173
174
181static void
182handle_peer_id (void *cls, const struct PeerIdUpdateMessage *pid_msg)
183{
184 struct GNUNET_PILS_Handle *h = cls;
186 uint32_t block_bytes;
187
188 h->reconnect_delay = GNUNET_TIME_UNIT_ZERO;
189 block_bytes = ntohl (pid_msg->block_len);
191 block_bytes);
192 if (NULL == parser)
193 {
195 "Error parsing Hello block from PILS!\n");
196 return;
197 }
198 memcpy (&h->hash, &pid_msg->hash, sizeof (struct GNUNET_HashCode));
199
200 if (NULL != h->pid_change_cb)
201 {
202 h->pid_change_cb (h->pid_change_cb_cls,
203 parser,
204 &pid_msg->hash);
205 }
207}
208
209
216static void
217handle_sign_result (void *cls, const struct SignResultMessage *msg)
218{
219 struct GNUNET_PILS_Handle *h = cls;
221
222 h->reconnect_delay = GNUNET_TIME_UNIT_ZERO;
223 op = find_op (h, ntohl (msg->rid));
224
226 "Received SIGN_RESULT message from service\n");
227
228 if (NULL == op)
229 {
231 "Didn't find the operation corresponding to id %u\n",
232 ntohl(msg->rid));
233 return;
234 }
235 if (NULL != op->sign_cb)
236 {
237 // FIXME maybe return NULL of key is 0ed
238 // as this indicates an error
240 &msg->peer_id,
241 &msg->sig);
242 }
244 h->op_tail,
245 op);
246 GNUNET_free (op);
247}
248
249
256static void
258{
259 struct GNUNET_PILS_Handle *h = cls;
261
262 h->reconnect_delay = GNUNET_TIME_UNIT_ZERO;
263 op = find_op (h, ntohl (msg->rid));
264
265 if (NULL == op)
266 return;
267 if (NULL != op->decaps_cb)
268 {
269 // FIXME maybe return NULL of key is 0ed
270 // as this indicates an error
272 &msg->key);
273 }
275 h->op_tail,
276 op);
277 GNUNET_free (op);
278}
279
280
286static void
287reconnect (void *cls);
288
289
297static void
298mq_error_handler (void *cls, enum GNUNET_MQ_Error error)
299{
300 struct GNUNET_PILS_Handle *h = cls;
301 (void) error;
302
303 // TODO logging
305 "pils-api",
306 "(mq_error_handler) Connection to service failed!.\n");
308 h->mq = NULL;
310 GNUNET_SCHEDULER_add_delayed (h->reconnect_delay, &reconnect, h);
311 h->reconnect_delay = GNUNET_TIME_STD_BACKOFF (h->reconnect_delay);
312}
313
314
320static void
321reconnect (void *cls)
322{
323 struct GNUNET_PILS_Handle *h = cls;
327 struct PeerIdUpdateMessage,
328 h),
329 GNUNET_MQ_hd_fixed_size (decaps_result,
331 struct DecapsResultMessage,
332 h),
333 GNUNET_MQ_hd_fixed_size (sign_result,
335 struct SignResultMessage,
336 h),
338 };
339
340 h->reconnect_task = NULL;
342 "Connecting to peer identity lifecycle service.\n");
343 GNUNET_assert (NULL == h->mq);
345 "pils",
346 handlers,
348 h);
349 if (NULL == h->mq)
350 {
352 "Failed to connect.\n");
353 {
355 GNUNET_SCHEDULER_add_delayed (h->reconnect_delay, &reconnect, h);
356 h->reconnect_delay = GNUNET_TIME_STD_BACKOFF (h->reconnect_delay);
357 }
358 return;
359 }
361 "pils-api",
362 "Connection to service successful!.\n");
363}
364
365
366struct GNUNET_PILS_Handle *
369 void *cls)
370{
371 struct GNUNET_PILS_Handle *h;
372
374 h->cfg = cfg;
375 h->pid_change_cb = pid_change_cb;
376 h->pid_change_cb_cls = cls;
377 h->reconnect_delay = GNUNET_TIME_UNIT_ZERO;
378 reconnect (h);
379 return h;
380}
381
382
389void
391{
393
394 GNUNET_assert (NULL != handle);
396 "Disonnecting from peer identity lifecycle service.\n");
397 if (NULL != handle->reconnect_task)
398 {
399 GNUNET_SCHEDULER_cancel (handle->reconnect_task);
400 handle->reconnect_task = NULL;
401 }
402 if (NULL != handle->mq)
403 {
405 handle->mq = NULL;
406 }
407 LOG (GNUNET_ERROR_TYPE_DEBUG, "Cleaning up\n");
408 while (NULL != (op = handle->op_head))
409 {
410 GNUNET_CONTAINER_DLL_remove (handle->op_head, handle->op_tail, op);
411 GNUNET_free (op);
412 }
414}
415
416
429 const struct
432 void *cb_cls)
433
434{
436 struct SignRequestMessage *msg;
437
440 ntohl (purpose->size),
442 op->h = handle;
443 op->sign_cb = cb;
444 op->sign_cb_cls = cb_cls;
445 msg->rid = htonl (handle->op_id_counter++);
446 op->op_id = ntohl (msg->rid);
447 memcpy (&msg[1], purpose, ntohl (purpose->size));
449 handle->op_tail,
450 op);
451 // FIXME resend?
453 op->env = NULL;
454 return op;
455}
456
457
469 const struct GNUNET_CRYPTO_HpkeEncapsulation *c,
471 void *cb_cls)
472{
474 struct DecapsMessage *msg;
475
478 msg->c = *c;
479 op->h = handle;
480 op->decaps_cb = cb;
481 op->decaps_cb_cls = cb_cls;
482 msg->rid = htonl (handle->op_id_counter++);
483 op->op_id = ntohl (msg->rid);
485 handle->op_tail,
486 op);
487 // FIXME resend?
489 op->env = NULL;
490 return op;
491}
492
493
494void
496{
497 struct GNUNET_PILS_Handle *h = op->h;
498
499 GNUNET_CONTAINER_DLL_remove (h->op_head, h->op_tail, op);
500 if (NULL != op->env)
502 GNUNET_free (op);
503}
504
505
506void
507GNUNET_PILS_derive_pid (size_t seed_key_bytes,
508 const uint8_t seed_key[seed_key_bytes],
509 const struct GNUNET_HashCode *addrs_hash,
510 struct GNUNET_CRYPTO_EddsaPrivateKey *outkey)
511{
512 struct GNUNET_ShortHashCode prk;
513
521 addrs_hash,
522 sizeof *addrs_hash,
523 seed_key,
524 seed_key_bytes));
533 sizeof *outkey,
534 &prk,
535 "gnunet-pils-ephemeral-peer-key",
536 strlen ("gnunet-pils-ephemeral-peer-key"),
537 NULL, 0);
538}
539
540
541void
543 const struct GNUNET_HELLO_Builder *builder)
544{
546 struct GNUNET_MQ_Envelope *env;
547 size_t block_bytes;
548
550 // TODO check whether the new hash and the 'current' hash are the same -
551 // nothing to do in that case (directly return the peer id?)
553 block_bytes,
555 msg->block_len = htonl (block_bytes);
557 builder,
558 NULL,
559 NULL,
561 (char*) &msg[1]);
563}
564
565
577 const struct GNUNET_HELLO_Builder *builder,
578 struct GNUNET_TIME_Absolute et,
580 void *cb_cls)
581{
582 struct PilsHelloSignaturePurpose hsp = {
583 .purpose.size = htonl (sizeof (hsp)),
584 .purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_HELLO),
585 .expiration_time = GNUNET_TIME_absolute_hton (et)
586 };
588 &hsp.h_addrs);
590 "Address hash is %s\n",
591 GNUNET_h2s_full (&hsp.h_addrs));
593 &hsp.purpose,
594 cb,
595 cb_cls);
596}
597
598
599/* end of pils_api.c */
struct GNUNET_MQ_MessageHandlers handlers[]
Definition: 003.c:1
struct GNUNET_MessageHeader * msg
Definition: 005.c:2
struct GNUNET_MQ_Envelope * env
Definition: 005.c:1
static struct GNUNET_ARM_Handle * h
Connection with ARM.
Definition: gnunet-arm.c:98
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
Definition: gnunet-arm.c:108
static char * peer_id
Option –peer.
Definition: gnunet-cadet.c:42
static struct HostSet * builder
NULL if we are not currently iterating over peer information.
struct GNUNET_PILS_Operation * op
PILS op.
Definition: gnunet-hello.c:94
static uint8_t seed_key[256/8]
void pid_change_cb(void *cls, const struct GNUNET_HELLO_Parser *hparser, const struct GNUNET_HashCode *addr_hash)
Definition: gnunet-pils.c:64
static struct GNUNET_VPN_Handle * handle
Handle to vpn service.
Definition: gnunet-vpn.c:35
Helper library for handling HELLO URIs.
void(* GNUNET_PILS_PidChangeCallback)(void *cls, const struct GNUNET_HELLO_Parser *parser, const struct GNUNET_HashCode *hash)
A handler/callback to be called on the change of the peer id.
void(* GNUNET_PILS_DecapsResultCallback)(void *cls, const struct GNUNET_ShortHashCode *key)
A handler/callback to be called for decaps.
void(* GNUNET_PILS_SignResultCallback)(void *cls, const struct GNUNET_PeerIdentity *pid, const struct GNUNET_CRYPTO_EddsaSignature *sig)
A handler/callback to be called for signatures.
Constants for network protocols.
#define GNUNET_SIGNATURE_PURPOSE_HELLO
Signature by which a peer affirms its address.
struct GNUNET_MQ_Handle * GNUNET_CLIENT_connect(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *service_name, const struct GNUNET_MQ_MessageHandler *handlers, GNUNET_MQ_ErrorHandler error_handler, void *error_handler_cls)
Create a message queue to connect to a GNUnet service.
Definition: client.c:1060
#define GNUNET_CONTAINER_DLL_remove(head, tail, element)
Remove an element from a DLL.
#define GNUNET_CONTAINER_DLL_insert(head, tail, element)
Insert an element at the head of a DLL.
enum GNUNET_GenericReturnValue GNUNET_CRYPTO_hkdf_extract(struct GNUNET_ShortHashCode *prk, const void *salt, size_t salt_len, const void *ikm, size_t ikm_len)
HKDF-Extract using SHA256.
Definition: crypto_hkdf.c:224
enum GNUNET_GenericReturnValue GNUNET_CRYPTO_hkdf_expand(void *result, size_t out_len, const struct GNUNET_ShortHashCode *prk,...)
HKDF-Expand using SHA256.
Definition: crypto_hkdf.c:156
void GNUNET_HELLO_parser_free(struct GNUNET_HELLO_Parser *parser)
Release resources of a builder.
Definition: hello-uri.c:379
void GNUNET_HELLO_builder_to_block(const struct GNUNET_HELLO_Builder *builder, const struct GNUNET_PeerIdentity *pid, const struct GNUNET_CRYPTO_EddsaSignature *sig, struct GNUNET_TIME_Absolute expiration_time, char *outbuf)
Generate DHT block from a builder.
Definition: hello-uri.c:1244
size_t GNUNET_HELLO_get_builder_to_block_size(const struct GNUNET_HELLO_Builder *builder)
Get projected block size for builder.
Definition: hello-uri.c:1312
struct GNUNET_HELLO_Parser * GNUNET_HELLO_parser_from_block(const void *block, size_t block_size)
Parse block.
Definition: hello-uri.c:523
void GNUNET_HELLO_builder_hash_addresses(const struct GNUNET_HELLO_Builder *builder, struct GNUNET_HashCode *hash)
Compute hash over addresses in builder.
Definition: hello-uri.c:1134
#define GNUNET_log(kind,...)
uint16_t size
The length of the struct (in bytes, including the length field itself), in big-endian format.
@ GNUNET_OK
@ GNUNET_SYSERR
const char * GNUNET_h2s_full(const struct GNUNET_HashCode *hc)
Convert a hash value to a string (for printing debug messages).
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
void GNUNET_log_from_nocheck(enum GNUNET_ErrorType kind, const char *comp, const char *message,...) __attribute__((format(printf
Log function that specifies an alternative component.
@ GNUNET_ERROR_TYPE_WARNING
@ GNUNET_ERROR_TYPE_ERROR
@ GNUNET_ERROR_TYPE_DEBUG
#define GNUNET_new(type)
Allocate a struct or union of the given type.
#define GNUNET_free(ptr)
Wrapper around free.
GNUNET_MQ_Error
Error codes for the queue.
void GNUNET_MQ_send(struct GNUNET_MQ_Handle *mq, struct GNUNET_MQ_Envelope *ev)
Send a message with the given message queue.
Definition: mq.c:305
#define GNUNET_MQ_handler_end()
End-marker for the handlers array.
void GNUNET_MQ_discard(struct GNUNET_MQ_Envelope *mqm)
Discard the message queue message, free all allocated resources.
Definition: mq.c:285
#define GNUNET_MQ_msg_extra(mvar, esize, type)
Allocate an envelope, with extra space allocated after the space needed by the message struct.
Definition: gnunet_mq_lib.h:61
#define GNUNET_MQ_msg(mvar, type)
Allocate a GNUNET_MQ_Envelope.
Definition: gnunet_mq_lib.h:76
#define GNUNET_MQ_hd_var_size(name, code, str, ctx)
#define GNUNET_MQ_hd_fixed_size(name, code, str, ctx)
void GNUNET_MQ_destroy(struct GNUNET_MQ_Handle *mq)
Destroy the message queue.
Definition: mq.c:700
#define GNUNET_MESSAGE_TYPE_PILS_SIGN_REQUEST
The client requests data to be signed with the peer identity.
#define GNUNET_MESSAGE_TYPE_PILS_KEM_DECAPS
Decaps request.
#define GNUNET_MESSAGE_TYPE_PILS_FEED_ADDRESSES
The client (core) provides new addresses to the service, so the service can generate the new peer id.
#define GNUNET_MESSAGE_TYPE_PILS_DECAPS_RESULT
Decaps result.
#define GNUNET_MESSAGE_TYPE_PILS_PEER_ID
Message passing the new peer id from the service to the client.
#define GNUNET_MESSAGE_TYPE_PILS_SIGN_RESULT
The service sends the requested signature to the client.
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
Definition: scheduler.c:980
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_delayed(struct GNUNET_TIME_Relative delay, GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run with a specified delay.
Definition: scheduler.c:1277
struct GNUNET_TIME_Absolute GNUNET_TIME_relative_to_absolute(struct GNUNET_TIME_Relative rel)
Convert relative time to an absolute time in the future.
Definition: time.c:316
#define GNUNET_TIME_UNIT_ZERO
Relative time zero.
struct GNUNET_TIME_AbsoluteNBO GNUNET_TIME_absolute_hton(struct GNUNET_TIME_Absolute a)
Convert absolute time to network byte order.
Definition: time.c:640
#define GNUNET_TIME_STD_BACKOFF(r)
Perform our standard exponential back-off calculation, starting at 1 ms and then going by a factor of...
Common type definitions for the peer identity lifecycle service and API.
static void handle_peer_id(void *cls, const struct PeerIdUpdateMessage *pid_msg)
Handles peer ids sent from the service.
Definition: pils_api.c:182
static struct GNUNET_PILS_Operation * find_op(struct GNUNET_PILS_Handle *h, uint32_t rid)
Find the op that matches the rid.
Definition: pils_api.c:132
struct GNUNET_PILS_Handle * GNUNET_PILS_connect(const struct GNUNET_CONFIGURATION_Handle *cfg, GNUNET_PILS_PidChangeCallback pid_change_cb, void *cls)
Connect to the PILS service.
Definition: pils_api.c:367
void GNUNET_PILS_disconnect(struct GNUNET_PILS_Handle *handle)
Disconnect from the PILS service.
Definition: pils_api.c:390
void GNUNET_PILS_derive_pid(size_t seed_key_bytes, const uint8_t seed_key[seed_key_bytes], const struct GNUNET_HashCode *addrs_hash, struct GNUNET_CRYPTO_EddsaPrivateKey *outkey)
Generate the peer id from the addresses hash and the initial secret key.
Definition: pils_api.c:507
struct GNUNET_PILS_Operation * GNUNET_PILS_sign_hello(struct GNUNET_PILS_Handle *handle, const struct GNUNET_HELLO_Builder *builder, struct GNUNET_TIME_Absolute et, GNUNET_PILS_SignResultCallback cb, void *cb_cls)
Create HELLO signature.
Definition: pils_api.c:576
void GNUNET_PILS_cancel(struct GNUNET_PILS_Operation *op)
Cancel request.
Definition: pils_api.c:495
static void handle_sign_result(void *cls, const struct SignResultMessage *msg)
Handles sign result.
Definition: pils_api.c:217
static void mq_error_handler(void *cls, enum GNUNET_MQ_Error error)
Handles errors with the mq.
Definition: pils_api.c:298
static void reconnect(void *cls)
Try again to connect to peer identity lifecycle service.
Definition: pils_api.c:321
static void handle_decaps_result(void *cls, const struct DecapsResultMessage *msg)
Handles decaps result.
Definition: pils_api.c:257
struct GNUNET_PILS_Operation * GNUNET_PILS_kem_decaps(struct GNUNET_PILS_Handle *handle, const struct GNUNET_CRYPTO_HpkeEncapsulation *c, GNUNET_PILS_DecapsResultCallback cb, void *cb_cls)
Decaps an encapsulated key with our private key.
Definition: pils_api.c:468
struct GNUNET_PILS_Operation * GNUNET_PILS_sign_by_peer_identity(struct GNUNET_PILS_Handle *handle, const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose, GNUNET_PILS_SignResultCallback cb, void *cb_cls)
Sign data with the peer id.
Definition: pils_api.c:428
#define LOG(kind,...)
Definition: pils_api.c:44
void GNUNET_PILS_feed_addresses(struct GNUNET_PILS_Handle *handle, const struct GNUNET_HELLO_Builder *builder)
Feed a set of addresses to pils so that it will generate a new peer id based on the given set of addr...
Definition: pils_api.c:542
static int check_peer_id(void *cls, const struct PeerIdUpdateMessage *msg)
Handles sign result.
Definition: pils_api.c:153
Message to request a decapsulation from PILS.
Definition: pils.h:143
struct GNUNET_CRYPTO_HpkeEncapsulation c
Encapsulation to decapsulate.
Definition: pils.h:152
Message containing the decapsulated key.
Definition: pils.h:164
Message requesting a signature on data with the current peer id.
Definition: pils.h:123
struct GNUNET_MQ_Handle * mq
Our connection to the ARM service.
Definition: arm_api.c:107
const struct GNUNET_CONFIGURATION_Handle * cfg
The configuration that we are using.
Definition: arm_api.c:112
struct GNUNET_SCHEDULER_Task * reconnect_task
ID of the reconnect task (if any).
Definition: arm_api.c:147
header of what an ECC signature signs this must be followed by "size - 8" bytes of the actual signed ...
uint32_t size
How many bytes does this signature sign? (including this purpose header); in network byte order (!...
Private ECC key encoded for transmission.
HPKE DHKEM encapsulation (X25519) See RFC 9180.
Context for building (or parsing) HELLO URIs.
Definition: hello-uri.c:184
Context for parsing HELLOs.
Definition: hello-uri.c:232
A 512-bit hashcode.
Handle to a message queue.
Definition: mq.c:87
Message handler for a specific message type.
A handle for the PILS service.
Definition: pils_api.c:82
struct GNUNET_PILS_Operation * op_head
DLL.
Definition: pils_api.c:110
const struct GNUNET_CONFIGURATION_Handle * cfg
Definition: pils_api.c:84
void * pid_change_cb_cls
Definition: pils_api.c:90
struct GNUNET_PeerIdentity peer_id
Definition: pils_api.c:102
uint32_t op_id_counter
Op ID counter.
Definition: pils_api.c:120
struct GNUNET_SCHEDULER_Task * reconnect_task
Definition: pils_api.c:93
struct GNUNET_TIME_Relative reconnect_delay
Definition: pils_api.c:96
struct GNUNET_PILS_Operation * op_tail
DLL.
Definition: pils_api.c:115
struct GNUNET_HashCode hash
Definition: pils_api.c:105
GNUNET_PILS_PidChangeCallback pid_change_cb
Definition: pils_api.c:87
struct GNUNET_MQ_Handle * mq
Definition: pils_api.c:99
struct GNUNET_PILS_Operation * next
Definition: pils_api.c:50
struct GNUNET_PILS_Handle * h
Definition: pils_api.c:56
GNUNET_PILS_SignResultCallback sign_cb
Definition: pils_api.c:65
GNUNET_PILS_DecapsResultCallback decaps_cb
Definition: pils_api.c:59
struct GNUNET_PILS_Operation * prev
Definition: pils_api.c:53
struct GNUNET_MQ_Envelope * env
Definition: pils_api.c:71
The identity of the host (wraps the signing key of the peer).
Entry in list of pending tasks.
Definition: scheduler.c:136
A 256-bit hashcode.
Time for absolute times used by GNUnet, in microseconds.
Time for relative time used by GNUnet, in microseconds.
struct GNUNET_MQ_Handle * mq
Connection to VPN service.
Definition: vpn_api.c:44
Message containing the current peer id and the hash from which it was generated.
Definition: pils.h:40
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_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
Message containing the signature.
Definition: pils.h:185