JVRSS

JVRSS

JVRSS class orchestrating the distributed key generation protocol

Constructor

new JVRSS(n, t)

Description:
  • Create a JVRSS instance

Source:
Parameters:
Name Type Description
n number

Total number of participants (N)

t number

Threshold degree (t+1 shares needed to reconstruct)

Methods

broadcastObfuscatedCoefficients()

Description:
  • Step 4: Each participant broadcasts obfuscated coefficients Broadcasts a_ik · G for verification

Source:

calculateSharedPublicKey() → {Buffer}

Description:
  • Calculate the shared public key using Method 2 a · G = Σ (a_i0 · G)

Source:
Returns:

Shared public key (compressed)

Type
Buffer

calculateShares()

Description:
  • Step 3: Each participant calculates their key share a_i = Σ f_j(i) for all j

Source:

clear()

Description:
  • Clear all sensitive data

Source:

distributePolynomialPoints()

Description:
  • Step 2: Distribute polynomial points securely between participants f_i(j) is sent from participant i to participant j

Source:

generatePolynomials()

Description:
  • Step 1: Each participant generates their private polynomial

Source:

getParticipant(index) → {Participant}

Description:
  • Get participant by index (1-indexed)

Source:
Parameters:
Name Type Description
index number

Participant index

Returns:

The participant

Type
Participant

getSharesForInterpolation() → {Array.<{x: BN, y: BN}>}

Description:
  • Get shares for interpolation (useful for product/inverse calculations)

Source:
Returns:

Array of shares in interpolation format

Type
Array.<{x: BN, y: BN}>

reconstructSecret() → {BN}

Description:
  • Reconstruct the secret (for testing/verification only) WARNING: In production, the secret should never be reconstructed!

Source:
Returns:

The reconstructed shared secret

Type
BN

runProtocol() → {Object}

Description:
  • Run the complete JVRSS protocol

Source:
Returns:

Protocol result

Type
Object

verifyAllShares() → {Object}

Description:
  • Step 5: Each participant verifies received polynomial points

Source:
Returns:

Verification result

Type
Object