Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for redpallas #64

Merged
merged 4 commits into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
188 changes: 187 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions coordinator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@ edition = "2021"
[dependencies]
eyre = "0.6.8"
frost-ed25519 = { version = "0.6.0", features = ["serde"] }
reddsa = { git = "https://github.com/ZcashFoundation/reddsa.git", rev = "8534e283acf0015cc2450e2a6b49685a3bb3145d", features = ["frost"] }
hex = { version = "0.4", features = ["serde"] }
thiserror = "1.0"
rand = "0.8"
serde_json = "1.0"
itertools = "0.11.0"
exitcode = "1.1.2"

[features]
redpallas = []
default = []
15 changes: 14 additions & 1 deletion coordinator/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ use crate::step_1::step_1;
use crate::step_2::step_2;
use crate::step_3::step_3;

#[cfg(feature = "redpallas")]
use crate::step_3::request_randomizer;

pub fn cli(
reader: &mut impl BufRead,
logger: &mut impl Write,
Expand All @@ -19,9 +22,19 @@ pub fn cli(

let signing_package = step_2(reader, logger, participants_config.participants.clone())?;

#[cfg(feature = "redpallas")]
let randomizer = request_randomizer(reader, logger)?;

writeln!(logger, "=== STEP 3: BUILD GROUP SIGNATURE ===\n")?;

step_3(reader, logger, participants_config, signing_package);
step_3(
reader,
logger,
participants_config,
signing_package,
#[cfg(feature = "redpallas")]
randomizer,
);

writeln!(logger, "=== END ===")?;

Expand Down
3 changes: 3 additions & 0 deletions coordinator/src/step_1.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#[cfg(not(feature = "redpallas"))]
use frost_ed25519 as frost;
#[cfg(feature = "redpallas")]
use reddsa::frost::redpallas as frost;

use frost::{keys::PublicKeyPackage, Error, Identifier};

Expand Down
7 changes: 5 additions & 2 deletions coordinator/src/step_2.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
use frost::{round1::SigningCommitments, Identifier, SigningPackage};

#[cfg(not(feature = "redpallas"))]
use frost_ed25519 as frost;
#[cfg(feature = "redpallas")]
use reddsa::frost::redpallas as frost;

use frost::{round1::SigningCommitments, Identifier, SigningPackage};

use std::{
collections::BTreeMap,
Expand Down
Loading