Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
1c1a31c
cocktail-dkg: first pass
conradoplg Mar 13, 2026
075b36d
correctly handle any hash size
conradoplg Mar 16, 2026
c43086a
allow computing extension from payloads
conradoplg Mar 16, 2026
000e357
fix test vector test
conradoplg Mar 17, 2026
7c181b0
use JSON test vector
conradoplg Mar 17, 2026
114727d
readd separate pop sign/verify; check more values from vectors
conradoplg Mar 17, 2026
496796b
support recovery
conradoplg Mar 17, 2026
54abee8
test all vectors; simplify recovery()
conradoplg Mar 17, 2026
569d970
manual docs cleanup
conradoplg Mar 17, 2026
2a6f690
use get() for slices
conradoplg Mar 17, 2026
04a3835
clippy fixes
conradoplg Mar 17, 2026
bf46628
inline element_to_bytes()
conradoplg Mar 17, 2026
7c2e0c8
rename ParsedTranscript to Transcript, move functions to serialize me…
conradoplg Mar 17, 2026
602410d
support all ciphersuites
conradoplg Mar 18, 2026
6a63c0c
make test vector test generic
conradoplg Mar 18, 2026
43561fe
partial xaes-256-gcm support added
conradoplg Mar 18, 2026
684e718
finished xaes usage; taproot test vector not passing due to tweak add…
conradoplg Mar 18, 2026
9f42c38
added missing files
conradoplg Mar 19, 2026
dd63723
clippy fixes
conradoplg Mar 19, 2026
cacee64
refactor CounterDrng into frost-core
conradoplg Mar 19, 2026
84a75c3
fixed taproot test by applying post_dkg() to vectors
conradoplg Mar 19, 2026
4b94ae3
move tests to a separate file
conradoplg Mar 20, 2026
647d19a
gate cocktail-dkg under feature
conradoplg Mar 20, 2026
4424ac6
remove spec file
conradoplg Mar 20, 2026
84e99f8
also move cocktail-dkg ciphersuite tests to separate file; to be comp…
conradoplg Mar 20, 2026
e0778ed
gencode
conradoplg Mar 20, 2026
a97b03c
cargo fmt
conradoplg Mar 20, 2026
a9041a9
add cocktail_dkg.rs to gencode
conradoplg Mar 20, 2026
eb57118
cleaned up docs
conradoplg Mar 26, 2026
a8ab5f8
udpdate to 0.2.0 spec
conradoplg Jul 13, 2026
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
284 changes: 278 additions & 6 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ members = [
# If you update the edition, make sure to also update the argument to rustfmt
# in gencode/src/main.rs.
edition = "2021"
rust-version = "1.81"
rust-version = "1.85"
version = "3.0.0-rc.0"
authors = [
"Deirdre Connolly <durumcrustulum@gmail.com>",
Expand All @@ -31,6 +31,8 @@ categories = ["cryptography"]
[workspace.dependencies]
# Currently holding back from updating due to MSRV 1.86 of criterion 0.8
# (we don't want to raise our MSRV just for this)
chacha20poly1305 = { version = "0.10", default-features = false, features = ["alloc"] }
xaes-256-gcm = { version = "0.1.0-rc.3", default-features = false, features = ["alloc"] }
criterion = "0.6"
document-features = "0.2.7"
hex = { version = "0.4.3", default-features = false, features = ["alloc"] }
Expand Down
3 changes: 3 additions & 0 deletions frost-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const-crc32 = { version = "1.2.0", package = "const-crc32-nostd" }
document-features.workspace = true
debugless-unwrap = { version = "1.0.0", optional = true }
derive-getters = "0.5.0"
derive-new = "0.6"
hex.workspace = true
postcard = { version = "1.0.0", features = ["alloc"], optional = true }
rand_core = { version = "0.6", default-features = false }
Expand Down Expand Up @@ -63,6 +64,8 @@ internals = []
## `serde` (e.g. JSON with `serde_json`).
serde = ["dep:serde", "dep:serdect"]
serialization = ["serde", "dep:postcard"]
## Enable the COCKTAIL-DKG distributed key generation protocol.
cocktail-dkg = []
# Exposes ciphersuite-generic tests for other crates to use
test-impl = ["dep:proptest", "dep:serde_json", "dep:criterion", "dep:tokio", "dep:debugless-unwrap"]

Expand Down
24 changes: 24 additions & 0 deletions frost-core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,24 @@ pub enum Error<C: Ciphersuite> {
/// The identifier of the signer whose share validation failed.
culprit: Identifier<C>,
},
/// Decryption of an encrypted share failed.
#[cfg(feature = "cocktail-dkg")]
#[error("Decryption of an encrypted share failed.")]
DecryptionFailed {
/// The identifier of the participant who sent the invalid ciphertext.
culprit: Identifier<C>,
},
/// A transcript signature is not valid.
#[cfg(feature = "cocktail-dkg")]
#[error("Invalid transcript signature.")]
InvalidTranscriptSignature {
/// The identifier of the participant whose transcript signature was invalid.
culprit: Identifier<C>,
},
/// Duplicated static public keys were provided.
#[cfg(feature = "cocktail-dkg")]
#[error("Duplicated static public keys provided.")]
DuplicatedVerifyingKeys,
/// Error in scalar Field.
#[error("Error in scalar Field.")]
FieldError(#[from] FieldError),
Expand Down Expand Up @@ -126,6 +144,12 @@ where
Error::InvalidSignatureShare { culprits } => culprits.clone(),
Error::InvalidProofOfKnowledge { culprit } => vec![*culprit],
Error::InvalidSecretShare { culprit } => culprit.map(|i| vec![i]).unwrap_or_default(),
#[cfg(feature = "cocktail-dkg")]
Error::DecryptionFailed { culprit } => vec![*culprit],
#[cfg(feature = "cocktail-dkg")]
Error::InvalidTranscriptSignature { culprit } => vec![*culprit],
#[cfg(feature = "cocktail-dkg")]
Error::DuplicatedVerifyingKeys => vec![],
Error::InvalidMinSigners
| Error::InvalidMaxSigners
| Error::InvalidCoefficients
Expand Down
3 changes: 3 additions & 0 deletions frost-core/src/keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ use crate::serialization::{Deserialize, Serialize};

use super::compute_lagrange_coefficient;

#[cfg(feature = "cocktail-dkg")]
#[cfg_attr(docsrs, doc(cfg(feature = "cocktail-dkg")))]
pub mod cocktail_dkg;
pub mod dkg;
pub mod refresh;
pub mod repairable;
Expand Down
Loading