Struct solana_zk_token_sdk::encryption::elgamal::ElGamal
source · [−]pub struct ElGamal;
Expand description
Algorithm handle for the twisted ElGamal encryption scheme
Implementations
sourceimpl ElGamal
impl ElGamal
sourcepub fn encode<T: Into<Scalar>>(amount: T) -> ElGamalCiphertext
pub fn encode<T: Into<Scalar>>(amount: T) -> ElGamalCiphertext
On input a message, the function returns a twisted ElGamal ciphertext where the associated Pedersen opening is always zero. Since the opening is zero, any twisted ElGamal ciphertext of this form is a valid ciphertext under any ElGamal public key.
Auto Trait Implementations
impl RefUnwindSafe for ElGamal
impl Send for ElGamal
impl Sync for ElGamal
impl Unpin for ElGamal
impl UnwindSafe for ElGamal
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
default fn example() -> T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more