Commit Graph

6 Commits

Author SHA1 Message Date
Jeffrey Walton
06092259c2
Make UncheckedKeySet and ProcessXorBlocks protected 2017-05-06 00:21:24 -04:00
Jeffrey Walton
1d1a150737
Avoid extra loads of workspace variables 2017-04-16 13:00:45 -04:00
Jeffrey Walton
35f95fb739
Fix unaligned pointer crash on Win32 due to _mm_load_si128
The SSSE3 intrinsics were performing aligned loads using _mm_load_si128 using user supplied pointers. The pointers are only a byte pointer, so its alignment can drop to 1 or 2. Switching to _mm_loadu_si128 will sidestep potential problems. The crash surfaced under Win32 testing.

Switch to memcpy's when performing bulk assignment x[0]=y[0] ... x[3]=y[3]. I believe Yun used the pattern to promote vectorization. Some compilers appear to be braindead and issue integer move's one word at a time. Non-braindead compiler will still take the optimization when advantageous, and slower compilers will benefit from the bulk move. We also cherry picked vectorization opportunities, like in ARIA_GSRK_NEON.

Remove keyBits variable. We now use UncheckedSetKey's keylen throughout.

Also fix a typo in CRYPTOPP_BOOL_SSSE3_INTRINSICS_AVAILABLE. __SSSE3__ was listed twice.
2017-04-13 04:28:02 -04:00
Jeffrey Walton
f44e705c16 Add NEON intrinsics for ARIA_GSRK_NEON
Update documentation
2017-04-12 12:15:32 -04:00
Jeffrey Walton
0d742591e0
Switch to code based on 32-bit implementation
The 32-bit code is based on Aaram Yun's code. Yun's code combined with a few library specific tweaks improves performance to roughly Camellia.
2017-04-11 11:39:45 -04:00
Jeffrey Walton
8ca0f47939
Add ARIA block cipher
This is the reference implementation, test data and test vectors from the ARIA.zip package on the KISA website. The website is located at http://seed.kisa.or.kr/iwt/ko/bbs/EgovReferenceList.do?bbsId=BBSMSTR_000000000002.

We have optimized routines that improve Key Setup and Bulk Encryption performance, but they are not being checked-in at the moment. The ARIA team is updating its implementation for contemporary hardware and we would like to use it as a starting point before we wander too far away from the KISA implementation.
2017-04-10 10:52:40 -04:00