@@ -272,7 +272,7 @@ impl Decrypter {
272
272
return None ;
273
273
} ;
274
274
275
- let Some ( dec_sk ) = self . dec_key . get ( ) else {
275
+ let Some ( dec_key ) = self . dec_key . get ( ) else {
276
276
warn ! ( node = %self . label, committee = %committee_id, "no existing key to reshare" ) ;
277
277
return None ;
278
278
} ;
@@ -281,7 +281,7 @@ impl Decrypter {
281
281
. encrypt_reshares (
282
282
next_store. committee ( ) ,
283
283
next_store. sorted_keys ( ) ,
284
- * dec_sk . privkey ( ) . share ( ) ,
284
+ * dec_key . privkey ( ) . share ( ) ,
285
285
DKG_AAD ,
286
286
)
287
287
. ok ( ) ?;
@@ -717,12 +717,12 @@ impl Worker {
717
717
718
718
if let Some ( ( & subset, _) ) = counts. iter ( ) . find ( |( _, count) | * * count >= threshold) {
719
719
let acc = DkgAccumulator :: from_subset ( key_store. to_owned ( ) , subset. to_owned ( ) ) ;
720
- let dec_sk = acc
720
+ let dec_key = acc
721
721
. extract_key ( & self . dkg_sk , None )
722
722
. map_err ( |e| DecrypterError :: Dkg ( e. to_string ( ) ) ) ?;
723
723
self . tracker . insert ( committee. id ( ) , acc) ;
724
724
725
- self . dec_key . set ( dec_sk ) ;
725
+ self . dec_key . set ( dec_key ) ;
726
726
self . state = WorkerState :: Running ;
727
727
info ! ( node = %self . label, committee_id = %committee. id( ) , "dkg finished (catchup successful)" ) ;
728
728
}
@@ -1027,7 +1027,7 @@ impl Worker {
1027
1027
/// NOTE: when a ciphertext is malformed, we will skip decrypting it (treat as garbage) here.
1028
1028
/// but will later be marked as decrypted during `hatch()`
1029
1029
async fn decrypt ( & mut self , incl : & InclusionList ) -> Result < DecShareBatch > {
1030
- let dec_sk : DecryptionKey = match & self . state {
1030
+ let dec_key : DecryptionKey = match & self . state {
1031
1031
WorkerState :: DkgPending ( _) => {
1032
1032
self . pending . insert ( incl. round ( ) , incl. clone ( ) ) ;
1033
1033
return Err ( DecrypterError :: DkgPending ) ;
@@ -1055,7 +1055,7 @@ impl Worker {
1055
1055
optional_ct. and_then ( |ct| {
1056
1056
// TODO: (anders) consider using committee_id as part of `aad`.
1057
1057
<DecryptionScheme as ThresholdEncScheme >:: decrypt (
1058
- dec_sk . privkey ( ) ,
1058
+ dec_key . privkey ( ) ,
1059
1059
& ct,
1060
1060
& THRES_AAD . to_vec ( ) ,
1061
1061
)
@@ -1133,7 +1133,7 @@ impl Worker {
1133
1133
return Ok ( Some ( incl) ) ;
1134
1134
}
1135
1135
1136
- let dec_sk = match & self . state {
1136
+ let dec_key = match & self . state {
1137
1137
WorkerState :: Running
1138
1138
| WorkerState :: ResharingComplete ( _)
1139
1139
| WorkerState :: ShuttingDown => self . dec_key . get ( ) . ok_or_else ( || {
@@ -1200,7 +1200,7 @@ impl Worker {
1200
1200
if let Some ( ct) = opt_ct {
1201
1201
match DecryptionScheme :: combine (
1202
1202
key_store. committee ( ) ,
1203
- dec_sk . combkey ( ) ,
1203
+ dec_key . combkey ( ) ,
1204
1204
dec_shares,
1205
1205
& ct,
1206
1206
& THRES_AAD . to_vec ( ) ,
0 commit comments