pub struct Aes256EncryptOnly(/* private fields */);Expand description
A key-scheduled Aes256 block cipher which can only encrypt blocks.
Trait Implementations§
Source§impl AesBlockCipher for Aes256EncryptOnly
impl AesBlockCipher for Aes256EncryptOnly
Source§fn new_with_key(key: Self::Key) -> Self
fn new_with_key(key: Self::Key) -> Self
Schedule a new AES key.
§Scalar Equivalent
ⓘ
Self({
<aes::Aes256 as aes::cipher::KeyInit>::new_from_slice(key.as_ref())
.expect("AES size is statically correct")
})§AVX2 Intrinsics Used
_mm_aeskeygenassist_si128AESKEYGENASSIST xmm, xmm, imm8
§Neon Intrinsics Used
vaeseq_u8- This intrinsic compiles to the following instructions:
Source§fn encrypt_many<const N: usize>(&self, blocks: [U8x16; N]) -> [U8x16; N]where
ArrayUnrolledOps: UnrollableArraySize<N>,
fn encrypt_many<const N: usize>(&self, blocks: [U8x16; N]) -> [U8x16; N]where
ArrayUnrolledOps: UnrollableArraySize<N>,
Encrypt blocks with AES-ECB
§Scalar Equivalent
ⓘ
let mut out = blocks;
for block in out.iter_mut() {
let block = aes::cipher::generic_array::GenericArray::from_mut_slice(
block.as_mut(),
);
aes::cipher::BlockEncrypt::encrypt_block((&self.0), block);
}
out§AVX2 Intrinsics Used
_mm_aesenc_si128AESENC xmm, xmm
_mm_aesenclast_si128AESENCLAST xmm, xmm
§Neon Intrinsics Used
vaeseq_u8- This intrinsic compiles to the following instructions:
vaesmcq_u8- This intrinsic compiles to the following instructions:
Source§const BLOCK_COUNT_HINT: usize = 4usize
const BLOCK_COUNT_HINT: usize = 4usize
Running
encrypt_many with this many blocks will typically result in good
performance.Source§impl Clone for Aes256EncryptOnly
impl Clone for Aes256EncryptOnly
Source§fn clone(&self) -> Aes256EncryptOnly
fn clone(&self) -> Aes256EncryptOnly
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Aes256EncryptOnly
impl RefUnwindSafe for Aes256EncryptOnly
impl Send for Aes256EncryptOnly
impl Sync for Aes256EncryptOnly
impl Unpin for Aes256EncryptOnly
impl UnwindSafe for Aes256EncryptOnly
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