pub struct Xts<C> { /* private fields */ }Expand description
XEX-based Tweaked CodeBook mode with ciphertext Stealing (XTS).
This implementation supports 128-bit block ciphers, which is the case covered by SP 800-38E / XTS-AES.
Implementations§
Source§impl<C> Xts<C>
impl<C> Xts<C>
Sourcepub fn new(data_cipher: C, tweak_cipher: C) -> Self
pub fn new(data_cipher: C, tweak_cipher: C) -> Self
Wrap a pair of block ciphers in SP 800-38E XTS mode.
data_cipher encrypts the sector payload blocks. tweak_cipher
derives the per-sector tweak stream from the caller-supplied tweak.
Sourcepub fn data_cipher(&self) -> &C
pub fn data_cipher(&self) -> &C
Borrow the data-encryption cipher.
Sourcepub fn tweak_cipher(&self) -> &C
pub fn tweak_cipher(&self) -> &C
Borrow the tweak-derivation cipher.
Source§impl<C: BlockCipher> Xts<C>
impl<C: BlockCipher> Xts<C>
Auto Trait Implementations§
impl<C> Freeze for Xts<C>where
C: Freeze,
impl<C> RefUnwindSafe for Xts<C>where
C: RefUnwindSafe,
impl<C> Send for Xts<C>where
C: Send,
impl<C> Sync for Xts<C>where
C: Sync,
impl<C> Unpin for Xts<C>where
C: Unpin,
impl<C> UnsafeUnpin for Xts<C>where
C: UnsafeUnpin,
impl<C> UnwindSafe for Xts<C>where
C: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more