Skip to content

Commit

Permalink
secret-sharing/src/churp: Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
peternose committed Apr 3, 2024
1 parent d535767 commit 77992b9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion secret-sharing/src/churp/handoff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ impl HandoffKind {
///
/// Should return false only in the dealing phase, where the sum of the
/// bivariate shares defines the shared secret. In other handoffs, this
/// should be false so that the shared secret remains unchanged.
/// should be true so that the shared secret remains unchanged.
pub fn require_zero_hole(&self) -> bool {
match &self {
HandoffKind::DealingPhase => false,
Expand Down
12 changes: 5 additions & 7 deletions secret-sharing/src/churp/switch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,8 @@ where

// The identity of the shareholder doesn't require verification.
// If the point is valid, it doesn't matter if it came from a stranger.
// However, since verification is costly, one could check if the point
// came from a legitimate shareholder.
let x = D::encode_shareholder(id)?;
if !self.vv.verify(&x, &bij) {
return Err(Error::InvalidSwitchPoint.into());
Expand Down Expand Up @@ -451,24 +453,20 @@ where
/// The degree of the secret-sharing polynomial.
threshold: u8,

/// Dimension switch kind
/// Dimension switch kind.
kind: DimensionSwitchKind,

/// The encoded identity.
me: D::PrimeField,

/// The number of rows in the verification matrix,
/// The number of rows in the verification matrix.
rows: usize,

/// The number of columns in the verification matrix,
/// The number of columns in the verification matrix.
cols: usize,

/// Indicates whether bivariate shares should be derived from a zero-hole
/// bivariate polynomial.
///
/// Should be false only in the dealing phase, where the sum of the
/// bivariate shares defines the shared secret. In other handoffs, this
/// should be true so that the shared secret remains unchanged.
zero_hole: bool,

/// A set of shareholders providing bivariate shares.
Expand Down

0 comments on commit 77992b9

Please sign in to comment.