RAILGUN Reloaded
    Preparing search index...

    Baby Jubjub FROST primitive implementation used by the signing manager.

    This class exposes low-level round operations and assumes the caller keeps track of participant sets, commitments, and protocol ordering correctly.

    Hierarchy

    • RailJubCurvePoint
      • BabyFROST
    Index
    • Returns bigint

    • Returns the subgroup order used by the FROST and DKG primitives.

      Returns any

      The Baby Jubjub subgroup order.

    • Returns the additive identity for the Baby Jubjub subgroup.

      Returns Point<bigint>

      The affine identity point.

    • Samples a scalar uniformly from the subgroup order.

      Parameters

      • rejectionSampling: boolean = true

        When true, uses rejection sampling to avoid bias.

      Returns bigint

      A uniformly sampled scalar.

    • Multiplies the subgroup generator by a scalar.

      Parameters

      • k: bigint

        Scalar multiplier.

      Returns Point<bigint>

      The resulting affine point.

    • Multiplies an affine point by a scalar.

      Parameters

      • A: Point<bigint>

        Affine point.

      • k: bigint

        Scalar multiplier.

      Returns Point<bigint>

      The resulting affine point.

    • Serializes an affine subgroup point using RFC 8032-style compression.

      Parameters

      • A: Point<bigint>

        Affine point to serialize.

      Returns Uint8Array

      The compressed 32-byte point encoding.

    • Deserializes a compressed point and verifies subgroup membership.

      Parameters

      • buf: Uint8Array

        Compressed point bytes.

      Returns Point<bigint>

      The decoded affine point.

    • Serializes a scalar into the canonical 32-byte form expected by the repo.

      Parameters

      • s: bigint

        Scalar to serialize.

      Returns Uint8Array

      The serialized scalar bytes.

    • Deserializes a scalar from the canonical 32-byte form.

      Parameters

      • buf: Uint8Array

        Serialized scalar bytes.

      Returns bigint

      The decoded scalar.

    • Compares two affine points for coordinate equality.

      Parameters

      • a: Point<bigint>

        First affine point.

      • b: Point<bigint>

        Second affine point.

      Returns boolean

      true when both coordinates match.

    • Converts a scalar into the repo's canonical 32-byte little-endian form.

      Parameters

      • a: bigint

        Scalar to encode.

      Returns Uint8Array<ArrayBufferLike>

      Encoded bytes.

    • Decodes a scalar from the repo's canonical 32-byte little-endian form.

      Parameters

      • a: Uint8Array

        Encoded bytes.

      Returns bigint

      The decoded scalar.

    • Reduces a bigint modulo the full curve order.

      Parameters

      • x: bigint

        Value to reduce.

      Returns any

      The reduced scalar.

    • Reduces a bigint modulo the prime-order subgroup.

      Parameters

      • x: bigint

        Value to reduce.

      Returns any

      The reduced scalar.

    • Computes a multiplicative inverse in the subgroup field.

      Parameters

      • a: bigint

        Scalar to invert.

      Returns bigint

      The multiplicative inverse modulo the subgroup order.

    • Applies EdDSA bit pruning to a 32-byte buffer.

      Parameters

      • buff: Uint8Array

        Input bytes.

      Returns Uint8Array<ArrayBuffer>

      The pruned buffer.

    • Derives the Baby Jubjub secret scalar for the provided private key.

      Parameters

      • prv: Uint8Array

        Private key bytes.

      Returns bigint

      The derived subgroup scalar divided by the cofactor.

    • Maps an Edwards point into Montgomery coordinates when the mapping exists.

      Parameters

      • ed: { x: bigint; y: bigint }

        Edwards affine point.

        • x: bigint

          Edwards x-coordinate.

        • y: bigint

          Edwards y-coordinate.

      Returns { u: bigint; v: bigint }

      The mapped Montgomery coordinates.

    • Computes the binding-factor hash domain.

      Parameters

      • m: Uint8Array

        Input bytes.

      Returns bigint

      The derived scalar.

    • Computes the signing challenge compatible with EDDSA-Poseidon verification.

      Parameters

      • R8: Point<bigint>

        Group commitment point.

      • A: Point<bigint>

        Group public key.

      • msgHash: bigint

        Message hash scalar.

      Returns bigint

      The derived scalar challenge.

    • Computes the deterministic nonce-derivation hash domain.

      Parameters

      • m: Uint8Array

        Input bytes.

      Returns bigint

      The derived scalar.

    • Computes the message hash domain.

      Parameters

      • m: Uint8Array

        Input bytes.

      Returns bigint

      The derived scalar.

    • Computes the commitment-list digest domain.

      Parameters

      • m: Uint8Array

        Input bytes.

      Returns bigint

      The derived scalar.

    • Derives a nonce scalar from signer secret material.

      Parameters

      • secret: bigint

        Signer secret scalar.

      Returns bigint

      The derived nonce scalar.

    • Computes the Lagrange coefficient for x_i at zero.

      Parameters

      • L: bigint[]

        Participant identifier list.

      • x_i: bigint

        Identifier to evaluate.

      Returns any

      The interpolation coefficient.

    • Encodes a commitment list into the byte form used by binding-factor hashing.

      Parameters

      • commitmentList: Commitment[]

        Commitment list for the active round.

      Returns Uint8Array<ArrayBufferLike>

      Encoded commitment bytes.

    • Extracts participant identifiers from a commitment list.

      Parameters

      • commitmentList: Commitment[]

        Commitment list for the active round.

      Returns bigint[]

      The participant identifiers.

    • Looks up a participant's binding factor inside a computed factor list.

      Parameters

      • bindingFactorList: BindingFactor[]

        Computed binding factors.

      • identifier: bigint

        Participant identifier.

      Returns bigint

      The participant binding factor.

    • Computes the binding factor for every participant in the signing set.

      Parameters

      • groupPublicKey: Point<bigint>

        Group public key.

      • commitmentList: Commitment[]

        Commitment list for the active round.

      • message: Uint8Array

        Message bytes.

      Returns { identifier: bigint; bindingFactor: bigint }[]

      The binding factors for every participant.

    • Computes the aggregate group commitment for the active signing set.

      Parameters

      • commitmentList: Commitment[]

        Commitment list for the active round.

      • bindingFactorList: BindingFactor[]

        Binding factors for that round.

      Returns Point<bigint>

      The aggregate group commitment.

    • Computes the per-message signing challenge.

      Parameters

      • groupCommitment: Point<bigint>

        Aggregate group commitment.

      • groupPublicKey: Point<bigint>

        Group public key.

      • message: bigint

        Message hash scalar.

      Returns bigint

      The per-message challenge scalar.

    • Generates round-1 nonces and public commitments for a signer.

      Parameters

      • sk_i: bigint

        Signer share scalar.

      • identifier: bigint

        Participant identifier.

      Returns Bindings

      The private nonces and public commitments.

    • Produces a signer-specific round-2 signature share.

      Parameters

      • identifier: bigint

        Participant identifier.

      • sk_i: bigint

        Signer share scalar.

      • groupPublicKey: Point<bigint>

        Group public key.

      • nonce_i: NoncePair

        Signer nonce pair from round 1.

      • message: bigint

        Message hash scalar.

      • commitmentList: Commitment[]

        Commitment list for the active round.

      Returns any

      The participant's signature share.

    • Aggregates verified signature shares into a final FROST signature.

      Parameters

      • commitmentList: Commitment[]

        Commitment list for the active round.

      • message: bigint

        Message hash scalar.

      • groupPublicKey: Point<bigint>

        Group public key.

      • sigShares: bigint[]

        Signature shares ordered by participant identifier.

      Returns { R8: Point<bigint>; S: any }

      The aggregate FROST signature.

    • Verifies an individual signer's signature share against its commitments.

      Parameters

      • identifier: bigint

        Participant identifier.

      • sk_i: bigint

        Signer share scalar.

      • commitment_i: Commitment

        Commitment published by that signer.

      • sigShare_i: bigint

        Signature share to verify.

      • commitmentList: Commitment[]

        Commitment list for the active round.

      • groupPublicKey: Point<bigint>

        Group public key.

      • message: bigint

        Message hash scalar.

      Returns boolean

      true when the signature share is valid.

    curveOrder: any = order
    generator: any = Base8
    Fr: any = FrValue
    order: any = subOrder
    identity: Point<bigint> = ...
    fieldPrime: any = r
    blake512: (msg: Input, opts?: Object) => Uint8Array = blake512
    contextString: "FROST-EDBABYJUJUB-BLAKE512-v1" = 'FROST-EDBABYJUJUB-BLAKE512-v1'
    hasher: RFC9591Hasher