diff --git a/crypto/dkg/src/lib.rs b/crypto/dkg/src/lib.rs index 77a3bdbe..478f400f 100644 --- a/crypto/dkg/src/lib.rs +++ b/crypto/dkg/src/lib.rs @@ -16,10 +16,10 @@ pub mod musig; #[cfg(feature = "std")] pub mod encryption; -/// The distributed key generation protocol described in the -/// [FROST paper](https://eprint.iacr.org/2020/852). +/// The PedPoP distributed key generation protocol described in the +/// [FROST paper](https://eprint.iacr.org/2020/852), augmented to be verifiable. #[cfg(feature = "std")] -pub mod frost; +pub mod pedpop; /// Promote keys between ciphersuites. #[cfg(feature = "std")] diff --git a/crypto/dkg/src/frost.rs b/crypto/dkg/src/pedpop.rs similarity index 100% rename from crypto/dkg/src/frost.rs rename to crypto/dkg/src/pedpop.rs diff --git a/crypto/dkg/src/tests/mod.rs b/crypto/dkg/src/tests/mod.rs index 548b2fe0..f21d7254 100644 --- a/crypto/dkg/src/tests/mod.rs +++ b/crypto/dkg/src/tests/mod.rs @@ -12,8 +12,8 @@ mod musig; pub use musig::test_musig; /// FROST key generation testing utility. -pub mod frost; -use frost::frost_gen; +pub mod pedpop; +use pedpop::pedpop_gen; // Promotion test. mod promote; @@ -53,7 +53,7 @@ pub fn recover_key(keys: &HashMap> pub fn key_gen( rng: &mut R, ) -> HashMap> { - let res = frost_gen(rng) + let res = pedpop_gen(rng) .drain() .map(|(i, core)| { assert_eq!( diff --git a/crypto/dkg/src/tests/frost.rs b/crypto/dkg/src/tests/pedpop.rs similarity index 94% rename from crypto/dkg/src/tests/frost.rs rename to crypto/dkg/src/tests/pedpop.rs index e54f60be..3ae383e3 100644 --- a/crypto/dkg/src/tests/frost.rs +++ b/crypto/dkg/src/tests/pedpop.rs @@ -6,13 +6,13 @@ use ciphersuite::Ciphersuite; use crate::{ Participant, ThresholdParams, ThresholdCore, - frost::{Commitments, KeyGenMachine, SecretShare, KeyMachine}, + pedpop::{Commitments, KeyGenMachine, SecretShare, KeyMachine}, encryption::{EncryptionKeyMessage, EncryptedMessage}, tests::{THRESHOLD, PARTICIPANTS, clone_without}, }; -type FrostEncryptedMessage = EncryptedMessage::F>>; -type FrostSecretShares = HashMap>; +type PedPoPEncryptedMessage = EncryptedMessage::F>>; +type PedPoPSecretShares = HashMap>; const CONTEXT: &str = "DKG Test Key Generation"; @@ -24,7 +24,7 @@ fn commit_enc_keys_and_shares( HashMap>, HashMap>>, HashMap, - HashMap>, + HashMap>, ) { let mut machines = HashMap::new(); let mut commitments = HashMap::new(); @@ -72,9 +72,9 @@ fn commit_enc_keys_and_shares( } fn generate_secret_shares( - shares: &HashMap>, + shares: &HashMap>, recipient: Participant, -) -> FrostSecretShares { +) -> PedPoPSecretShares { let mut our_secret_shares = HashMap::new(); for (i, shares) in shares { if recipient == *i { @@ -85,8 +85,8 @@ fn generate_secret_shares( our_secret_shares } -/// Fully perform the FROST key generation algorithm. -pub fn frost_gen( +/// Fully perform the PedPoP key generation algorithm. +pub fn pedpop_gen( rng: &mut R, ) -> HashMap> { let (mut machines, _, _, secret_shares) = commit_enc_keys_and_shares::<_, C>(rng); @@ -125,7 +125,7 @@ mod literal { use crate::{ DkgError, encryption::EncryptionKeyProof, - frost::{BlameMachine, AdditionalBlameMachine}, + pedpop::{BlameMachine, AdditionalBlameMachine}, }; use super::*; @@ -136,7 +136,7 @@ mod literal { fn test_blame( commitment_msgs: &HashMap>>, machines: Vec>, - msg: &FrostEncryptedMessage, + msg: &PedPoPEncryptedMessage, blame: &Option>, ) { for machine in machines { diff --git a/processor/src/key_gen.rs b/processor/src/key_gen.rs index 6976e225..297db194 100644 --- a/processor/src/key_gen.rs +++ b/processor/src/key_gen.rs @@ -10,7 +10,7 @@ use ciphersuite::group::GroupEncoding; use frost::{ curve::{Ciphersuite, Ristretto}, dkg::{ - DkgError, Participant, ThresholdParams, ThresholdCore, ThresholdKeys, encryption::*, frost::*, + DkgError, Participant, ThresholdParams, ThresholdCore, ThresholdKeys, encryption::*, pedpop::*, }, };