Inverse of share_keys(). Given a SecretShareMap holding
at least threshold shares, reconstructs a PrivateKey
equivalent to the original secret at the point of sharing.
The reconstructed key participates in distributed decryption
identically to the original, so a dropped-out party's share
of a threshold decryption can still be completed by the
remaining parties.
recover_shared_key(
cc,
share_map,
n_parties,
threshold,
sharing_scheme = "additive"
)A PrivateKey holding the reconstructed secret.
A CryptoContext. Used to construct the empty
placeholder key that the scheme routine fills in.
A SecretShareMap from share_keys().
Integer; must match the value used at
share_keys() time.
Integer; must match the value used at
share_keys() time.
Character; must match the value used at
share_keys() time.
Under the hood, the C++ API takes a mutable PrivateKey
reference that must be pre-allocated as an empty
PrivateKeyImpl bound to cc. The R wrapper constructs that
empty placeholder internally so R users do not have to know
about the in-place-fill convention.
share_keys()