pub struct Aes128Kwp;Expand description
SP 800-38F KWP with AES-16*8, per RFC 5649.
Implementations§
Source§impl Aes128Kwp
impl Aes128Kwp
Sourcepub const fn wrapped_len(plaintext_len: usize) -> usize
pub const fn wrapped_len(plaintext_len: usize) -> usize
Output length for a given input length: padded up to a multiple of eight, plus the eight-byte header.
Sourcepub fn wrap(kek: &[u8], plaintext: &[u8], out: &mut [u8]) -> Result<()>
pub fn wrap(kek: &[u8], plaintext: &[u8], out: &mut [u8]) -> Result<()>
Wrap data of any length from one byte upwards.
The length is carried in the check value, so unwrapping recovers it exactly. It is not hidden: an observer learns the length to within eight bytes from the ciphertext size alone.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Aes128Kwp
impl RefUnwindSafe for Aes128Kwp
impl Send for Aes128Kwp
impl Sync for Aes128Kwp
impl Unpin for Aes128Kwp
impl UnsafeUnpin for Aes128Kwp
impl UnwindSafe for Aes128Kwp
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