core
Low-level core helpers for arithmetic, error handling, and group constants.
Use this module when you need primitives that sit below the voting workflow surface exposed by the root package.
Classes
Section titled “Classes”IndexOutOfRangeError
Section titled “IndexOutOfRangeError”Raised when a participant index falls outside the supported 1..n
numbering scheme used across the protocol.
Extends
Section titled “Extends”ThresholdElGamalError
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new IndexOutOfRangeError(
message):IndexOutOfRangeError
Parameters
Section titled “Parameters”message
Section titled “message”string
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”ThresholdElGamalError.constructor
InvalidGroupElementError
Section titled “InvalidGroupElementError”Raised when a point or public key is not a canonical member of the selected cryptographic group.
Extends
Section titled “Extends”ThresholdElGamalError
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new InvalidGroupElementError(
message):InvalidGroupElementError
Parameters
Section titled “Parameters”message
Section titled “message”string
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”ThresholdElGamalError.constructor
InvalidPayloadError
Section titled “InvalidPayloadError”Raised when a payload, transcript field, manifest field, or serialized value does not satisfy the package’s canonical encoding rules.
Extends
Section titled “Extends”ThresholdElGamalError
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new InvalidPayloadError(
message):InvalidPayloadError
Parameters
Section titled “Parameters”message
Section titled “message”string
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”ThresholdElGamalError.constructor
InvalidProofError
Section titled “InvalidProofError”Raised when a Schnorr, DLEQ, or disjunctive proof transcript fails structural checks or cryptographic verification.
Extends
Section titled “Extends”ThresholdElGamalError
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new InvalidProofError(
message):InvalidProofError
Parameters
Section titled “Parameters”message
Section titled “message”string
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”ThresholdElGamalError.constructor
InvalidScalarError
Section titled “InvalidScalarError”Raised when a scalar value falls outside the expected field or subgroup domain for the current operation.
Extends
Section titled “Extends”ThresholdElGamalError
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new InvalidScalarError(
message):InvalidScalarError
Parameters
Section titled “Parameters”message
Section titled “message”string
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”ThresholdElGamalError.constructor
InvalidShareError
Section titled “InvalidShareError”Raised when a serialized share, decrypted share envelope, or reconstructed share set fails threshold-specific validation.
Extends
Section titled “Extends”ThresholdElGamalError
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new InvalidShareError(
message):InvalidShareError
Parameters
Section titled “Parameters”message
Section titled “message”string
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”ThresholdElGamalError.constructor
PhaseViolationError
Section titled “PhaseViolationError”Raised when a published payload claims to belong to a protocol phase that does not match the supported ceremony state machine.
Extends
Section titled “Extends”ThresholdElGamalError
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new PhaseViolationError(
message):PhaseViolationError
Parameters
Section titled “Parameters”message
Section titled “message”string
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”ThresholdElGamalError.constructor
PlaintextDomainError
Section titled “PlaintextDomainError”Raised when an additive plaintext falls outside the explicitly bounded domain that the current workflow promised to support.
Extends
Section titled “Extends”ThresholdElGamalError
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new PlaintextDomainError(
message):PlaintextDomainError
Parameters
Section titled “Parameters”message
Section titled “message”string
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”ThresholdElGamalError.constructor
ThresholdViolationError
Section titled “ThresholdViolationError”Raised when threshold parameters or participant counts violate the supported
1 <= k <= n relationship or the package’s honest-majority policy.
Extends
Section titled “Extends”ThresholdElGamalError
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ThresholdViolationError(
message):ThresholdViolationError
Parameters
Section titled “Parameters”message
Section titled “message”string
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”ThresholdElGamalError.constructor
TranscriptMismatchError
Section titled “TranscriptMismatchError”Raised when transcript hashes, manifest hashes, or other canonical digest commitments do not match the values claimed by published payloads.
Extends
Section titled “Extends”ThresholdElGamalError
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new TranscriptMismatchError(
message):TranscriptMismatchError
Parameters
Section titled “Parameters”message
Section titled “message”string
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”ThresholdElGamalError.constructor
UnsupportedSuiteError
Section titled “UnsupportedSuiteError”Raised when the requested suite or required runtime capability is unavailable in the current environment.
Extends
Section titled “Extends”ThresholdElGamalError
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new UnsupportedSuiteError(
message):UnsupportedSuiteError
Parameters
Section titled “Parameters”message
Section titled “message”string
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”ThresholdElGamalError.constructor
Type aliases
Section titled “Type aliases”EncodedPoint
Section titled “EncodedPoint”EncodedPoint =
Brand<string,"EncodedPoint">
Canonical 32-byte Ristretto point encoding exposed at the public boundary.
Public helpers use this branded string type to distinguish encoded points from ordinary hex strings.
Variables
Section titled “Variables”RISTRETTO_GROUP
Section titled “RISTRETTO_GROUP”
constRISTRETTO_GROUP:CryptoGroup
Immutable definition of the built-in ristretto255 tally group.
Every public cryptographic workflow in this package ultimately routes through this suite definition.
Functions
Section titled “Functions”modQ()
Section titled “modQ()”modQ(
value,q):bigint
Reduces a value into the range 0..q-1.
Parameters
Section titled “Parameters”bigint
bigint
Returns
Section titled “Returns”bigint
Throws
Section titled “Throws”InvalidScalarError
When q is not positive.