Rename DKG specified in FROST from FROST to PedPoP

This commit is contained in:
Luke Parker 2024-07-18 16:41:31 -04:00
parent 491500057b
commit b33a6487aa
No known key found for this signature in database
5 changed files with 17 additions and 17 deletions

View file

@ -16,10 +16,10 @@ pub mod musig;
#[cfg(feature = "std")] #[cfg(feature = "std")]
pub mod encryption; pub mod encryption;
/// The distributed key generation protocol described in the /// The PedPoP distributed key generation protocol described in the
/// [FROST paper](https://eprint.iacr.org/2020/852). /// [FROST paper](https://eprint.iacr.org/2020/852), augmented to be verifiable.
#[cfg(feature = "std")] #[cfg(feature = "std")]
pub mod frost; pub mod pedpop;
/// Promote keys between ciphersuites. /// Promote keys between ciphersuites.
#[cfg(feature = "std")] #[cfg(feature = "std")]

View file

@ -12,8 +12,8 @@ mod musig;
pub use musig::test_musig; pub use musig::test_musig;
/// FROST key generation testing utility. /// FROST key generation testing utility.
pub mod frost; pub mod pedpop;
use frost::frost_gen; use pedpop::pedpop_gen;
// Promotion test. // Promotion test.
mod promote; mod promote;
@ -53,7 +53,7 @@ pub fn recover_key<C: Ciphersuite>(keys: &HashMap<Participant, ThresholdKeys<C>>
pub fn key_gen<R: RngCore + CryptoRng, C: Ciphersuite>( pub fn key_gen<R: RngCore + CryptoRng, C: Ciphersuite>(
rng: &mut R, rng: &mut R,
) -> HashMap<Participant, ThresholdKeys<C>> { ) -> HashMap<Participant, ThresholdKeys<C>> {
let res = frost_gen(rng) let res = pedpop_gen(rng)
.drain() .drain()
.map(|(i, core)| { .map(|(i, core)| {
assert_eq!( assert_eq!(

View file

@ -6,13 +6,13 @@ use ciphersuite::Ciphersuite;
use crate::{ use crate::{
Participant, ThresholdParams, ThresholdCore, Participant, ThresholdParams, ThresholdCore,
frost::{Commitments, KeyGenMachine, SecretShare, KeyMachine}, pedpop::{Commitments, KeyGenMachine, SecretShare, KeyMachine},
encryption::{EncryptionKeyMessage, EncryptedMessage}, encryption::{EncryptionKeyMessage, EncryptedMessage},
tests::{THRESHOLD, PARTICIPANTS, clone_without}, tests::{THRESHOLD, PARTICIPANTS, clone_without},
}; };
type FrostEncryptedMessage<C> = EncryptedMessage<C, SecretShare<<C as Ciphersuite>::F>>; type PedPoPEncryptedMessage<C> = EncryptedMessage<C, SecretShare<<C as Ciphersuite>::F>>;
type FrostSecretShares<C> = HashMap<Participant, FrostEncryptedMessage<C>>; type PedPoPSecretShares<C> = HashMap<Participant, PedPoPEncryptedMessage<C>>;
const CONTEXT: &str = "DKG Test Key Generation"; const CONTEXT: &str = "DKG Test Key Generation";
@ -24,7 +24,7 @@ fn commit_enc_keys_and_shares<R: RngCore + CryptoRng, C: Ciphersuite>(
HashMap<Participant, KeyMachine<C>>, HashMap<Participant, KeyMachine<C>>,
HashMap<Participant, EncryptionKeyMessage<C, Commitments<C>>>, HashMap<Participant, EncryptionKeyMessage<C, Commitments<C>>>,
HashMap<Participant, C::G>, HashMap<Participant, C::G>,
HashMap<Participant, FrostSecretShares<C>>, HashMap<Participant, PedPoPSecretShares<C>>,
) { ) {
let mut machines = HashMap::new(); let mut machines = HashMap::new();
let mut commitments = HashMap::new(); let mut commitments = HashMap::new();
@ -72,9 +72,9 @@ fn commit_enc_keys_and_shares<R: RngCore + CryptoRng, C: Ciphersuite>(
} }
fn generate_secret_shares<C: Ciphersuite>( fn generate_secret_shares<C: Ciphersuite>(
shares: &HashMap<Participant, FrostSecretShares<C>>, shares: &HashMap<Participant, PedPoPSecretShares<C>>,
recipient: Participant, recipient: Participant,
) -> FrostSecretShares<C> { ) -> PedPoPSecretShares<C> {
let mut our_secret_shares = HashMap::new(); let mut our_secret_shares = HashMap::new();
for (i, shares) in shares { for (i, shares) in shares {
if recipient == *i { if recipient == *i {
@ -85,8 +85,8 @@ fn generate_secret_shares<C: Ciphersuite>(
our_secret_shares our_secret_shares
} }
/// Fully perform the FROST key generation algorithm. /// Fully perform the PedPoP key generation algorithm.
pub fn frost_gen<R: RngCore + CryptoRng, C: Ciphersuite>( pub fn pedpop_gen<R: RngCore + CryptoRng, C: Ciphersuite>(
rng: &mut R, rng: &mut R,
) -> HashMap<Participant, ThresholdCore<C>> { ) -> HashMap<Participant, ThresholdCore<C>> {
let (mut machines, _, _, secret_shares) = commit_enc_keys_and_shares::<_, C>(rng); let (mut machines, _, _, secret_shares) = commit_enc_keys_and_shares::<_, C>(rng);
@ -125,7 +125,7 @@ mod literal {
use crate::{ use crate::{
DkgError, DkgError,
encryption::EncryptionKeyProof, encryption::EncryptionKeyProof,
frost::{BlameMachine, AdditionalBlameMachine}, pedpop::{BlameMachine, AdditionalBlameMachine},
}; };
use super::*; use super::*;
@ -136,7 +136,7 @@ mod literal {
fn test_blame( fn test_blame(
commitment_msgs: &HashMap<Participant, EncryptionKeyMessage<Ristretto, Commitments<Ristretto>>>, commitment_msgs: &HashMap<Participant, EncryptionKeyMessage<Ristretto, Commitments<Ristretto>>>,
machines: Vec<BlameMachine<Ristretto>>, machines: Vec<BlameMachine<Ristretto>>,
msg: &FrostEncryptedMessage<Ristretto>, msg: &PedPoPEncryptedMessage<Ristretto>,
blame: &Option<EncryptionKeyProof<Ristretto>>, blame: &Option<EncryptionKeyProof<Ristretto>>,
) { ) {
for machine in machines { for machine in machines {

View file

@ -10,7 +10,7 @@ use ciphersuite::group::GroupEncoding;
use frost::{ use frost::{
curve::{Ciphersuite, Ristretto}, curve::{Ciphersuite, Ristretto},
dkg::{ dkg::{
DkgError, Participant, ThresholdParams, ThresholdCore, ThresholdKeys, encryption::*, frost::*, DkgError, Participant, ThresholdParams, ThresholdCore, ThresholdKeys, encryption::*, pedpop::*,
}, },
}; };