FrostEngine<P, S> class
abstract
Shared interface of the pure-Dart FROST engines (FrostSecp256k1
/ FrostEd25519, RFC 9591 Sections 4-5 plus Appendix C) — the
MuSig2 precedent (MuSig2Context behind DartMuSig2Api).
P is the suite point type (Secp256k1Point on secp256k1,
EdwardsLimbPoint on Ed25519); S is the suite scalar field
(Secp256k1Fr on secp256k1, Ed25519Fr on Ed25519). Participant
ids are plain 1-based int counters (u32 wire range). Suites
differ only in Hash function, scalar endianness, and point encoding;
every core method below is implemented by both engines with
identical semantics.
- Implementers
Constructors
Properties
- contextString → String
-
Ciphersuite context string (
FROST-secp256k1-SHA256-v1/FROST-ED25519-SHA512-v1).no setter - elementLen → int
-
Encoded point length in bytes (33 secp256k1, 32 Ed25519).
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scalarLen → int
-
Scalar length in bytes (32 on both suites).
no setter
Methods
-
aggregate(
List< FrostEngineCommitment< commitments, List<P> >int> msg, P groupPublicKey, ) → (P, S) -
Aggregate shares into
(R, z)(Section 5.3). -
bindingFactorFor(
Map< int, S> factors, int identifier) → S -
commit(
) → FrostEngineNonces< P, S> - Round-1 commit with fresh randomness (Section 4.1).
-
commitWithRandomness(
List< int> hidingRandomness, List<int> bindingRandomness) → FrostEngineNonces<P, S> - Round-1 commit with caller randomness (Section 5.1).
-
computeBindingFactors(
P groupPublicKey, List< FrostEngineCommitment< commitments, List<P> >int> msg) → Map<int, S> -
Binding factors
ρ_lfor every participant (Section 4.4). -
computeChallenge(
P groupCommitment, P groupPublicKey, List< int> msg) → S -
Schnorr challenge
c = H2(R, PK, m)(Section 4.3). -
computeGroupCommitment(
List< FrostEngineCommitment< commitments, Map<P> >int, S> factors) → P -
Group commitment
R = Σ (D_l + ρ_l · E_l)(Section 4.5). -
decodeSignature(
List< int> sig) → (P, S) -
deriveGroupInfo(
int maxParticipants, List< P> vssCommitment) → (P, List<P> ) - Group key + member keys from VSS commitments.
-
deriveInterpolatingValue(
List< int> ids, int xi) → S -
Lagrange weight of
xioveridsat zero (Section 4.2).ids/xiare plain participant integers (wire order). -
deserializeElement(
List< int> buf) → P -
deserializeScalar(
List< int> buf) → S -
encodeGroupCommitmentList(
List< FrostEngineCommitment< commitments) → List<P> >int> - Canonical commitment-list encoding, id-sorted (Section 4.3).
-
encodeSignature(
P r, S z) → List< int> -
Canonical encoding (Appendix A):
R || z. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
participantsFromCommitmentList(
List< FrostEngineCommitment< commitments) → List<P> >int> - Participant ids in commitment-list order.
-
polynomialEvaluate(
S x, List< S> coeffs) → S - Horner polynomial evaluation (Section 4.2).
-
polynomialInterpolateConstant(
List< (S, S)> points) → S -
Interpolate the constant term through
(x, y)points (C.1.1). -
Threshold reshare (additive, Rust core mirror):
n = secrets.length,2 <= threshold <= n,ids.length == n,coeffs.length == n * (threshold - 1),idsunique and non-zero. -
scalarBaseMult(
S s) → P -
scalarMult(
P p, S s) → P - Combine share records → secret (Lagrange at zero).
- Trusted-dealer sharding (Appendix C): secret + coefficients → per-participant shares + full polynomial (secret first).
-
serializeElement(
P p) → List< int> -
serializeScalar(
S s) → List< int> -
sign(
int identifier, P groupPublicKey, FrostEngineNonces< P, S> nonces, List<int> msg, List<FrostEngineCommitment< commitments) → SP> > - Round-2 signature share (Section 5.2).
-
toString(
) → String -
A string representation of this object.
inherited
- Verify one participant's share (Section 5.3).
-
verifySignature(
P groupCommitment, S z, P groupPublicKey, List< int> msg) → bool -
Schnorr verification
z·G == R + c·PK(Appendix B). -
vssCommit(
List< S> coeffs) → List<P> -
Feldman VSS commitments
G·coeffs. -
vssVerify(
List< P> commitment) → bool - Verify a share against VSS commitments.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited