reshareAdditive abstract method
Threshold reshare (additive, Rust core mirror): n = secrets.length,
2 <= threshold <= n, ids.length == n,
coeffs.length == n * (threshold - 1), ids unique and non-zero.
For secret j, poly_j = [secrets[j]] + coeffs[j*(t-1)..(j+1)*(t-1)];
new share b_i = sum_j polynomialEvaluate(ids[i], poly_j);
pubs[i] = scalarBaseMult(b_i); group = sum_j scalarBaseMult(a_j).
// n = 2, threshold = 2: poly0 = [a0, c0], poly1 = [a1, c1];
// b_i = poly0(ids[i]) + poly1(ids[i]); pubs[i] == G * b_i;
// group == G * a0 + G * a1; any threshold (id, b) pairs combine
// to (a0 + a1) via deriveInterpolatingValue.
final r = engine.reshareAdditive([a0, a1], [c0, c1], [id1, id2], 2);
assert(r.shares.length == 2 && r.pubs.length == 2);
Implementation
({List<S> shares, List<P> pubs, P group}) reshareAdditive(
List<S> secrets,
List<S> coeffs,
List<int> ids,
int threshold,
);