Skip to content

Commit e432d1f

Browse files
committed
Change dkg::round3 to return this crate's PublicKeyPackage
Return the `PublicKeyPackage` from `ironfish-frost` instead of the one from `frost-core`
1 parent 7e8c186 commit e432d1f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/dkg/round3.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use crate::dkg::round2;
1111
use crate::dkg::round2::import_secret_package;
1212
use crate::frost::keys::dkg::part3;
1313
use crate::frost::keys::KeyPackage;
14-
use crate::frost::keys::PublicKeyPackage;
14+
use crate::keys::PublicKeyPackage;
1515
use crate::participant::Secret;
1616
use std::borrow::Borrow;
1717
use std::collections::BTreeMap;
@@ -60,6 +60,8 @@ where
6060

6161
let mut gsk_shards = Vec::new();
6262
let mut round1_frost_packages = BTreeMap::new();
63+
let mut identities = Vec::new();
64+
6365
for public_package in round1_public_packages.iter() {
6466
if public_package.checksum() != expected_round1_checksum {
6567
return Err(Error::ChecksumError(ChecksumError::DkgPublicPackageError));
@@ -83,6 +85,7 @@ where
8385
.group_secret_key_shard(secret)
8486
.map_err(Error::DecryptionError)?;
8587
gsk_shards.push(gsk_shard);
88+
identities.push(identity.clone());
8689
}
8790

8891
// Sanity check
@@ -133,6 +136,9 @@ where
133136
)
134137
.map_err(Error::FrostError)?;
135138

139+
let public_key_package =
140+
PublicKeyPackage::from_frost(public_key_package, identities, min_signers);
141+
136142
Ok((
137143
key_package,
138144
public_key_package,

0 commit comments

Comments
 (0)