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")]
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")]

View file

@ -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<C: Ciphersuite>(keys: &HashMap<Participant, ThresholdKeys<C>>
pub fn key_gen<R: RngCore + CryptoRng, C: Ciphersuite>(
rng: &mut R,
) -> HashMap<Participant, ThresholdKeys<C>> {
let res = frost_gen(rng)
let res = pedpop_gen(rng)
.drain()
.map(|(i, core)| {
assert_eq!(

View file

@ -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<C> = EncryptedMessage<C, SecretShare<<C as Ciphersuite>::F>>;
type FrostSecretShares<C> = HashMap<Participant, FrostEncryptedMessage<C>>;
type PedPoPEncryptedMessage<C> = EncryptedMessage<C, SecretShare<<C as Ciphersuite>::F>>;
type PedPoPSecretShares<C> = HashMap<Participant, PedPoPEncryptedMessage<C>>;
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, EncryptionKeyMessage<C, Commitments<C>>>,
HashMap<Participant, C::G>,
HashMap<Participant, FrostSecretShares<C>>,
HashMap<Participant, PedPoPSecretShares<C>>,
) {
let mut machines = 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>(
shares: &HashMap<Participant, FrostSecretShares<C>>,
shares: &HashMap<Participant, PedPoPSecretShares<C>>,
recipient: Participant,
) -> FrostSecretShares<C> {
) -> PedPoPSecretShares<C> {
let mut our_secret_shares = HashMap::new();
for (i, shares) in shares {
if recipient == *i {
@ -85,8 +85,8 @@ fn generate_secret_shares<C: Ciphersuite>(
our_secret_shares
}
/// Fully perform the FROST key generation algorithm.
pub fn frost_gen<R: RngCore + CryptoRng, C: Ciphersuite>(
/// Fully perform the PedPoP key generation algorithm.
pub fn pedpop_gen<R: RngCore + CryptoRng, C: Ciphersuite>(
rng: &mut R,
) -> HashMap<Participant, ThresholdCore<C>> {
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<Participant, EncryptionKeyMessage<Ristretto, Commitments<Ristretto>>>,
machines: Vec<BlameMachine<Ristretto>>,
msg: &FrostEncryptedMessage<Ristretto>,
msg: &PedPoPEncryptedMessage<Ristretto>,
blame: &Option<EncryptionKeyProof<Ristretto>>,
) {
for machine in machines {

View file

@ -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::*,
},
};