Struct scicrypt::cryptosystems::curve_el_gamal::CurveElGamalSK
source · [−]pub struct CurveElGamalSK { /* private fields */ }
Expand description
Decryption key for curve-based ElGamal
Trait Implementations
sourceimpl DecryptionKey<CurveElGamalPK> for CurveElGamalSK
impl DecryptionKey<CurveElGamalPK> for CurveElGamalSK
sourcefn decrypt_raw(
&self,
_public_key: &CurveElGamalPK,
ciphertext: &CurveElGamalCiphertext
) -> RistrettoPoint
fn decrypt_raw(
&self,
_public_key: &CurveElGamalPK,
ciphertext: &CurveElGamalCiphertext
) -> RistrettoPoint
Decrypt the ciphertext using the secret key and its related public key.
sourcefn decrypt_identity_raw(
&self,
_public_key: &CurveElGamalPK,
ciphertext: &<CurveElGamalPK as EncryptionKey>::Ciphertext
) -> bool
fn decrypt_identity_raw(
&self,
_public_key: &CurveElGamalPK,
ciphertext: &<CurveElGamalPK as EncryptionKey>::Ciphertext
) -> bool
Returns true if the encrypted value equals the identity. This is typically faster than a full decryption.
sourcefn decrypt(
&self,
ciphertext: &AssociatedCiphertext<'pk, <PK as EncryptionKey>::Ciphertext, PK>
) -> <PK as EncryptionKey>::Plaintext
fn decrypt(
&self,
ciphertext: &AssociatedCiphertext<'pk, <PK as EncryptionKey>::Ciphertext, PK>
) -> <PK as EncryptionKey>::Plaintext
Decrypt the associated ciphertext using the secret key.
sourcefn decrypt_identity(
&self,
ciphertext: &AssociatedCiphertext<'pk, <PK as EncryptionKey>::Ciphertext, PK>
) -> bool
fn decrypt_identity(
&self,
ciphertext: &AssociatedCiphertext<'pk, <PK as EncryptionKey>::Ciphertext, PK>
) -> bool
Returns true if the associated ciphertext encrypts the identity. This is typically faster than a full decryption.
sourceimpl DecryptionKey<PrecomputedCurveElGamalPK> for CurveElGamalSK
impl DecryptionKey<PrecomputedCurveElGamalPK> for CurveElGamalSK
sourcefn decrypt_raw(
&self,
_public_key: &PrecomputedCurveElGamalPK,
ciphertext: &CurveElGamalCiphertext
) -> RistrettoPoint
fn decrypt_raw(
&self,
_public_key: &PrecomputedCurveElGamalPK,
ciphertext: &CurveElGamalCiphertext
) -> RistrettoPoint
Decrypt the ciphertext using the secret key and its related public key.
sourcefn decrypt_identity_raw(
&self,
_public_key: &PrecomputedCurveElGamalPK,
ciphertext: &<CurveElGamalPK as EncryptionKey>::Ciphertext
) -> bool
fn decrypt_identity_raw(
&self,
_public_key: &PrecomputedCurveElGamalPK,
ciphertext: &<CurveElGamalPK as EncryptionKey>::Ciphertext
) -> bool
Returns true if the encrypted value equals the identity. This is typically faster than a full decryption.
sourcefn decrypt(
&self,
ciphertext: &AssociatedCiphertext<'pk, <PK as EncryptionKey>::Ciphertext, PK>
) -> <PK as EncryptionKey>::Plaintext
fn decrypt(
&self,
ciphertext: &AssociatedCiphertext<'pk, <PK as EncryptionKey>::Ciphertext, PK>
) -> <PK as EncryptionKey>::Plaintext
Decrypt the associated ciphertext using the secret key.
sourcefn decrypt_identity(
&self,
ciphertext: &AssociatedCiphertext<'pk, <PK as EncryptionKey>::Ciphertext, PK>
) -> bool
fn decrypt_identity(
&self,
ciphertext: &AssociatedCiphertext<'pk, <PK as EncryptionKey>::Ciphertext, PK>
) -> bool
Returns true if the associated ciphertext encrypts the identity. This is typically faster than a full decryption.
Auto Trait Implementations
impl RefUnwindSafe for CurveElGamalSK
impl Send for CurveElGamalSK
impl Sync for CurveElGamalSK
impl Unpin for CurveElGamalSK
impl UnwindSafe for CurveElGamalSK
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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
sourceimpl<T> CheckedAs for T
impl<T> CheckedAs for T
sourcefn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
sourcefn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
sourceimpl<T> OverflowingAs for T
impl<T> OverflowingAs for T
sourcefn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
sourcefn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
sourceimpl<T> SaturatingAs for T
impl<T> SaturatingAs for T
sourcefn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
sourcefn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
sourceimpl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
sourcefn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
sourcefn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
sourceimpl<T> WrappingAs for T
impl<T> WrappingAs for T
sourcefn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
sourcefn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.