FROST Ed448 TypeScript Library - v0.2.2-alpha.3
    Preparing search index...

    Class Nonce<C>

    A scalar that is a signing nonce.

    Nonces are secret values generated during Round 1 that must be kept private and used exactly once for a signing operation.

    Type Parameters

    Index

    Methods

    • Generates a new uniformly random signing nonce by sourcing fresh randomness and combining with the secret signing share, to hedge against a bad RNG.

      Each participant generates signing nonces before performing a signing operation.

      An implementation of nonce_generate(secret) from the spec.

      Type Parameters

      Parameters

      • ciphersuite: C

        The ciphersuite to use

      • secret: SigningShare<C>

        The participant's signing share

      • rng: RandomSource

        A cryptographically secure random number generator

      Returns Nonce<C>

      A new signing nonce

    • Internal

      Create a nonce from a scalar.

      Type Parameters

      Parameters

      • ciphersuite: C
      • scalar: C["Scalar"]

      Returns Nonce<C>

    • Internal

      Convert a nonce into a scalar.

      Returns C["Scalar"]

    • Internal

      Generates a nonce from the given random bytes. This function allows testing and MUST NOT be made public.

      Type Parameters

      Parameters

      Returns Nonce<C>

    • Deserialize a Nonce from bytes.

      Type Parameters

      Parameters

      • ciphersuite: C

        The ciphersuite to use

      • bytes: Uint8Array

        The serialized nonce bytes

      Returns Nonce<C>

      The deserialized nonce

      Error if deserialization fails

    • Serialize the Nonce to bytes.

      Returns Uint8Array

      The serialized nonce bytes

    • Zeroize the nonce by overwriting the scalar with zero.

      This should be called when the nonce is no longer needed to prevent secret data from remaining in memory.

      Returns void