Skip to content

Commit 17bbd0b

Browse files
authored
aes: change AES-NI ParBlocksSize back to 8 (#519)
Changes it from 9 back to 8, like it was in `aes` v0.8. Anecdotally we've had some reports of better performance: #515 I also think an odd number of blocks just seems a bit unusual to me, and 8 blocks is what I've typically seen in other implementations.
1 parent 89dd1fb commit 17bbd0b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

aes/src/x86.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use cipher::{
1717
AlgorithmName, BlockCipherDecBackend, BlockCipherDecClosure, BlockCipherDecrypt,
1818
BlockCipherEncBackend, BlockCipherEncClosure, BlockCipherEncrypt, BlockSizeUser, InOut, Key,
1919
KeyInit, KeySizeUser, ParBlocksSizeUser,
20-
consts::{U9, U16, U24, U32},
20+
consts::{U8, U16, U24, U32},
2121
crypto_common::WeakKeyError,
2222
};
2323
#[cfg(all(target_arch = "x86_64", any(aes_avx256, aes_avx512)))]
@@ -447,7 +447,7 @@ macro_rules! define_aes_impl {
447447
}
448448

449449
impl<'a> ParBlocksSizeUser for $name_backend::Ni<'a> {
450-
type ParBlocksSize = U9;
450+
type ParBlocksSize = U8;
451451
}
452452
#[cfg(all(target_arch = "x86_64", any(aes_avx256, aes_avx512)))]
453453
impl<'a> ParBlocksSizeUser for $name_backend::Vaes256<'a> {

0 commit comments

Comments
 (0)