pub trait DecryptionKey<PK: EncryptionKey> {
// Required methods
fn decrypt_raw(
&self,
public_key: &PK,
ciphertext: &PK::Ciphertext,
) -> PK::Plaintext;
fn decrypt_identity_raw(
&self,
public_key: &PK,
ciphertext: &PK::Ciphertext,
) -> bool;
// Provided methods
fn decrypt<'pk>(
&self,
ciphertext: &AssociatedCiphertext<'pk, PK::Ciphertext, PK>,
) -> PK::Plaintext { ... }
fn decrypt_identity<'pk>(
&self,
ciphertext: &AssociatedCiphertext<'pk, PK::Ciphertext, PK>,
) -> bool { ... }
}Expand description
The decryption key.
Required Methods§
Sourcefn decrypt_raw(
&self,
public_key: &PK,
ciphertext: &PK::Ciphertext,
) -> PK::Plaintext
fn decrypt_raw( &self, public_key: &PK, ciphertext: &PK::Ciphertext, ) -> PK::Plaintext
Decrypt the ciphertext using the secret key and its related public key.
Sourcefn decrypt_identity_raw(
&self,
public_key: &PK,
ciphertext: &PK::Ciphertext,
) -> bool
fn decrypt_identity_raw( &self, public_key: &PK, ciphertext: &PK::Ciphertext, ) -> bool
Returns true if the encrypted value equals the identity. This is typically faster than a full decryption.
Provided Methods§
Sourcefn decrypt<'pk>(
&self,
ciphertext: &AssociatedCiphertext<'pk, PK::Ciphertext, PK>,
) -> PK::Plaintext
fn decrypt<'pk>( &self, ciphertext: &AssociatedCiphertext<'pk, PK::Ciphertext, PK>, ) -> PK::Plaintext
Decrypt the associated ciphertext using the secret key.
Sourcefn decrypt_identity<'pk>(
&self,
ciphertext: &AssociatedCiphertext<'pk, PK::Ciphertext, PK>,
) -> bool
fn decrypt_identity<'pk>( &self, ciphertext: &AssociatedCiphertext<'pk, PK::Ciphertext, PK>, ) -> bool
Returns true if the associated ciphertext encrypts the identity. This is typically faster than a full decryption.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".