aboutsummaryrefslogtreecommitdiff
path: root/src/secretsharing/secretsharing_protocol.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/secretsharing/secretsharing_protocol.h')
-rw-r--r--src/secretsharing/secretsharing_protocol.h147
1 files changed, 0 insertions, 147 deletions
diff --git a/src/secretsharing/secretsharing_protocol.h b/src/secretsharing/secretsharing_protocol.h
deleted file mode 100644
index d4aaecb6c..000000000
--- a/src/secretsharing/secretsharing_protocol.h
+++ /dev/null
@@ -1,147 +0,0 @@
1/*
2 This file is part of GNUnet
3 Copyright (C) 2012 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
21
22/**
23 * @file secretsharing/secretsharing_protocol.h
24 * @brief p2p message definitions for secretsharing
25 * @author Florian Dold
26 */
27
28#ifndef GNUNET_SECRETSHARING_PROTOCOL_H
29#define GNUNET_SECRETSHARING_PROTOCOL_H
30
31#include "platform.h"
32#include "gnunet_common.h"
33#include "gnunet_protocols.h"
34#include "secretsharing.h"
35
36
37GNUNET_NETWORK_STRUCT_BEGIN
38
39
40/**
41 * Consensus element data used in the first round of key generation.
42 */
43struct GNUNET_SECRETSHARING_KeygenCommitData
44{
45 /**
46 * Signature over the rest of the message.
47 */
48 struct GNUNET_CRYPTO_EddsaSignature signature;
49 /**
50 * Signature purpose for signing the keygen commit data.
51 */
52 struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
53 /**
54 * Peer that inserts this element.
55 */
56 struct GNUNET_PeerIdentity peer;
57 /**
58 * Ephemeral paillier public key used by 'peer' for
59 * this session.
60 */
61 struct GNUNET_CRYPTO_PaillierPublicKey pubkey;
62 /**
63 * Commitment of 'peer' to its presecret.
64 */
65 struct GNUNET_HashCode commitment GNUNET_PACKED;
66};
67
68
69struct GNUNET_SECRETSHARING_KeygenRevealData
70{
71 /**
72 * Signature over rest of the message.
73 */
74 struct GNUNET_CRYPTO_EddsaSignature signature;
75 /*
76 * Signature purpose for signing the keygen commit data.
77 */
78 struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
79 /**
80 * Peer that inserts this element.
81 */
82 struct GNUNET_PeerIdentity peer;
83
84 /* values follow */
85};
86
87
88/**
89 * Data of then element put in consensus
90 * for decrypting a value.
91 */
92struct GNUNET_SECRETSHARING_DecryptData
93{
94 /*
95 * Signature over rest of the message.
96 */
97 struct GNUNET_CRYPTO_EddsaSignature signature;
98 /*
99 * Signature purpose for signing the keygen commit data.
100 */
101 struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
102 /**
103 * Ciphertext we want to decrypt.
104 */
105 struct GNUNET_SECRETSHARING_Ciphertext ciphertext;
106 /**
107 * Peer that inserts this element.
108 */
109 struct GNUNET_PeerIdentity peer;
110 /**
111 * Partial decryption, computed as c_1^{s_i}
112 */
113 struct GNUNET_SECRETSHARING_FieldElement partial_decryption;
114 /**
115 * Commitment for the non-interactive zero knowledge proof.
116 * g^\beta, with \beta < q
117 */
118 struct GNUNET_SECRETSHARING_FieldElement nizk_commit1;
119 /**
120 * Commitment for the non-interactive zero knowledge proof.
121 * c_1^\beta, with \beta < q
122 */
123 struct GNUNET_SECRETSHARING_FieldElement nizk_commit2;
124 /**
125 * Response to the challenge computed from the protocol transcript.
126 * r = \beta + challenge \cdot share_i
127 */
128 struct GNUNET_SECRETSHARING_FieldElement nizk_response;
129};
130
131
132struct GNUNET_SECRETSHARING_FairEncryption
133{
134 struct GNUNET_CRYPTO_PaillierCiphertext c;
135 /**
136 * h = g^x, where x is the fairly encrypted secret.
137 */
138 char h[GNUNET_SECRETSHARING_ELGAMAL_BITS / 8];
139 char t1[GNUNET_SECRETSHARING_ELGAMAL_BITS / 8];
140 char t2[GNUNET_CRYPTO_PAILLIER_BITS * 2 / 8];
141 char z[GNUNET_SECRETSHARING_ELGAMAL_BITS / 8];
142 char w[GNUNET_CRYPTO_PAILLIER_BITS / 8];
143};
144
145GNUNET_NETWORK_STRUCT_END
146
147#endif