30
30
//! [Feldman's VSS]: https://www.cs.umd.edu/~gasarch/TOPICS/secretsharing/feldmanVSS.pdf
31
31
//! [secure broadcast channel]: https://frost.zfnd.org/terminology.html#broadcast-channel
32
32
33
- use std:: { collections:: BTreeMap , iter} ;
33
+ use core:: iter;
34
+
35
+ use alloc:: collections:: BTreeMap ;
34
36
35
37
use rand_core:: { CryptoRng , RngCore } ;
36
38
@@ -39,6 +41,9 @@ use crate::{
39
41
SigningKey , VerifyingKey ,
40
42
} ;
41
43
44
+ #[ cfg( feature = "serialization" ) ]
45
+ use crate :: serialization:: { Deserialize , Serialize } ;
46
+
42
47
use super :: {
43
48
evaluate_polynomial, generate_coefficients, generate_secret_polynomial,
44
49
validate_num_of_signers, KeyPackage , PublicKeyPackage , SecretShare , SigningShare ,
@@ -47,11 +52,10 @@ use super::{
47
52
48
53
/// DKG Round 1 structures.
49
54
pub mod round1 {
55
+ use alloc:: vec:: Vec ;
50
56
use derive_getters:: Getters ;
51
57
use zeroize:: Zeroize ;
52
58
53
- use crate :: serialization:: { Deserialize , Serialize } ;
54
-
55
59
use super :: * ;
56
60
57
61
/// The package that must be broadcast by each participant to all other participants
@@ -135,11 +139,11 @@ pub mod round1 {
135
139
}
136
140
}
137
141
138
- impl < C > std :: fmt:: Debug for SecretPackage < C >
142
+ impl < C > core :: fmt:: Debug for SecretPackage < C >
139
143
where
140
144
C : Ciphersuite ,
141
145
{
142
- fn fmt ( & self , f : & mut std :: fmt:: Formatter < ' _ > ) -> std :: fmt:: Result {
146
+ fn fmt ( & self , f : & mut core :: fmt:: Formatter < ' _ > ) -> core :: fmt:: Result {
143
147
f. debug_struct ( "SecretPackage" )
144
148
. field ( "identifier" , & self . identifier )
145
149
. field ( "coefficients" , & "<redacted>" )
@@ -167,7 +171,8 @@ pub mod round2 {
167
171
use derive_getters:: Getters ;
168
172
use zeroize:: Zeroize ;
169
173
170
- use crate :: serialization:: { Deserialize , Serialize } ;
174
+ #[ cfg( feature = "serialization" ) ]
175
+ use alloc:: vec:: Vec ;
171
176
172
177
use super :: * ;
173
178
@@ -239,11 +244,11 @@ pub mod round2 {
239
244
pub ( crate ) max_signers : u16 ,
240
245
}
241
246
242
- impl < C > std :: fmt:: Debug for SecretPackage < C >
247
+ impl < C > core :: fmt:: Debug for SecretPackage < C >
243
248
where
244
249
C : Ciphersuite ,
245
250
{
246
- fn fmt ( & self , f : & mut std :: fmt:: Formatter < ' _ > ) -> std :: fmt:: Result {
251
+ fn fmt ( & self , f : & mut core :: fmt:: Formatter < ' _ > ) -> core :: fmt:: Result {
247
252
f. debug_struct ( "SecretPackage" )
248
253
. field ( "identifier" , & self . identifier )
249
254
. field ( "commitment" , & self . commitment )
0 commit comments