Skip to content

Commit 4dac029

Browse files
nickfarrowLLFourn
authored andcommitted
[❄] Improve polynomial fingerprint comment clarity
1 parent fe28d3e commit 4dac029

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

schnorr_fun/src/frost/chilldkg.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -662,8 +662,10 @@ pub mod encpedpop {
662662
/// Grinds all polynomial coefficients to achieve a fingerprint by rejection sampling.
663663
/// This is meant to be run by the coordinator.
664664
///
665-
/// This method modifies each non-constant coefficient of the polynomial through group addition
666-
/// until the hash of all coefficients up to that point has the required number of leading zero bits.
665+
/// This method modifies each non-constant coefficient of the polynomial through group
666+
/// addition until the running hash (computed by sequentially incorporating coefficients)
667+
/// has the required number of leading zero bits at each step.
668+
///
667669
/// The fingerprint is tied to the specific public key by including it in the hash.
668670
///
669671
/// ## Parameters
@@ -695,7 +697,8 @@ pub mod encpedpop {
695697

696698
let mut tweaks = Vec::with_capacity(self.inner.agg_poly.len());
697699

698-
// Grind each coefficient in sequence
700+
// Grind each coefficient in sequence, note that agg_poly only
701+
// contains the non-constant coefficients.
699702
for coeff_index in 0..self.inner.agg_poly.len() {
700703
let mut total_tweak = Scalar::<Public, Zero>::zero();
701704
let original_coeff = self.inner.agg_poly[coeff_index];
@@ -920,7 +923,7 @@ pub mod encpedpop {
920923
/// This calls all the other functions defined in this module to get the whole job done on a
921924
/// single computer by simulating all the other parties.
922925
///
923-
/// A fingerprint can be provided to grind the polynomial coefficients.
926+
/// A fingerprint can be provided to grind into the polynomial coefficients.
924927
pub fn simulate_keygen<H, NG>(
925928
schnorr: &Schnorr<H, NG>,
926929
threshold: u32,
@@ -1165,7 +1168,7 @@ pub mod certpedpop {
11651168
/// This calls all the other functions defined in this module to get the whole job done on a
11661169
/// single computer by simulating all the other parties.
11671170
///
1168-
/// A fingerprint can be provided to grind the polynomial coefficients.
1171+
/// A fingerprint can be provided to grind into the polynomial coefficients.
11691172
pub fn simulate_keygen<H: Hash32, NG: NonceGen>(
11701173
schnorr: &Schnorr<H, NG>,
11711174
threshold: u32,

0 commit comments

Comments
 (0)