Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Variables

Const red

red: ReductionContext = BN.mont(p)

Prime number to use with the different modular operations.

Functions

computeSharedSecret

  • computeSharedSecret(ri: BN, xi: Uint8Array, ziLeft: Uint8Array, xiList: Uint8Array[]): Uint8Array
  • ComputeSki computes the shared secret.

    Parameters

    • ri: BN

      the random number generated by the user.

    • xi: Uint8Array

      the xi computed by the user.

    • ziLeft: Uint8Array

      the computed zi by the 'right' neighbor (in a cycle)

    • xiList: Uint8Array[]

      the list of all the xi computed by all the users.

    Returns Uint8Array

computeXi

  • computeXi(ri: BN, ziRight: Uint8Array, ziLeft: Uint8Array): Uint8Array
  • computeXi computes the second value to broadcast to all users once the zi from the left and right neighbor is received.

    Parameters

    • ri: BN

      the random number generated by the user.

    • ziRight: Uint8Array

      the computed zi by the 'left' neighbor (in a cycle)

    • ziLeft: Uint8Array

      the computed zi by the 'right' neighbor (in a cycle)

    Returns Uint8Array

computeZi

  • computeZi(ri: BN): Uint8Array
  • computeZi computes the first value to broadcast to all users.

    Parameters

    • ri: BN

      the random number generated by the user.

    Returns Uint8Array

deriveKey

  • deriveKey(sharedSecret: Uint8Array): Promise<CryptoKey>
  • deriveKey derives a symmetric key given a shared secret.

    Parameters

    • sharedSecret: Uint8Array

      the shared secret computed with the key agreement protocol.

    Returns Promise<CryptoKey>

generateRi

  • generateRi(): BN

indexOf

  • indexOf(xiList: Uint8Array[], xi: Uint8Array): number
  • indexOf returns the index of the xi in the given list.

    Parameters

    • xiList: Uint8Array[]

      the list of all the xi from the users.

    • xi: Uint8Array

      the xi computed by the user.

    Returns number

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc