k1Reshare method
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.
Implementation
@override
FrostReshare k1Reshare({
required List<int> ids,
required List<int> secretsConcat,
required List<int> coeffsConcat,
required int threshold,
}) {
final result = api.frostK1Reshare(
idsConcat: _idsConcat(ids),
secretsConcat: secretsConcat.asBytes,
n: ids.length,
coeffsConcat: coeffsConcat.asBytes,
nCoeffs: coeffsConcat.length ~/ 32,
threshold: threshold,
);
final out = result.unwrapOrThrowCryptoError();
return FrostReshare(
sharesConcat: out.sharesConcat.toList(),
pubs: _splitEl(out.pubsConcat, 33),
group: out.group.toList(),
);
}