Skip to content

Commit

Permalink
Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
davxy committed Feb 28, 2024
1 parent 2af5bd2 commit 2799d46
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ark-secret-scalar/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ impl<F: PrimeField> SecretScalar<F> {
SecretScalar(self.0.clone())
}

/// Randomply resplit the secret in two components.
pub fn resplit(&mut self) {
let mut xof = Rng2Xof(getrandom_or_panic());
let x = xof_read_reduced(&mut xof);
Expand All @@ -110,6 +111,7 @@ impl<F: PrimeField> SecretScalar<F> {
(lhs[0] * rhs) + (lhs[1] * rhs)
}

/// Get the secret scalar value by joining the two components.
pub fn scalar(&self) -> F {
self.0[0] + self.0[1]
}
Expand Down

0 comments on commit 2799d46

Please sign in to comment.