Struct sequoia_openpgp::packet::skesk::SKESK5[][src]

pub struct SKESK5 { /* fields omitted */ }
Expand description

Holds an symmetrically encrypted session key version 5.

Holds an symmetrically encrypted session key. The session key is needed to decrypt the actual ciphertext. See [Section 5.3 of RFC 4880bis] for details.

This feature is experimental.

Implementations

Creates a new SKESK version 5 packet.

The given symmetric algorithm is the one used to encrypt the session key.

Creates a new SKESK version 5 packet with the given password.

This function takes two SymmetricAlgorithm arguments: The first, payload_algo, is the algorithm used to encrypt the message’s payload (i.e. the one used in the SEIP or AED packet), and the second, esk_algo, is used to encrypt the session key. Usually, one should use the same algorithm, but if they differ, the esk_algo should be at least as strong as the payload_algo as not to weaken the security of the payload encryption.

Derives the key inside this SKESK5 from password.

Returns a tuple containing a placeholder symmetric cipher and the key itself. SKESK5 packets do not contain the symmetric cipher algorithm and instead rely on the AED packet that contains it.

Gets the AEAD algorithm.

Sets the AEAD algorithm.

Gets the AEAD initialization vector.

If the S2K mechanism is not supported by Sequoia, this function will fail. Note that the information is not lost, but stored in the packet. If the packet is serialized again, it is written out.

Sets the AEAD initialization vector.

Gets the AEAD digest.

Sets the AEAD digest.

Methods from Deref<Target = SKESK4>

Gets the symmetric encryption algorithm.

Sets the symmetric encryption algorithm.

Gets the key derivation method.

Sets the key derivation method.

Gets the encrypted session key.

If the S2K mechanism is not supported by Sequoia, this function will fail. Note that the information is not lost, but stored in the packet. If the packet is serialized again, it is written out.

Sets the encrypted session key.

Derives the key inside this SKESK4 from password.

Returns a tuple of the symmetric cipher to use with the key and the key itself.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

Performs the conversion.

Performs the conversion.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

Writes a serialized version of the object to o.

Exports a serialized version of the object to o. Read more

Computes the maximal length of the serialized representation. Read more

Serializes into the given buffer. Read more

Serializes the packet to a vector.

Exports into the given buffer. Read more

Exports to a vector. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.