|
@@ -32,7 +32,7 @@ pub fn generate_shares(
|
|
|
|
|
|
let numcoeffs = (threshold - 1) as usize;
|
|
|
|
|
|
- let mut coeffs: Vec<Scalar> = Vec::with_capacity(numcoeffs);
|
|
|
+ let mut coefficients: Vec<Scalar> = Vec::with_capacity(numcoeffs);
|
|
|
|
|
|
let mut rng: ThreadRng = rand::thread_rng();
|
|
|
|
|
@@ -41,7 +41,7 @@ pub fn generate_shares(
|
|
|
let mut commitment: Commitment = Vec::with_capacity(threshold as usize);
|
|
|
|
|
|
for _ in 0..numcoeffs {
|
|
|
- coeffs.push(Scalar::random(&mut rng));
|
|
|
+ coefficients.push(Scalar::random(&mut rng));
|
|
|
}
|
|
|
|
|
|
for share_index in 1..numshares + 1 {
|
|
@@ -51,7 +51,7 @@ pub fn generate_shares(
|
|
|
let scalar_index = Scalar::from(share_index);
|
|
|
let mut value = Scalar::zero();
|
|
|
for i in (0..numcoeffs).rev() {
|
|
|
- value += coeffs[i];
|
|
|
+ value += coefficients[i];
|
|
|
value *= scalar_index;
|
|
|
}
|
|
|
value += secret;
|
|
@@ -62,7 +62,7 @@ pub fn generate_shares(
|
|
|
}
|
|
|
|
|
|
commitment.push(ED25519_BASEPOINT_POINT * secret);
|
|
|
- for c in coeffs {
|
|
|
+ for c in coefficients {
|
|
|
commitment.push(ED25519_BASEPOINT_POINT * c);
|
|
|
}
|
|
|
|