pub struct DecryptionSharePrecomputed<E: Pairing> {
pub decrypter_index: usize,
pub decryption_share: E::TargetField,
pub validator_checksum: ValidatorShareChecksum<E>,
}Expand description
A decryption share for a precomputed variant of the threshold decryption scheme. In this variant, the decryption share is precomputed and can be combined without additional computation on the client side. The downside is that the threshold of decryption shares required to decrypt is equal to the number of private key shares in the scheme.
Fields§
§decrypter_index: usize§validator_checksum: ValidatorShareChecksum<E>Implementations§
Sourcepub fn create(
validator_index: usize,
validator_decryption_key: &E::ScalarField,
private_key_share: &PrivateKeyShare<E>,
ciphertext_header: &CiphertextHeader<E>,
aad: &[u8],
lagrange_coeff: &E::ScalarField,
) -> Result<Self>
pub fn create( validator_index: usize, validator_decryption_key: &E::ScalarField, private_key_share: &PrivateKeyShare<E>, ciphertext_header: &CiphertextHeader<E>, aad: &[u8], lagrange_coeff: &E::ScalarField, ) -> Result<Self>
Create a decryption share from the given parameters. This function checks that the ciphertext is valid.
Sourcepub fn create_unchecked(
validator_index: usize,
validator_decryption_key: &E::ScalarField,
private_key_share: &PrivateKeyShare<E>,
ciphertext_header: &CiphertextHeader<E>,
lagrange_coeff: &E::ScalarField,
) -> Result<Self>
pub fn create_unchecked( validator_index: usize, validator_decryption_key: &E::ScalarField, private_key_share: &PrivateKeyShare<E>, ciphertext_header: &CiphertextHeader<E>, lagrange_coeff: &E::ScalarField, ) -> Result<Self>
Create a decryption share from the given parameters. This function does not check that the ciphertext is valid.
Trait Implementations§
Source§fn clone(&self) -> DecryptionSharePrecomputed<E>
fn clone(&self) -> DecryptionSharePrecomputed<E>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§fn eq(&self, other: &DecryptionSharePrecomputed<E>) -> bool
fn eq(&self, other: &DecryptionSharePrecomputed<E>) -> bool
Tests for
self and other values to be equal, and is used by ==.Auto Trait Implementations§
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> FromBytes for Twhere
T: for<'de> Deserialize<'de>,
impl<T> FromBytes for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more