Constructor
new Participant(index, threshold)
- Description:
Create a new participant
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
index |
number | Unique participant label i (1-indexed, must be > 0) |
threshold |
number | Threshold t (t+1 shares needed to reconstruct) |
Methods
calculateKeyShare(totalParticipants)
- Description:
Step 3 of JVRSS: Calculate private key share a_i = 危 f_j(i) for all participants j
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
totalParticipants |
number | Total number of participants N |
clear()
- Description:
Clear all sensitive data
- Source:
evaluateAt(x) → {BN}
- Description:
Evaluate private polynomial at point x Used for sending f_i(j) to participant j
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
x |
number | Evaluation point |
Returns:
f_i(x)
- Type
- BN
generatePolynomial(secret)
- Description:
Step 1 of JVRSS: Generate private polynomial f_i(x) with random coefficients f_i(x) = a_i0 + a_i1x + ... + a_itx^t
- Source:
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
secret |
BN | null |
null
|
Optional secret for a_i0 (typically random) |
generateSignatureShare(r, e, inverseKShare) → {Object}
- Description:
Section 4.3: Generate signature share s_i s_i = k_i^-1 * (e + a_i * r) mod n
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
r |
BN | The r value from ephemeral key |
e |
BN | Message hash |
inverseKShare |
BN | k_i^-1 share |
Returns:
Signature share
- Type
- Object
getBlindingShare() → {BN|null}
- Description:
Get blinding share
- Source:
Returns:
The blinding share or null
- Type
- BN | null
getKeyShare() → {BN}
- Description:
Get the private key share value
- Source:
Returns:
The key share a_i
- Type
- BN
getKeySharePublicKey() → {Buffer}
- Description:
Get public key corresponding to this participant's key share
- Source:
Returns:
a_i 路 G compressed
- Type
- Buffer
getNextEphemeralKey() → {Object|null}
- Description:
Get next unused ephemeral key
- Source:
Returns:
Next ephemeral key or null if none available
- Type
- Object | null
getObfuscatedCoefficients() → {Array.<Buffer>}
- Description:
Step 4 of JVRSS: Get obfuscated coefficients for verification Returns a_ik 路 G for k = 0, ..., t
- Source:
Returns:
Array of compressed public key points
- Type
- Array.<Buffer>
getPolynomialPointFor(j) → {Object}
- Description:
Get polynomial point to send to participant j
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
j |
number | Target participant index |
Returns:
Point data
- Type
- Object
receivePolynomialPoint(fromIndex, value)
- Description:
Receive polynomial point from another participant Store f_j(i) where j is the sender and i is this participant
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
fromIndex |
number | Sender participant index j |
value |
BN | f_j(i) value |
setBlindingShare(blindingShare)
- Description:
Set a blinding share for INVSS operations
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
blindingShare |
BN | The blinding value share b_i |
storeEphemeralKey(r, inverseKShare)
- Description:
Store an ephemeral key for later signing
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
r |
BN | The r value (x-coordinate of k路G mod n) |
inverseKShare |
BN | This participant's inverse ephemeral share k_i^-1 |
verifyPolynomialPoint(fromIndex, pointValue, obfuscatedCoeffs) → {boolean}
- Description:
Step 5 of JVRSS: Verify a polynomial point from participant j Check that f_j(i) 路 G == 危 i^k * (a_jk 路 G)
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
fromIndex |
number | Sender participant index j |
pointValue |
BN | f_j(i) received value |
obfuscatedCoeffs |
Array.<Buffer> | Obfuscated coefficients a_jk 路 G |
Returns:
True if verification passes
- Type
- boolean