Skip to content

Latest commit

 

History

History
104 lines (60 loc) · 3.04 KB

index.md

File metadata and controls

104 lines (60 loc) · 3.04 KB

Table of Contents

createShare

index.js:9-49

creates a secert to share, an array of shares to share and a verifaction vector

Parameters

  • bls Object an instance of bls-lib
  • numOfShares Number the number of share to create
  • threshold Number the number of share needed to recover the secret

Returns Object the return value contains verifcationVector, and array of shares and a random secert

renewShare

index.js:58-119

renew shares and verification vector, while keeping the secret

Parameters

  • bls Object an instance of bls-lib
  • shares Number the array of shares to be renewed (it is not possible to renew only some shares ; all must be). This array will not be modified, and new shares appear in the return object.
  • threshold Number the number of share needed to recover the secret
  • oldVvec

Returns Object the return value contains the new verifcationVector, an array containing the new shares, and the secret (which has not changed in respect to the original shares)

verifyShare

index.js:128-148

verifys a share again a verifcation vector

Parameters

Returns Boolean

recoverSecret

index.js:155-166

verifys a share again a verifcation vector

Parameters

  • bls
  • shares Array an array of unque shares containing threshold number of shares

Returns Uint8Array the recovered secret