Enum sequoia_openpgp::packet::PKESK [−][src]
#[non_exhaustive] pub enum PKESK { V3(PKESK3), }
Expand description
Holds an asymmetrically encrypted session key.
The session key is used to decrypt the actual ciphertext, which is typically stored in a SEIP or AED packet. See Section 5.1 of RFC 4880 for details.
A PKESK packet is not normally instantiated directly. In most
cases, you’ll create one as a side-effect of encrypting a message
using the streaming serializer, or parsing an encrypted message
using the PacketParser
.
Note: This enum cannot be exhaustively matched to allow future extensions.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
V3(PKESK3)
PKESK packet version 3.
Implementations
Methods from Deref<Target = PKESK3>
Sets the recipient.
Gets the public key algorithm.
Sets the public key algorithm.
Gets the encrypted session key.
Sets the encrypted session key.
pub fn decrypt(
&self,
decryptor: &mut dyn Decryptor,
sym_algo_hint: Option<SymmetricAlgorithm>
) -> Option<(SymmetricAlgorithm, SessionKey)>
[src]
pub fn decrypt(
&self,
decryptor: &mut dyn Decryptor,
sym_algo_hint: Option<SymmetricAlgorithm>
) -> Option<(SymmetricAlgorithm, SessionKey)>
[src]Decrypts the encrypted session key.
If the symmetric algorithm used to encrypt the message is known in advance, it should be given as argument. This allows us to reduce the side-channel leakage of the decryption operation for RSA.
Returns the session key and symmetric algorithm used to encrypt the following payload.
Returns None
on errors. This prevents leaking information
to an attacker, which could lead to compromise of secret key
material with certain algorithms (RSA). See Section 14 of
RFC 4880.
Trait Implementations
Implement IntoIterator
so that
cert::insert_packets(sig)
just works.
Reads from the given reader.
Auto Trait Implementations
impl RefUnwindSafe for PKESK
impl UnwindSafe for PKESK
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self