edReshare method

  1. @override
FrostReshare edReshare({
  1. required List<int> ids,
  2. required List<int> seedsConcat,
  3. required List<int> coeffSeedsConcat,
  4. required int threshold,
})
override

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.

Implementation

@override
FrostReshare edReshare({
  required List<int> ids,
  required List<int> seedsConcat,
  required List<int> coeffSeedsConcat,
  required int threshold,
}) {
  final result = api.frostEdReshare(
    idsConcat: _idsConcat(ids),
    secretsConcat: seedsConcat.asBytes,
    n: ids.length,
    coeffsConcat: coeffSeedsConcat.asBytes,
    nCoeffs: coeffSeedsConcat.length ~/ 32,
    threshold: threshold,
  );
  final out = result.unwrapOrThrowCryptoError();
  return FrostReshare(
    sharesConcat: out.sharesConcat.toList(),
    pubs: _splitEl(out.pubsConcat, 32),
    group: out.group.toList(),
  );
}