@@ -212,86 +212,6 @@ pub mod keys {
212
212
///
213
213
/// Used for verification purposes before publishing a signature.
214
214
pub type PublicKeyPackage = frost:: keys:: PublicKeyPackage < J > ;
215
-
216
- pub mod dkg {
217
- #![ doc = include_str ! ( "./redjubjub/dkg.md" ) ]
218
- use super :: * ;
219
-
220
- /// The secret package that must be kept in memory by the participant
221
- /// between the first and second parts of the DKG protocol (round 1).
222
- ///
223
- /// # Security
224
- ///
225
- /// This package MUST NOT be sent to other participants!
226
- pub type Round1SecretPackage = frost:: keys:: dkg:: Round1SecretPackage < J > ;
227
-
228
- /// The package that must be broadcast by each participant to all other participants
229
- /// between the first and second parts of the DKG protocol (round 1).
230
- pub type Round1Package = frost:: keys:: dkg:: Round1Package < J > ;
231
-
232
- /// The secret package that must be kept in memory by the participant
233
- /// between the second and third parts of the DKG protocol (round 2).
234
- ///
235
- /// # Security
236
- ///
237
- /// This package MUST NOT be sent to other participants!
238
- pub type Round2SecretPackage = frost:: keys:: dkg:: Round2SecretPackage < J > ;
239
-
240
- /// A package that must be sent by each participant to some other participants
241
- /// in Round 2 of the DKG protocol. Note that there is one specific package
242
- /// for each specific recipient, in contrast to Round 1.
243
- ///
244
- /// # Security
245
- ///
246
- /// The package must be sent on an *confidential* and *authenticated* channel.
247
- pub type Round2Package = frost:: keys:: dkg:: Round2Package < J > ;
248
-
249
- /// Performs the first part of the distributed key generation protocol
250
- /// for the given participant.
251
- ///
252
- /// It returns the [`Round1SecretPackage`] that must be kept in memory
253
- /// by the participant for the other steps, and the [`Round1Package`] that
254
- /// must be sent to other participants.
255
- pub fn keygen_part1 < R : RngCore + CryptoRng > (
256
- identifier : Identifier ,
257
- max_signers : u16 ,
258
- min_signers : u16 ,
259
- mut rng : R ,
260
- ) -> Result < ( Round1SecretPackage , Round1Package ) , Error > {
261
- frost:: keys:: dkg:: keygen_part1 ( identifier, max_signers, min_signers, & mut rng)
262
- }
263
-
264
- /// Performs the second part of the distributed key generation protocol
265
- /// for the participant holding the given [`Round1SecretPackage`],
266
- /// given the received [`Round1Package`]s received from the other participants.
267
- ///
268
- /// It returns the [`Round2SecretPackage`] that must be kept in memory
269
- /// by the participant for the final step, and the [`Round2Package`]s that
270
- /// must be sent to other participants.
271
- pub fn keygen_part2 (
272
- secret_package : Round1SecretPackage ,
273
- round1_packages : & [ Round1Package ] ,
274
- ) -> Result < ( Round2SecretPackage , Vec < Round2Package > ) , Error > {
275
- frost:: keys:: dkg:: keygen_part2 ( secret_package, round1_packages)
276
- }
277
-
278
- /// Performs the third and final part of the distributed key generation protocol
279
- /// for the participant holding the given [`Round2SecretPackage`],
280
- /// given the received [`Round1Package`]s and [`Round2Package`]s received from
281
- /// the other participants.
282
- ///
283
- /// It returns the [`KeyPackage`] that has the long-lived key share for the
284
- /// participant, and the [`PublicKeyPackage`]s that has public information
285
- /// about all participants; both of which are required to compute FROST
286
- /// signatures.
287
- pub fn keygen_part3 (
288
- round2_secret_package : & Round2SecretPackage ,
289
- round1_packages : & [ Round1Package ] ,
290
- round2_packages : & [ Round2Package ] ,
291
- ) -> Result < ( KeyPackage , PublicKeyPackage ) , Error > {
292
- frost:: keys:: dkg:: keygen_part3 ( round2_secret_package, round1_packages, round2_packages)
293
- }
294
- }
295
215
}
296
216
297
217
/// FROST(Jubjub, BLAKE2b-512) Round 1 functionality and types.
0 commit comments