GNUnet debian-0.24.3-23-g589b01d60
messenger_api_epoch_announcement.c
Go to the documentation of this file.
1/*
2 This file is part of GNUnet.
3 Copyright (C) 2024--2025 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 */
27
28#include "gnunet_common.h"
29#include "messenger_api_epoch.h"
33#include "messenger_api_room.h"
34
35static void
37 identifier)
38{
39 GNUNET_assert (identifier);
40
42 identifier,
43 sizeof (*identifier));
44
45 identifier->code.group_bit = 0;
46 identifier->code.level_bits = 0;
47}
48
49
52 announcement,
54 previous,
56{
57 const struct GNUNET_CRYPTO_SymmetricSessionKey *previous_key;
58
59 GNUNET_assert ((announcement) && (previous) && (key));
60
61 previous_key = get_epoch_announcement_key (previous);
62
63 if (! previous_key)
64 return GNUNET_SYSERR;
65
67 sizeof (*key),
68 &(announcement->epoch->hash),
69 sizeof (announcement->epoch->hash),
70 previous_key,
71 sizeof (*previous_key),
72 &(announcement->identifier),
73 sizeof (announcement->identifier),
74 NULL))
75 return GNUNET_SYSERR;
76 else
77 return GNUNET_OK;
78}
79
80
86{
87 struct GNUNET_MESSENGER_EpochAnnouncement *announcement;
88 const struct GNUNET_MESSENGER_EpochAnnouncement *previous;
89
91
92 announcement = GNUNET_new (struct GNUNET_MESSENGER_EpochAnnouncement);
93
94 if (! announcement)
95 return NULL;
96
98
99 if ((GNUNET_YES == valid) && (previous) &&
100 (GNUNET_YES != previous->valid))
101 previous = NULL;
102
103 if (previous)
104 identifier = &(previous->identifier);
105
106 if (identifier)
107 GNUNET_memcpy (&(announcement->identifier), identifier,
108 sizeof (announcement->identifier));
109 else
111
112 GNUNET_assert (! announcement->identifier.code.group_bit);
113
115 announcement->appeal = NULL;
116
117 announcement->appeal_task = NULL;
118
119 announcement->epoch = epoch;
120 announcement->membership = create_epoch_membership (
121 get_epoch_announcement_size (announcement));
122 announcement->shared_key = NULL;
123 announcement->query = NULL;
124
126
127 announcement->valid = GNUNET_YES;
128 announcement->stored = GNUNET_NO;
129
130 if (previous)
131 {
133
134 if (GNUNET_OK == derive_epoch_announcement_key (announcement,
135 previous,
136 &key))
137 {
138 set_epoch_announcement_key (announcement, &key, GNUNET_YES);
139
140 announcement->valid = previous->valid;
141 }
142 }
143
144 return announcement;
145}
146
147
148void
150 announcement)
151{
152 GNUNET_assert (announcement);
153
154 if (announcement->messages)
156
157 if (announcement->membership)
158 destroy_epoch_membership (announcement->membership);
159
160 if (announcement->shared_key)
161 GNUNET_free (announcement->shared_key);
162
163 if (announcement->query)
164 GNUNET_NAMESTORE_cancel (announcement->query);
165
166 if (announcement->appeal_task)
167 GNUNET_SCHEDULER_cancel (announcement->appeal_task);
168
169 if (announcement->appeal)
170 GNUNET_free (announcement->appeal);
171
172 GNUNET_free (announcement);
173}
174
175
176uint32_t
178 announcement)
179{
180 GNUNET_assert (announcement);
181
182 return get_epoch_size (announcement->epoch);
183}
184
185
186uint32_t
189 announcement)
190{
191 GNUNET_assert (announcement);
192
193 return get_epoch_membership_count (announcement->membership);
194}
195
196
200 announcement)
201{
202 GNUNET_assert (announcement);
203
204 return is_epoch_membership_completed (announcement->membership);
205}
206
207
211 announcement)
212{
213 GNUNET_assert (announcement);
214
215 return is_epoch_membership_member (announcement->membership, NULL);
216}
217
218
219static void
221{
222 struct GNUNET_MESSENGER_EpochAnnouncement *announcement;
223 struct GNUNET_HashCode event;
224
225 GNUNET_assert (cls);
226
227 announcement = cls;
228 announcement->appeal_task = NULL;
229
230 if (GNUNET_YES == is_epoch_announcement_member (announcement, NULL))
231 return;
232
233 if (GNUNET_OK != get_epoch_announcement_member_hash (announcement, &event,
234 GNUNET_YES))
235 return;
236
237 send_epoch_announcement_appeal (announcement, &event);
238}
239
240
241void
243 announcement,
245{
246 struct GNUNET_TIME_Absolute timepoint;
247
248 GNUNET_assert (announcement);
249
251
252 if (! announcement->appeal)
253 announcement->appeal = GNUNET_new (struct GNUNET_TIME_Absolute);
254 else if (GNUNET_TIME_absolute_cmp (*(announcement->appeal), >, timepoint))
255 return;
256
257 GNUNET_memcpy (announcement->appeal, &timepoint, sizeof (timepoint));
258
259 if (announcement->appeal_task)
260 GNUNET_SCHEDULER_cancel (announcement->appeal_task);
261
263 *(announcement->appeal),
266 announcement);
267}
268
269
273 announcement)
274{
275 struct GNUNET_TIME_Relative time;
276
277 GNUNET_assert (announcement);
278
279 if (! announcement->appeal)
280 return GNUNET_NO;
281
282 time = GNUNET_TIME_absolute_get_remaining (*(announcement->appeal));
283
285 return GNUNET_NO;
286
287 return GNUNET_YES;
288}
289
290
291static void
293 announcement);
294
295void
297 announcement,
299 shared_key,
300 enum GNUNET_GenericReturnValue write_record)
301{
302 GNUNET_assert (announcement);
303
304 if ((GNUNET_NO == write_record) && (shared_key))
305 announcement->stored = GNUNET_YES;
306
307 if (announcement->shared_key)
308 return;
309
310 announcement->shared_key = GNUNET_new (struct
312
313 if (! announcement->shared_key)
314 return;
315
316 if (shared_key)
317 GNUNET_memcpy (announcement->shared_key, shared_key,
318 sizeof (struct GNUNET_CRYPTO_SymmetricSessionKey));
319 else
321
322 update_epoch_announcement (announcement->epoch, announcement);
323
324 if (GNUNET_YES != announcement->stored)
326
327 handle_secret_messages_with_key (announcement);
328}
329
330
333 announcement)
334{
335 GNUNET_assert (announcement);
336
337 return announcement->shared_key;
338}
339
340
344 announcement,
345 const struct
347 previous)
348{
349 const struct GNUNET_CRYPTO_SymmetricSessionKey *shared_key;
351
352 GNUNET_assert ((announcement) && (previous));
353
354 shared_key = get_epoch_announcement_key (announcement);
355
356 if (! shared_key)
357 return GNUNET_SYSERR;
358
359 if (GNUNET_OK != derive_epoch_announcement_key (announcement, previous, &key))
360 return GNUNET_SYSERR;
361
362 if (0 == GNUNET_memcmp (shared_key, &key))
363 return GNUNET_YES;
364 else
365 return GNUNET_NO;
366}
367
368
369static void
371 announcement,
372 const struct GNUNET_HashCode *hash,
373 enum GNUNET_GenericReturnValue update)
374{
375 const struct GNUNET_CRYPTO_SymmetricSessionKey *shared_key;
376
377 GNUNET_assert ((announcement) && (hash));
378
379 shared_key = get_epoch_announcement_key (announcement);
380
381 GNUNET_assert ((shared_key) && (announcement->epoch) && (announcement->epoch->
382 room));
383
384 if (GNUNET_NO != update_room_secret_message (announcement->epoch->room,
385 hash, shared_key, update))
387}
388
389
392 const struct GNUNET_HashCode *hash,
393 void *value)
394{
395 struct GNUNET_MESSENGER_EpochAnnouncement *announcement;
396
397 GNUNET_assert ((cls) && (hash));
398
399 announcement = cls;
400
401 handle_secret_message_with_key (announcement, hash, GNUNET_YES);
402 return GNUNET_YES;
403}
404
405
406static void
408 announcement)
409{
410 GNUNET_assert (announcement);
411
412 if (! get_epoch_announcement_key (announcement))
413 return;
414
417 announcement);
418}
419
420
421void
423 announcement,
424 const struct GNUNET_MESSENGER_Message *
425 message,
426 const struct GNUNET_HashCode *hash)
427{
428 GNUNET_assert ((announcement) && (message) && (hash) &&
430
431 if (! get_epoch_announcement_key (announcement))
432 {
434 messages, hash))
435 return;
436
438 hash, NULL,
440 return;
441 }
442
443 handle_secret_message_with_key (announcement, hash, GNUNET_NO);
444}
445
446
449 announcement,
450 const struct GNUNET_HashCode *hash,
451 const struct GNUNET_MESSENGER_Message *
452 message,
453 struct GNUNET_MESSENGER_Contact *contact,
455{
457
458 GNUNET_assert ((announcement) && (hash) && (message) && (contact));
459
460 if (GNUNET_YES != is_epoch_member (announcement->epoch, contact))
461 return GNUNET_SYSERR;
462
464 hash,
465 message,
466 contact,
467 sent);
468
469 if (GNUNET_YES != result)
470 return result;
471
472 update_epoch_announcement (announcement->epoch, announcement);
473 return GNUNET_YES;
474}
475
476
479 announcement,
480 const struct GNUNET_HashCode *hash,
481 const struct GNUNET_MESSENGER_Message *
482 message,
483 struct GNUNET_MESSENGER_Contact *contact)
484{
485 GNUNET_assert ((announcement) && (hash) && (message) && (contact));
486
488 return GNUNET_SYSERR;
489
491 hash, contact);
492}
493
494
497 announcement,
498 const struct GNUNET_MESSENGER_Contact *contact)
499{
500 GNUNET_assert (announcement);
501
502 return is_epoch_membership_member (announcement->membership, contact);
503}
504
505
509 announcement,
510 struct GNUNET_HashCode *hash,
511 enum GNUNET_GenericReturnValue other)
512{
513 GNUNET_assert ((announcement) && (hash));
514
516 announcement->membership, hash, other);
517}
518
519
520void
522 announcement,
523 const struct GNUNET_MESSENGER_Contact *
524 contact)
525{
526 const struct GNUNET_MESSENGER_Message *message;
527 struct GNUNET_MESSENGER_EpochAnnouncement *previous;
528 struct GNUNET_MESSENGER_Epoch *epoch;
529
530 GNUNET_assert (announcement);
531
532 if (GNUNET_NO == announcement->valid)
533 return;
534
535 if ((contact) && (GNUNET_YES != is_epoch_member (announcement->epoch,
536 contact)))
537 return;
538
539 announcement->valid = GNUNET_NO;
541
542 message = get_room_message (announcement->epoch->room,
543 &(announcement->epoch->hash));
544
545 if (! message)
546 goto skip_traversal;
547
548 switch (message->header.kind)
549 {
551 epoch = get_room_epoch (
552 announcement->epoch->room, &(message->body.join.epoch), GNUNET_NO);
553
554 if (epoch)
555 previous = get_epoch_announcement (
556 epoch, &(announcement->identifier), GNUNET_SYSERR);
557 else
558 previous = NULL;
559 break;
561 epoch = get_room_epoch (
562 announcement->epoch->room, &(message->body.leave.epoch), GNUNET_NO);
563
564 if (epoch)
565 previous = get_epoch_announcement (
566 epoch, &(announcement->identifier), GNUNET_SYSERR);
567 else
568 previous = NULL;
569 break;
571 epoch = get_room_epoch (
572 announcement->epoch->room, &(message->body.merge.epochs[0]), GNUNET_NO);
573
574 if (epoch)
575 {
576 previous = get_epoch_announcement (
577 epoch, &(announcement->identifier), GNUNET_SYSERR);
578
579 if ((previous) &&
581 announcement)))
582 previous = NULL;
583 }
584 else
585 previous = NULL;
586
587 if (! previous)
588 {
589 epoch = get_room_epoch (
590 announcement->epoch->room, &(message->body.merge.epochs[1]), GNUNET_NO);
591
592 if (epoch)
593 previous = get_epoch_announcement (
594 epoch, &(announcement->identifier), GNUNET_SYSERR);
595 }
596 break;
597 default:
598 previous = NULL;
599 break;
600 }
601
602 if ((previous) &&
604 announcement)))
605 previous = NULL;
606
607 if (previous)
608 invalidate_epoch_announcement (previous, contact);
609
610skip_traversal:
611 if (announcement->epoch->main_announcement != announcement)
612 return;
613
615 announcement->epoch, NULL, GNUNET_YES);
616}
617
618
621 )
622{
624 const struct GNUNET_CRYPTO_EcdhePrivateKey *private_key;
626 struct GNUNET_MESSENGER_Message *message;
627
628 GNUNET_assert (announcement);
629
630 key = get_epoch_announcement_key (announcement);
631
632 if (! key)
633 return GNUNET_SYSERR;
634
636 announcement->announcement_expiration);
637
639 return GNUNET_NO;
640
643
644 private_key = get_epoch_private_key (announcement->epoch,
645 timeout);
646
647 if (! private_key)
648 return GNUNET_SYSERR;
649
651
652 message = create_message_announcement (&(announcement->identifier),
653 private_key,
654 key,
655 timeout);
656
657 if (! message)
658 return GNUNET_SYSERR;
659
660 send_epoch_message (announcement->epoch, message);
661
664
665 return GNUNET_OK;
666}
667
668
671 const struct GNUNET_HashCode *key,
672 void *value)
673{
674 struct GNUNET_HashCode *event;
675
676 GNUNET_assert ((cls) && (key));
677
678 event = cls;
679
680 GNUNET_memcpy (event, key, sizeof (*event));
681 return GNUNET_NO;
682}
683
684
687 announcement,
688 const struct GNUNET_HashCode *event)
689{
690 const struct GNUNET_CRYPTO_EcdhePrivateKey *private_key;
692 struct GNUNET_HashCode event_hash;
693 struct GNUNET_MESSENGER_Message *message;
694
695 GNUNET_assert (announcement);
696
698 private_key = get_epoch_private_key (announcement->epoch,
699 timeout);
700
701 if (! private_key)
702 return GNUNET_SYSERR;
703
705
706 if ((! event) ||
708 membership->members
709 , event)))
710 {
711 if (get_epoch_announcement_members_count (announcement) <= 0)
712 return GNUNET_SYSERR;
713
716 &event_hash);
717
718 event = &event_hash;
719 }
720
721 message = create_message_appeal (event,
722 private_key,
723 timeout);
724
725 if (! message)
726 return GNUNET_SYSERR;
727
729 send_epoch_message (announcement->epoch, message);
730 return GNUNET_OK;
731}
732
733
736 announcement,
737 const struct GNUNET_HashCode *event)
738{
739 struct GNUNET_MESSENGER_Room *room;
741 const struct GNUNET_MESSENGER_Message *appeal_message;
742 const struct GNUNET_CRYPTO_EcdhePublicKey *public_key;
743 struct GNUNET_MESSENGER_Message *message;
744
745 GNUNET_assert ((announcement) && (event));
746
747 room = announcement->epoch->room;
748 key = get_epoch_announcement_key (announcement);
749
750 if (! key)
751 return GNUNET_SYSERR;
752
753 appeal_message = get_room_message (room, event);
754
755 if (! appeal_message)
756 return GNUNET_SYSERR;
757
758 if (GNUNET_MESSENGER_KIND_APPEAL != appeal_message->header.kind)
759 return GNUNET_SYSERR;
760
762 membership->members,
763 &(appeal_message->
765 ))
766 return GNUNET_SYSERR;
767
768 public_key = &(appeal_message->body.appeal.key);
769 message = create_message_access (event,
770 public_key,
771 key);
772
773 if (! message)
774 return GNUNET_SYSERR;
775
776 send_epoch_message (announcement->epoch, message);
777 return GNUNET_OK;
778}
779
780
783 announcement)
784{
786 struct GNUNET_MESSENGER_Message *message;
787
788 GNUNET_assert (announcement);
789
790 key = get_epoch_announcement_key (announcement);
791
792 if (! key)
793 return GNUNET_SYSERR;
794
795 message = create_message_revolution (&(announcement->identifier),
796 key);
797
798 if (! message)
799 return GNUNET_SYSERR;
800
801 send_epoch_message (announcement->epoch, message);
802 return GNUNET_OK;
803}
804
805
809 announcement,
810 const struct
812 const struct GNUNET_HashCode *event)
813{
814 struct GNUNET_MESSENGER_Room *room;
816 const struct GNUNET_MESSENGER_Message *announcement_message;
817 const union GNUNET_MESSENGER_EpochIdentifier *identifier;
818 const struct GNUNET_CRYPTO_SymmetricSessionKey *group_key;
819 struct GNUNET_MESSENGER_Message *message;
820
821 GNUNET_assert ((announcement) && (group) && (event));
822
823 room = group->epoch->room;
824 key = get_epoch_announcement_key (announcement);
825
826 if (! key)
827 return GNUNET_SYSERR;
828
829 if (! group->identifier.code.group_bit)
830 return GNUNET_SYSERR;
831
832 announcement_message = get_room_message (room, event);
833
834 if ((! announcement_message) ||
835 (GNUNET_MESSENGER_KIND_ANNOUNCEMENT != announcement_message->header.kind))
836 return GNUNET_SYSERR;
837
838 identifier = &(announcement_message->body.announcement.identifier);
839
840 if (0 != GNUNET_memcmp (&(announcement->identifier), identifier))
841 return GNUNET_SYSERR;
842
843 if (GNUNET_YES != verify_message_by_key (announcement_message, key))
844 return GNUNET_SYSERR;
845
846 group_key = get_epoch_group_key (group);
847
848 if (! group_key)
849 return GNUNET_SYSERR;
850
851 message = create_message_authorization (&(group->identifier),
852 event,
853 group_key,
854 key);
855
856 if (! message)
857 return GNUNET_SYSERR;
858
859 send_epoch_message (announcement->epoch, message);
860 return GNUNET_OK;
861}
862
863
864void
866 announcement,
867 const struct GNUNET_MESSENGER_Message *message,
868 const struct GNUNET_HashCode *hash,
869 struct GNUNET_MESSENGER_Contact *sender,
871{
874
875 GNUNET_assert ((announcement) && (message) && (hash) && (sender));
876
877 key = get_epoch_announcement_key (announcement);
878
879 if (key)
880 {
881 if (GNUNET_OK != verify_message_by_key (message, key))
882 return;
883
884 cancel_room_actions_by (announcement->epoch->room,
886 &(announcement->epoch->hash),
887 &(announcement->identifier),
888 sender);
889
890 if ((GNUNET_YES == is_epoch_announcement_completed (announcement)) &&
891 (GNUNET_YES != is_epoch_announcement_member (announcement, sender)))
892 {
894 return;
895 }
896 }
897
899 hash,
900 message,
901 sender,
902 sent))
903 return;
904
905 if ((GNUNET_YES != sent) &&
907 {
908 const struct GNUNET_MESSENGER_Contact *contact;
909
910 contact = get_handle_contact (
911 get_room_handle (announcement->epoch->room),
912 get_room_key (announcement->epoch->room));
913
914 send_epoch_announcement (announcement);
915
917 get_message_timeout (message),
918 get_epoch_position_factor (announcement->epoch, contact,
919 announcement->membership));
920 }
921 else if (announcement->epoch->main_group)
923 get_message_timeout (message),
925 else
927
928 delay_room_action (announcement->epoch->room, hash, timeout);
929}
930
931
932void
934 announcement,
935 const struct GNUNET_MESSENGER_Message *
936 message,
937 const struct GNUNET_HashCode *hash,
938 struct GNUNET_MESSENGER_Contact *sender,
940{
942
943 GNUNET_assert ((announcement) && (message) && (hash) && (sender));
944
945 if (GNUNET_YES == is_room_public (announcement->epoch->room))
946 return;
947
948 if ((GNUNET_YES == sent) && (GNUNET_YES == announcement->valid))
950 announcement->epoch,
952
953 if ((get_epoch_announcement_key (announcement)) ||
954 (GNUNET_YES == is_epoch_announcement_appealed (announcement)))
955 return;
956
957 timeout = get_message_timeout (message);
958
960 return;
961
962 send_epoch_announcement_appeal (announcement, hash);
963}
964
965
966void
968 announcement,
969 const struct GNUNET_MESSENGER_Message *
970 message,
971 const struct GNUNET_HashCode *hash)
972{
973 const struct GNUNET_CRYPTO_EcdhePrivateKey *private_key;
974 struct GNUNET_CRYPTO_SymmetricSessionKey shared_key;
975 const struct GNUNET_MESSENGER_Message *appeal_message;
976
977 GNUNET_assert ((announcement) && (message) && (hash));
978
979 private_key = get_epoch_private_key (announcement->epoch,
981
982 if (! private_key)
983 {
985 "Private key for decrypting shared key is missing!\n");
986 return;
987 }
988
990 message, private_key, &shared_key))
991 return;
992
993 if (get_epoch_announcement_key (announcement))
994 return;
995
996 set_epoch_announcement_key (announcement, &shared_key, GNUNET_YES);
997
998 appeal_message = get_room_message (
999 announcement->epoch->room,
1000 &(message->body.access.event));
1001
1002 if ((announcement->epoch->main_group) &&
1003 (appeal_message) &&
1004 (GNUNET_MESSENGER_KIND_APPEAL == appeal_message->header.kind) &&
1006 announcement->epoch)) &&
1008 announcement->epoch->main_group, announcement)))
1010 announcement, announcement->epoch->main_group,
1011 &(appeal_message->body.appeal.event));
1012
1013 send_epoch_announcement (announcement);
1014}
1015
1016
1017static void
1019 enum GNUNET_ErrorCode ec)
1020{
1021 struct GNUNET_MESSENGER_EpochAnnouncement *announcement;
1022
1023 GNUNET_assert (cls);
1024
1025 announcement = cls;
1026
1027 if (GNUNET_EC_NONE != ec)
1029 "Error writing epoch key record: %d\n", (int) ec);
1030
1031 announcement->query = NULL;
1032}
1033
1034
1035void
1037 announcement,
1038 enum GNUNET_GenericReturnValue deleted)
1039{
1040 const struct GNUNET_MESSENGER_Handle *handle;
1041 const struct GNUNET_HashCode *key;
1042 const struct GNUNET_HashCode *hash;
1043 const struct GNUNET_ShortHashCode *identifier;
1044 const struct GNUNET_CRYPTO_SymmetricSessionKey *shared_key;
1045
1046 GNUNET_assert ((announcement) && (announcement->epoch));
1047
1048 handle = get_room_handle (announcement->epoch->room);
1049
1050 if (! handle)
1051 return;
1052
1053 key = get_room_key (announcement->epoch->room);
1054 hash = &(announcement->epoch->hash);
1055 identifier = &(announcement->identifier.hash);
1056
1057 if (GNUNET_YES == deleted)
1058 {
1059 shared_key = NULL;
1060 }
1061 else
1062 {
1063 shared_key = announcement->shared_key;
1064
1065 if (! shared_key)
1066 return;
1067 }
1068
1070 handle, key, hash, identifier, shared_key,
1071 GNUNET_YES == announcement->valid?
1075 announcement,
1076 &(announcement->query));
1077}
static struct GNUNET_TIME_Relative timeout
User defined timestamp for completing operations.
Definition: gnunet-arm.c:118
struct GNUNET_HashCode key
The key used in the DHT.
static char * value
Value of the record to add/remove.
static int result
Global testing status.
static struct GNUNET_VPN_Handle * handle
Handle to vpn service.
Definition: gnunet-vpn.c:35
commonly used definitions; globals in this file are exempt from the rule that the module name ("commo...
GNUNET_ErrorCode
Taler error codes.
@ GNUNET_EC_NONE
No error (success).
void GNUNET_CRYPTO_symmetric_create_session_key(struct GNUNET_CRYPTO_SymmetricSessionKey *key)
Create a new random session key.
void GNUNET_CRYPTO_random_block(enum GNUNET_CRYPTO_Quality mode, void *buffer, size_t length)
Fill block with a random values.
@ GNUNET_CRYPTO_QUALITY_WEAK
No good quality of the operation is needed (i.e., random numbers can be pseudo-random).
enum GNUNET_GenericReturnValue GNUNET_CRYPTO_kdf(void *result, size_t out_len, const void *xts, size_t xts_len, const void *skm, size_t skm_len,...)
Derive key.
Definition: crypto_kdf.c:62
enum GNUNET_GenericReturnValue GNUNET_CONTAINER_multihashmap_contains(const struct GNUNET_CONTAINER_MultiHashMap *map, const struct GNUNET_HashCode *key)
Check if the map contains any value under the given key (including values that are NULL).
int GNUNET_CONTAINER_multihashmap_remove_all(struct GNUNET_CONTAINER_MultiHashMap *map, const struct GNUNET_HashCode *key)
Remove all entries for the given key from the map.
int GNUNET_CONTAINER_multihashmap_iterate(struct GNUNET_CONTAINER_MultiHashMap *map, GNUNET_CONTAINER_MultiHashMapIteratorCallback it, void *it_cls)
Iterate over all entries in the map.
enum GNUNET_GenericReturnValue GNUNET_CONTAINER_multihashmap_put(struct GNUNET_CONTAINER_MultiHashMap *map, const struct GNUNET_HashCode *key, void *value, enum GNUNET_CONTAINER_MultiHashMapOption opt)
Store a key-value pair in the map.
void GNUNET_CONTAINER_multihashmap_destroy(struct GNUNET_CONTAINER_MultiHashMap *map)
Destroy a hash map.
struct GNUNET_CONTAINER_MultiHashMap * GNUNET_CONTAINER_multihashmap_create(unsigned int len, int do_not_copy_keys)
Create a multi hash map.
@ GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST
, ' bother checking if a value already exists (faster than GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE...
#define GNUNET_log(kind,...)
#define GNUNET_memcmp(a, b)
Compare memory in a and b, where both must be of the same pointer type.
#define GNUNET_memcpy(dst, src, n)
Call memcpy() but check for n being 0 first.
GNUNET_GenericReturnValue
Named constants for return values.
@ GNUNET_SCHEDULER_PRIORITY_HIGH
Run with high priority (important requests).
@ GNUNET_OK
@ GNUNET_YES
@ GNUNET_NO
@ GNUNET_SYSERR
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
@ 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_MESSENGER_KIND_ANNOUNCEMENT
The announcement kind.
@ GNUNET_MESSENGER_KIND_APPEAL
The appeal kind.
@ GNUNET_MESSENGER_KIND_LEAVE
The leave kind.
@ GNUNET_MESSENGER_KIND_SECRET
The secret kind.
@ GNUNET_MESSENGER_KIND_JOIN
The join kind.
@ GNUNET_MESSENGER_KIND_MERGE
The merge kind.
@ GNUNET_MESSENGER_FLAG_EPOCH_NONE
The none flag.
@ GNUNET_MESSENGER_FLAG_EPOCH_VALID
The valid flag.
void GNUNET_NAMESTORE_cancel(struct GNUNET_NAMESTORE_QueueEntry *qe)
Cancel a namestore operation.
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_at_with_priority(struct GNUNET_TIME_Absolute at, enum GNUNET_SCHEDULER_Priority priority, GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run at the specified time.
Definition: scheduler.c:1118
struct GNUNET_TIME_Relative GNUNET_TIME_relative_get_zero_(void)
Return relative time of 0ms.
Definition: time.c:133
struct GNUNET_TIME_Relative GNUNET_TIME_relative_get_hour_(void)
Return relative time of 1 hour.
Definition: time.c:187
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_get_zero_(void)
Return absolute time of 0ms.
Definition: time.c:142
struct GNUNET_TIME_Relative GNUNET_TIME_absolute_get_remaining(struct GNUNET_TIME_Absolute future)
Given a timestamp in the future, how much time remains until then?
Definition: time.c:406
bool GNUNET_TIME_relative_is_zero(struct GNUNET_TIME_Relative rel)
Test if rel is zero.
Definition: time.c:664
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_get(void)
Get the current time.
Definition: time.c:111
struct GNUNET_TIME_Relative GNUNET_TIME_relative_multiply_double(struct GNUNET_TIME_Relative rel, double factor)
Multiply relative time by a given factor.
Definition: time.c:506
struct GNUNET_TIME_Relative GNUNET_TIME_relative_multiply(struct GNUNET_TIME_Relative rel, unsigned long long factor)
Multiply relative time by a given factor.
Definition: time.c:486
#define GNUNET_TIME_absolute_cmp(t1, op, t2)
Compare two absolute times.
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_add(struct GNUNET_TIME_Absolute start, struct GNUNET_TIME_Relative duration)
Add a given relative duration to the given start time.
Definition: time.c:452
const struct GNUNET_TIME_Relative get_epoch_private_key_timeout(const struct GNUNET_MESSENGER_Epoch *epoch)
Returns the current relative timeout for the private key (ECDHE) of a given epoch that limits the usa...
uint32_t get_epoch_size(const struct GNUNET_MESSENGER_Epoch *epoch)
Returns the amount of members by a given epoch or zero as long as it's not fully initialized yet.
const struct GNUNET_MESSENGER_EpochAnnouncement * get_epoch_previous_announcement(struct GNUNET_MESSENGER_Epoch *epoch, const union GNUNET_MESSENGER_EpochIdentifier *identifier)
Returns the epoch announcement of a previous epoch from a given epoch using a specific announcement i...
void update_epoch_announcement(struct GNUNET_MESSENGER_Epoch *epoch, struct GNUNET_MESSENGER_EpochAnnouncement *announcement)
Updates the main announcement of a given epoch, looking into replacing the current main announcement ...
enum GNUNET_GenericReturnValue is_epoch_member(const struct GNUNET_MESSENGER_Epoch *epoch, const struct GNUNET_MESSENGER_Contact *contact)
Returns whether a specific contact is member of a given epoch.
const struct GNUNET_CRYPTO_EcdhePrivateKey * get_epoch_private_key(struct GNUNET_MESSENGER_Epoch *epoch, const struct GNUNET_TIME_Relative timeout)
Returns the asymmetric private key (ECDHE) from a handle for a given epoch that can be used for HPKE ...
struct GNUNET_MESSENGER_EpochAnnouncement * get_epoch_announcement(struct GNUNET_MESSENGER_Epoch *epoch, const union GNUNET_MESSENGER_EpochIdentifier *identifier, enum GNUNET_GenericReturnValue valid)
Returns the epoch announcement of a given epoch using a specific unique identifier or NULL.
void propose_epoch_group(struct GNUNET_MESSENGER_Epoch *epoch, const struct GNUNET_TIME_Relative timeout)
Tries to propose a new group inside a given epoch that will automatically be formed by using the clie...
double get_epoch_position_factor(const struct GNUNET_MESSENGER_Epoch *epoch, const struct GNUNET_MESSENGER_Contact *contact, const struct GNUNET_MESSENGER_EpochMembership *membership)
Returns a relative member positon of a specific contact inside a given epoch in relation to its list ...
void send_epoch_message(const struct GNUNET_MESSENGER_Epoch *epoch, struct GNUNET_MESSENGER_Message *message)
Sends a created and allocated message in a room of a given epoch enforcing the message gets interpret...
enum GNUNET_GenericReturnValue send_epoch_announcement_appeal(struct GNUNET_MESSENGER_EpochAnnouncement *announcement, const struct GNUNET_HashCode *event)
Tries to send an appeal message by the client responding to a previous event in regards to a given ep...
static void handle_secret_message_with_key(struct GNUNET_MESSENGER_EpochAnnouncement *announcement, const struct GNUNET_HashCode *hash, enum GNUNET_GenericReturnValue update)
static void task_epoch_announcement_appeal(void *cls)
enum GNUNET_GenericReturnValue send_epoch_announcement_access(struct GNUNET_MESSENGER_EpochAnnouncement *announcement, const struct GNUNET_HashCode *event)
Tries to send an access message by the client responding to a previous event in regards to a given ep...
enum GNUNET_GenericReturnValue is_epoch_announcement_appealed(const struct GNUNET_MESSENGER_EpochAnnouncement *announcement)
Returns whether a given epoch announcement of the client is currently appealing for its secret key fr...
enum GNUNET_GenericReturnValue send_epoch_announcement(struct GNUNET_MESSENGER_EpochAnnouncement *announcement)
Tries to send an announcement message by the client for a given epoch announcement using its secret k...
uint32_t get_epoch_announcement_size(const struct GNUNET_MESSENGER_EpochAnnouncement *announcement)
Returns the size of a given epoch announcement in terms of members.
enum GNUNET_GenericReturnValue send_epoch_announcement_authorization(struct GNUNET_MESSENGER_EpochAnnouncement *announcement, const struct GNUNET_MESSENGER_EpochGroup *group, const struct GNUNET_HashCode *event)
Tries to send an authorization message by the client responding to a previous event in regards to a g...
enum GNUNET_GenericReturnValue get_epoch_announcement_member_hash(const struct GNUNET_MESSENGER_EpochAnnouncement *announcement, struct GNUNET_HashCode *hash, enum GNUNET_GenericReturnValue other)
Provides an announcement hash of a member from a given epoch announcement.
static void handle_secret_messages_with_key(struct GNUNET_MESSENGER_EpochAnnouncement *announcement)
enum GNUNET_GenericReturnValue is_epoch_announcement_completed(const struct GNUNET_MESSENGER_EpochAnnouncement *announcement)
Returns whether a given epoch announcement is complete in terms of confirmed announcements from its m...
static enum GNUNET_GenericReturnValue derive_epoch_announcement_key(const struct GNUNET_MESSENGER_EpochAnnouncement *announcement, const struct GNUNET_MESSENGER_EpochAnnouncement *previous, struct GNUNET_CRYPTO_SymmetricSessionKey *key)
static void random_epoch_announcement_identifier(union GNUNET_MESSENGER_EpochIdentifier *identifier)
void set_epoch_announcement_appeal(struct GNUNET_MESSENGER_EpochAnnouncement *announcement, struct GNUNET_TIME_Relative timeout)
Sets a specified timeout for a given epoch announcement of the client for its own appeal of the annou...
struct GNUNET_MESSENGER_EpochAnnouncement * create_epoch_announcement(struct GNUNET_MESSENGER_Epoch *epoch, const union GNUNET_MESSENGER_EpochIdentifier *identifier, enum GNUNET_GenericReturnValue valid)
Creates and allocates a new epoch announcement for a given epoch using a specific announcement identi...
const struct GNUNET_CRYPTO_SymmetricSessionKey * get_epoch_announcement_key(const struct GNUNET_MESSENGER_EpochAnnouncement *announcement)
Returns the secret key of a given epoch announcement or NULL.
enum GNUNET_GenericReturnValue send_epoch_announcement_revolution(struct GNUNET_MESSENGER_EpochAnnouncement *announcement)
Tries to send a revolution message by the client for a given epoch announcement using its secret key.
void set_epoch_announcement_key(struct GNUNET_MESSENGER_EpochAnnouncement *announcement, const struct GNUNET_CRYPTO_SymmetricSessionKey *shared_key, enum GNUNET_GenericReturnValue write_record)
Sets the secret key of a given epoch announcement to a shared key.
enum GNUNET_GenericReturnValue revoke_epoch_announcement_member(struct GNUNET_MESSENGER_EpochAnnouncement *announcement, const struct GNUNET_HashCode *hash, const struct GNUNET_MESSENGER_Message *message, struct GNUNET_MESSENGER_Contact *contact)
Revokes an announcement message with its hash from a given epoch announcement removing the caused con...
void destroy_epoch_announcement(struct GNUNET_MESSENGER_EpochAnnouncement *announcement)
Destroys a given epoch announcement and frees its resources.
enum GNUNET_GenericReturnValue is_epoch_announcement_member(const struct GNUNET_MESSENGER_EpochAnnouncement *announcement, const struct GNUNET_MESSENGER_Contact *contact)
Returns whether a specific contact is confirmed member of a given epoch announcement.
void handle_epoch_announcement(struct GNUNET_MESSENGER_EpochAnnouncement *announcement, const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash, struct GNUNET_MESSENGER_Contact *sender, enum GNUNET_GenericReturnValue sent)
Handles an announcement message with hash from its sender inside a given epoch announcement as first ...
void invalidate_epoch_announcement(struct GNUNET_MESSENGER_EpochAnnouncement *announcement, const struct GNUNET_MESSENGER_Contact *contact)
Invalidates a given epoch announcement by a specific contact.
static enum GNUNET_GenericReturnValue it_handle_secret_message(void *cls, const struct GNUNET_HashCode *hash, void *value)
static enum GNUNET_GenericReturnValue is_epoch_announcement_key_derived_from(const struct GNUNET_MESSENGER_EpochAnnouncement *announcement, const struct GNUNET_MESSENGER_EpochAnnouncement *previous)
void handle_epoch_announcement_access(struct GNUNET_MESSENGER_EpochAnnouncement *announcement, const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash)
Handles an access message with hash from its sender inside a given epoch announcement.
void handle_epoch_announcement_message(struct GNUNET_MESSENGER_EpochAnnouncement *announcement, const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash)
Handles an encrypted message with hash by a given epoch announcement using its secret key for decrypt...
void handle_epoch_announcement_delay(struct GNUNET_MESSENGER_EpochAnnouncement *announcement, const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash, struct GNUNET_MESSENGER_Contact *sender, enum GNUNET_GenericReturnValue sent)
Handles an announcement message with hash from its sender inside a given epoch announcement as second...
static void cont_write_epoch_announcement_record(void *cls, enum GNUNET_ErrorCode ec)
static enum GNUNET_GenericReturnValue it_store_any_event(void *cls, const struct GNUNET_HashCode *key, void *value)
void write_epoch_announcement_record(struct GNUNET_MESSENGER_EpochAnnouncement *announcement, enum GNUNET_GenericReturnValue deleted)
Writes/Deletes the GNS record of a given epoch announcement depending on a provided flag that states ...
enum GNUNET_GenericReturnValue confirm_epoch_announcement_member(struct GNUNET_MESSENGER_EpochAnnouncement *announcement, const struct GNUNET_HashCode *hash, const struct GNUNET_MESSENGER_Message *message, struct GNUNET_MESSENGER_Contact *contact, enum GNUNET_GenericReturnValue sent)
Confirms an announcement message with its hash to a given epoch announcement as confirmation for a sp...
enum GNUNET_GenericReturnValue is_epoch_announcement_announced(const struct GNUNET_MESSENGER_EpochAnnouncement *announcement)
Returns whether the client has announced being part of a given epoch announcement owning its secret k...
uint32_t get_epoch_announcement_members_count(const struct GNUNET_MESSENGER_EpochAnnouncement *announcement)
Returns the current amount of members of a given epoch announcement.
enum GNUNET_GenericReturnValue is_epoch_group_compatible(const struct GNUNET_MESSENGER_EpochGroup *group, const struct GNUNET_MESSENGER_Epoch *epoch)
Returns whether a given epoch group is compatible with a specific epoch with its members.
double get_epoch_group_position_factor(const struct GNUNET_MESSENGER_EpochGroup *group)
Returns a relative member positon of the client inside a given epoch group in relation to its list of...
enum GNUNET_GenericReturnValue is_epoch_group_missing_announcement(const struct GNUNET_MESSENGER_EpochGroup *group, const struct GNUNET_MESSENGER_EpochAnnouncement *announcement)
Returns whether any member of a given epoch group is missing in a provided epoch announcement.
const struct GNUNET_CRYPTO_SymmetricSessionKey * get_epoch_group_key(const struct GNUNET_MESSENGER_EpochGroup *group)
Returns the secret key of a given epoch group or NULL.
enum GNUNET_GenericReturnValue is_epoch_membership_member(const struct GNUNET_MESSENGER_EpochMembership *membership, const struct GNUNET_MESSENGER_Contact *contact)
Returns whether a specific contact is announced member of a given epoch membership.
enum GNUNET_GenericReturnValue revoke_epoch_membership_announcement(struct GNUNET_MESSENGER_EpochMembership *membership, const struct GNUNET_HashCode *hash, struct GNUNET_MESSENGER_Contact *contact)
Drops an announcement message with a provided hash from a given epoch membership to revoke the confir...
enum GNUNET_GenericReturnValue confirm_epoch_membership_announcment(struct GNUNET_MESSENGER_EpochMembership *membership, const struct GNUNET_HashCode *hash, const struct GNUNET_MESSENGER_Message *message, struct GNUNET_MESSENGER_Contact *contact, enum GNUNET_GenericReturnValue sent)
Adds an announcement message with its hash to a given epoch membership as confirmation for a specific...
enum GNUNET_GenericReturnValue is_epoch_membership_completed(const struct GNUNET_MESSENGER_EpochMembership *membership)
Returns whether a given epoch membership is complete, meaning that all of its intended members have p...
struct GNUNET_MESSENGER_EpochMembership * create_epoch_membership(uint32_t size)
Creates and allocates a new membership for subgroups of an epoch with specified size.
enum GNUNET_GenericReturnValue get_epoch_membership_member_hash(const struct GNUNET_MESSENGER_EpochMembership *membership, struct GNUNET_HashCode *hash, enum GNUNET_GenericReturnValue other)
Provides an announcement hash of a member from a given epoch membership.
void destroy_epoch_membership(struct GNUNET_MESSENGER_EpochMembership *membership)
Destroys and frees resources of a given membership.
uint32_t get_epoch_membership_count(const struct GNUNET_MESSENGER_EpochMembership *membership)
Returns the current amount of individual members inside a given epoch membership.
struct GNUNET_MESSENGER_Contact * get_handle_contact(struct GNUNET_MESSENGER_Handle *handle, const struct GNUNET_HashCode *key)
Returns the contact of a given handle in a room identified by a given key.
enum GNUNET_GenericReturnValue store_handle_epoch_key(const struct GNUNET_MESSENGER_Handle *handle, const struct GNUNET_HashCode *key, const struct GNUNET_HashCode *hash, const struct GNUNET_ShortHashCode *identifier, const struct GNUNET_CRYPTO_SymmetricSessionKey *shared_key, uint32_t flags, GNUNET_NAMESTORE_ContinuationWithStatus cont, void *cont_cls, struct GNUNET_NAMESTORE_QueueEntry **query)
Stores/deletes a shared_key for a given room from a handle identified by its key in an epoch with cer...
struct GNUNET_TIME_Relative get_message_timeout(const struct GNUNET_MESSENGER_Message *message)
Return the relative timeout of the content from a given message that controls when a delayed handling...
enum GNUNET_GenericReturnValue verify_message_by_key(const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_CRYPTO_SymmetricSessionKey *key)
Verifies the hmac of a given message body with a specific shared key.
enum GNUNET_GenericReturnValue extract_access_message_key(const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_CRYPTO_EcdhePrivateKey *key, struct GNUNET_CRYPTO_SymmetricSessionKey *shared_key)
Extracts the shared epoch or group key from an access message using the private ephemeral key from an...
struct GNUNET_MESSENGER_Message * create_message_announcement(const union GNUNET_MESSENGER_EpochIdentifier *identifier, const struct GNUNET_CRYPTO_EcdhePrivateKey *private_key, const struct GNUNET_CRYPTO_SymmetricSessionKey *shared_key, const struct GNUNET_TIME_Relative timeout)
Creates and allocates a new announcement message for an announcement of a given epoch or group under ...
struct GNUNET_MESSENGER_Message * create_message_appeal(const struct GNUNET_HashCode *event, const struct GNUNET_CRYPTO_EcdhePrivateKey *private_key, const struct GNUNET_TIME_Relative timeout)
Creates and allocates a new appeal message for an epoch announcement using a specific private_key to ...
struct GNUNET_MESSENGER_Message * create_message_revolution(const union GNUNET_MESSENGER_EpochIdentifier *identifier, const struct GNUNET_CRYPTO_SymmetricSessionKey *shared_key)
Creates and allocates a new revolution message for an announced epoch or group selected by its identi...
struct GNUNET_MESSENGER_Message * create_message_authorization(const union GNUNET_MESSENGER_EpochIdentifier *identifier, const struct GNUNET_HashCode *event, const struct GNUNET_CRYPTO_SymmetricSessionKey *group_key, const struct GNUNET_CRYPTO_SymmetricSessionKey *shared_key)
Creates and allocates a new authorization message to grant access to the shared_key of a specific gro...
struct GNUNET_MESSENGER_Message * create_message_access(const struct GNUNET_HashCode *event, const struct GNUNET_CRYPTO_EcdhePublicKey *public_key, const struct GNUNET_CRYPTO_SymmetricSessionKey *shared_key)
Creates and allocates a new access message to grant access to the shared_key of an announced epoch or...
void cancel_room_actions_by(struct GNUNET_MESSENGER_Room *room, enum GNUNET_MESSENGER_MessageKind kind, const struct GNUNET_HashCode *epoch_hash, const union GNUNET_MESSENGER_EpochIdentifier *identifier, const struct GNUNET_MESSENGER_Contact *contact)
Searches queued actions to handle messages of a specific message kind in a room with any delay and ca...
const struct GNUNET_MESSENGER_Message * get_room_message(const struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash)
Returns a message locally stored from a map for a given hash in a room.
struct GNUNET_MESSENGER_Epoch * get_room_epoch(struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash, enum GNUNET_GenericReturnValue recent)
Returns the epoch in a given room from a specific epoch hash that represents the exact message the ep...
enum GNUNET_GenericReturnValue update_room_secret_message(struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash, const struct GNUNET_CRYPTO_SymmetricSessionKey *key, enum GNUNET_GenericReturnValue update)
Updates a secret message with a given hash in a room for the client API trying to decrypt it with the...
enum GNUNET_GenericReturnValue is_room_public(const struct GNUNET_MESSENGER_Room *room)
Returns whether a given room is public or using epoch keys to encrypt private traffic and sync those ...
const struct GNUNET_HashCode * get_room_key(const struct GNUNET_MESSENGER_Room *room)
Return a the hash representation of a given room.
struct GNUNET_MESSENGER_Handle * get_room_handle(struct GNUNET_MESSENGER_Room *room)
Returns the messenger handle of the room.
void delay_room_action(struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash, const struct GNUNET_TIME_Relative delay)
Enqueues delayed handling of a message in a room under a given hash once a specific delay has timed o...
Private ECC key encoded for transmission.
Public ECC key (always for Curve25519) encoded in a format suitable for network transmission and encr...
A 512-bit hashcode.
struct GNUNET_NAMESTORE_QueueEntry * query
struct GNUNET_MESSENGER_EpochMembership * membership
struct GNUNET_CRYPTO_SymmetricSessionKey * shared_key
struct GNUNET_CONTAINER_MultiHashMap * messages
union GNUNET_MESSENGER_EpochIdentifier identifier
struct GNUNET_MESSENGER_Epoch * epoch
union GNUNET_MESSENGER_EpochIdentifier identifier
struct GNUNET_CONTAINER_MultiHashMap * members
struct GNUNET_MESSENGER_Room * room
struct GNUNET_MESSENGER_EpochGroup * main_group
struct GNUNET_MESSENGER_EpochAnnouncement * main_announcement
struct GNUNET_HashCode hash
struct GNUNET_HashCode event
The hash of the linked announcement or group message event.
union GNUNET_MESSENGER_EpochIdentifier identifier
The identifier of the announcement in an epoch.
struct GNUNET_CRYPTO_EcdhePublicKey key
The public key to receive access.
struct GNUNET_HashCode event
The hash of the linked announcement message event.
struct GNUNET_MESSENGER_MessageAnnouncement announcement
struct GNUNET_MESSENGER_MessageMerge merge
struct GNUNET_MESSENGER_MessageLeave leave
struct GNUNET_MESSENGER_MessageAccess access
struct GNUNET_MESSENGER_MessageAppeal appeal
struct GNUNET_MESSENGER_MessageJoin join
enum GNUNET_MESSENGER_MessageKind kind
The kind of the message.
struct GNUNET_HashCode epoch
The previous epoch the message was sent from.
struct GNUNET_HashCode epoch
The previous epoch the message was sent from.
struct GNUNET_HashCode epochs[2]
The previous epochs the message was sent from.
struct GNUNET_MESSENGER_MessageHeader header
Header.
struct GNUNET_MESSENGER_MessageBody body
Body.
A 256-bit hashcode.
Time for absolute times used by GNUnet, in microseconds.
Time for relative time used by GNUnet, in microseconds.
An epoch identifier unifies an epoch identifier code and its 256bit hash representation.
struct GNUNET_MESSENGER_EpochIdentifierCode code