Function minimumEventsPerEntropyBits

  • Given the number of equally-likely results per event, return the number of events required to achieve the required bits of Shannon entropy. entropy of the event in bits.

    For example, to compute the number of standard, 6-sided dice rolls required to generate a private key (with the recommended 128-bit entropy minimum), minimumEventsPerEntropyBits(6).

    Parameters

    • possibleResults: number

      the number of equally-likely results per event; e.g. for a coin, 2, for dice, the number of faces (for a standard die, 6)

    • requiredEntropyBits: KeyUtilConstants = KeyUtilConstants.privateKeyRequiredEntropyBits

      the number of bits of entropy required. Defaults to 128, the recommended value for all private key generation.

    Returns number

Generated using TypeDoc