FrostApi class abstract interface

RFC 9591 FROST signing surface (both ciphersuites).

k1 = FROST(secp256k1, SHA-256): points 33 bytes, R 33 bytes. ed = FROST(Ed25519, SHA-512): points 32 bytes, R 32 bytes. Identifiers are 1-based (u32 on the native side).

Two backends implement this interface with no shared crypto between them: DartFrostApi runs the pure-Dart engines in this package, NativeFrostApi maps every call onto the connector's BuFrostApi (Rust/FFI or WASM) via unwrapOrThrowCryptoError, exactly like NativeMuSig2Api maps onto BuMusig2Api. The isScalar: false Ed25519 inputs are RFC 8032 seeds, expanded inside each backend; threshold: 0 selects the additive quorum convention, otherwise an explicit 2 <= t <= n.

Implementers

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

edAggregate({required List<FrostCommitment> commitments, required List<int> message, required List<int> groupPublicKey, required List<List<int>> shares}) → FrostThresholdSignature
Aggregate signature shares → (R, z) (Ed25519 suite).
edCombine(List<FrostKeyShare> shares, {bool isScalar = true}) → BuBytes
Combine share records → 32-byte secret (Ed25519 suite).
edCommit({required List<int> secretShare, List<int>? hidingRandomness, List<int>? bindingRandomness, bool isScalar = true}) → FrostNoncePair
Round-1 commit (Ed25519 suite).
edGroupFromMembers({required List<int> ids, required List<int> pubsConcat, required int threshold}) → BuBytes
Group key from member points (Ed25519 suite): ids + pubsConcat (n x 32 B). threshold: 0 = additive sum, else Lagrange at zero.
edGroupInfo({required List<int> vssConcat, required int nComms, required int max}) → FrostGroupInfo
Group key + max member keys from a VSS commitment (Ed25519 suite).
edPrepareShares({required List<FrostKeyShare> shares, required int threshold, bool isScalar = true}) → BuBytes
Signing-share preparation (Ed25519 suite): expand seeds when isScalar is false, then additive-rescale like k1PrepareShares.
edReshare({required List<int> ids, required List<int> seedsConcat, required List<int> coeffSeedsConcat, required int threshold}) → FrostReshare
Threshold reshare (additive, Ed25519 suite): ids + seedsConcat (n 32-byte RFC 8032 seeds, expanded in the backend) + coeffSeedsConcat (n * (threshold - 1) 32-byte seeds) → fresh shares, member pubs and group key. Requires n >= 2, 2 <= threshold <= n.
edShard({required List<int> secret, required List<int> coefficients, required int maxParticipants, bool isScalar = true}) → FrostDealerShard
Dealer shard (Ed25519 suite): same shapes, 32-byte points. isScalar: true (default) = canonical scalars, false = RFC 8032 seeds expanded in the backend.
edSign({required int identifier, required List<int> secretShare, required List<int> groupPublicKey, required FrostNoncePair nonces, required List<FrostCommitment> commitments, required List<int> message, bool isScalar = true}) → BuBytes
Round-2 signature share (Ed25519 suite).
edVerify({required List<int> commitment, required List<int> z, required List<int> groupPublicKey, required List<int> message}) → bool
Verify a final (R, z) signature (Ed25519 suite).
edVerifyShare({required int identifier, required List<int> participantPublicKey, required FrostCommitment commitment, required List<int> share, required List<FrostCommitment> commitments, required List<int> groupPublicKey, required List<int> message}) → bool
Verify one participant's signature share (Ed25519 suite).
edVssCommit({required List<int> coeffsConcat, required int nCoeffs}) → BuBytes
Feldman VSS commitment (Ed25519 suite): nCoeffs scalars → nCoeffs 32-byte points.
k1Aggregate({required List<FrostCommitment> commitments, required List<int> message, required List<int> groupPublicKey, required List<List<int>> shares}) → FrostThresholdSignature
Aggregate signature shares → (R, z).
k1Combine(List<FrostKeyShare> shares) → BuBytes
Combine share records → 32-byte secret (Lagrange at zero).
k1Commit({required List<int> secretShare, List<int>? hidingRandomness, List<int>? bindingRandomness}) → FrostNoncePair
Round-1 commit: 32-byte secretShare + caller 32-byte hidingRandomness/bindingRandomness (or fresh randomness when null) → nonce scalars + commitments.
k1GroupFromMembers({required List<int> ids, required List<int> pubsConcat, required int threshold}) → BuBytes
Group key from member points: ids + pubsConcat (n x 33 B). threshold: 0 = additive sum, else Lagrange interpolation at zero. Pure public-key math inside the backend.
k1GroupInfo({required List<int> vssConcat, required int nComms, required int max}) → FrostGroupInfo
Group key + max member keys from a VSS commitment (nComms concatenated 33-byte points, secret commitment first).
k1PrepareShares({required List<FrostKeyShare> shares, required int threshold}) → BuBytes
Signing-share preparation: expand + additive-rescale shares ([id:u32 LE][share:32] records) → n 32-byte scalars, same order. threshold: 0 = additive full-set rescale, else Shamir passthrough. All secret math happens inside the backend; shape errors throw.
k1Reshare({required List<int> ids, required List<int> secretsConcat, required List<int> coeffsConcat, required int threshold}) → FrostReshare
Threshold reshare (additive): ids (n participant identifiers) + secretsConcat (n 32-byte scalars) + coeffsConcat (n * (threshold - 1) 32-byte scalars, row-major) → fresh shares, member pubs and group key. Requires n >= 2, 2 <= threshold <= n.
k1Shard({required List<int> secret, required List<int> coefficients, required int maxParticipants}) → FrostDealerShard
Dealer shard: 32-byte secret + concatenated 32-byte polynomial coefficients (secret excluded) → one share record per participant (1..=[maxParticipants]).
k1Sign({required int identifier, required List<int> secretShare, required List<int> groupPublicKey, required FrostNoncePair nonces, required List<FrostCommitment> commitments, required List<int> message}) → BuBytes
Round-2 signature share (32 bytes) for identifier.
k1Verify({required List<int> commitment, required List<int> z, required List<int> groupPublicKey, required List<int> message}) → bool
Verify a final (R, z) signature (Appendix B Schnorr).
k1VerifyShare({required int identifier, required List<int> participantPublicKey, required FrostCommitment commitment, required List<int> share, required List<FrostCommitment> commitments, required List<int> groupPublicKey, required List<int> message}) → bool
Verify one participant's signature share.
k1VssCommit({required List<int> coeffsConcat, required int nCoeffs}) → BuBytes
Feldman VSS commitment: nCoeffs scalars → nCoeffs 33-byte points.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited