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

    Class SigningKey<C>

    A signing key for a Schnorr signature on a FROST Ciphersuite Group.

    This class wraps a scalar value that serves as the private key for signing operations. The scalar must be non-zero and within the valid range for the ciphersuite's field.

    Type Parameters

    • C extends Ciphersuite

      The ciphersuite type that defines the cryptographic parameters

    Index

    Methods

    • Generate a new signing key using random bytes from the provided RNG.

      Type Parameters

      Parameters

      • ciphersuite: C

        The ciphersuite to use for key generation

      • rng: CryptoRng

        A cryptographically secure random number generator

      Returns SigningKey<C>

      A new SigningKey with a random non-zero scalar

    • Creates a SigningKey from a scalar value.

      Type Parameters

      Parameters

      • ciphersuite: C

        The ciphersuite to use

      • scalar: Scalar<C>

        The scalar value to use as the signing key

      Returns SigningKey<C>

      A new SigningKey wrapping the scalar

      If the scalar is zero (MalformedSigningKey)

    • Deserialize a SigningKey from bytes.

      Type Parameters

      Parameters

      • ciphersuite: C

        The ciphersuite to use for deserialization

      • bytes: Uint8Array

        The serialized signing key bytes

      Returns SigningKey<C>

      The deserialized SigningKey

      If deserialization fails or the scalar is zero

    • Serialize the SigningKey to bytes.

      Returns Uint8Array

      The serialized signing key as a byte array

    • Create a signature for a message using this SigningKey.

      Uses the ciphersuite's singleSign method if available (for Ciphersuite), otherwise falls back to the default signing implementation.

      Parameters

      • rng: CryptoRng

        A cryptographically secure random number generator

      • message: Uint8Array

        The message to sign

      Returns Signature<C>

      The signature over the message

    • Internal

      Default signing implementation for standard Schnorr signatures.

      This implements the standard Schnorr signing algorithm:

      1. Generate random nonce k and commitment R = k * G
      2. Compute challenge c = H2(R || public_key || message)
      3. Compute response z = k + c * private_key

      Parameters

      • rng: CryptoRng

        A cryptographically secure random number generator

      • message: Uint8Array

        The message to sign

      Returns Signature<C>

      The signature (R, z)

    • Return the underlying scalar value.

      WARNING: This exposes the private key material. Use with caution.

      Returns Scalar<C>

      The scalar value of this signing key

    • Get the ciphersuite associated with this signing key.

      Returns C

      The ciphersuite

    • Zeroize the scalar to clear sensitive key material from memory.

      After calling this method, the signing key should not be used. This provides defense-in-depth for sensitive cryptographic material.

      Returns void

    • Check equality with another SigningKey.

      Parameters

      Returns boolean

      true if the signing keys are equal

    • Create a copy of this signing key.

      Returns SigningKey<C>

      A new SigningKey with the same scalar value

    • Returns a debug string representation. The actual key material is redacted for security.

      Returns string

      A debug string with redacted content