An example is given in #8 for cryptographic signature verification. Further examples that can be added for the API functions may include:
message encryption with PublicKey::encrypt and decryption with SecretKey::decrypt,
for a threshold scheme, cyphertext share decryption with SecretKeyShare::decrypt_share and decryption of the entire encrypted message with PublicKeySet::decrypt,
generation of threshold signature shares, their combination into a signature with PublicKeySet::combine_signatures and verification of that signature with PublicKey::verify.
In addition, poanetwork/hbbft#183 (comment) provides a shared randomness usecase for an internal computation of threshold_crypto that only uses DecryptionShares and removes the xor_vec step that would require a Ciphertext. With a slight modification of the API, such an example can be provided as well.
An example is given in #8 for cryptographic signature verification. Further examples that can be added for the API functions may include:
PublicKey::encrypt
and decryption withSecretKey::decrypt
,SecretKeyShare::decrypt_share
and decryption of the entire encrypted message withPublicKeySet::decrypt
,PublicKeySet::combine_signatures
and verification of that signature withPublicKey::verify
.In addition, poanetwork/hbbft#183 (comment) provides a shared randomness usecase for an internal computation of
threshold_crypto
that only usesDecryptionShare
s and removes thexor_vec
step that would require aCiphertext
. With a slight modification of the API, such an example can be provided as well.