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.
share_keys(cc, sk, n_parties, threshold, index, sharing_scheme = "additive")A SecretShareMap suitable for passing to
recover_shared_key(). length() of it is the number of shares.
A CryptoContext with the MULTIPARTY feature.
The PrivateKey to share.
Integer; total number of parties.
Integer; minimum number of shares needed to
reconstruct. For "additive" this must be n_parties - 1;
for "shamir" it is typically floor(n_parties/2) + 1.
Integer; the 1-based index of the party owning
sk (the "my share index").
Character; either "additive" (default)
or "shamir".
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) + 1 threshold; the secret can be
reconstructed from any majority subset of the distributed
shares. Robust against up to floor((N-1)/2) parties
dropping out.
recover_shared_key()