Produces the set of shares that party index would
distribute to the other parties under the chosen
sharing_scheme. The returned SecretShareMap is opaque;
in a real deployment the shares would be serialized and
routed over the network to each receiving party, and the
receiving parties would store them for use in an abort
recovery.
Arguments
- cc
A
CryptoContextwith theMULTIPARTYfeature.- sk
The
PrivateKeyto share.- n_parties
Integer; total number of parties.
- threshold
Integer; minimum number of shares needed to reconstruct. For
"additive"this must ben_parties - 1; for"shamir"it is typicallyfloor(n_parties/2) + 1.- index
Integer; the 1-based index of the party owning
sk(the "my share index").- sharing_scheme
Character; either
"additive"(default) or"shamir".
Value
A SecretShareMap suitable for passing to
recover_shared_key().
Details
Two sharing schemes are supported:
"additive"— N-1 threshold; every party must contribute their share to reconstruct. Robust against corruption of any single party's storage but not against any party dropping out."shamir"—floor(N/2) + 1threshold; the secret can be reconstructed from any majority subset of the distributed shares. Robust against up tofloor((N-1)/2)parties dropping out.
