Trait scicrypt::cryptosystems::DecryptDirectly [−][src]
pub trait DecryptDirectly {
type Plaintext;
type Ciphertext;
type SecretKey;
fn decrypt_direct(
ciphertext: &Self::Ciphertext,
secret_key: &Self::SecretKey
) -> Self::Plaintext;
}
Expand description
Some cryptosystems do not require the public key to decrypt, as all the necessary information is stored within the ciphertext and the secret key. For example, ElGamal when its group is hard-coded.
Associated Types
type Ciphertext
type Ciphertext
The type of the encrypted plaintexts.
Required methods
fn decrypt_direct(
ciphertext: &Self::Ciphertext,
secret_key: &Self::SecretKey
) -> Self::Plaintext
fn decrypt_direct(
ciphertext: &Self::Ciphertext,
secret_key: &Self::SecretKey
) -> Self::Plaintext
Decrypt a ciphertext using the secret key directly, without requiring a rich ciphertext.