pub struct DesCt { /* private fields */ }Expand description
A software-only constant-time DES path.
DesCt avoids the fast path’s secret-indexed permutation and S-box tables.
Instead it keeps the same key schedule but evaluates IP/FP/E with fixed
loops and evaluates each S-box through the packed ANF bitset form above.
Implementations§
Source§impl DesCt
impl DesCt
Sourcepub fn new(key: &[u8; 8]) -> Result<Self, DesKeyError>
pub fn new(key: &[u8; 8]) -> Result<Self, DesKeyError>
Create a new constant-time DES instance from an 8-byte key.
Sourcepub fn new_unchecked(key: &[u8; 8]) -> Self
pub fn new_unchecked(key: &[u8; 8]) -> Self
Create constant-time DES from an 8-byte key without weak-key screening.
Sourcepub fn new_wiping(key: &mut [u8; 8]) -> Result<Self, DesKeyError>
pub fn new_wiping(key: &mut [u8; 8]) -> Result<Self, DesKeyError>
Create a new constant-time DES instance and wipe the provided key buffer.
Trait Implementations§
Source§impl BlockCipher for DesCt
impl BlockCipher for DesCt
Auto Trait Implementations§
impl Freeze for DesCt
impl RefUnwindSafe for DesCt
impl Send for DesCt
impl Sync for DesCt
impl Unpin for DesCt
impl UnsafeUnpin for DesCt
impl UnwindSafe for DesCt
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