Hierarchy

  • SecretSharing

Constructors

Properties

shareLength: number = 64

Methods

  • Lagrange basis

    Returns

    Parameters

    • indice: FBN[]

      The list of known x

    • index: FBN = ...

      The point to interpolate

    Returns FBN[]

  • Recontruct the original secret from its shares

    Returns

    The original secret

    Parameters

    • shares: Uint8Array[]

      List of shares

    Returns Uint8Array

  • Derive the coefficient of the highest term

    Returns

    The highest coefficient

    Parameters

    • shares: Uint8Array[]

      Secret shares

    Returns Uint8Array

  • Lagrange Interpolation

    Returns

    The y coordinate

    Parameters

    • index: Uint8Array

      The x coordinate

    • shares: Uint8Array[]

      The sufficient number of shares

    Returns FBN

  • Merge the current share with an update to the next share

    Returns

    The next share

    Parameters

    • prev: Uint8Array

      The current share

    • next: Uint8Array

      The update

    Returns Uint8Array

  • Proactivate the shares

    Returns

    List of next shares

    Parameters

    • t: number

      The threshold

    • n: number

      The total number of shares

    • indice: Uint8Array[]

      The list of indexes

    • __namedParameters: {
          id?: Uint8Array;
      } = {}
      • Optional id?: Uint8Array

    Returns Uint8Array[]

  • Split a secret into multiple shares. The algorithm allows t of n shares able to reconstruct the secret.

    Returns

    List of shares and zkps

    Parameters

    • key: Uint8Array

      The secret (Must be less than this.red)

    • t: number

      The threshold

    • n: number

      The total number of shares

    • __namedParameters: {
          id?: Uint8Array;
          indice?: Uint8Array[];
      } = {}
      • Optional id?: Uint8Array
      • Optional indice?: Uint8Array[]

    Returns Uint8Array[]

Generated using TypeDoc