GNUnet  0.10.x
secretsharing.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2013 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 
26 #ifndef SECRETSHARING_H
27 #define SECRETSHARING_H
28 
29 #include "platform.h"
30 #include "gnunet_util_lib.h"
31 #include "gnunet_time_lib.h"
32 #include "gnunet_common.h"
34 
35 
37 
43 };
44 
45 
50  struct GNUNET_MessageHeader header;
51 
56 
61 
66 
72 
77 
78  /* struct GNUNET_PeerIdentity[num_peers]; */
79 };
80 
81 
82 
87  uint16_t threshold;
88 
92  uint16_t num_peers;
93 
97  uint16_t my_peer;
98 
104 
109 };
110 
111 
120  struct GNUNET_MessageHeader header;
121 
122  /* rest: the serialized share */
123 };
124 
125 
130  struct GNUNET_MessageHeader header;
131 
136 
141 
146 
147  /* the share with payload */
148 };
149 
150 
155  struct GNUNET_MessageHeader header;
156 
161  uint32_t success GNUNET_PACKED;
162 
167 };
168 
169 
171 
172 
180  uint16_t threshold;
181 
185  uint16_t num_peers;
186 
190  uint16_t my_peer;
191 
197 
202 
207 
208  /*
209  * For each peer, store elgamal_g to the peer's
210  * share.
211  */
213 
214  /*
215  * Original indices of peers from the DKG round.
216  */
217  uint16_t *original_indices;
218 };
219 
220 
221 #endif
static unsigned int threshold
What should the threshold for then key be?
uint16_t threshold
Threshold for the key this share belongs to.
struct GNUNET_PeerIdentity * peers
Peer identities (includes &#39;my_peer&#39;)
static int start
Set if we are to start default services (including ARM).
Definition: gnunet-arm.c:39
A share, with all values in in host byte order.
static struct GNUNET_HashCode session_id
Time for absolute time used by GNUnet, in microseconds and in network byte order. ...
#define GNUNET_NETWORK_STRUCT_BEGIN
Define as empty, GNUNET_PACKED should suffice, but this won&#39;t work on W32.
Public key of a group sharing a secret.
static struct GNUNET_SECRETSHARING_Ciphertext ciphertext
uint16_t threshold
Threshold for the key this share belongs to.
Definition: secretsharing.h:87
A 512-bit hashcode.
static unsigned int num_peers
#define GNUNET_NETWORK_STRUCT_END
Define as empty, GNUNET_PACKED should suffice, but this won&#39;t work on W32;.
The identity of the host (wraps the signing key of the peer).
#define GNUNET_PACKED
gcc-ism to get packed structs.
struct GNUNET_SECRETSHARING_FieldElement * sigmas
uint16_t my_peer
Index of our peer in the list.
unsigned char bits[GNUNET_SECRETSHARING_ELGAMAL_BITS/8]
Value of an element in <elgamal_g>.
Definition: secretsharing.h:42
static struct GNUNET_TIME_Absolute deadline
Deadline for all consensuses.
Header for all communications.
commonly used definitions; globals in this file are exempt from the rule that the module name ("commo...
uint16_t num_peers
Peers that have the share.
uint16_t my_peer
Index of our peer in the list.
Definition: secretsharing.h:97
Notify the client that then threshold secret has been established.
uint16_t num_peers
Peers that have the share.
Definition: secretsharing.h:92
#define GNUNET_SECRETSHARING_ELGAMAL_BITS
Number of bits for secretsharing elements.