Struct proj_crypto::symmetric::State [] [src]

pub struct State { /* fields omitted */ }

Stores the state of the symmetric encryption system. Memory is zeroed when this goes out of scope

Methods

impl State
[src]

Create a new symmetric::State object.

Perform authenticated encryption. The message number is used to select the correct encryption key and as a nonce. Returns the ciphertext.

Attempt authenticated decryption. Similar semantics to encryption.

Un-encrypted authentication for verifying public packet metadata such as the message number and length

for verifying tags created by plain_auth_tag

Destroy keys up to number n. This is done so that future compromises cannot compromise messages under the older keys and as a performance optimisation to reduce the number of hashes required. As it cannot be undone, this should not be done until the previous iterations of the keys are no-longer needed: for example their messages have all been acknowledged.