diff --git a/crypto/frost/src/algorithm.rs b/crypto/frost/src/algorithm.rs index e0679523..16f0bfa6 100644 --- a/crypto/frost/src/algorithm.rs +++ b/crypto/frost/src/algorithm.rs @@ -38,7 +38,7 @@ pub trait Algorithm: Clone { fn transcript(&mut self) -> &mut Self::Transcript; /// Obtain the list of nonces to generate, as specified by the generators to create commitments - /// against per-nonce + /// against per-nonce. fn nonces(&self) -> Vec>; /// Generate an addendum to FROST"s preprocessing stage. diff --git a/crypto/frost/src/nonce.rs b/crypto/frost/src/nonce.rs index 71f5fa47..c4c5f361 100644 --- a/crypto/frost/src/nonce.rs +++ b/crypto/frost/src/nonce.rs @@ -3,10 +3,11 @@ // Then there is a signature (a modified Chaum Pedersen proof) using multiple nonces at once // // Accordingly, in order for this library to be robust, it supports generating an arbitrary amount -// of nonces, each against an arbitrary list of basepoints +// of nonces, each against an arbitrary list of generators // // Each nonce remains of the form (d, e) and made into a proper nonce with d + (e * b) -// When multiple D, E pairs are provided, a DLEq proof is also provided to confirm their integrity +// When representations across multiple generators are provided, a DLEq proof is also provided to +// confirm their integrity use core::ops::Deref; use std::{ @@ -72,6 +73,7 @@ impl GeneratorCommitments { #[derive(Clone, PartialEq, Eq)] pub(crate) struct NonceCommitments { // Called generators as these commitments are indexed by generator later on + // So to get the commitments for the first generator, it'd be commitments.generators[0] pub(crate) generators: Vec>, } @@ -130,9 +132,11 @@ impl NonceCommitments { } } +/// Commitments for all the nonces across all their generators. #[derive(Clone, PartialEq, Eq)] pub(crate) struct Commitments { // Called nonces as these commitments are indexed by nonce + // So to get the commitments for the first nonce, it'd be commitments.nonces[0] pub(crate) nonces: Vec>, // DLEq Proof proving that each set of commitments were generated using a single pair of discrete // logarithms diff --git a/crypto/frost/src/sign.rs b/crypto/frost/src/sign.rs index 4c7a15ec..b869e610 100644 --- a/crypto/frost/src/sign.rs +++ b/crypto/frost/src/sign.rs @@ -221,8 +221,8 @@ pub trait SignMachine: Sized { /// security as your private key share. fn cache(self) -> CachedPreprocess; - /// Create a sign machine from a cached preprocess. After this, the preprocess should be fully - /// deleted, as it must never be reused. It is + /// Create a sign machine from a cached preprocess. After this, the preprocess must be deleted so + /// it's never reused. Any reuse would cause the signer to leak their secret share. fn from_cache( params: Self::Params, keys: Self::Keys,