Skip to main content

FrameCounter

Trait FrameCounter 

Source
pub trait FrameCounter {
    // Required method
    fn next(&mut self) -> Counter;
}
Expand description

Trait to provide the next counter value (CTR) used in the header and for encryption.

§Warning

It is crutial that a unique combination of (base key, KID, CTR) is used for each encryption operation to prevent reusing the same key and nonce of the underlying AEAD algorithm. ,see RFC 9605 9.1 ** This is not enforced by this library.**

Required Methods§

Source

fn next(&mut self) -> Counter

Returns the next counter value. Must be unique for each encryption operation (with the same base key & KID).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§