Compare commits

...

1465 Commits

Author SHA1 Message Date
Jeffrey Walton 0c82df181c Update documentation 2019-08-31 07:46:19 -04:00
Jeffrey Walton 033f204a86 Fix .Net 2002 compile
This testing occurs on Windows XP. We are still rockin it
2019-08-27 14:44:27 -04:00
Jeffrey Walton b067d16e88 Update documentation 2019-08-27 10:28:13 -04:00
Jeffrey Walton 29453dcf08
Update comments 2019-08-27 07:52:33 -04:00
Jeffrey Walton 56165883fc
Update comments 2019-08-27 07:08:07 -04:00
Jeffrey Walton 54c8819c70
Fix ElGamal compile on Linux 2019-08-27 06:44:02 -04:00
Jeffrey Walton fcbfd68dfb
Add specialized Validate() to ElGamal
This was added for compatibility with BouncyCastle and other libraries. ElGamals paper and the HAC says to select x over the interval [1,p-1]. Crypto++ selects x over [1,q-1] as with other GFP schemes. Crypto++ fails to validate some of the keys of other libraries.
DL_PublicKey_GFP_OldFormat used to perform a reduction on x, but I think it treated a symptom and not the underlying cause. The underlying cause was, Crypto++ wass too strict in validating the parameter.
Note that wikipedia says to select the privaye key x over [1,q-1]. We are unable to find a reference for the practice, though it is OK.
2019-08-27 06:38:25 -04:00
Jeffrey Walton 90b0699edd
Add private key test data for ElGamal 2019-08-27 06:10:38 -04:00
Jeffrey Walton e06e3bd7a9
Fix ECP::Double and brainpoolP256r1 (GH #878) 2019-08-26 18:33:26 -04:00
Jeffrey Walton 66a6994e99
Add asserts to pubkey.h 2019-08-26 14:44:52 -04:00
Jeffrey Walton 8fa8ec9913
Update documentation 2019-08-25 12:20:21 -04:00
Jeffrey Walton db6d6b38b8
Update documentation 2019-08-25 12:00:28 -04:00
Jeffrey Walton 72f2b72920
Add test data from bug report (GH #876) 2019-08-24 18:00:03 -04:00
Jeffrey Walton f78c3c00d2
Regenerate ElGamal test data 2019-08-24 17:49:41 -04:00
Jeffrey Walton ff941db163
Update documentation 2019-08-24 16:59:39 -04:00
Jeffrey Walton a2c06c35b8
Use ASN1::elGamal() in ElGamal keys (GH #876) 2019-08-24 16:17:03 -04:00
Jeffrey Walton a7e83e6bf4
Update asserts in gfpcrypt.cpp 2019-08-24 15:48:14 -04:00
Jeffrey Walton 3d96234038
Fix typedef for MSVC (GH #876) 2019-08-24 06:44:14 -04:00
Jeffrey Walton 29e3818fd2
Add typedef for ElGamal::PrivateKey and ElGamal::PublicKey (GH #876) 2019-08-24 04:44:22 -04:00
Jeffrey Walton b80693d532
Add OID for ElGamal encryption (GH #876) 2019-08-24 03:18:29 -04:00
Jeffrey Walton 8130bd7a24
Update comments 2019-08-19 08:30:11 -04:00
Jeffrey Walton b9ff95f35a
Add define for CRYPTOPP_BOOL_ARM64 2019-08-18 04:27:25 -04:00
Jeffrey Walton 6545754337
Check size_t to DWORD and ULONG conversions
DWORD and ULONG are 32-bit. The conversion from size_t could fail, and the RNG would return a truncated result. I think it is low risk, but the test for the conversion test is cheap.
2019-08-17 21:19:04 -04:00
Jeffrey Walton d49c1a1605
Update documentation 2019-08-17 14:49:03 -04:00
Jeffrey Walton e22700f741
Fix use of MaxDerivedKeyLength (GH #874) 2019-08-16 07:12:14 -04:00
Jeffrey Walton c0a5a06a82
Fix use of MaxDerivedKeyLength (GH #874)
Also fix memcpy with NULL buffer
2019-08-16 06:45:30 -04:00
Jeffrey Walton 2ba9d3d00f
Restore former Test_RandomNumberGenerator behavior
There's no need to special case for HURD. No one uses it
2019-08-12 14:55:05 -04:00
Jeffrey Walton 7606c35fda
Update comments 2019-08-12 06:32:21 -04:00
Jeffrey Walton ea08de08d6
Add missing pumpAll to Test_RandomNumberGenerator 2019-08-12 06:27:10 -04:00
Jeffrey Walton 197f5fb1df
Add ASSERT to check m_fd for values <0
We are seeing RNG falures on HURD, but we are not throwing when constructing BlockingRng or NonblockingRng. This is despite the fact that /dev/urandom is missing during testing. NonblockingRng should always thwo when /dev/urandom is missing.
2019-08-12 05:40:22 -04:00
Jeffrey Walton 6028587b9f
Tighten Test_RandomNumberGenerator test
Debian HURD was slipping between the cracks. HURD appeared to be a minor failure because entropy on the heap improved the test result. After we zero'd the block, it was a catastrophic failure.
2019-08-12 05:34:11 -04:00
Jeffrey Walton 34e49627b7 Use C++ dynamic initialization if available 2019-08-12 00:11:41 -04:00
Jeffrey Walton 2d6895acb4 Update documentation 2019-08-11 22:37:15 -04:00
Jeffrey Walton 247418eec0 Use Bash arithmetic operators 2019-08-11 14:54:14 -04:00
Jeffrey Walton 11c5d14f85
Whitespace check-in 2019-08-10 03:24:52 -04:00
Jeffrey Walton 04b2a20c5d
Restore ECP ABI (GH #869)
Placing AdditionFunction as an inner class of ECP broke the ABI. We need to maintain the ABI so distros can patch Crypto++ 8.2.
2019-08-09 17:34:14 -04:00
Jeffrey Walton 7ac5791199
Fix cryptest.sh when swap is 0
If there is enough RAM then we don't need a swap file. I've got a Core i7-8800 with 64 GB or RAM that does not need a swap file.
2019-08-09 17:18:58 -04:00
Jeffrey Walton 242df465e8
Update comments 2019-08-07 23:30:48 -04:00
Jeffrey Walton c4700ae0b9
Avoid bitwise operation on boolean values 2019-08-07 23:27:33 -04:00
Jeffrey Walton 348e8e3b30
Clear unreachable code warnings under VC++ 2019-08-07 22:54:32 -04:00
Jeffrey Walton 1a5155fd96
Split public key benchmarks into integers and elliptic curves 2019-08-07 04:20:37 -04:00
Jeffrey Walton f3dd3d2559
Avoid temporary ECP::Point in ECP Addition and Double
This regains a lot of performance lost to the const-timeness (GH #869)
2019-08-07 02:43:13 -04:00
Jeffrey Walton b5fe6ab383
Clear parenthesis warning with GCC 2019-08-07 01:57:59 -04:00
Jeffrey Walton 7dc3b73e92
Add rdseed.asm to FileList.txt 2019-08-06 23:25:01 -04:00
Jeffrey Walton 7bba334641
Whitespace check-in 2019-08-06 21:42:43 -04:00
Jeffrey Walton b1c691b53a
Fix RDSEED hang on x86 (GH #872) (#873)
Calls to `MASM_RDSEED_GenerateBlock` would hang for an unknown reasons on Windows 10 and VS2017/VS2019 toolchains. Similar calls to `MASM_RDRAND_GenerateBlock` worked as expected. They were effectively the same code. The only differences were the function names and the opcodes (they were literally copy/paste).

Splitting `rdrand.asm` (with both `RDRAND` and `RDSEED`) into `rdrand.asm` (with `RDRAND`) and `rdseed.asm` (with `RDSEED`) resolved the issue. We don't know why.
2019-08-06 21:01:22 -04:00
Jeffrey Walton e5ab7919f9
Remove unneeded T in ECP Add()
Switch to 'R' variable in AdditionFunction to avoid shadow warnings
2019-08-06 03:28:53 -04:00
Jeffrey Walton 0ded32192e
Avoid branches in Montgomery Add() (GH #869) 2019-08-06 03:14:03 -04:00
Jeffrey Walton 5ae70e22b9
Avoid branches in Montgomery Double() (GH #869) 2019-08-06 01:23:37 -04:00
Jeffrey Walton df18c5b745 Add Debug and Release linker flags 2019-08-06 00:20:59 -04:00
Jeffrey Walton 41864fd49e Use local labels for RDRAND and RDSEED code (GH #872)
This did not fix the issue, but it is something on the TODO list.
2019-08-06 00:18:56 -04:00
Jeffrey Walton a01711e347 Fix CopyToRoot target with spaces in path 2019-08-05 13:27:54 -04:00
Jeffrey Walton c9ef9420e7
Fix ECP leakage in Add() and Double() (GH #869, PR #871)
This check-in provides the fix for leaks in ECP's Add() and Double(). The fixes were taken from Joost Renes, Craig Costello, and Lejla Batina's [Complete addition formulas for prime order elliptic curves](https://eprint.iacr.org/2015/1060.pdf).

The Pull Request includes two additional changes that were related to testing the primary fix. First, an `AuthenticatedKeyAgreementWithRolesValidate` interface was added. It allows us to test key agreement when roles are involved. Roles are "client", "server", "initiator", "recipient", etc.

Second, `SetGlobalSeed` was added to `test.cpp` to help with reproducible results. We had code in two different places that set the seed value for the random number generator. But it was sloppy and doing a poor job since results could not be reproduced under some circumstances.
2019-08-05 03:51:58 -04:00
Jeffrey Walton b3eb4c6a69
Fix AuthenticatedKeyAgreementWithRolesValidate messages 2019-08-03 23:59:25 -04:00
Jeffrey Walton 5aac8506bd
Use recipient rather than responder in authenticated key agreement
The recipient may not respond (though they do in the case of these key agreement schemes)
2019-08-03 23:52:50 -04:00
Jeffrey Walton 0b42a18cde
Update documentation 2019-08-03 23:25:15 -04:00
Jeffrey Walton 4e6dd922f7
Update documentation 2019-08-03 22:33:46 -04:00
Jeffrey Walton c3e0d123b2
Update documentation 2019-08-03 22:08:07 -04:00
Jeffrey Walton 37c0fb7ba8
Update documentation 2019-08-03 22:05:01 -04:00
Jeffrey Walton 057c2b434b
Update documentation 2019-08-03 21:58:26 -04:00
Jeffrey Walton 47a58050c6
Update documentation 2019-08-03 19:22:17 -04:00
Jeffrey Walton 2e6ccd7fb1
Fix authenticated key agreement domain parameter consistency test 2019-08-03 17:01:02 -04:00
Jeffrey Walton 7eeb954b23
Add AuthenticatedKeyAgreementValidateWithRoles free standing test function 2019-08-03 16:32:36 -04:00
Jeffrey Walton 3c5cb828b1
Spelling 2019-08-03 15:38:39 -04:00
Jeffrey Walton 84c4ae429f
Fix const-ness in HMQV and FHMQV 2019-08-03 03:24:26 -04:00
Jeffrey Walton 176cab0dc5
Update comments
Reference the bug report in DL_SignerBase::SignAndRestart for future readers
2019-07-29 10:36:29 -04:00
Ján Jančár f68f00f560 Fix ECDSA scalar multiplication leakage of bit-length. (GH #870)
This fixes the timing leakage of bit-length of nonces in ECDSA by essentially
fixing the bit-length, by using a nonce equivalent modulo the subgroup order.
2019-07-29 10:12:14 -04:00
Jeffrey Walton 739e5799e3 Whitespace check-in 2019-07-27 15:56:15 -04:00
Jeffrey Walton e4c402ace9
Clear truncation warning in rng.cpp (PR #867) 2019-07-25 04:52:24 -04:00
Andrew Marshall 12382a14be Use fixed size temporary in LC_RNG for consistency across platforms (#867) 2019-07-23 12:39:51 -04:00
Jeffrey Walton 614795f3e1
Add -DNDEBUG for openSUSE standrad build test 2019-07-22 16:10:43 -04:00
Jeffrey Walton 6eab4b7c32
Add openSUSE standard build test (GH #865) 2019-07-22 15:37:25 -04:00
Jeffrey Walton 9d2cab7548
Add CRYPTOPP_CXX14 define 2019-07-22 01:08:12 -04:00
Jeffrey Walton a7f2796dda
Update comments 2019-07-21 22:21:10 -04:00
Jeffrey Walton 7b7827e9cb
Clear Clang warning on SSE2 load 2019-07-21 22:20:55 -04:00
Jeffrey Walton 46e58df837
Add LINK_LIBRARY_PATH (GH #866) 2019-07-21 15:57:26 -04:00
Jeffrey Walton 3747e3d944
Don't use BASH_SOURCE in cryptest.sh 2019-07-21 03:19:14 -04:00
Jeffrey Walton ed7f4a0493
Use LINK_LIBRARY in cryptest-symbols.sh script (GH #866) 2019-07-21 03:16:01 -04:00
Jeffrey Walton dfaf2fc453
Remove references to GNUmakefile.shared (GH# 866) 2019-07-21 03:06:44 -04:00
Jeffrey Walton ef6e57990e
Use LINK_LIBRARY in cryptest.sh script (GH #866) 2019-07-21 03:02:43 -04:00
Jeffrey Walton 52ad132134
Add link-library variable to Makefiles (GH #866)
This should help distros and Crypto++ test scripts
2019-07-21 02:24:06 -04:00
Jeffrey Walton 5957b19fb8
Fix AVX2 feature test under Clang 3.3
Clang 3.3 appears to support some of AVX2, but it is missing _mm256_broadcastsi128_si256.
2019-07-21 00:27:23 -04:00
Jeffrey Walton 22a55bbbc5
Use wildcard for FORTIFY_SOURCE filter on TCXXFLAGS (GH #865) 2019-07-19 11:26:20 -04:00
Jeffrey Walton 417fbd719a
Fix missing if statement
Copy/paste error from the regular GNUmakefile
2019-07-19 00:16:23 -04:00
Jeffrey Walton 058a59814f
Fix TCXXFLAGS using openSUSE standard flags (GH #865) 2019-07-19 00:14:25 -04:00
Jeffrey Walton 07c208dbc6
Filter out static_assert from Posix assert test 2019-07-14 22:43:31 -04:00
Jeffrey Walton 769643bbe1
Fix macro paste in CRYPTOPP_ASSERT_JOIN 2019-07-14 19:09:05 -04:00
Jeffrey Walton 388a2e6ded
Fix macro paste in CRYPTOPP_ASSERT_JOIN 2019-07-14 19:04:52 -04:00
Jeffrey Walton f5881d121a
CRYPTOPP_CXX11_STATIC_ASSERT -> CRYPTOPP_CXX14_STATIC_ASSERT
WHoops, this is a C++14 feature
2019-07-14 19:02:58 -04:00
Jeffrey Walton 002e794ae2
Use C++ static_assert from N3928 when available 2019-07-14 18:28:51 -04:00
Jeffrey Walton 5de1089c8c
Update documentation 2019-07-14 12:50:50 -04:00
Jeffrey Walton e8b07b162f
Avoid preprocessor error in SIZE_MAX (GH #864) 2019-07-14 00:52:30 -04:00
Jeffrey Walton 6ae9c055cc
Move CRYPTOPP_CXX11 down in list of defines 2019-07-11 12:12:19 -04:00
Jeffrey Walton f0d7917719
Move CRYPTOPP_NO_CXX11 and CRYPTOPP_NO_CXX17 to config_cxx.h
It looks like these two were overlooked during refactoring
2019-07-11 12:10:19 -04:00
Jeffrey Walton 8260dd1e81
Increase m_buf size (GH #862) 2019-07-10 15:54:48 -04:00
Jeffrey Walton 6d69043403
Add BufferedTransformation GetWord64 and PutWord64 (GH #862) 2019-07-10 10:04:58 -04:00
Jeffrey Walton a76c6a203f
Update documentation 2019-07-10 08:10:44 -04:00
Jeffrey Walton 60e7bf3081
Update documentation 2019-07-08 18:46:27 -04:00
Jeffrey Walton 195cd6e7c8
Update documentation 2019-07-06 16:06:27 -04:00
Jeffrey Walton 2ffa70fbc6
Clear asserts under DEBUG builds 2019-07-06 15:57:08 -04:00
Jeffrey Walton fd7115fc8b
Remove duplicate CRYPTOPP_GCC_VERSION test 2019-07-06 08:06:00 -04:00
Jeffrey Walton b76a010dda
Cleanup PowerPC defines 2019-07-06 07:35:36 -04:00
Jeffrey Walton f0a2967191
Fix missing binary operator 2019-07-06 07:07:16 -04:00
Jeffrey Walton 37de652635
Use C++ feature test macros when available
There are not too many of them. __cpp_threadsafe_static_init may be useful for less frequently used compilers and platforms.
2019-07-06 07:03:26 -04:00
Jeffrey Walton 76fa704cbe
Avoid potential uninitialized read in AutoSeededX917RNG
This is a minor fix to AutoSeededX917RNG::Reseed. Valgrind produces a finding if user input is too small or seed size is too large. The constraints make it a little tricky to use correctly. HKDF will always produce the correct amount of material with provable security, and avoid the Valgrind finding.
2019-07-06 02:58:43 -04:00
Jeffrey Walton 6c995e215a Fold CRYPTOPP_VALGRIND into CRYPTOPP_COVERAGE 2019-07-05 19:10:01 -04:00
Jeffrey Walton d4b3e1535a
Limit GCC workaround to 5.3 on PowerPC
GCC fixed the issue at GCC 5.3. Also see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31690
2019-07-05 18:08:05 -04:00
Jeffrey Walton 9c28cf2227
Whitespace check-in
Cleanup after the VMAC fixes
2019-07-05 17:26:50 -04:00
Jeffrey Walton ad99fc5b05
Clear Asan finding in VMAC under 32-bit inline ASM (GH #860)
Second try. The first try cleared the Asan finding but broke at -O3. Eventually we will skin this cat.
2019-07-05 16:33:01 -04:00
Jeffrey Walton 7fd751ed36
Revert Asan finding in VMAC change (GH #860)
cryptest.sh showed it broke at -O3
2019-07-05 11:58:35 -04:00
Jeffrey Walton f7986129df
Clear Asan finding in VMAC under 32-bit inline ASM (GH #860)
This one has been nagging us for a while. Tested OK under i686 and x86_64.
2019-07-05 03:38:03 -04:00
Jeffrey Walton 6bead34bd9
Update headers for 'make dep' 2019-07-05 02:42:27 -04:00
Jeffrey Walton ae04195d1f
Use xattr in cryptest-autotools.sh 2019-07-04 16:06:51 -04:00
Jeffrey Walton 6afa6fc213
Fix cryptest-autotools.sh on OS X
Needed to remove quarantine bit
2019-07-04 15:36:17 -04:00
Jeffrey Walton 6eeebaf26b
Update documentation 2019-07-04 13:57:33 -04:00
Jeffrey Walton 2baa37efac
Clear unused parameter warnings for GCC with -Wextra (GH #856) 2019-07-03 15:17:53 -04:00
Jeffrey Walton cd0d145635 Add legacy ECIES EC2N cryptosystem and kat (GH #856) 2019-07-03 03:06:58 -04:00
Jeffrey Walton ce6d3c1306 Add legacy ECIES ECP cryptosystem and kat (GH #856) 2019-07-03 01:41:23 -04:00
Mouse 5d0ceb3b04
Revert #857 for now
Travis CI fails "deep tests" of DLIES with #857 applied. Let's revert it for now and get back to
```c++
    cipherKey = key + MAC::DEDAULT_KEYLENGTH;
```
and see if it improves the situation.
2019-07-02 23:24:45 -04:00
Jeffrey Walton eeb7dadc76
Fix missing _mm_roti_epi32 and _mm_roti_epi64 under GCC (GH #859) 2019-07-02 19:10:11 -04:00
Jeffrey Walton fbbf0a08e8
Add missing XOP header for blake2b_simd.cpp (GH #859)
The Gentoo folks caught a bug at https://bugs.gentoo.org/689162. The 689162 bug uses -march=bdver1 -msse4.1 on a AMD Bulldozer machine.

Investigating the issue we are missing the XOP header blake2b_simd.cpp. However, adding the XOP header is not enough for this particular config. Four source files fail to compile with the expected headers. We are waiting on the GCC folks to get back to us with a fix.
2019-07-02 16:55:00 -04:00
Alon Bar-Lev 2eb400c52f config: guard CRYPTOPP_SSE2_INTRIN_AVAILABLE with CRYPTOPP_DISABLE_SSE2 (#858)
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
2019-07-02 16:45:03 -04:00
Mouse c80a7ad028
Merge pull request #857 from rectalogic/nullhash
Use MAC::DIGESTSIZE in ECIES SymmetricEncrypt/SymmetricDecrypt
2019-07-02 11:06:29 -04:00
Mouse 97f5174226
Complete change from DEFAULT_KEYLENGTH to DIGESTSIZE in DLAES
Change from `MAC::DEFAULT_KEYLENGTH` to `MAC::DIGESTSIZE` in `DL_EncryptionAlgorithm_Xor` was only partially done. This was discovered when null hash was used. This, along with the proposed fix, was discovered by Andrew Wason (thanks!).
2019-07-02 11:02:07 -04:00
Andrew Wason 9c307ff4ba Use MAC::DIGESTSIZE in ECIES SymmetricEncrypt/SymmetricDecrypt
Fixes #856
2019-07-02 10:47:46 -04:00
Jeffrey Walton 445ec61125
Remove copy ctor from DERGeneralEncoder and BERGeneralDecoder
GCC was giving too many warnings at -Wextra. We also could not comply with Rule of 3 because it resulted in compile failures in C++98 and C++03
2019-07-01 13:29:46 -04:00
Jeffrey Walton c3d4e79a09
Use CRYPTOPP_CXX11_DELETED_FUNCTIONS in NotCopyable 2019-07-01 13:27:51 -04:00
Jeffrey Walton 36e8dfeca8
Add define for C++11 deleted functions 2019-07-01 08:17:22 -04:00
Jeffrey Walton 18d5e5528f Fix divide by 0 finding (GH #855)
I'm not sure which tool is producing this finding. I am pretty sure it is a false positive, but clear it for the sake of dark and silent cockpits
2019-06-28 14:22:03 -04:00
Jeffrey Walton 26a59cd94b
Update README 2019-06-15 06:42:34 -04:00
Jeffrey Walton 840bc65740
Update README 2019-06-15 06:20:49 -04:00
Mouse 03619c0800
Merge pull request #853 from DimaStebaev/pull-request
Compilation warning fix.
2019-06-12 07:37:52 -04:00
Dmytro Stebaiev d24c991913
Pull changes from master branch 2019-06-10 11:25:46 +03:00
Jeffrey Walton 0ea4354157
Update comments 2019-06-09 12:52:10 -04:00
Jeffrey Walton 570a8e1b36
Whitespace check-in 2019-06-09 12:12:46 -04:00
Jeffrey Walton 955ac6fe24
Rework SSE2 and AVX2 loads and stores 2019-06-09 04:29:40 -04:00
Jeffrey Walton 8c78985de2
Add ModularArithmetic::operator= 2019-06-09 02:56:30 -04:00
Jeffrey Walton c1f4d17e10
Cleanup BERGeneralDecoder constructors
For real this time...
2019-06-09 02:03:06 -04:00
Jeffrey Walton 55fe6a2191
Cleanup BERGeneralDecoder constructors 2019-06-09 02:00:53 -04:00
Jeffrey Walton 8fab1c3677
Revert changes for lgtm findings
This broke SunCC to the point of no repair. SunCC is using AVX2 instructions for C++ and SSE2. Man this compiler sucks...
2019-06-09 01:49:44 -04:00
Jeffrey Walton 3ce1823fd1
Fix SunCC compile
Sun's compiler is mostly braindead.
2019-06-09 00:00:22 -04:00
Jeffrey Walton 6a11f00768
Clear lgtm findings 2019-06-08 12:59:14 -04:00
Jeffrey Walton 43b01973b1
Clear lgtm findings
We did some refactoring and added sse_simd.h. Over time more SSE functions will likely move into sse_simd.h
2019-06-08 11:00:11 -04:00
Jeffrey Walton afffba7b7b
Add -mtune=native option to makefile
Added for Solaris 11 .3 on SPARC64
2019-06-07 13:02:25 -04:00
Dmytro Stebaiev fa9187ac77
Fix compilation warning 2019-06-07 18:17:15 +03:00
Jeffrey Walton ed4996f652
Cleanup governor.sh script 2019-06-05 23:21:00 -04:00
Jeffrey Walton 29a30b74b0
Update head comments 2019-06-05 23:09:58 -04:00
Jeffrey Walton 17fa3031b3
Clear lgtm finding in ECP class 2019-06-05 10:52:45 -04:00
Jeffrey Walton d8122cec16
Avoid ARM rev on Aarch64
This broke Aarch64
2019-06-04 21:17:13 -04:00
Jeffrey Walton 6c009ddf43
Remove dummy operator= in ModularArithmetic 2019-06-04 19:05:33 -04:00
Jeffrey Walton 994c98b6c0
Fix GCC compile on AIX
In file included from test.cpp:31:0:
validate.h:213:93: error: operator '||' has no right operand
 #elif (_POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE || _POSIX_SOURCE)
2019-06-04 09:45:33 -04:00
Jeffrey Walton 3afb1f1099
Fix GCC compile on AIX
In file included from test.cpp:31:0:
validate.h:213:93: error: operator '||' has no right operand
 #elif (_POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE || _POSIX_SOURCE)
2019-06-04 09:37:28 -04:00
Jeffrey Walton 198b081df5
Add assert to RemainingLength member function 2019-06-04 09:29:01 -04:00
Jeffrey Walton 238578a808
Clear lgtm findings
The lgtm service asks for scoped calls to IsolatedInitialize. The code is a tad bit more readable, so we will clear the findings.
2019-06-04 05:31:46 -04:00
Jeffrey Walton 462bcc859d
Update Poly1305 nonce length check 2019-06-04 04:39:19 -04:00
Jeffrey Walton a644008679
Cleanup ASN.1 encoders and decoders (GH #851) 2019-06-04 02:49:16 -04:00
Jeffrey Walton ab538471b1
Update documentation 2019-06-04 02:46:43 -04:00
Jeffrey Walton f330c0eca8
Clear warning on missing assignment operator 2019-06-03 23:17:15 -04:00
Jeffrey Walton c76711237a
Call base class IsolatedInitialize 2019-06-03 06:45:58 -04:00
Jeffrey Walton 3faf716d73
Call base class IsolatedInitialize 2019-06-03 06:44:58 -04:00
Jeffrey Walton 0a20141f36
Clear warning for assignment operator in HuffmanNode 2019-06-03 06:32:24 -04:00
Jeffrey Walton 54d48ac1f4
Add header guard for serpentp.h 2019-06-03 06:17:58 -04:00
Jeffrey Walton 342cdb9589
Clear lgtm warning on unsafe functions 2019-06-03 05:41:58 -04:00
Jeffrey Walton 959494871f
Guard use of volatile cast in TEA and XTEA 2019-06-02 05:29:08 -04:00
Jeffrey Walton 9538f2d715
Fix compile on iOS 2019-06-01 08:05:39 -04:00
Jeffrey Walton f00b0427aa
Exit setenv script if not sourced 2019-06-01 07:43:32 -04:00
Jeffrey Walton 1a0d7c516d
Disable BMI2 code paths in Integer class (GH #850) 2019-06-01 00:14:19 -04:00
Jeffrey Walton 8e27c6b3fa
Fix OS X compile with Clang later than 6.0
It looks like Apple Clang 6.0 does not provide _blsr_u32 and friends. Later versions of Clang defines _blsr_u32 and it causes a stream of warnings.
2019-05-31 23:33:17 -04:00
Jeffrey Walton 392ec3465e
Fix OS X compile with Clang 6.0 2019-05-31 23:03:24 -04:00
Jeffrey Walton 4952fa489d
Use BMI2 when available for MultiplyWordsLoHi, MulAcc and friends
Using BMI2 saves about 0.03 ms on a Core i5 6400 @ 2.7 GHz. It is small but measurable. It also gives GCC more freedom in selecting memory or register operands
2019-05-31 09:42:39 -04:00
Jeffrey Walton fb0bef1eb6
Use BMI2 when available for MultiplyWordsLoHi, MulAcc and friends
Using BMI2 saves about 0.03 ms on a Core i5 6400 @ 2.7 GHz. It is small but measurable. It also gives GCC more freedom in selecting memory or register operands
2019-05-31 05:37:35 -04:00
Jeffrey Walton aed6e935d6
Update documentation 2019-05-30 23:22:47 -04:00
Jeffrey Walton 1f2be58434
Update Doxygen comments 2019-05-30 22:30:22 -04:00
Jeffrey Walton 0dd07252d2
Update comments 2019-05-28 20:19:34 -04:00
Jeffrey Walton e40de18538
Update comments 2019-05-28 20:18:58 -04:00
Jeffrey Walton b61da7acfe
Update cryptest-autotools script 2019-05-28 06:36:01 -04:00
Jeffrey Walton a2e7c26f6c
Add 16-bit rev16 and rbit 2019-05-28 02:50:58 -04:00
Jeffrey Walton 623059f28c
Use ARM rev and rbit when appropriate
We tried to add a ByteReverse(word64) and BitReverse(word64) overloads but GCC was producing bad code for it.
2019-05-27 14:27:12 -04:00
Jeffrey Walton 81da61fe7b
Breakout sha_block_data_order and sha_block_data_order_neon (GH #847) 2019-05-26 22:10:26 -04:00
Jeffrey Walton d4b533a60f
Add Thumb and Arm versions of CPU_ProbeARMv7() 2019-05-26 17:06:55 -04:00
Jeffrey Walton 7cd8d0278a
Remove VFP_ABI_PUSH and VFP_ABI_POP macros 2019-05-26 02:14:03 -04:00
Jeffrey Walton 9a3c1e351d
Clear Valgrind finding in IncrementCounterByOne
The single buffer IncrementCounterByOne generated a Valgrind finding on ARM. This commit uses the same pattern for both overloads in case Valgrind wants to fire on the two-buffer version.
2019-05-25 19:49:49 -04:00
Jeffrey Walton ca11105a40
Clear sign comparison warning under GCC 2019-05-25 17:00:32 -04:00
Jeffrey Walton f90c162b68
Fix IncrementCounterByOne
This was introduced earlier in the day when clearing a Valgrind finding. It tested good with the self tests. However, we double process byte[0] if there's a carry.
2019-05-25 07:02:32 -04:00
Jeffrey Walton fc10a7f1ea
Fix SHA512 on ARM benchmarks
This was a mistake when porting from Cryptogams to Crypto++. The macros VFP_ABI_PUSH and VFP_ABI_POP needed to be defined because they save and restore SIMD register state. They were originally missing during the port. The benchmarks would hang because the doubles we used for benchmarking were blown away in sha512_block_data_order_neon.
2019-05-25 06:23:19 -04:00
Jeffrey Walton 92df2a685f
Clear Valgrind warnings on ARM
I don't believe these should have been findings. They were clear on x86, Aarch64 and PowerPC.
2019-05-25 03:41:05 -04:00
Jeffrey Walton 1400757fea
Update comments 2019-05-25 00:43:27 -04:00
Jeffrey Walton ea96b9d375
Use CRYPTOGAMS_armcap_P for ARM (GH #846)
Andy advised against removing the global caps variable. This commit reintroduces CRYPTOGAMS_armcap_P. However, due to the shared object symbol loading problem, we needed to use CRYPTOGAMS_armcap_P as a global, and not CRYPTOGAMS_armcap as a local. Using CRYPTOGAMS_armcap_P directly caused the symbol to be marked as R_ARM_ABS32 which avoids the problem with R_ARM_REL32.
2019-05-24 16:33:47 -04:00
Jeffrey Walton 1650cac3f3
Update comments 2019-05-23 19:35:05 -04:00
Jeffrey Walton 2a09376211
Remove const_cast from CryptogamsArmCaps() 2019-05-23 03:17:17 -04:00
Jeffrey Walton c5bb85754f
Add RDRAND and RDSEED test programs
These are for Autotools on Solaris.
2019-05-22 21:25:31 -04:00
Jeffrey Walton fed4a55f39
Update cryptest-autotools script 2019-05-22 21:03:19 -04:00
Jeffrey Walton 57b85fafce
Update Cryptogams SHA headers (GH #846) 2019-05-22 19:11:16 -04:00
Jeffrey Walton 7eaa5837e0
Fix "unexpected reloc type 0x03" for ARM shared object (GH #846) 2019-05-22 19:00:08 -04:00
Jeffrey Walton ce5d5d5c0f
Use CRYPTOGAMS_armcap_loc for word label 2019-05-22 06:37:16 -04:00
Jeffrey Walton 0a4b370d3f
Use CRYPTOGAMS_armcaps
It looks like CRYPTOGAMS_armcap was used in some places, and it broke Autotools
2019-05-22 05:46:06 -04:00
Jeffrey Walton 13e3a19e94
Remove __KERNEL__ guard
Andy's code is used in the Linux kernel. The define is not needed here.
2019-05-22 05:12:16 -04:00
Jeffrey Walton 073c246595
Rename CRYPTOGAMS_armcap_P to CRYPTOGAMS_armcap 2019-05-22 05:01:27 -04:00
Jeffrey Walton 50dd3ad354
Spelling 2019-05-22 03:04:38 -04:00
Jeffrey Walton 7287a79669
Use config_ver.h in change-version script 2019-05-22 02:56:37 -04:00
Jeffrey Walton 1abab8050e
Clear documentation warnings 2019-05-22 02:53:26 -04:00
Jeffrey Walton 879b8c6fe9
Remove unused CLANG_INTEGRATED_ASSEMBLER from Makefile
This is an artifact that should have been removed at CRYPTOPP_DISABLE_MIXED_ASM.
2019-05-21 20:05:44 -04:00
Jeffrey Walton f396ade93a
Rename XGETBV to XGETBV64 2019-05-21 19:44:48 -04:00
Jeffrey Walton 6f3be56c9d
Update comments 2019-05-21 19:40:11 -04:00
Jeffrey Walton 02cdbf61d3
Rename ExtendedControlRegister to XGETBV 2019-05-21 19:31:13 -04:00
Jeffrey Walton cf85d768b4
Fix armv8l-unknown-linux-gnueabihf yet again 2019-05-21 18:48:13 -04:00
Jeffrey Walton 5e15b46234
Fix Aarch64 compile in CPU_ProbeARMv7
Previous to the Cryptogams cut-in we could be sloppy and return anything for ARMv8. Now e have real code backing ARMv7 we need to return an accurate value.
2019-05-21 08:13:52 -04:00
Jeffrey Walton 268ea61f1c
Cutover to CRYPTOPP_LLVM_CLANG_VERSION (GH #845)
We were using CRYPTOPP_CLANG_VERSION in some places.
2019-05-21 07:54:47 -04:00
Jeffrey Walton 2d4a932c33
Remove -tvos_simulator_version_min from AppleTVSimulator
It did not clear the problem.
2019-05-21 07:08:41 -04:00
Jeffrey Walton 5b1cae0c63
Fix compile using MSVC 2013 ARM 2019-05-21 06:54:33 -04:00
Jeffrey Walton 751515901b
Limit Cryptogams AES and SHA to Linux distros
The Apple assembler cannot translate the source files for iOS.
2019-05-21 05:59:58 -04:00
Jeffrey Walton ddb9249444
Fix source warning 2019-05-21 05:44:21 -04:00
Jeffrey Walton 1973674732
Add sanity check to setenv-*.sh scripts
Prompt user to source the script when required. Whitespace check-in
2019-05-21 05:37:40 -04:00
Jeffrey Walton 3e897eb0f6
Use CRYPTOPP_ARM_NEON_AVAILABLE in neon_simd.cpp 2019-05-21 05:11:24 -04:00
Jeffrey Walton 02baab2307
Enable Cryptogams AES on ARM using Clang
It looks like AES needed -mthumb for Clang. SHA must not use -mthumb under Clang due to a crash.
2019-05-21 04:23:40 -04:00
Jeffrey Walton 6acbbf1849
Fix crash in GCM mode on ARM with -mthumb 2019-05-21 04:03:22 -04:00
Jeffrey Walton 08235400b0
Add CRYPTOPP_CLANG_VERSION for ARM asm defines
We should be using both CRYPTOPP_APPLE_CLANG_VERSION and CRYPTOPP_LLVM_CLANG_VERSION. We'll loop back to it when we have some time.
2019-05-21 03:02:35 -04:00
Jeffrey Walton 5fb03078eb
Use void return value for Cryptogams SHA functions 2019-05-21 02:38:30 -04:00
Jeffrey Walton e8603143dc
Whitespace check-in
We also simplified the CPU_ProbeNEON logic a bit to a vmov.u32 and vshl.u32.
2019-05-21 02:21:15 -04:00
Jeffrey Walton 40251d9b7f
Guard CPU_ProbeARMv7 with CRYPTOPP_BOOL_ARM32 (GH #844)
We make these queries available on all platforms so folks don't need to guard code.
2019-05-20 23:33:06 -04:00
Jeffrey Walton c456d6aa69
Guard CPU_ProbeARMv7 with CRYPTOPP_BOOL_ARM32 (GH #844)
We make these queries available on all platforms so folks don't need to guard code.
2019-05-20 23:30:12 -04:00
Jeffrey Walton cc011d2e44
Remove Aarch32 and Aarch64 from CPU_QueryARMv7
I believe some of the code may be generated differently. When testing CPU_ProbeARMv7 I had trouble compiling it on ARMv8.
2019-05-20 23:09:57 -04:00
Jeffrey Walton a9be7ced86
Fix CPU_QueryARMv7 for Clang (GH #844)
This fixes the query under Clang. This appears to be a trickier problem because there is no explicit define for HWCAP_ARMv7. We rely on HWCAP_NEON as a proxy, or fallback to a CPU_ProbeARMv7.
2019-05-20 23:02:36 -04:00
Jeffrey Walton a164c1f41d
Fix CPU_ProbeARMv7 for Clang (GH #844)
This fixes the probe undr Clang. However, we need to fix the CPU_QueryARMv7
2019-05-20 21:41:57 -04:00
Jeffrey Walton c0cff24953
Update comments 2019-05-20 17:11:59 -04:00
Jeffrey Walton b1b6ea5b78
Fold declarations for CRYPTOGAMS_armcaps
Also declare storage for CRYPTOGAMS_armcaps. This moves the symbol from BSS to initialized data. The Cryptogams module declares the symbol as common, so they are weak and use our declaration.
2019-05-20 17:03:57 -04:00
Jeffrey Walton 5c7c092336
Cleanup Cryptogams defines 2019-05-20 16:39:26 -04:00
Jeffrey Walton 00155d42cc
Enable Cryptogams SHA asm for Clang
AES is still disabled
2019-05-20 15:29:30 -04:00
Jeffrey Walton 9590481c7f
Update cryptest-autotools.sh 2019-05-20 03:48:02 -04:00
Jeffrey Walton 122529ed4a
Add test for automake in cryptest-autotools.sh 2019-05-19 21:46:36 -04:00
Jeffrey Walton e0b60439bf
Fix Scrypt crash when blockSize is 0 (GH #842)
This may change in the future. I prefer to recover, and use default block size when block size is 0. But this stops the immediate problem of a crash.
2019-05-19 21:24:32 -04:00
Jeffrey Walton 2c0455edf8
Add additional asserts in Scrypt::ValidateParameters (GH #842)
We still need to figure out what to do, but we can start warning users immediately.
2019-05-19 18:52:37 -04:00
Jeffrey Walton e3788aacc5
Display C++ for SHA512_AlgorithmProvider on ARM 2019-05-19 18:17:46 -04:00
Jeffrey Walton 6528561cb3
Update comments 2019-05-19 18:10:09 -04:00
Jeffrey Walton e19a6152b5
Return CRYPTOGAMS_armcaps in CryptogamsArmCaps 2019-05-19 16:51:40 -04:00
Jeffrey Walton 62d53e6c44
Disable Cryptogams ASM on static Transform function
This needs mmore testing.
2019-05-19 16:46:01 -04:00
Jeffrey Walton d38e5a954d
Add ARM SHA512 asm implementation from Cryptogams (GH #841, PR #843)
Cryptogams is Andy Polyakov's project used to create high speed crypto algorithms and share them with other developers. Cryptogams  has a dual license. First is the OpenSSL license because Andy contributes to OpenSSL. Second is a BSD license for those who want a more permissive license.

Andy's implementation runs about 45% faster than C/C++ code. Testing on a 1.8 GHz Cortex-A17 shows Cryptograms at 45 cpb, and C++ at 79 cpb.

The integration instructions are documented at [Cryptogams SHA](https://wiki.openssl.org/index.php/Cryptogams_SHA) on the OpenSSL wiki.
2019-05-19 16:29:45 -04:00
Jeffrey Walton 4c9ca6b723
Add ARM SHA256 asm implementation from Cryptogams (GH #840, PR #840)
Cryptogams is Andy Polyakov's project used to create high speed crypto algorithms and share them with other developers. Cryptogams  has a dual license. First is the OpenSSL license because Andy contributes to OpenSSL. Second is a BSD license for those who want a more permissive license.

Andy's implementation runs about 45% faster than C/C++ code. Testing on a 1 GHz Cortex-A7 shows Cryptograms at 17 cpb, and C++ at 30 cpb.

The integration instructions are documented at [Cryptogams SHA](https://wiki.openssl.org/index.php/Cryptogams_SHA) on the OpenSSL wiki.
2019-05-19 06:59:12 -04:00
Jeffrey Walton 8c99b1cd75
Add call to automake in cryptest-automake.sh 2019-05-19 02:26:44 -04:00
Jeffrey Walton ffb11da13b
Add call to automake in cryptest-automake.sh 2019-05-19 02:19:47 -04:00
Jeffrey Walton 1a63112faf
Add ARM SHA1 asm implementation from Cryptogams (GH #837, PR #838)
Add ARM SHA1 asm implementation from Cryptogams.

Cryptogams is Andy Polyakov's project used to create high speed crypto algorithms and share them with other developers. Cryptogams  has a dual license. First is the OpenSSL license because Andy contributes to OpenSSL. Second is a BSD license for those who want a more permissive license.

Andy's implementation runs about 30% faster than C/C++ code. Testing on a 1 GHz Cortex-A7 shows Cryptograms at 16 cpb, and C++ at 23 cpb.

The integration instructions are documented at [Cryptogams SHA](https://wiki.openssl.org/index.php/Cryptogams_SHA) on the OpenSSL wiki.
2019-05-18 23:07:17 -04:00
Jeffrey Walton 4a21619bff
Regenerate Cryptogams AES assembly file
> It does not look like much has changed in the last year.
2019-05-18 06:49:51 -04:00
Jeffrey Walton 6cc9c81fa5
Use test_arm_sha1.cxx for feature tests 2019-05-17 23:45:23 -04:00
Jeffrey Walton 83ee4e1fc0
Use test_arm_sha1.cxx for feature tests 2019-05-17 23:42:15 -04:00
Jeffrey Walton f027361369
Split test_arm_sha.cxx into SHA1 and SHA256 tests 2019-05-17 22:19:26 -04:00
Jeffrey Walton c51f0ecbfd
Make config.h more Autoconf friendly (GH #835, PR #836) 2019-05-17 15:18:17 -04:00
Jeffrey Walton b25b6f0892
Cleanup SIMON64 and SPECK64 flags in Makefile (GH #834) 2019-05-16 18:57:57 -04:00
Jeffrey Walton edc0952b25
Whitespace check-in 2019-05-16 02:47:44 -04:00
Jeffrey Walton ef3968f551
Guard x86 cache line size 2019-05-08 21:20:49 -04:00
Jeffrey Walton 72a71eb230
Use fallback in detecting ARM and PowerPC cache line size 2019-05-08 19:54:05 -04:00
Jeffrey Walton c91813c0b4
Use fallback in detecting VIA cach line size 2019-05-08 19:46:23 -04:00
Jeffrey Walton 40e5891635
Use CPU_QuerySHA256 for ARM 2019-05-08 19:31:31 -04:00
Jeffrey Walton 73bf2f29c0
Add "AMDisbetter!" cpuid detection 2019-05-08 18:51:12 -04:00
Jeffrey Walton 986fded372
Spelling 2019-05-08 18:33:55 -04:00
Jeffrey Walton d9aed27ad3
Add code for VIA L1 data cache line size 2019-05-08 18:29:33 -04:00
Jeffrey Walton 30fc56d58c
Clear alignment warnings on ARM 32-bit platforms 2019-05-01 12:54:25 -04:00
Jeffrey Walton 337d1c88c8
Use armv7l for machine of Clang triplet armv8l-unknown-linux-gnueabihf (GH #831)
Autotools uses armv7l. We should be safe using the same machine.
2019-05-01 11:00:34 -04:00
Jeffrey Walton a5fe6fa6da
Remove unneeded perm check in cryptest-autotools.sh 2019-05-01 10:45:11 -04:00
Jeffrey Walton 4acdcc46d0
Try workaround Clang triplet on ARMv7l (GH #831) 2019-05-01 01:48:00 -04:00
Jeffrey Walton 7ef3dacdc2
Remove C++11 constexpr code for CRYPTOPP_ALIGN_DATA (PR #830)
I don't have faith in it even though it has tested good so far.
2019-04-30 23:00:56 -04:00
Jeffrey Walton ff544c386c
Use dynamic_cast in ed25519 (GH #829) 2019-04-30 20:29:21 -04:00
Jeffrey Walton a379c5644a
Clear alignment warnings on ARM 32-bit platforms (#828) 2019-04-30 17:53:58 -04:00
Jeffrey Walton b9fe3a3415
Clear alignment warnings on ARM 32-bit platforms 2019-04-29 22:40:07 -04:00
Jeffrey Walton 6c60e2cd1d
Add conservative governor setting
This governor setting is showing up on dev-board 4.19 kernels
2019-04-29 18:21:50 -04:00
Jeffrey Walton a11ac1e879
Use ConstBytePtr in TestDataNameValuePairs (GH #827) 2019-04-29 00:13:32 -04:00
Jeffrey Walton 38a4bb55cf
Post-release version increment 2019-04-29 00:12:18 -04:00
Jeffrey Walton 9dcc26c582
Prepare for Crypto++ 8.2 release
Make ConstBytePtr return non-NULL pointer
2019-04-28 19:37:23 -04:00
Jeffrey Walton ec1aa8874c
Prepare for Crypto++ 8.2 release
Fix SHAKE-128 and SHAKE-256 tests
2019-04-28 19:09:45 -04:00
Jeffrey Walton 7ba4657375
Prepare for Crypto++ 8.2 release
Fix VS2010 compile on WIndows Vista; Add BytePtr inline function
2019-04-28 18:10:03 -04:00
Jeffrey Walton c9703ab5ea
Prepare for Crypto++ 8.2 release
Fix VS2010 compile on WIndows Vista
2019-04-28 17:27:09 -04:00
Jeffrey Walton a04014aa48
Prepare for Crypto++ 8.2 release
Fix Fedora 7 compile
2019-04-28 15:21:26 -04:00
Jeffrey Walton e705fa7fad
Prepare for Crypto++ 8.2 release 2019-04-28 12:47:07 -04:00
Jeffrey Walton 4e0c3ed837
Prepare for Crypto++ 8.2 release 2019-04-28 11:48:32 -04:00
Jeffrey Walton 9e22df09a1
Prepare for Crypto++ 8.2 release 2019-04-28 11:48:04 -04:00
Jeffrey Walton 68b4fc0d8b
Prepare for Crypto++ 8.2 release 2019-04-28 11:30:32 -04:00
Jeffrey Walton c9dc95a45c
Clear GCC multiline comment warning 2019-04-27 23:30:33 -04:00
Jeffrey Walton fd2fd0c199
Remove unneeded permutes
Loading byte arrays does not suffer the endian swaps.
2019-04-27 23:09:30 -04:00
Jeffrey Walton 90f52dd9ae
Regenerate cryptest.nmake list 2019-04-27 21:37:23 -04:00
Jeffrey Walton b16d37e347
Clear C4296 under MSVC++ (GH #821) 2019-04-27 21:21:56 -04:00
Jeffrey Walton 255a6f2aa0
Clear UBsan warning -Wstringop-overflow 2019-04-27 21:08:02 -04:00
Jeffrey Walton 39418a8512
Use PowerPC unaligned loads and stores with Power8 (GH #825, PR #826)
Use PowerPC unaligned loads and stores with Power8. Formerly we were using Power7 as the floor because the IBM POWER Architecture manuals said unaligned loads and stores were available. However, some compilers generate bad code for unaligned loads and stores using `-march=power7`, so bump to a known good.
2019-04-27 20:35:01 -04:00
Jeffrey Walton d451751eb2
Update SKIPJACK documentation (GH #824) 2019-04-27 14:40:53 -04:00
Jeffrey Walton cdaac6b844
Add SKIPJACK/CBC test vectors (GH #824)
Generated using Botan 1.11.17, https://github.com/noloader/cryptopp-test/tree/master/SKIPJACK
2019-04-27 14:21:48 -04:00
Jeffrey Walton d1b1554188
Add SKIPJACK test vectors from SP800-17, Table 6, pp. 140-42 (GH #824) 2019-04-27 13:24:54 -04:00
Jeffrey Walton e8107e9cb8
Update documentation
The library uses both PKCS #5 and PKCS #7 padding
2019-04-04 07:20:33 -04:00
Jeffrey Walton 9f8017a276
Fix missing GF2NT_233_Multiply_Reduce_CLMUL in the cursed DLL (GH #783)
This should have been checked-in during GH #783 and PR #784. I think there was one mailing list message about missing symbols GF2NT_233_Multiply_Reduce_CLMUL and GF2NT_233_Square_Reduce_CLMUL. I missed it when attempting to reproduce the issue. I can duplicate it now using VS2013. I think the addition of CRYPTOPP_DLL caused the issue to surface.
2019-03-21 08:13:14 -04:00
Jeffrey Walton fc3b16e3a3
Fix SHAKE compile error with old GCC (GH #818) 2019-03-18 08:06:48 -04:00
Jeffrey Walton 0d17eea82c
Add x25519 default constructor 2019-03-04 19:43:33 -05:00
Jeffrey Walton 08b9e21e5a
Use TCXXFLAGS for feature tests in GNUmakefile-cross
This mirrors PR #815, where we used CXXFLAGS instead of TCXXFLAGS for feature tests
2019-02-28 06:42:16 -05:00
Nicolas Chauvet (kwizart) 7c7a12c584 Use TCXXFLAGS instead of CXXFLAGS (#815)
As done with others tests. This will avoid a miss-detection of aarch64 features
when using flags such as _FORTIFY_SOURCE that needs to be filtered for testing

This fixes https://github.com/weidai11/cryptopp/issues/812

V2: Fix all cases

Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
2019-02-28 06:37:18 -05:00
Jeffrey Walton 84ab1f3c66
Remove early NEON qualification tests from Makefile (GH #812, GH #813)
The makefile tries to pre-qualify NEON (for lack of a better term), and sets IS_NEON accordingly. If IS_NEON=1, then we go on to perform test compiles to see if -mfloat-abi=X -mfpu=neon (and friends) actually work. Effectively we are performing a test to see if we should perform another test.

The IS_NEON flag predates our compile time feature tests. It was kind of helpful when we were trying to sort out if a platform and compiler options supported NEON without a compile test. That was an absolute mess and we quickly learned we needed a real compile time feature test (which we now have).

Additionally, Debian and Fedora ARMEL builds are failing because we are misdetecting NEON availability. It looks like we fail to set IS_NEON properly, so we never get into the code paths that set either (1) -mfloat-abi=X -mfpu=neon or (2) -DCRYPTOPP_DISABLE_NEON or -DCRYPTOPP_DISABLE_ASM. Later, the makefile builds a *_simd.cpp and the result is an error that NEON needs to be activated (or disabled).

This commit removes IS_NEON so we immediately move to compile time feature tests.
2019-02-27 19:35:04 -05:00
Jeffrey Walton 8624a91988
Spelling 2019-02-24 17:00:20 -05:00
Jeffrey Walton 3183970300
Add missing BLAKE2 constructors
BLAKE2b and BLAKE2s are both missing a constructor that takes only the digest size. Also see https://groups.google.com/d/msg/cryptopp-users/QCFGYw8q3Yo/vpBCqz-vBgAJ
2019-02-24 15:45:00 -05:00
Jeffrey Walton 758939ab2e
Fix missing BlockSize() in BLAKE2 classes (GH #811) 2019-02-23 14:13:31 -05:00
Jeffrey Walton 6138b8a127
Post-release version increment
Also see https://www.cryptopp.com/wiki/Release_Process#Increment_version_numbers
2019-02-23 14:03:49 -05:00
Jeffrey Walton 20e9e0cb10
Prepare for Crypto++ 8.1 release
This should have been checked in with 1c34979592. Too late now, but fix it anyway.
2019-02-23 13:57:40 -05:00
Jeffrey Walton 1c34979592
Prepare for Crypto++ 8.1 release 2019-02-23 00:18:15 -05:00
Jeffrey Walton 95bc90adc4
Clear unused warnings with MSVC 2019-02-22 08:38:20 -05:00
Jeffrey Walton 3185e93fe3
Fix missing symbols in Windows DLL 2019-02-22 08:38:13 -05:00
Fabrice Fontaine a809dbdbc4 AVX2 depends on GCC 4.9 (PR #809) 2019-02-21 18:34:32 -05:00
Jeffrey Walton 0239393a22
Update Readme 2019-02-15 21:37:26 -05:00
Jeffrey Walton 72719766bb
Update Readme 2019-02-15 16:42:58 -05:00
Jeffrey Walton f44d4cb5b8
Update documentation 2019-02-15 08:57:54 -05:00
Jeffrey Walton e8bb20d84f
Fix AlgorithmName for SHA3-based classes 2019-02-13 14:22:43 -05:00
Jeffrey Walton 8dd39d03ae
Update documentation 2019-02-13 12:16:05 -05:00
Jeffrey Walton 00f9c1f0eb
Enable extended output in SHAKE-128 and SHAKE-256 (GH #805, PR #806) 2019-02-13 11:31:18 -05:00
Jeffrey Walton 2e440959b1
Update documentation 2019-02-13 00:01:58 -05:00
Jeffrey Walton 8db6fe16b4
Update documentation 2019-02-12 23:52:19 -05:00
Jeffrey Walton 57465b5ae3
Update documentation 2019-02-12 23:38:38 -05:00
Jeffrey Walton 9defd0afcd
Add SHAKE-128 and SHAKE-256 (GH #805, PR #806)
This should have been added during the original commit
2019-02-12 23:12:35 -05:00
Jeffrey Walton c6e8a61b8b
Add SHAKE-128 and SHAKE-256 (GH #805, PR #806) 2019-02-12 19:51:37 -05:00
Jeffrey Walton e499131ea6
Latch previous ROUNDS in Salsa and ChaCha ciphers (GH #800, PR #804) 2019-02-12 16:56:01 -05:00
asbai a9eac2ce6e Fix missing AlgorithmProvider() on PanamaHash (GH #801, PR #803) 2019-02-12 15:05:39 -05:00
Jeffrey Walton 6befce1851
Update documentation 2019-02-11 12:44:30 -05:00
Jeffrey Walton d86fcf64a7
Update documentation 2019-02-11 12:29:04 -05:00
Jeffrey Walton 161d680434
Back-off ChaCha assert at the moment (GH #790)
We don't know what we are supposed to do at the moment. We need the CFRG or IETF to say what is supposed to happen.
2019-02-11 11:40:05 -05:00
Jeffrey Walton 0ca4c41a97
Add ed25519 SignStream and VerifyStream functions (GH #796, PR #797) 2019-02-10 23:08:14 -05:00
Jeffrey Walton 1c6a96a57e
Update README 2019-02-10 04:41:51 -05:00
Jeffrey Walton 978b221909
Update README 2019-02-09 14:05:09 -05:00
Jeffrey Walton 65b10a4af8
Add additional XChaCha20/Poly1305 test vectors (GH #724)
These test vectors were generated with Botan
2019-02-08 17:08:17 -05:00
Jeffrey Walton b9eea8e842
Add additional ChaCha20/Poly1305 test vectors (GH #724)
These test vectors were generated with Botan
2019-02-08 16:38:23 -05:00
Jeffrey Walton cae5f8e0fd
Add SecretToPublicKey function for x25519 2019-02-07 17:05:23 -05:00
Jeffrey Walton de85886ca4
Update comments 2019-02-07 15:45:38 -05:00
Jeffrey Walton 4caa5ee724
Add SecretToPublicKey function for ed25519
Also remove IsClamped. Clamping occurs with ed25519, but it happens inside the Donna code. It is not needed elsewhere for ed25519.
2019-02-07 15:00:00 -05:00
Jeffrey Walton dde43de786
Use SECRET_KEYLENGTH for ed25519PrivateKey::GenerateRandom 2019-02-06 19:20:48 -05:00
Jeffrey Walton 23a32c4e3d
Add XChaCha20/Poly1305 benchmark 2019-02-06 16:57:36 -05:00
Jeffrey Walton 76b47204df
Add IETF XChaCha20Poly1305 (GH #727, PR #795) 2019-02-06 04:14:39 -05:00
Jeffrey Walton 0661536bd6
Fix spelling 2019-02-06 01:23:27 -05:00
Jeffrey Walton 26c83877ef
Add IETF XChaCha (GH #727, PR #794) 2019-02-06 01:03:28 -05:00
Jeffrey Walton 48531785b7
Use IsPowerOf2 in Integer::Divide 2019-02-05 02:05:36 -05:00
Jeffrey Walton b09ca89a6e
Update comments 2019-02-05 01:19:35 -05:00
Jeffrey Walton 5b1e6fd28f
Fix Fedora 7 compile
Fedora 7 toolchain supplies upto SSE4.2
2019-02-05 01:14:35 -05:00
Jeffrey Walton 5f731c06b3
Fix NULL device 2019-02-04 11:28:28 -05:00
Jeffrey Walton 47435f7d72
Guard use of <cstddef> for Microsoft compilers (GH #781) 2019-02-04 07:18:51 -05:00
Jeffrey Walton 5b6b86c7f1
Avoid extra call to RekeyCipherAndMac in ChaCha20/Poly1305 2019-02-04 06:04:12 -05:00
Jeffrey Walton 868ca8e2e5
Fix cryptest.nmake file list 2019-02-03 22:59:56 -05:00
Jeffrey Walton e10736482c
Add test compile to makefile 2019-02-03 11:09:10 -05:00
Jeffrey Walton ef1c8c2bb4
Add Hurd support for Makefile and cryptest.sh
IS_HURD in the makefile is to avoid complaints by some of the more eager GNU folks. We could do it using IS_LINUX
2019-02-03 10:28:48 -05:00
Jeffrey Walton 83145ffed6
Cleanup lcov recipe 2019-02-02 16:49:28 -05:00
Jeffrey Walton a05e108a93
Fix benchmarks when CRYPTOPP_DISABLE_ASM 2019-02-02 16:49:08 -05:00
Jeffrey Walton d0cc098af1
Cleanup Gcov recipe
We should have removed the source files at GH #208, PR #703
2019-02-02 15:34:56 -05:00
Jeffrey Walton 4d24876490
Fix Linux detection for GNU Hurd 2019-02-02 15:20:59 -05:00
Jeffrey Walton 1b8c00b37c
Update comments 2019-02-02 00:47:56 -05:00
Jeffrey Walton 96eac11d3b
Update DataDir search paths (GH #760) 2019-02-02 00:29:36 -05:00
Jeffrey Walton 2beb779286
Remove cryptestcwd binary
Also see https://github.com/noloader/cryptopp-autotools/issues/3
2019-02-01 09:51:37 -05:00
Jeffrey Walton 3b5de1bf15
Update documentation 2019-01-31 19:53:34 -05:00
Jeffrey Walton cd395c7943
Update documentation 2019-01-31 19:33:13 -05:00
Jeffrey Walton c415a64a0e
Clear Doxygen warning (GH #791) 2019-01-31 19:12:27 -05:00
Jeffrey Walton 7fe141c004
Whitespace check-in 2019-01-31 19:04:44 -05:00
Jeffrey Walton dbc071f083
Whitespace check-in 2019-01-31 19:01:58 -05:00
Jeffrey Walton 49daf12913
Whitespace check-in 2019-01-31 18:55:50 -05:00
Jeffrey Walton 04e5939c8d
Fix spelling 2019-01-31 18:37:41 -05:00
Jeffrey Walton a8290bd66d
Remove SimpleKeyingInterface from ChaCha20Poly1305_Base 2019-01-31 07:24:43 -05:00
Jeffrey Walton 56db805713
Add seckey.h header dependency 2019-01-31 01:34:03 -05:00
Jeffrey Walton 416f519f50
Move NumericLimitsMin and NumericLimitsMax to CryptoPP namespace (GH #793) 2019-01-31 00:05:00 -05:00
Jeffrey Walton 31fdfaa070
Clear unused function warning in Donna source files (GH #793) 2019-01-30 23:06:06 -05:00
Jeffrey Walton 3d8bd4c582
Use ChaCha cipher AlgorithmProvider() 2019-01-30 23:04:37 -05:00
Jeffrey Walton b29faeab58
Add -Wno-unused-function to misc.h (GH #793)
This was added to misc.h due to the noise created by NumericLimitsMin and NumericLimitsMax. It should make it easier to remove -Wno-unused-function from config.h.
2019-01-30 20:52:21 -05:00
Jeffrey Walton df98f8c16b
Make AuthenticatedSymmetricCipherBase::ProcessData overflow safe 2019-01-30 10:45:12 -05:00
Jeffrey Walton 97838012ee
Add test for length in memcpy 2019-01-30 10:00:09 -05:00
Jeffrey Walton 33897e944c
Clear UBsan finding with -std=c++03
New finding after cutting in ChaCha20/Poly1305
2019-01-30 09:56:36 -05:00
Jeffrey Walton 02f5da3511
Clear UBsan finding with -std=c++03
New finding after cutting in ChaCha20/Poly1305
2019-01-30 07:28:08 -05:00
Jeffrey Walton b69bfb5bdf
Use T_IsEncryption for ChaCha20Poly1305 2019-01-30 03:31:59 -05:00
Jeffrey Walton 33eac51e92
Fix MaxHeaderLength and MaxMessageLength (GH #724) 2019-01-30 02:51:14 -05:00
Jeffrey Walton ebb9593a4b
Update comments 2019-01-30 02:17:58 -05:00
Jeffrey Walton 013b5a30c7
Update comments 2019-01-30 01:54:08 -05:00
Jeffrey Walton c1ad534038
Update comments 2019-01-30 01:45:09 -05:00
Jeffrey Walton 38f694924f
Update License.txt 2019-01-30 01:35:55 -05:00
Jeffrey Walton 892103f2b0
Update License.txt 2019-01-30 01:21:29 -05:00
Jeffrey Walton dd48a7acef
Fix ChaCha20/Poly1305 when using filters (GH #724) 2019-01-30 00:55:27 -05:00
Jeffrey Walton a4f6da8d30
Update documentation 2019-01-28 22:42:34 -05:00
Jeffrey Walton 281831c08a
Fix ChaCha20Poly1305 padding 2019-01-28 20:56:10 -05:00
Jeffrey Walton cb674918b3
Add ChaCha20Poly1305 benchmarks (GH #724) 2019-01-28 10:18:04 -05:00
Jeffrey Walton 7c3414b072
Fix ChaCha20Poly1305 IVSize() (GH #724) 2019-01-28 10:01:19 -05:00
Jeffrey Walton fcf637082d
Clear Doxygen warnings 2019-01-28 09:09:41 -05:00
Jeffrey Walton 30e7469f5e
Clear Doxygen warnings 2019-01-28 09:06:49 -05:00
Jeffrey Walton 315e54e63d
Add ChaCha20/Poly1305 AEAD cipher (GH #724) 2019-01-28 08:52:56 -05:00
Jeffrey Walton 3cb86675af
Update documentation 2019-01-28 06:13:43 -05:00
Jeffrey Walton 6ef865fbcd
Update documentation 2019-01-27 12:13:09 -05:00
Jeffrey Walton 3f37cfc3a3
Update documentation 2019-01-27 11:54:35 -05:00
Jeffrey Walton f78a5b2eb8
Avoid extra memcpy in Poly1305 Resynchronize 2019-01-27 09:08:02 -05:00
Jeffrey Walton d2c030638d
Convert CONSTANT_TIME_CARRY to inline function 2019-01-27 08:46:05 -05:00
Jeffrey Walton 143537467f
Add Andrew Moon's Donna curve contributions 2019-01-27 07:27:43 -05:00
Jeffrey Walton 0186d31be0
Update documentation 2019-01-27 06:56:12 -05:00
Jeffrey Walton d852c18fe8
Update comments 2019-01-27 06:46:45 -05:00
Jeffrey Walton 33e401116c
Fix Poly1305TLS on big-endian systems (GH #727) 2019-01-27 06:37:48 -05:00
Jeffrey Walton 4d25979403
Update documentation 2019-01-27 05:48:37 -05:00
Jeffrey Walton 6770a8dad4
Update documentation 2019-01-27 05:45:05 -05:00
Jeffrey Walton 62ce6db97d
Fix missing GF2NT_233_Multiply_Reduce_ARMv8 on Aarch64 2019-01-27 02:18:19 -05:00
Jeffrey Walton e388f2d88d
Add Poly1305TLS algorithm (GH #727)
This is the IETF's rendition of Poly1305 that forgoes AES and the nonce, and uses 16-bytes of the key directly to mac the message
2019-01-27 01:41:53 -05:00
Jeffrey Walton 6cd2d0a06a
Fix Aarch64 build when CRYPTOPP_ARM_PMULL_AVAILABLE=0 2019-01-26 20:20:45 -05:00
Jeffrey Walton 6a76dc5ecf
Refactor Poly1305(AES) in preparation for IETF rendition (GH #727) 2019-01-26 13:53:21 -05:00
Jeffrey Walton e17f17d8fc
Add tamper comment to Poly1305(AES) tests 2019-01-26 13:12:46 -05:00
Jeffrey Walton 69286301e0
Add Poly1305(AES) test vectors 2019-01-26 12:54:47 -05:00
Jeffrey Walton 64a89bf352
Update License.txt with CRYPTOGAMS text 2019-01-26 05:12:20 -05:00
Jeffrey Walton e719a1a0ea
Add CRYPTOGAMS copyright notice for Poly1305 scalar multiplication 2019-01-26 04:43:55 -05:00
Jeffrey Walton 83f41e0d76
Update documentation 2019-01-26 00:12:11 -05:00
Jeffrey Walton b9d2310beb
Use ROUNDS constant for ChaChaTLS 2019-01-25 23:27:48 -05:00
Jeffrey Walton 76bdb328a6
Switch to RFC 8439 for ChaChaTLS
Unfortunately the block counter wrap problem is still present.
2019-01-25 21:51:43 -05:00
Jeffrey Walton 82f80124e6
Update comments 2019-01-25 19:49:17 -05:00
Jeffrey Walton 779e28a9b0
Update comments 2019-01-25 19:04:34 -05:00
Jeffrey Walton c1f9b484b7
Use ChaChaTLS in benchmarks 2019-01-25 08:20:25 -05:00
Jeffrey Walton 6a68abea0a
Update comments 2019-01-25 08:14:23 -05:00
Jeffrey Walton 97df2b960b
Update comments 2019-01-25 07:54:00 -05:00
Jeffrey Walton dcd9e67eeb
Refactor ChaCha and ChaChaTLS use a common core 2019-01-25 06:40:12 -05:00
Jeffrey Walton 70dcd29e0b
Refactor ChaCha and ChaChaTLS use a common core 2019-01-25 06:18:58 -05:00
Jeffrey Walton 798e4d85b3
Update comments 2019-01-25 05:06:06 -05:00
Jeffrey Walton d7e416d403
Add additional ChaChaTLS test vectors
These test vectors were generated from a modified Bernstein reference implementation.
2019-01-25 05:03:27 -05:00
Jeffrey Walton d25ba0c59a
Enable SIMD implementation for ChaChaTLS (GH #265) 2019-01-25 02:57:11 -05:00
Jeffrey Walton caaaaa7691
Add additional ChaChaTLS test vectors
These test vectors were generated from a modified Bernstein reference implementation.
2019-01-25 02:34:44 -05:00
Jeffrey Walton acde2f8e5e
Use word64 for ChaChaTLS InitialBlock (GH #265) 2019-01-25 02:34:07 -05:00
Jeffrey Walton 7923a97d24
Enable ChaCha-TLS tests in test vectors 2019-01-25 01:03:22 -05:00
Jeffrey Walton f23b58b73c
Remove rounds from ChaChaTLS
Rounds are alwys 20 in the IETF implementation.
2019-01-24 22:26:15 -05:00
Jeffrey Walton 099f870c55
Add additional ChaChaTLS test vectors from RFC 7539 2019-01-24 21:15:48 -05:00
Jeffrey Walton a29b734a0f
Fix AlgorithmProvider for ChaChaTLS 2019-01-24 09:46:56 -05:00
Jeffrey Walton 5603661eec
Add ChaChaTLS implementation (GH #265)
We tweaked ChaCha to arrive at the IETF's implementation specified by RFC 7539. We are not sure how to handle block counter wrap. At the moment the caller is responsible for managing it. We were not able to find a reference implementation so we disable SIMD implementations like SSE, AVX, NEON and Power4. We need the wide block tests for corner cases to ensure our implementation is correct.
2019-01-24 09:36:05 -05:00
Jeffrey Walton b47f04418c
Update documentation 2019-01-24 02:09:03 -05:00
Jeffrey Walton 0f70d0262b
Update documentation 2019-01-24 02:01:52 -05:00
Jeffrey Walton 1cd8ccbf82
Drop use of static in unnamed namespace 2019-01-23 06:15:51 -05:00
Jeffrey Walton 3d07010ac8
Fix self test failure with IBM XL C/C++ on AIX 2019-01-22 08:16:03 -05:00
Jeffrey Walton 488c1df2fe
Fix self test failure with IBM XL C/C++ on AIX 2019-01-22 06:13:14 -05:00
Jeffrey Walton 76765f1e0a
Fix self test failure with IBM XL C/C++ on AIX 2019-01-22 06:08:47 -05:00
Jeffrey Walton 6d339011a8
Remove /openmp from cryptest.nmake
This has cross-pollinated twice in two days
2019-01-22 05:11:50 -05:00
Jeffrey Walton ef1b391ce6
Use #pragma omp simd for OpenMP 4.0 compilers (GH #787)
Crap... It is OpenMP 4.0, not 3.0
2019-01-22 04:58:54 -05:00
Jeffrey Walton 6ada677461
Whitespace check-in 2019-01-22 03:44:34 -05:00
Jeffrey Walton 8572541841
Use #pragma omp simd for OpenMP 3.0 compilers (GH #787) 2019-01-22 03:42:53 -05:00
Jeffrey Walton 3f38a5f7dd
Cleanup gf2n_simd.cpp 2019-01-22 02:47:12 -05:00
Jeffrey Walton df3f104eb2
Clear type limits warning using GCC 2019-01-22 02:37:38 -05:00
Jeffrey Walton c22f37f051
Clear unused variable warning on AIX 2019-01-22 02:35:25 -05:00
Jeffrey Walton b8f7348c61
Whitespace check-in 2019-01-21 22:16:49 -05:00
Jeffrey Walton c62bf2b147
Add call to DoQuickSanityCheck in HMQV and FHMQV before private key operation 2019-01-21 19:55:05 -05:00
Jeffrey Walton 76a4a5728d
Fix failed debug self test with Sun Studio 12.6 2019-01-21 19:54:26 -05:00
Jeffrey Walton bbad4397c4
Use VectMergeLow and VecMergeHigh 2019-01-21 03:04:07 -05:00
Jeffrey Walton 767d7e2a13
Remove /openmp from cryptest.nmake 2019-01-21 02:03:22 -05:00
Jeffrey Walton ac24f39e33
Fix compile on AIX 2019-01-21 00:56:21 -05:00
Jeffrey Walton 8b892e2020
Add dedicated F2N_Square_256 circuit 2019-01-21 00:48:53 -05:00
Jeffrey Walton 7ab75751cd
Clear unused variable warning under Visual Studio 2019-01-20 23:44:01 -05:00
Jeffrey Walton fbf0f62f4b
Clear unused variable warning under Visual Studio 2019-01-20 23:40:20 -05:00
Jeffrey Walton ca32b63038
Remove /openmp from cryptest.nmake 2019-01-20 22:46:45 -05:00
Jeffrey Walton 7e96a283a3
Fix compile under MSVC 2019-01-20 22:45:53 -05:00
Jeffrey Walton 672f5c7f3d
Update documentation 2019-01-20 22:43:00 -05:00
Jeffrey Walton aa043b38a7
Use OpenMP 2.0 for MSC compilers (GH #787) 2019-01-20 22:10:36 -05:00
Jeffrey Walton 92808945c1
Fix TestAltivecOps on AIX 2019-01-20 19:34:09 -05:00
Jeffrey Walton 0b348fe4be
Remove socket libraries
This should have been removed at Issue 178 and Issue 208
2019-01-20 16:43:49 -05:00
Jeffrey Walton efddef694d
Update documentation 2019-01-20 04:50:22 -05:00
Jeffrey Walton f510b3498c
Update documentation 2019-01-20 03:52:05 -05:00
Jeffrey Walton f95638ef0c
Update documentation 2019-01-20 03:24:18 -05:00
Jeffrey Walton 177385393d
Update CPU_ProbePMULL test 2019-01-20 02:41:20 -05:00
Jeffrey Walton 8fd5bb31cf
Add VecPolyMultiply for Intel-equivalent F2N multiplies 2019-01-20 01:47:34 -05:00
Jeffrey Walton c60f30f912
Add dedicated F2N_Multiply_256x256 circuit 2019-01-19 18:27:12 -05:00
Jeffrey Walton cefcaeaa68
Update documentation 2019-01-19 16:32:13 -05:00
Jeffrey Walton 275b86a8d5
Update documentation 2019-01-19 16:21:07 -05:00
Jeffrey Walton c39d7fdef5
Add VecMergeHi and VecMergeLo PowerPC wrappers 2019-01-19 15:20:47 -05:00
Jeffrey Walton 5909ec6186
Cleanup PowerPC vector operations 2019-01-19 05:34:02 -05:00
Jeffrey Walton 76b7390840
Switch to vec_mergeh and vec_mergel for PowerPC in binary curves
This saves aboout 4 instructions in VMULL
2019-01-19 04:52:36 -05:00
Jeffrey Walton e3bc76832c
Switch to vec_mergeh and vec_mergel for PowerPC in binary curves 2019-01-19 04:22:55 -05:00
Jeffrey Walton ac49c970bc
Switch to vec_mergeh and vec_mergel for PowerPC in binary curves 2019-01-19 03:49:20 -05:00
Jeffrey Walton b6959d4d51
Update cryptest-symbols.sh script 2019-01-18 00:18:39 -05:00
Jeffrey Walton bdd5f470ce
Add additional comments 2019-01-16 17:56:03 -05:00
Jeffrey Walton f6c9a8e183
Disable CRYPTOPP_BUGGY_SIMD_LOAD_AND_STORE by default 2019-01-16 17:27:36 -05:00
Jeffrey Walton 2718731bac
Add additional comments 2019-01-16 17:26:30 -05:00
Jeffrey Walton e86a6b32eb
Add CRYPTOPP_BUGGY_SIMD_LOAD_AND_STORE (GH #782)
I also suspect this has something to do with GH #768 and several others
2019-01-16 17:06:39 -05:00
Jeffrey Walton 7969f7181f
Add additional comments to Aligned Allocator (GH #779) 2019-01-16 17:04:55 -05:00
Jeffrey Walton 3fba3b0a1c
Avoid unknown pragma warning from GCC (GH #777) 2019-01-16 14:43:58 -05:00
Jeffrey Walton 2113a471eb
Fix compile on MinGW32 2019-01-16 03:14:06 -05:00
Jeffrey Walton df9fa62205
Use carryless multiplies for NIST b233 and k233 curves (GH #783, PR #784)
Use carryless multiplies for NIST b233 and k233 curves.
2019-01-16 00:02:04 -05:00
Javier Navarro 982655845a Don't add the flag CRYPTOPP_DISABLE_ASM twice for iPhone simulator builds (GH #778) 2019-01-11 16:40:48 -05:00
Jeffrey Walton fdfcb2a172
Make AlignedAllocate available in simulator debug builds (GH #779, PR #780)
* Make AlignedAllocate available in simulator debug builds (GH #779)

* Use CRYPTOPP_CONSTANT for rotate params
2019-01-11 16:37:26 -05:00
Jeffrey Walton 22a25c0e84
Clear tautological compare warning with Clang (GH #777) 2019-01-10 13:11:43 -05:00
Jeffrey Walton 1ab72cd8fb
Update distclean rule in cryptest.nmake 2019-01-09 01:39:09 -05:00
Jeffrey Walton dbec62cdb2
Update distclean rule in cryptest.nmake 2019-01-09 01:04:59 -05:00
Jeffrey Walton 7428fa82ab
Clear unused variable warning with GCC 2019-01-08 17:31:53 -05:00
Jeffrey Walton 6d5316812f
Fix compile when NO_OS_DEPENDENCE is defined 2019-01-08 17:03:45 -05:00
Jeffrey Walton 3a18d73cc1
Use W64LIT instead of word64 cast 2019-01-08 12:33:13 -05:00
Jeffrey Walton 734affe257
Add missing dependency to cryptest.nmake 2019-01-08 03:36:06 -05:00
Jeffrey Walton f74d09f645
Revert cryptest.nmake cross-pollination 2019-01-08 03:05:39 -05:00
Jeffrey Walton cc4009450a
Clear early GCC warning 2019-01-08 03:04:11 -05:00
Jeffrey Walton 800af2323c
Add distclean recipe to cryptest.nmake 2019-01-07 23:57:36 -05:00
Jeffrey Walton 01b33b8c78
Update comments 2019-01-07 22:24:01 -05:00
Jeffrey Walton aa934f5bb5
Add dlltest.cpp to cryptest.nmake 2019-01-07 18:32:53 -05:00
Jeffrey Walton 61a060765a
Update cryptest.nmake script 2019-01-07 18:02:06 -05:00
Jeffrey Walton 6d959d0dac
Update cryptest.nmake script 2019-01-07 16:10:18 -05:00
Jeffrey Walton 2166dc903d
Add DLL testing code to cryptest.nmake 2019-01-07 14:53:41 -05:00
Jeffrey Walton c9639c2086
Add specific error message to dump2def 2019-01-07 13:31:45 -05:00
Jeffrey Walton 1137103768
Add cl.exe compile command 2019-01-07 12:48:42 -05:00
Jeffrey Walton c5fde84d6e
Make lib name configurable 2019-01-07 00:01:01 -05:00
Jeffrey Walton e38bfe417d
Add /OUT option for dumpbin 2019-01-06 22:51:37 -05:00
Jeffrey Walton 1709d5dc65
Update recipes for Nmake file 2019-01-06 22:16:11 -05:00
Jeffrey Walton 72ce467f23 Add dump2def source file 2019-01-06 21:15:00 -05:00
Jeffrey Walton c97e786cbb
Update comments 2019-01-05 12:48:39 -05:00
Jeffrey Walton 0538af5173
Update comments 2019-01-05 09:54:42 -05:00
Jeffrey Walton 6520ac2e2b
Fix unintentional check-in of nmake file 2019-01-04 20:44:56 -05:00
Jeffrey Walton f47ffe2a4d
Fix IsDebuggerPresent guard for ARM64 (GH #776) 2019-01-04 20:43:19 -05:00
Jeffrey Walton f9ef238846
Whitespace check-in 2019-01-04 20:39:22 -05:00
Jeffrey Walton 1f1c90cc29
Fix _M_IX86 typo 2019-01-04 20:33:53 -05:00
Jeffrey Walton 26a9bdcd76
Clear duplicate declaration warning using MSVC 2019-01-04 18:49:14 -05:00
Jeffrey Walton e6ceab85ff
Fix ARM64 compile with MSVC compiler (GH #776) 2019-01-04 16:55:42 -05:00
Javier Navarro b43f8f5976 Initialize "APPLE_SDK" for arm64, armv7, armv7s, armv6 or armv5 (GH #774) 2019-01-04 16:41:48 -05:00
Jeffrey Walton 65012e8e75
Fix GCM ARM64 compile with MSVC compiler (GH #776) 2019-01-04 16:12:35 -05:00
Jeffrey Walton df4fc3faee
Cleanup headers after Microsoft ARM64 port 2019-01-04 11:43:38 -05:00
Jeffrey Walton 822ca11579
Cleanup headers after Microsoft ARM64 port 2019-01-04 11:33:28 -05:00
Jeffrey Walton 02f7fda54b
Fix <arm_neon.h> include for ARM64 with MSVC compiler (GH #776) 2019-01-04 11:25:55 -05:00
Jeffrey Walton 9277d115a8
Fix SHA ARM64 compile with MSVC compiler (GH #776) 2019-01-04 11:18:34 -05:00
Jeffrey Walton 5ccbd9af6a
Use Microsoft x86-beased defined for __emulu 2019-01-04 10:29:24 -05:00
Jeffrey Walton 619f9790df
Fix VMAC ARM64 compile with MSVC compiler (GH #776) 2019-01-04 10:25:52 -05:00
Jeffrey Walton c085c7a75b
Fix Integer ARM64 compile with MSVC compiler (GH #776) 2019-01-03 23:19:06 -05:00
Jeffrey Walton 7ab07dde06
Use 64-bit add for AdvancedProcessBlocks128_4x1_NEON 2019-01-03 21:25:19 -05:00
Jeffrey Walton 9255740285
Fix self test NEON compile with MSVC compiler (GH #776) 2019-01-03 21:00:22 -05:00
Jeffrey Walton a20c56ea49
Fix SIMON128 and SPECK128 NEON compile with MSVC compiler (GH #776) 2019-01-03 20:06:39 -05:00
Jeffrey Walton e039efa2d3
Fix LEA NEON compile with MSVC compiler (GH #776) 2019-01-03 19:53:01 -05:00
Jeffrey Walton a0fa63879f
Add PACK32x4 macro guard 2019-01-03 19:52:57 -05:00
Jeffrey Walton ed349dced1
Fix AdvancedProcessBlocks_{MxN}_NEON compile with MSVC compiler (GH #776) 2019-01-03 19:49:00 -05:00
Jeffrey Walton b70bc4865f
Fix ChaCha NEON compile with MSVC compiler (GH #776) 2019-01-03 13:37:53 -05:00
Jeffrey Walton 8baa2f7a27
Update comments 2019-01-03 13:17:27 -05:00
Jeffrey Walton a79fe3a826
Use _NSGetExecutablePath on OS X (GH #760)
Also test for symlinks and reject them, if found.
2019-01-02 23:43:44 -05:00
Jeffrey Walton 7819af671b
Use _get_pgmptr on Windows (GH #760)
Let's see how well this works across the versions of Visual Studio we support
2019-01-02 20:22:55 -05:00
Jeffrey Walton 86fd3ef109
Rework makefile, avoid GNU install program
Solaris lacks a GNU compatible install program in /usr/bin and /usr/xpg4/bin. Just use cp and chmod. Cp and chmod work everywhere
2019-01-02 19:48:20 -05:00
Jeffrey Walton 748ebe6328
Use getexecname() on Solaris (GH #) 2019-01-02 19:46:00 -05:00
Jeffrey Walton 60ffc2ec01
Fix missing ed25519 MessageAccumulator Update 2019-01-02 13:39:59 -05:00
Marcel Raad 1a4b851ac1 Fix clang warnings (GH #771) 2019-01-02 12:05:26 -05:00
Jeffrey Walton da2444d243
Update documentation 2019-01-02 12:02:32 -05:00
Jeffrey Walton 9484815960
Cache DataDir when C++11 dynamic init is available (GH #760) 2019-01-02 03:30:49 -05:00
Jeffrey Walton 174f247c44
Add LSB install location to DataDir (GH #760) 2019-01-02 01:22:23 -05:00
Jeffrey Walton e5085684ef
Fix missing SunCC Allocator::max_size(size_type) member function (GH #770) 2019-01-01 17:56:26 -05:00
Tanzinul Islam 148a5e917b Avoid Clang integrated assembler on macOS PowerPC (GH #769) 2018-12-30 00:47:02 -05:00
Jeffrey Walton 8838f78ec4
Fix ChaCha compiler crash for GCC 3.3 2018-12-29 01:08:43 -05:00
Jeffrey Walton 2d06777747
Fix GCM build when SSSE3 not available 2018-12-29 00:56:25 -05:00
Jeffrey Walton fc2ead427c
Fix SIMECK build when SSSE3 not available 2018-12-29 00:49:43 -05:00
Jeffrey Walton 58772f3491
Fix SIMON build when SSSE3 not available 2018-12-29 00:48:12 -05:00
Jeffrey Walton a9bd504b2f
Fix SPECK build when SSSE3 not available 2018-12-29 00:45:57 -05:00
Jeffrey Walton d00b614e46
Fix LEA build when SSSE3 not available 2018-12-29 00:43:26 -05:00
Jeffrey Walton df47185573
Fix CHAM build when SSSE3 not available 2018-12-29 00:39:11 -05:00
Jeffrey Walton 8edc5cf2d5
Add "cc" clobber due to GCC 3.3 compile failure 2018-12-29 00:09:59 -05:00
Jeffrey Walton be85db4de4
Restore unnamed namespace for SHA512_HashBlock_SSE2 (GH #684) 2018-12-28 18:05:06 -05:00
Jeffrey Walton 662db8fc87
Cleanup adv_simd.h include for arch flags 2018-12-28 14:08:54 -05:00
Jeffrey Walton d2cf296d2a
Fix missing RDRAND and RDSEED GenerateBlock functions when CRYPTOPP_DISABLE_ASM
Also see https://github.com/noloader/cryptopp-cmake/issues/44
2018-12-28 12:45:34 -05:00
Jeffrey Walton 29d1c1772d
Fix missing ExtendedControlRegister when CRYPTOPP_DISABLE_ASM
Also see https://github.com/noloader/cryptopp-cmake/issues/44
2018-12-28 12:19:13 -05:00
Jeffrey Walton 16f9cbc82a
Add comments on potential environment misdetection 2018-12-28 11:43:55 -05:00
Jeffrey Walton 9c58ba8f2b
Avoid use of uint8_t in donna64.cpp 2018-12-28 11:16:41 -05:00
Jeffrey Walton 856e374bba
Update VS2005.zip with SIMECK simd file 2018-12-28 11:11:08 -05:00
Jeffrey Walton b3a473878c
Post-release version increment
Also see https://www.cryptopp.com/wiki/Release_Process#Increment_version_numbers
2018-12-28 08:25:44 -05:00
Jeffrey Walton 5e5fb6c855
Prepare for Crypto++ 8.0 release 2018-12-27 21:56:59 -05:00
Jeffrey Walton 5e48cfd0c9
Prepare for Crypto++ 8.0 release 2018-12-27 18:30:38 -05:00
Jeffrey Walton 5ace5e478a
Spelling corrections 2018-12-27 17:47:20 -05:00
Jeffrey Walton b877782692
Use local definition of space 2018-12-27 13:56:03 -05:00
Jeffrey Walton e8025bf6a9
Remove unused SM4 code for ARM 2018-12-27 11:52:12 -05:00
Jeffrey Walton 9f2917bb31
Check for root in governor.sh 2018-12-27 06:54:34 -05:00
Jeffrey Walton 0c658f5a7c
PublicKey is optional for curve25519 2018-12-26 20:35:49 -05:00
Jeffrey Walton d5338fd212
Remove unneeded buf compare 2018-12-26 19:55:12 -05:00
Jeffrey Walton 1fc26dc14c
Cleanup Validate tests 2018-12-26 19:50:51 -05:00
Jeffrey Walton 5202b6312f
Add ed25519PrivateKey::Validate body (GH #764)
We also clamp the private key and recalculate the public key. Note: we already know some IETF keys fail to validate because they are not clamped as specified in Bernsteain's paper or the RFCs (derp....)
2018-12-26 19:34:41 -05:00
Jeffrey Walton 21cd665a1c
Fix TestEd25519 for Debug builds on PowerPC 2018-12-26 15:21:36 -05:00
Jeffrey Walton d0245a4971
Fix "explicit template specialization cannot have a storage class" on Aarch64 debug builds 2018-12-26 13:32:26 -05:00
Jeffrey Walton b9688ec5e6
Fix "explicit template specialization cannot have a storage class" on Aarch64 debug builds 2018-12-26 13:24:54 -05:00
Jeffrey Walton 83a37b8284
Fix Debug PowerPC build 2018-12-26 12:29:32 -05:00
Jeffrey Walton 5f5250296d
Fix cryptest.vcxproj.user
Debug changes cross-pollinated into the commit
2018-12-25 23:48:59 -05:00
Jeffrey Walton bf10aae97d
Add additional asserts 2018-12-25 20:24:54 -05:00
Jeffrey Walton 6e09f4ee19
Update README.txt 2018-12-25 19:53:30 -05:00
Jeffrey Walton 82c0cb6b42
Whitespace check-in 2018-12-25 19:09:04 -05:00
Jeffrey Walton f9a33173f5
Add additional self tests 2018-12-25 18:38:08 -05:00
Jeffrey Walton 2ccac19de1
Use variable length messages in TestEd25519 2018-12-25 18:16:14 -05:00
Jeffrey Walton 0311daf7e2
Update documentation 2018-12-25 16:18:01 -05:00
Jeffrey Walton afd9c856ea
Update documentation 2018-12-25 15:42:36 -05:00
Jeffrey Walton 630361d249
Update documentation 2018-12-25 11:12:56 -05:00
Jeffrey Walton c55e58c205
Update documentation 2018-12-25 11:08:14 -05:00
Jeffrey Walton 567eef2d4d
Update documentation 2018-12-25 11:02:02 -05:00
Jeffrey Walton f981c86c69
Update documentation 2018-12-25 10:54:42 -05:00
Jeffrey Walton ba0dece8d9
Update documentation 2018-12-25 10:51:56 -05:00
Jeffrey Walton a749296504
Add additional self tests
And whitespace check-in
2018-12-25 10:08:49 -05:00
Jeffrey Walton 7226abd433
Add additional self tests
And whitespace check-in
2018-12-25 09:28:27 -05:00
Jeffrey Walton 2c3ca1c01e
Update documentation 2018-12-25 09:13:19 -05:00
Jeffrey Walton 4aa28fcf57
Update documentation 2018-12-25 09:10:11 -05:00
Jeffrey Walton bfd3f4e3c7
Update documentation 2018-12-25 09:00:52 -05:00
Jeffrey Walton d47f5506bb
Update documentation 2018-12-25 08:51:48 -05:00
Jeffrey Walton f528e9a238
Update documentation 2018-12-25 08:45:34 -05:00
Jeffrey Walton e389e2adc0
Update documentation 2018-12-25 08:38:15 -05:00
Jeffrey Walton ae2677648b
Update documentation 2018-12-25 08:17:20 -05:00
Jeffrey Walton 0d2067ab8d
Update documentation 2018-12-25 08:12:12 -05:00
Jeffrey Walton 430a968ca8
Update documentation 2018-12-25 08:10:24 -05:00
Jeffrey Walton d5e529d819
Update documentation 2018-12-25 07:46:59 -05:00
Jeffrey Walton 3b18e81bc1
Remove unneeded ed25519Verifier code
Add accessors for public and private key
2018-12-25 07:38:30 -05:00
Jeffrey Walton c37d7c83b1
Fix compile with NO_OS_DEPENDENCE 2018-12-25 06:48:09 -05:00
Jeffrey Walton 416db72f2c
Update documentation 2018-12-25 06:41:51 -05:00
Jeffrey Walton 5cbc6710d7
Clear unused variable warning 2018-12-25 05:49:43 -05:00
Jeffrey Walton 5b95b0ab1e
Update documentation 2018-12-24 18:17:25 -05:00
Jeffrey Walton d62674b561
Add ed25519 (GH #764, PR #767)
Add ed25519
2018-12-24 17:17:32 -05:00
Jeffrey Walton 2ba3c1fc73
Update documentation 2018-12-23 18:27:56 -05:00
Tanzinul Islam b5142e044f Use SSE2 intrinsics header in sse_simd.cpp only if needed (#759)
Embarcadero C++Builder v10.3 [has a bug](https://quality.embarcadero.com/browse/RSP-22883) where its old Intel intrinsics headers try to use retired Clang builtins and fail to compile. In devising a workaround with `-DCRYPTOPP_DISABLE_ASM`, I found that `sse_simd.cpp` includes `<emmintrin.h>` even when its code doesn't need the intrinsics.

With this patch, `-DCRYPTOPP_DISABLE_ASM` will be a sufficient workaround because `CRYPTOPP_SSE2_INTRIN_AVAILABLE` is derived from it in `config.h`.
2018-12-23 08:49:39 -05:00
Shmueli Englard fc87f8666a Add check for VS version and ExtendedControlRegister (PR #766) 2018-12-21 19:54:24 -05:00
hygonsoc 6dfb428f10 Add Hygon Dhyana support to enable RDRAND/RDSEED/ADX/AVX2 Feature (PR #765)
Hugh, interesting.

Thank you very much.

Ping @randombit. Botan may want or need this, too.
2018-12-20 17:33:16 -05:00
Jeffrey Walton 398964b87d
Add curve ids for x25519, ed25519, x448 and ed448
Also see https://tools.ietf.org/html/draft-ietf-curdle-pkix
2018-12-18 17:53:39 -05:00
Jeffrey Walton 4f7e2c984d
Make test vectors text files in VS filter file 2018-12-15 04:51:30 -05:00
Jeffrey Walton 33cb5e63ab
Add Test vectors and data to VS project files 2018-12-15 04:39:12 -05:00
Jeffrey Walton 704762ba2c
Add Test vectors and data to VS project files 2018-12-15 04:24:30 -05:00
Jeffrey Walton 9b5b3f4c13
Update vs2005.zip after x25519 cut-in (GH #761) 2018-12-15 03:37:40 -05:00
Jeffrey Walton 67f6a1f0bd
Clear warning C4702: unreachable code 2018-12-14 15:39:54 -05:00
Jeffrey Walton 5226761662
Whitespace check-in 2018-12-14 13:44:10 -05:00
Jeffrey Walton 1b49bdc420
Enable x25519 SSE2 for MS compilers (GH #761) 2018-12-14 13:43:01 -05:00
Jeffrey Walton 17d7a70501
Backout change to validate3.cpp
It was modified for local testing, and cross-pollinated into the last commit.
2018-12-14 12:25:15 -05:00
Jeffrey Walton 4f64bb8eb3
Clear warning C4163: '_umul128' : not available as an intrinsic function 2018-12-14 12:23:18 -05:00
Jeffrey Walton 91e5844625
Enable x25519 64-bit code path for Microsoft compilers 2018-12-14 12:17:50 -05:00
Jeffrey Walton 235c615a10
Make TestCurve25519 available in Release builds 2018-12-14 12:15:58 -05:00
Jeffrey Walton 00f777661d
Update comments and documentation 2018-12-14 04:35:07 -05:00
Jeffrey Walton 6f2188af79
Use byte instead of unsigned char 2018-12-14 04:19:03 -05:00
Jeffrey Walton cac977856a
Clear alginment warning with Clang
The data is aligned, but Clang issues warning based on type and not the actual alignment of the variable and data.
2018-12-14 04:14:44 -05:00
Jeffrey Walton d35124f304
Make SSE2 configurable via CRYPTOPP_SSE2_INTRIN_AVAILABLE
Benchmarking shows things run a little slower with SSE2 on modern Core i5's. Also update comments and links
2018-12-14 03:17:04 -05:00
Jeffrey Walton 67af746743
Update comments 2018-12-14 02:14:20 -05:00
Jeffrey Walton c0150ed4bd
Fix placement of align attribute for 32-bit 2018-12-14 02:00:55 -05:00
Jeffrey Walton 6dc60888d9
Fix the cut-in of Moon's implementation (GH #761)
The initial cut-in was missing preamble present in Moon's curve25519_donna function. It originally tested good because we only perform a pairwise consistency check in release builds. Comprehensive testing with debug builds revealed the problem. Debug builds cross-validate against Bernstein's TweetNaCl library.
2018-12-13 20:34:39 -05:00
Jeffrey Walton 8c3432473b
Update comments 2018-12-13 18:51:15 -05:00
Jeffrey Walton 27cd177209
Fix the cut-in of Moon's implementation (GH #761)
The initial cut-in was missing preamble present in Moon's curve25519_donna function. It originally tested good because we only perform a pairwise consistency check in release builds. Comprehensive testing with debug builds revealed the problem. Debug builds cross-validate against Bernstein's TweetNaCl library.
2018-12-13 18:50:42 -05:00
Jeffrey Walton eb749783da
Fix the cut-in of Moon's implementation (GH #761)
The initial cut-in was missing preamble present in Moon's curve25519_donna function. It originally tested good because we only perform a pairwise consistency check in release builds. Comprehensive testing with debug builds revealed the problem. Debug builds cross-validate against Bernstein's TweetNaCl library.
2018-12-13 18:22:34 -05:00
Jeffrey Walton 83ddeadb65
Make clamped and small order tests static class members 2018-12-13 16:16:40 -05:00
Jeffrey Walton b19abcde1f
Cleanup donna files 2018-12-13 14:17:36 -05:00
Jeffrey Walton 560c332f19
Cutover to Andrew Moon's 64-bit code (GH #761)
The code is public domain without license restrictions. It is also faster than Langley's original implementation.
2018-12-13 13:25:22 -05:00
Jeffrey Walton 5f8dcbbb37
Cleanup Moon's donna_32.cpp 2018-12-13 13:24:14 -05:00
Jeffrey Walton adf109a953
Cutover to Andrew Moon's 32-bit code (GH #761)
The code is public domain without license restrictions. It is also faster than Langley's original implementation.
2018-12-13 12:03:41 -05:00
Jeffrey Walton 9156c49555
Update comments 2018-12-13 11:57:52 -05:00
Jeffrey Walton c76f50ebbb
Add missing header guard 2018-12-13 11:33:26 -05:00
Jeffrey Walton 26fc727f8f
Increase precision on OutputResultOperations
Andrew Moon's x25519 SSE2 code broke reporting because it was too fast.
2018-12-13 10:48:07 -05:00
Jeffrey Walton 12e9d137b2
Fix copy/paste error
32-bit was copied into 64-bit, including the oversized declarations.
2018-12-13 10:27:35 -05:00
Jeffrey Walton 152ac6177c
Add Moon's curve25519 using SSE2 (GH #761)
Moon's code is very fast. In fact it is so fast it broke our benchmarks. Moon's code registers 0.00 milliseconds and 0.00 megacycles/operation.
2018-12-13 10:19:54 -05:00
Jeffrey Walton 20f4d22055
Fix compile on 32-bit MIPS (GH #761)
Testing on a ci20 dev-board with Debian 5 and GCC 4
2018-12-13 04:21:38 -05:00
Jeffrey Walton 0bdacf1496
Fix missing semi-colon in non-ASM path 2018-12-13 03:39:01 -05:00
Jeffrey Walton 459035fcaa
Cleanup donna_32.cpp arithmetic shift 2018-12-12 22:52:15 -05:00
Jeffrey Walton a09d4024b7
Perform both is_clamped and is_small_order at level 2 validation 2018-12-12 10:48:53 -05:00
Jeffrey Walton 220ae9b914
Update documentation 2018-12-12 10:35:00 -05:00
Jeffrey Walton b5cf4ff307
Remove unneeded TYPE_OF_SOCKLEN_T define.
This should have been removed at GH #208, PR #703.
2018-12-12 10:16:15 -05:00
Jeffrey Walton 131397ba5a
Documented Donna namespace for curve25519 2018-12-12 10:14:27 -05:00
Jeffrey Walton 0ad50c61ed
Switch to library integer types
The standard ints will cause trouble on older versions of Visual Studio. It looks like they were missed at the initial cut-in.
2018-12-12 09:48:41 -05:00
Jeffrey Walton d481922a50
Re-enable UBsan tests on Travis
The Xenial image and the Xcode 10.1 toolchain are mature enough to enable the sanitizer.
2018-12-12 09:34:09 -05:00
Jeffrey Walton 3d98320b1e
Fix compile on 32-bit SunCC (GH #761) 2018-12-12 09:05:56 -05:00
Jeffrey Walton 80c551121f
Remove duplicate test run
The test vector collection is run earlier in the process.
2018-12-12 05:59:20 -05:00
Jeffrey Walton e97d6d0ff5
Fix failed self test when NO_OS_DEPENDENCE (GH #761)
Add is_clamped for secret key validation.

Cleanup paramter names in Donna::curve25519 to follow function.

Overload Donna::curve25519 to implicitly use base point if not provided.

Add additional asserts to let the code debug itself.

Update documentation.
2018-12-12 03:56:09 -05:00
Jeffrey Walton 80776453f8
Fix x25519 test data (GH #761) 2018-12-12 03:55:56 -05:00
Jeffrey Walton 34d42b6998
Cut-in x25519 weak points and validation 2018-12-11 18:26:44 -05:00
Jeffrey Walton 4afa78c0e2
Update documentation 2018-12-11 17:48:19 -05:00
Jeffrey Walton 20fce33449
Update documentation 2018-12-11 17:32:28 -05:00
Jeffrey Walton 77923a291a
Add Langley's curve25519 (GH #761, PR# 762) 2018-12-11 16:17:56 -05:00
Jeffrey Walton c1681148a2
Add fallback arch in case arch is not set for setenv-ios.sh 2018-12-09 13:19:27 -05:00
Jeffrey Walton 0aa217b91c
Update comments in config.h
Some comments in config.h were old. Time for a refresh.
Switch from CRYPTOPP_BOOL_ARM64 to CRYPTOPP_BOOL_ARMV8. Aarch32 is ARMv8, and that's the important part.
2018-12-09 10:24:55 -05:00
Jeffrey Walton fbb9b40397
Update Travis Android SDK and NDK gear 2018-12-09 09:43:15 -05:00
Jeffrey Walton 709ca5c480
Update Travis Android SDK and NDK gear 2018-12-09 09:39:38 -05:00
Jeffrey Walton 354e7ca7c9
Update Travis Android SDK and NDK gear 2018-12-09 08:11:04 -05:00
Jeffrey Walton e08898b215
Squash Android SDK warning
Also see https://stackoverflow.com/a/47028911/608639
2018-12-09 06:36:52 -05:00
Jeffrey Walton b6acde8327
Add setenv-travis script 2018-12-09 06:04:53 -05:00
Jeffrey Walton 123b0725cf
Update Travis Android SDK and NDK gear 2018-12-09 04:52:06 -05:00
Jeffrey Walton 7a191ba42d
Update Travis Android SDK and NDK gear 2018-12-09 04:51:07 -05:00
Jeffrey Walton 435b7cabd3
Update Travis Android SDK and NDK gear 2018-12-09 04:19:00 -05:00
Jeffrey Walton b324f18777
Increase git clone depth for Travis 2018-12-09 03:31:50 -05:00
Jeffrey Walton 872c9487e5
Rename VS2005 files with dashes to underscores (GH #736) 2018-12-08 13:26:54 -05:00
Jeffrey Walton 99b7a73047
Add missing iOS architectures for Travis 2018-12-08 12:50:16 -05:00
Jeffrey Walton 7777704a38
Move iOS simulator builds to allowed_failures in Travis 2018-12-08 11:40:53 -05:00
Jeffrey Walton 95964fd0b3
Backout setenv-ios.sh changes
The changes did not help
2018-12-08 11:31:30 -05:00
Jeffrey Walton d1156ddfc6
Try -watchos_simulator_version_min and -tvos_simulator_version_min 2018-12-08 10:37:57 -05:00
Jeffrey Walton d48192d190
Remove -no_new_main from Apple Watch and TV simulators
It did not help...
2018-12-08 10:24:58 -05:00
Jeffrey Walton 1e9a487b47
Clear Clang warning about C++11 template extension
"warning: non-type template argument referring to function 'F' with internal linkage is a C++11 extension". Also see https://travis-ci.org/noloader/cryptopp/jobs/465328751
2018-12-08 09:51:42 -05:00
Jeffrey Walton 55b1535a18
Try to fix Watch and TV simulator link error
Something about a missing _start symbol. I'm not sure if -no_new_main is the solution or not. Also see https://stackoverflow.com/q/24841283/608639.
2018-12-08 09:03:38 -05:00
Jeffrey Walton c531c1c550
Add iOS Watch and TV simulator testing 2018-12-08 08:28:53 -05:00
Jeffrey Walton c52e99a3c1
Fix ANDROID_HOME path
ANDROID_HOME is /c/Users/Jeff/.android on desktops. It is a place where user's private data goes, like Android debug signing keys. It is not the SDK directory like answered on Stack Overflow.
2018-12-08 08:24:27 -05:00
Jeffrey Walton 5124ff7b20
Use OS X 10.1 image for Travis testing 2018-12-08 08:08:08 -05:00
Jeffrey Walton 8c4f38b27d
Update comments 2018-12-08 00:01:38 -05:00
Jeffrey Walton eee358b025
Fix DataDir for C++03 and below (GH #760) 2018-12-07 23:42:31 -05:00
Jeffrey Walton 5b0df2592a
Handle test vectors with extensions 2018-12-07 14:25:10 -05:00
Jeffrey Walton 1c88fd6f59
Add search for test vectors and test data (GH #760) 2018-12-07 12:25:52 -05:00
Jeffrey Walton 52035583de
Cleanup Panama cihers 2018-12-07 01:46:49 -05:00
Jeffrey Walton 08aa7724cd
Disable Panama ASM on X86 (GH #758) 2018-12-06 18:28:56 -05:00
Jeffrey Walton f74b8c8344
Fix -Wreorder warning using GCC 2018-12-06 08:39:19 -05:00
Jeffrey Walton fd15d998be
Update comments 2018-12-05 19:53:14 -05:00
Jeffrey Walton 7656ff2b49
Fix Fedora and Red Hat feature tests
They use a hardened build and include flags like -Werror=XXX and -Wp,FORTIFY_SOURCE
2018-12-05 18:35:21 -05:00
Jeffrey Walton a6067da355
Fix Fedora and Red Hat feature tests
They use a hardened build and include flags like -Werror=XXX and -Wp,FORTIFY_SOURCE
2018-12-05 18:30:25 -05:00
Jeffrey Walton 8769302a8b
Add CRYPTOPP_DISABLE_MIXED_ASM define and feature test (GH #756, PR #757) 2018-12-05 13:22:10 -05:00
Jeffrey Walton 4b295f1f32
Use const_cast instead of reinterpret_cast 2018-12-04 22:12:07 -05:00
Jeffrey Walton 7832ae3733
Switch to uintptr_t for IsAlignedOn
I thought this might be part of the problem for https://groups.google.com/d/msg/cryptopp-users/sHCHSjM7scY/PkcSbIo-DQAJ but it did not help. However, the uintptr_t is the proper cast here.
2018-12-04 21:42:23 -05:00
Jeffrey Walton a1c89661bc
Fix -xarch for CLMUL on Solaris 2018-12-04 18:32:45 -05:00
Jeffrey Walton cdefa5befe
Test Travis Xenial build
I can't test on my fork at the moment because it is tied up with some other changes. Also see https://blog.travis-ci.com/2018-11-08-xenial-release.
2018-12-04 11:05:16 -05:00
Jeffrey Walton 482151a980
Fix Aarch64 with early GCC 2018-12-04 05:49:21 -05:00
Jeffrey Walton 800dd99c60
Add init priorities for XLC compilers 2018-12-04 04:13:58 -05:00
Jeffrey Walton 71ce30f75f
Whitespace check-in 2018-12-04 03:56:47 -05:00
Jeffrey Walton fc5019a89e
Add test_x86_avx512.cxx (GH #753) 2018-12-04 00:11:33 -05:00
Jeffrey Walton 53bdcb2053
Add test_x86_avx512.cxx (GH #753) 2018-12-04 00:09:56 -05:00
Jeffrey Walton 13f7bd7ffb
Make GF2_32 class member of RawIDA 2018-12-03 08:32:22 -05:00
Jeffrey Walton 0b1162aa34
Update documentation 2018-12-03 06:55:57 -05:00
Jeffrey Walton 6729b29410
Move DEFAULT_CHANNEL and AAD_CHANNEL defs into cryptlib.cpp (GH #751)
The library used to provide DEFAULT_CHANNEL and AAD_CHANNEL this way. We experienced Static Initialization Order Fiasco crashes on occassion, so we moved them into cryptlib.h with internal linkage. The cost was, each translation unit got a copy of the strings which contributed to bloat. Issue 751 shows Clang compiles the global constructors for DEFAULT_CHANNEL and AAD_CHANNEL above the base ISA so we caught crashes on OS X with down-level hardware.

We are now at a "pick your poison" point. We selected Static Initialization Order Fiasco because it seems to be less prevalent.

Hat tip to the C++ Committee for allowing this problem to fester for three decades.
2018-12-03 06:33:15 -05:00
Jeffrey Walton 318d53f6f9
Avoid use of NDEBUG in source files
Posix NDEBUG causes our test script to fail the Posix Assert test
2018-12-03 04:18:41 -05:00
Jeffrey Walton 774454ba7c
Cleanup Disable rules for x86 2018-12-01 21:33:17 -05:00
Jeffrey Walton 62b1b7d65b
Update comments 2018-12-01 13:13:35 -05:00
Jeffrey Walton de2c09eea5
Remove unneeded test program 2018-12-01 12:49:57 -05:00
Jeffrey Walton 92ae496c80
Update GNUmakefile-cross for feature tests (GH #741) 2018-12-01 12:48:47 -05:00
Jeffrey Walton 07209942a4
Clear unused variable warnings on iOS 2018-12-01 11:25:36 -05:00
Jeffrey Walton a49e2ee2e7
Clear unused variable warnings on iOS 2018-12-01 11:25:18 -05:00
Jeffrey Walton b8bf4540ff
Fix simulator SDK 2018-12-01 10:50:32 -05:00
Jeffrey Walton 42de69d883
Update ARM recipes 2018-12-01 10:42:20 -05:00
Jeffrey Walton d9288fa870
Add additional ARM test programs
The SHA512 and SHA3 programs need fixing, but they are stubbed out
2018-12-01 10:33:04 -05:00
Jeffrey Walton 8ae7e45cc1
Initialize ARM test program variables 2018-12-01 09:38:54 -05:00
Jeffrey Walton 3b6ef04973
Initialize ARM test program variables 2018-12-01 09:37:23 -05:00
Jeffrey Walton 9e5ba86d7b
Fix Macports build on old hardware
We needed to detect MacPorts earlier so the flags are used in TCXXFLAGS
2018-12-01 06:04:45 -05:00
Jeffrey Walton cecd2fd66c
Remove language dependent BAD_RESULT variable from Makefile 2018-12-01 04:02:15 -05:00
Jeffrey Walton 41d4fcecbd
Fix typo 2018-12-01 03:55:39 -05:00
Jeffrey Walton 06c0c27e10
Update test programs for x86 and ARM (GH #741) 2018-12-01 03:16:54 -05:00
Jeffrey Walton 28aa02b860
Clear SunCC warning on extra ';' 2018-12-01 02:44:21 -05:00
Jeffrey Walton 6028a6921a
Fix SIGILL in TestDARN() function
I thought this was due to trying to call the darn instruction even though g_hasDARN == false on Power8. However, the problem turned out to be a Power9 load was used when DARN class threw a DARN_Err.
2018-11-30 09:12:35 -05:00
Jeffrey Walton 3e909c13d4
Add IBM XLC init priority support 2018-11-30 08:23:35 -05:00
Jeffrey Walton 52613240ae
Update documentation 2018-11-30 08:22:30 -05:00
Jeffrey Walton af7cdcdbec
Update documentation 2018-11-30 05:57:02 -05:00
Jeffrey Walton b87ef5d5cf
Update documentation 2018-11-30 05:48:41 -05:00
Jeffrey Walton fd5e35fcb6
Fix SIGILL on Linux when using XLC for DARN 2018-11-30 05:28:44 -05:00
Jeffrey Walton 8fba667250
Initialize Intel intrinsic variables 2018-11-28 23:44:03 -05:00
Jeffrey Walton f07f01f415
Add Power9 Random Number Generator support (GH #747, PR #748)
This adds the missing changes to the Windows source files
2018-11-28 21:51:39 -05:00
Jeffrey Walton 603d37b28b
Fix type for XLC features ladder 2018-11-28 21:35:07 -05:00
Jeffrey Walton 5d9ecc2b2e
Align GNUmakefile with Autotools and CMake 2018-11-28 19:58:58 -05:00
Jeffrey Walton ee5b0562b9
Make temporary buffer a SecBlock for zeroization 2018-11-27 22:59:41 -05:00
Jeffrey Walton 09bda53fc0
Fix PowerMac compile on G4's and G5's 2018-11-27 21:17:47 -05:00
Jeffrey Walton 5685b0fdc4
Guard GCC_DARN_ASM_AVAILABLE on GCC 4.0
The GCC inline assembler is available at GCC 3.2, but we check for 4.0 for expediency
2018-11-27 20:47:00 -05:00
Jeffrey Walton 7a9970f02e
Update comments and cpu feature test 2018-11-27 06:34:44 -05:00
Jeffrey Walton d41085e907
Update documentation 2018-11-27 06:08:51 -05:00
Jeffrey Walton 9ddd6dc93c
Fix CPU_ProbeDARN test
The DARN probe used 64-bit version of the instruction. I think it would have been OK  32-bit binaries, but the 32-bit version is always safe.
2018-11-27 04:46:51 -05:00
Jeffrey Walton 3db34abf2f
Add Power9 Random Number Generator support (GH #747, PR #748) 2018-11-27 02:54:26 -05:00
Jeffrey Walton 1966d13617
Cleanup BLAKE2 m_keyLength and m_digestSize 2018-11-25 02:05:02 -05:00
Jeffrey Walton cfbe382e0c
Update documentation 2018-11-24 06:04:18 -05:00
Jeffrey Walton a00fd95032
Update documentation 2018-11-24 05:01:43 -05:00
Jeffrey Walton b6a73cadfb
Update documentation 2018-11-24 04:57:45 -05:00
Jeffrey Walton 9a987b4867
Fix compile error with GCC on POWER7 2018-11-24 04:43:14 -05:00
Jeffrey Walton 93a9bfbac2
Update documentation 2018-11-24 03:47:16 -05:00
Jeffrey Walton 758e31d5a0
Add 64-bit element rotates for POWER7 2018-11-24 03:27:12 -05:00
Jeffrey Walton cf3dfa2745
Drop uint64x2_p to POWER7
According to the OpenPOWER specs, unsigned long long vectors first appeared in ISA 2.06, which is POWER7. However some support functions, like vec_add, did not arrive until ISA 2.07, which is POWER8.
2018-11-24 02:53:59 -05:00
Jeffrey Walton a4dc4e2237
Update documentation 2018-11-24 02:23:25 -05:00
Jeffrey Walton ad58f0cbdc
Update comments for PowerPC 2018-11-24 02:14:28 -05:00
Jeffrey Walton 51fea1a15e
Add VecLoadAligned for PowerPC 2018-11-24 01:27:44 -05:00
Jeffrey Walton 727de927cc
Add CRYPTOPP_POWER7_ALTIVEC for XLC 12 on AIX workaround 2018-11-24 01:11:54 -05:00
Jeffrey Walton 064650d31e
Avoid IsAlignedOn in VecLoad_ALTIVEC and VecStore_ALTIVEC 2018-11-23 23:58:30 -05:00
Jeffrey Walton a48e387ead
Add missing offset to VecStoreBE 2018-11-23 15:53:58 -05:00
Jeffrey Walton 39aaec7c59
Use vec_revb when POWER9 is available 2018-11-23 12:16:45 -05:00
Jeffrey Walton 4020ba7058
Fix PowerPC compile on Linux 2018-11-22 23:20:55 -05:00
Jeffrey Walton ae5650d498
Fix PowerPC compile on Linux 2018-11-22 22:51:02 -05:00
Jeffrey Walton bc63a78b69
Move Power8 SHA tests into ppc_power8.cpp 2018-11-22 22:41:56 -05:00
Jeffrey Walton 2b5bea7b12
Fix POWER8 compile when -DCRYPTOPP_DISABLE_ALTIVEC 2018-11-22 22:23:44 -05:00
Jeffrey Walton 3efc7752e4
Remove __IBM_ATTRIBUTES
I believe this is C++ attributes, and not GCC attributes
2018-11-22 20:47:35 -05:00
Jeffrey Walton 3ba4dc6052
Use __IBMCPP_NULLPTR from IBM compiler manual 2018-11-22 19:44:41 -05:00
Jeffrey Walton 652d0e42bf
Use __IBM_ATTRIBUTES and __IBM_ALIGNOF__ from IBM compiler manual 2018-11-22 19:18:08 -05:00
Jeffrey Walton 2fe5177d07
Update documentation 2018-11-22 16:54:28 -05:00
Jeffrey Walton 17b7ebeb39
Update documentation 2018-11-22 16:37:41 -05:00
Jeffrey Walton f6de172367
Fix UBsan finding on PowerPC under Clang 7.0 2018-11-22 16:27:16 -05:00
Jeffrey Walton 568d9376a2 Update documentation
Signed-off-by: Jeffrey Walton <noloader@gmail.com>
2018-11-22 13:54:03 -05:00
Jeffrey Walton 64981be36b
Remove unneeded assert in panama.cpp
The code handles both aligned and unaligned cases
2018-11-22 04:28:38 -05:00
Jeffrey Walton 8d4103fb0c
Fix alignment on AIX (GH #745) 2018-11-22 00:15:37 -05:00
Jeffrey Walton 6cf8895bf1
Add additional assert to FixedSizeAllocatorWithCleanup (GH #745)
This assert checks the array we return to the caller is large enough. Spoiler alert... it is not always large enough, like on 64-bit AIX. The linker on AIX appears to align smaller than 8-bytes
2018-11-21 23:04:00 -05:00
Jeffrey Walton 1e8ac49b49
Guard use of _debug_memset with __DEBUG_ALLOC__
This is engaged with IBM XLC's -qheapdebug option
2018-11-21 21:04:20 -05:00
Jeffrey Walton e26b1a0b2a
Add debug heap support on AIX with IBM XLC 2018-11-21 20:19:06 -05:00
Jeffrey Walton be437504c7 Clear "x" might be used before it is set using IBM XLC 2018-11-21 20:15:00 -05:00
Jeffrey Walton 5492101fc0
Fix XLC 13.1 debug builds on Linux 2018-11-21 17:37:19 -05:00
Jeffrey Walton 2caa62a066
Add TCXXFLAGS for compiler and cpu feature testing (GH #741)
This will allow users to specify agreesive warning flags without accidentally failing a feature test. The feature tests are minimal but the system headers could be noisy under elevated warnings
2018-11-21 16:25:34 -05:00
Jeffrey Walton 4db81f2eba
Improve -fPIC and -pthread rules 2018-11-21 15:16:55 -05:00
Jeffrey Walton 322c67f373
Use previous digest size as a default value in BLAKE2 2018-11-21 13:28:21 -05:00
Jeffrey Walton 0d44176fd1
Cleanup debug information from SIMON source files 2018-11-21 13:05:59 -05:00
Jeffrey Walton 0998b40d2d
Disable Altivec for BLAKE2s on AIX 7.1 and XLC 12.01 (GH #743) 2018-11-21 00:25:05 -05:00
Jeffrey Walton a65d55a3fd
Rewrite BLAKE2 classes
The ParameterBlocks for BLAKE2 had undefined behavior. We relied on the compiler packing the bytes in the structure, then we used the first byte as the start of an array.

This rewrite does things correctly. We don't memset the structure, and we don't treat the structure as a contiguous array.
2018-11-20 23:32:35 -05:00
Jeffrey Walton 13bee44388
Update comments 2018-11-20 00:06:34 -05:00
Jeffrey Walton 3be1ae60f8
Clear warning on unitialized rounds 2018-11-19 23:41:34 -05:00
Jeffrey Walton 778f6f122d
Remove potential UB from CFB_CipherConcretePolicy 2018-11-19 23:40:51 -05:00
Jeffrey Walton 081d9110ee
Call VecStore_ALTIVEC by name
The old form could suffer recursion if teplate deduction fails
2018-11-19 20:59:15 -05:00
Jeffrey Walton e6370f3ea1
Fix typo in VecStore 2018-11-19 20:31:06 -05:00
Jeffrey Walton 66b3ba5d66
Update comments 2018-11-19 20:02:51 -05:00
Jeffrey Walton f52a141f6e
Add separate Polynomial Multiply feature test on POWER8 (GH#742) 2018-11-19 18:31:45 -05:00
Jeffrey Walton 215f9dc164
Fix POWER7 runtime detection test (GH #742) 2018-11-19 18:31:00 -05:00
Jeffrey Walton 0de4556b39
Fix feature test programs for early POWER7 machines 2018-11-19 18:29:46 -05:00
Jeffrey Walton 0df98b049a
Improve support for early XLC compilers on POWER7 (GH #742) 2018-11-19 18:28:50 -05:00
Jeffrey Walton 7274827f19
Add test_ppc_vmull.cxx test program 2018-11-19 15:47:04 -05:00
Jeffrey Walton 531ab7e8c5
Update comments 2018-11-19 15:23:29 -05:00
Jeffrey Walton 87565dce75
Add POWER3 test for PowerPC
Issue 656 talks about running on a G4 Macbook
2018-11-19 15:23:07 -05:00
Jeffrey Walton 3681d2fa1f
Update documentation 2018-11-19 13:50:53 -05:00
Jeffrey Walton 201375749b
Update documentation 2018-11-19 13:30:56 -05:00
Jeffrey Walton 4c192ecc18
Whitespace check-in 2018-11-19 04:55:45 -05:00
Jeffrey Walton 7d637ded9c
Cleanup POWER8 SHA code 2018-11-19 04:50:13 -05:00
Jeffrey Walton 2f26de7aab
Add 64-bit element loads and stores 2018-11-19 04:49:51 -05:00
Jeffrey Walton 3129ad4d70
Fix LLVM Clang compile on PowerPC 2018-11-19 02:28:29 -05:00
Jeffrey Walton c9f1a26024
Update test programs for PowerPC (GH #741) 2018-11-19 02:02:43 -05:00
Jeffrey Walton b1929f78d0
Update test programs for PowerPC (GH #741) 2018-11-19 01:36:11 -05:00
Jeffrey Walton f8b1a997c5
Update test programs for PowerPC (GH #741) 2018-11-18 23:41:43 -05:00
Jeffrey Walton 2bb9f49544
Add test_ppc_aes.cxx test program 2018-11-18 22:26:34 -05:00
Jeffrey Walton 1ac7207545
Use clean compile as feature test gate on PowerPC (GH #742) 2018-11-18 20:49:55 -05:00
Jeffrey Walton 76cb99ffe8
Add unexpected to BAD_RESULT 2018-11-18 19:40:34 -05:00
Jeffrey Walton a82e766925
Make CMake configurable in test script 2018-11-18 18:54:57 -05:00
Jeffrey Walton b65ff5293a
Make CMake configurable in test script 2018-11-18 18:49:16 -05:00
Jeffrey Walton 3725c8411b
Move CPU_ProbePower7 and CPU_ProbePower8 into their own source files (GH #742) 2018-11-18 16:35:02 -05:00
Jeffrey Walton 1a06aadbf0
Update comments 2018-11-18 14:54:37 -05:00
Jeffrey Walton 2e68e95a92
Add BLAKE2s and ChaCha CORE SIMD function (GH #656)
The CORE function provides the implementation for ChaCha_OperateKeystream_ALTIVEC, ChaCha_OperateKeystream_POWER7, BLAKE2_Compress32_ALTIVEC and BLAKE2_Compress32_POWER7. Depending on the options used to compile the source files, either POWER7 or ALTIVEC will be used.
This is needed to support the "new toolchain, ancient hardware" use case.
2018-11-18 14:43:48 -05:00
Jeffrey Walton e28b2e0f02
Switch between POWER7 and POWER4 (GH #656)
This is kind of tricky. We automatically drop from POWER7 to POWER4 if 7 is notavailable. However, if POWER7 is available the runtime test checks for HasAltivec(), and not HasPower7(), if the drop does not occur.
All of this goodness is happening on an old Apple G4 laptop with Gentoo. It is a "new toolchain on old hardware".
2018-11-18 12:42:04 -05:00
Jeffrey Walton 70473f0cab
Whitespace check-in 2018-11-18 12:31:44 -05:00
Jeffrey Walton 59ba3b6aca
Switch between POWER7 and POWER4 (GH #656)
This is kind of tricky. We automatically drop from POWER7 to POWER4 if 7 is not available. However, if POWER7 is available the runtime test checks for HasAltivec(), and not HasPower7(), if the drop does not occur.
All of this goodness is happening on an old Apple G4 laptop with Gentoo. It is a "new toolchain on old hardware".
2018-11-18 11:57:33 -05:00
Jeffrey Walton aae108d228
Fix PowerPC-64 detection using Clang 2018-11-18 01:52:42 -05:00
Jeffrey Walton 7f5624db7c
Update Filelist 2018-11-17 15:53:52 -05:00
Jeffrey Walton 889c98b9af
Add Newlib test 2018-11-17 15:50:04 -05:00
Jeffrey Walton 0c6dc33d2b
Fix missing header 2018-11-17 15:32:53 -05:00
Jeffrey Walton 0564266151
Cleanup makefile 2018-11-17 15:28:30 -05:00
Jeffrey Walton b0f77fe7e3
Add additional tests 2018-11-17 15:09:36 -05:00
Jeffrey Walton 147983305a
Use __ALTIVEC__ preprocessor macro for PowerPC 2018-11-17 01:49:48 -05:00
Jeffrey Walton c4c413e3f3
Drop GCM to POWER7 if POWER8 unavailable 2018-11-17 00:47:17 -05:00
Jeffrey Walton bbc5c63d33
Drop GCM to POWER7 on PowerPC
GCM can do some bulk XOR's using the SIMD unit. However, we still need loads and stores to be fast. Fast loads and stores of unaligned data requires the VSX unit
2018-11-17 00:41:49 -05:00
Jeffrey Walton 0ac7b25221
Use C++ compiler for all source files (PR #733) 2018-11-15 19:13:28 -05:00
Blue 2d2f69c235 Fix missing cpu-features.o in shared object (PR #733) 2018-11-15 19:11:29 -05:00
Jeffrey Walton 5ef276411c
Update documentation 2018-11-15 17:52:06 -05:00
Jeffrey Walton 4c5695c51b
Update documentation 2018-11-15 17:40:06 -05:00
Jeffrey Walton f53405b995
Update documentation 2018-11-15 17:21:38 -05:00
Jeffrey Walton cf52307abd
Update documentation 2018-11-15 16:59:11 -05:00
Jeffrey Walton 364017c097
Update documentation 2018-11-15 16:45:56 -05:00
Jeffrey Walton dd111a6174
Update documentation 2018-11-15 16:23:21 -05:00
Jeffrey Walton 512fa101e8
Update documentation 2018-11-15 15:27:42 -05:00
Jeffrey Walton f6e04e5f33
Rename PPC vector functions from VectorFunc to VecFunc 2018-11-15 15:17:49 -05:00
Jeffrey Walton 8e5cd3637e
Update documentation 2018-11-15 12:15:21 -05:00
Jeffrey Walton 98699dde05
Update documentation 2018-11-15 04:39:54 -05:00
Jeffrey Walton 8b4da4ca68
Update comments 2018-11-15 04:12:35 -05:00
Jeffrey Walton e784c04eb0
Update documentation 2018-11-15 03:43:47 -05:00
Jeffrey Walton 89faf39228
Cleanup BLAKE2s 2018-11-15 03:35:39 -05:00
Jeffrey Walton f69b7537f5
Update documentation 2018-11-15 03:27:23 -05:00
Jeffrey Walton 390fed72c5
Add word32 VectorStore overloads 2018-11-15 03:11:36 -05:00
Jeffrey Walton 10f85d6596
Make Altivec vector wraps friendly to downgrades
The way the existing ppc_simd.h is written makes it hard to to switch between the old Altivec loads and stores and the new POWER7 loads and stores. This checkin rewrites the wrappers to use _ALTIVEC_, _ARCH_PWR7 and _ARCH_PWR8. The wrappers in this file now honor -maltivec, -mcpu-power7 and -mcpu=power8. It allows users to compile a source file, like chacha_simd.cpp, with a lower ISA and things just work for them.
2018-11-15 02:11:00 -05:00
Jeffrey Walton 3c7bdf1a26
Add Octet suffix for vec_sld
We need to make room for packed shifts and rotates
2018-11-14 23:32:26 -05:00
Jeffrey Walton d656545875
Remove duplicate functions 2018-11-14 23:20:03 -05:00
Jeffrey Walton 505c58acc1
Add Octet suffix for vec_sld
We need to make room for packed shifts and rotates
2018-11-14 23:12:39 -05:00
Jeffrey Walton fa8e692d84
Switch to compiler macros for PPC header 2018-11-14 22:59:17 -05:00
Jeffrey Walton 4f86bcc39d
Remove -qxlcompatmacros after Commit 96d3fa208e 2018-11-14 20:18:56 -05:00
Jeffrey Walton 96d3fa208e
Fix compile when using XLC with LLVM front-end without -qxlcompatmacros 2018-11-14 20:16:38 -05:00
Jeffrey Walton 7bd02896a0
Fix XLC flags with LLVM front-end 2018-11-14 20:01:05 -05:00
Jeffrey Walton 5b9b9b8d08
Whitespace check-in 2018-11-14 08:24:52 -05:00
Jeffrey Walton 7c9858f89c
Cleanup PowerPC and XLC feature tests 2018-11-14 08:19:39 -05:00
Jeffrey Walton 225ab6cb7b
Drop ChaCha requirements to POWER7
This costs about 0.6 cpb (700 MB/s on GCC112), but it makes the faster algorithm available to more machines. In the future we may want to provide both POWER7 and POWER8
2018-11-14 08:19:13 -05:00
Jeffrey Walton b3941a433d
Fix some IBM XL C/C++ issues 2018-11-13 23:39:39 -05:00
bobsayshilol 7f8d3e8882 Miscellaneos warning fixes (GH #739)
* Fix -pedantic warning in GCC.

* Fix -Wunused-private-field warning.

* Fix -Wkeyword-macro warning.
2018-11-13 22:04:03 -05:00
Jeffrey Walton fc1e98e70d
Make feature test output filename configurable (PR #737, GH #738) 2018-11-13 14:02:40 -05:00
Jeffrey Walton 197f751831
Use Linux EOL conventions 2018-11-13 14:01:05 -05:00
Jeffrey Walton 00fc030fb4
Add test_pthreads.cxx to Filelist 2018-11-13 13:53:15 -05:00
Jeffrey Walton 926e91008b
Use Windows EOL conventions 2018-11-13 13:48:38 -05:00
Jeffrey Walton 69a00192b9
Add return value to pthread test function 2018-11-13 13:43:20 -05:00
Jeffrey Walton dd6af58c98
Add pthreads test 2018-11-13 12:13:16 -05:00
Jeffrey Walton e69106f257
Add "Invalid mnemonic" to bad result on PPC 2018-11-13 01:57:12 -05:00
Jeffrey Walton 27b61d8752
Add CRYPTOPP_INLINE to SIMON and SPECk for debugging 2018-11-13 00:02:34 -05:00
Jeffrey Walton 4da4f7ea2a Add AVX2 arch to chacha_avx.cpp 2018-11-13 00:01:55 -05:00
Jeffrey Walton 57b2bf5708
Switch to VectorLoad overload with one arg 2018-11-12 23:38:46 -05:00
Jeffrey Walton 7515b4d661
Fix SIMON64 and SPECK64 providers 2018-11-12 22:03:26 -05:00
Jeffrey Walton 9550ccc9a3
Port SIMON64 to Altivec
SIMON64 runs about 4x faster than C++ for POWER4 and friends. If POWER7 is available it goes back to full speed due to efficient unaligned loads
2018-11-12 21:51:11 -05:00
Jeffrey Walton a0608a6b80
Port SPECK64 to Altivec
SPECK64 runs about 4x faster than C++ for POWER4 and friends. If POWER7 is available it goes back to full speed due to efficient unaligned loads
2018-11-12 20:56:15 -05:00
Jeffrey Walton b372f7d387
Clear unused variable warning 2018-11-12 16:54:29 -05:00
Jeffrey Walton cff351de11
Simplify Aach64 polynomial multiply tests 2018-11-12 16:50:52 -05:00
Jeffrey Walton 6291e2fbeb
Simplify Aach64 polynomial multiply tests 2018-11-12 16:36:46 -05:00
Jeffrey Walton 75c9775944
Simplify Aach64 polynomial multiply tests 2018-11-12 16:27:48 -05:00
Jeffrey Walton 1070186bc4
Update Filelist.txt 2018-11-12 15:44:05 -05:00
Jeffrey Walton cac97f041d
Rename PPC feature tests to test_ppc_xxx.cxx (PR #737) 2018-11-12 15:43:01 -05:00
Jeffrey Walton ff212dae3e
Rename x86 feature tests to test_x86_xxx.cxx (PR #737) 2018-11-12 15:37:14 -05:00
Jeffrey Walton 41639e5ec6
Fix ARM A-32 and Aarch64 feature tests (PR #737) 2018-11-12 14:59:36 -05:00
Jeffrey Walton 886fd7903d
Remove wildcard from a.out clean recipe 2018-11-12 05:25:01 -05:00
Jeffrey Walton a0f3744ed4
Use __cpp_lib_uncaught_exceptions for CRYPTOPP_CXX17_EXCEPTIONS
Also see https://bugs.llvm.org/show_bug.cgi?id=39631
2018-11-12 03:37:32 -05:00
Jeffrey Walton 499a5e289d
Remove a.out artifacts whenever feature tests run (GH #738) 2018-11-12 01:57:09 -05:00
Jeffrey Walton f91584a7bc
Remove a.out artifacts on OS X during clean (GH #738) 2018-11-12 00:56:54 -05:00
Jeffrey Walton 4e404cceeb
Fix incorrect Macport compiler detection (GH #738) 2018-11-11 13:44:39 -05:00
Jeffrey Walton b163176f82
Fix missing 'no such instruction' in assembler messages (GH #738) 2018-11-11 13:35:03 -05:00
Jeffrey Walton 05f053007b
Make TrimComment call TrimSpace 2018-11-11 12:41:29 -05:00
Jeffrey Walton de75959fd7
Move HAS_NEWLIB down to _XOPEN_SOURCE test 2018-11-11 11:54:58 -05:00
Jeffrey Walton 74ee0eef7e
Update comments 2018-11-11 10:55:51 -05:00
Jeffrey Walton 959d81b236
Fix cryptest.sh are *-simd file rename 2018-11-11 10:03:31 -05:00
Jeffrey Walton 40da78e5ad Cleanup GNUmakefile (PR #737) 2018-11-11 09:59:55 -05:00
Jeffrey Walton 04062661bf
Fix test program header include 2018-11-11 08:43:14 -05:00
Jeffrey Walton 8e83d7a8ff
Use __GNUC__ for POWER8 AES availability test 2018-11-11 08:00:45 -05:00
Jeffrey Walton 213569a46d
Remove Darwin requirement for Port compilers
I seem to recall someone used one on Linux at one time
2018-11-11 07:53:49 -05:00
Jeffrey Walton 8011f023b5
Add test programs to file list (PR #737) 2018-11-11 01:33:41 -05:00
Jeffrey Walton 6e94562c52
Move to feature-based availability testing in Makefile (PR #737) 2018-11-11 01:14:43 -05:00
Jeffrey Walton 087f97edea
Remove patch file 2018-11-10 22:24:23 -05:00
Jeffrey Walton 1db4115add
Allow all Android tests to fail until we fix the script for NDK 16b 2018-11-10 18:57:00 -05:00
Jeffrey Walton 5e48e6560e
Whitespace check-in 2018-11-10 14:10:31 -05:00
Jeffrey Walton b354eee1ed
Add /arch:AVX for chacha_avx.cpp to Nmake recipe 2018-11-10 11:56:56 -05:00
Jeffrey Walton 0ee1cb2ae9
Rename files with dashes to underscores
Also see https://github.com/weidai11/cryptopp/issues/736
2018-11-10 11:55:39 -05:00
Jeffrey Walton 06e1d0c0d9
Add call to _mm256_zeroupper to avoid state penalties
Also see https://stackoverflow.com/a/7841251/608639
2018-11-10 11:39:30 -05:00
Jeffrey Walton cc7d5c1561
Rename files with dashes to underscores
Also see https://github.com/weidai11/cryptopp/issues/736
2018-11-10 11:19:35 -05:00
Jeffrey Walton f3fa10a15c
Rename files with dashes to underscores
Also see https://github.com/weidai11/cryptopp/issues/736
2018-11-10 11:16:39 -05:00
Jeffrey Walton 896225069d
Rename files with dashes to underscores (GH #736)
Also see https://groups.google.com/forum/#!topic/cryptopp-users/HBz-6gZZFOA on the mailing list
2018-11-10 08:00:14 -05:00
Jeffrey Walton 776a2195bd
Re-add static functions to eccrypto.cpp
I think another approach is better for CMake
2018-11-09 21:29:59 -05:00
Jeffrey Walton 9dfc010425
Fix compile with SunCC using CMake
This is likely another SunCC problem.
2018-11-09 21:00:37 -05:00
Jeffrey Walton f839e5093c
Enable SSE2 intrinsics for SunCC 2018-11-09 20:35:27 -05:00
Jeffrey Walton 2106086f1f
Fix Solaris mapfile
The mapfile now removes all hwcaps_1 (SSE-AVX), and hwcaps_2 (AVX2, RDRAND, RDSEED). Unfortunately, it requires  2 and does not work on Solaris 9.
2018-11-09 18:59:04 -05:00
Jeffrey Walton a592d64d1d
Update comments 2018-11-09 17:04:02 -05:00
Jeffrey Walton 656be82a8f
Cleanup ARIA SSE and NEON code 2018-11-09 11:56:47 -05:00
Jeffrey Walton ca9d0f10f6
Use single block for ARIA key 2018-11-09 10:16:40 -05:00
Jeffrey Walton 28e7baf46b
Clear C4456 under MSVC 2018-11-09 09:26:09 -05:00
Jeffrey Walton a75f0cd855
Fix missing comment characters 2018-11-09 08:38:29 -05:00
Jeffrey Walton 092309b266
Fix global optimization bug for ChaCha AVX2 under VS2017 (GH #735)
Also see https://github.com/weidai11/cryptopp/issues/649. The 649 issue is the one affecting AES. It appears to be the same problem.
2018-11-09 08:00:53 -05:00
Jeffrey Walton af9fb9d21e
Add ChaCha to self tests (GH #732) 2018-11-08 22:08:59 -05:00
Jeffrey Walton e6112e35df
Clear C4456 under MSVC 2018-11-08 21:31:25 -05:00
Jeffrey Walton dede7bf6b4
Whitespace check-in 2018-11-08 20:34:22 -05:00
Jeffrey Walton aa1d0a5129
Lower Binutil version to 2.23 for AVX 2018-11-08 19:03:33 -05:00
Jeffrey Walton d9011f07d2
Add ChaCha AVX2 implementation (GH #735) 2018-11-08 16:20:31 -05:00
Jeffrey Walton 9b31bc189c
Fix Solaris hardware cpas to allow AVX and AVX2 2018-11-08 15:38:13 -05:00
Jeffrey Walton cc5eb3919f
Fix compile using SunCC 5.9 2018-11-08 15:08:30 -05:00
Jeffrey Walton 4ddaa9d01d whitespace check-in 2018-11-07 13:18:37 -05:00
Jeffrey Walton f57df06c5e
Disable global optimizations for Rijndael using MSC compiler (GH #649) 2018-11-05 23:45:59 -05:00
Jeffrey Walton 5a36cd54bd
Add meaningful test failure messages 2018-11-05 21:26:16 -05:00
Jeffrey Walton 8b13c2a8d0
Whitespace check-in
Look, we can finally use whitespace to add breaks and make these somewhat readable.
2018-11-05 20:43:11 -05:00
Jeffrey Walton 93c7518900
Improve datatest parser
This switches to line oriented parsing for the test files. Previously we we using streams for names, and lines for values. We can now use whitespace and make the tests a bit more readable by grouping similar tests. AlgorithmType will clear the current accumlated values.
2018-11-05 20:40:39 -05:00
Jeffrey Walton 7c0be4ea8f
Add additional Salsa test vectors 2018-11-05 09:00:32 -05:00
Jeffrey Walton 5de6545827
Add additional test vectors 2018-11-04 20:05:08 -05:00
Jeffrey Walton 4ee0b3e2f6
cryptlib.h 2018-11-04 15:46:44 -05:00
Jeffrey Walton f5bce1ab8c
Fix missing errno on PPC64 with GCC 4.8.5 2018-11-04 15:36:13 -05:00
Jeffrey Walton 6cc763939e
Skip unneeded wrap check in SIMD book keeping (GH #732) 2018-11-04 15:35:34 -05:00
Jeffrey Walton 29be6ed97a
Work-around potential counter increment problem in ChaCha20 (GH #732)
This is only a work-around for the moment. The issue only affects SIMD code. The problem is, the algorithm we use performs a 32-bit add as an intermediate result, but we really need a 64-bit add. We are running 4 transforms in parallel, and we can't add and carry the way we need to.

The workaround is, whenever we could cross the 32-bit counter boundary we use the C version of the transform. We determine the cross-over point by 'bool safe = 0xffffffff - state.low > 4'. When not safe we skip the SIMD version of the algorithm and use the C version. Once we are safe again we use the SIMD version again.

The work-around costs us about 0.1 to 0.2 cpb. At 1.10 or 1.15 cpb that equates to about 200 MB/s on a Skylake. We'd like to get it back eventually.
2018-11-04 14:49:26 -05:00
Jeffrey Walton d7a3562c0b
Whitespace check-in 2018-11-04 14:36:55 -05:00
Jeffrey Walton 87d679bc7e
Add additional ChaCha20 test vectors (GH #732)
The additional tests ensure we cross the 32-bit boundary used by the state counters
2018-11-04 14:34:32 -05:00
Jeffrey Walton 40fa6873f9
Add ability to Seek64 in test framework (GH #732)
Also see https://github.com/randombit/botan/pull/1728
2018-11-04 14:21:54 -05:00
Jeffrey Walton f7c0fab5b2
Fix compile on early Apple platforms.
I think this may be related to the VectorSource check-in. The error is:

algparam.h: In constructor 'ConstByteArrayParameter::ConstByteArrayParameter(const T&, bool) [with T = std::vector<byte, std::allocator<byte> >]':
filters.h:1444:   instantiated from here
algparam.h:56: error: 'const class std::vector<byte, std::allocator<byte> >' has no member named 'data'
2018-11-03 20:00:29 -04:00
Jeffrey Walton a4d97e9bf8
Use vec_shleft_octet to avoid confusion with vec_extract 2018-11-03 19:29:08 -04:00
Jeffrey Walton 4e3d160acc
Update comments 2018-11-03 18:56:59 -04:00
Jeffrey Walton 43cf1f0d95
Use vec_sldo to avoid confusion with vec_extract 2018-11-03 17:34:36 -04:00
Jeffrey Walton aee045912a
Whitespace check-in 2018-11-03 16:42:35 -04:00
Jeffrey Walton 6aa6393bf3
Update documentation 2018-11-03 11:17:54 -04:00
Jeffrey Walton 4b4dbdb90a
Update documentation 2018-11-03 11:09:09 -04:00
Jeffrey Walton bdeaae3ac9
Fix disjoint t[] and f[] when using SIMD implementations 2018-11-03 10:49:22 -04:00
Jeffrey Walton 600e2a8be4
Rewrite BLAKE2 classes to remove intermediate base class 2018-11-03 10:33:35 -04:00
Jeffrey Walton 06867e5caf
Guard BLAKE2 on CRYPTOPP_ALTIVEC_AVAILABLE 2018-11-03 05:50:34 -04:00
Jeffrey Walton dfacc9f15c
Use CRYPTOPP_ALTIVEC_AVAILABLE values over defined
This allows users to -DCRYPTOPP_ALTIVEC_AVAILABLE=0 on the command line. It is especially important on PPC, which varies wildly among compilers dating back to the 2000's
2018-11-03 05:25:52 -04:00
Jeffrey Walton aa7e90903e
Remove unneeded #undef's from BLAKE2_Compress32_POWER7 2018-11-02 21:24:55 -04:00
Jeffrey Walton d68d01066f
Cleanup return statements in PowerPC's VectorSet32 2018-11-02 21:23:41 -04:00
Jeffrey Walton fc17f160ac
Remove unneeded BLAKE2B_IV from Blake2s source file 2018-11-02 19:21:57 -04:00
Jeffrey Walton 5dca85b819
Split Blake2 SIMD files into blake2s-simd.cpp and blake2b-simd.cpp (GH #729, GH #731)
The split was required for Blake2b and Power8; Blake2s only requires Power7
2018-11-02 19:09:36 -04:00
Jeffrey Walton d2b64a4d63
Add BLAKE2b Power8 implementation (GH #731) 2018-11-02 18:34:46 -04:00
Jeffrey Walton 1fd8ac8b8b
Use vec_perm on PowerPC little-endian for GCC 2018-11-01 14:05:34 -04:00
Jeffrey Walton c6d2729954
Update comments 2018-11-01 13:32:42 -04:00
Jeffrey Walton bcfd8444e5
Use vec_mergeh and vec_mergel for PowerPC
Origian benchmarks showed no material difference. However, today we are seeing up to 0.4 cpb profit on GCC112.
2018-11-01 13:07:49 -04:00
orangefour 20f82c067e Add VectorSource (GH #730) 2018-11-01 06:49:04 -04:00
Jeffrey Walton 7c5da3e1ca
Update comments 2018-10-31 02:42:25 -04:00
Jeffrey Walton a19385a684
Fix mask names
This follows IBM convention, where the lowest memory address is "high", and the highest memory address is "low"
2018-10-30 19:35:16 -04:00
Jeffrey Walton 95d454841c
Update documentation 2018-10-30 09:42:42 -04:00
Jeffrey Walton 659c0c113c
Add BLAKE2b Power8 implementation (GH #729) 2018-10-30 06:20:31 -04:00
Jeffrey Walton 81db4ea5e3
Switch to pch.cpp for compile tests.
adhoc.cpp was a bit uncomfortable because we had to copy it out from adhoc.cpp.proto. For some reason CMake could not perform the copy, so we started using pch.cpp in CMake. This commit keeps them consistent.
We may have problems with one test, and that is the Newlib tests. I seem to recall they a C++ header included to properly identify its use. We cross that bridge during MinGW testing.
2018-10-29 08:41:54 -04:00
Jeffrey Walton ffe63caae5
Add CXX awareness to CMake test script 2018-10-29 04:58:32 -04:00
Jeffrey Walton 1ff6f39ec6
Add proper declaration for Kalyna tables; and split from definitions 2018-10-28 06:09:46 -04:00
Jeffrey Walton 1d0c6dd916
Cleanup SHA SIMD source file
Add proper declaration for SHA256_K and SHA512_K tables; and split from definitions
2018-10-28 04:45:26 -04:00
Jeffrey Walton c601213ce1
Sync CRYPTOPP_{BIG|LITTLE}_ENDIAN with Autotools
Autotools sets up its config.h file with the '#define XXX 0' or '#define XXX 1' pattern. This check-in makes the sources Autotools aware. We need to verify CMake does the same
2018-10-28 04:24:22 -04:00
Jeffrey Walton e185cbd803 Revert "Sync CRYPTOPP_{BIG|LITTLE}_ENDIAN with Autotools"
This reverts commit 04306f86ac. It broke GCC 4.8 on PowerPC.
2018-10-28 03:42:50 -04:00
Jeffrey Walton a7615a8c7c
Add packed 32-bit Shuffle specializations for ChaCha on Power8 2018-10-28 00:48:18 -04:00
Jeffrey Walton 542140621a
Update comments 2018-10-27 14:01:25 -04:00
Jeffrey Walton a281cd9d48
Add ChaCha recipes to GNUmakefile-cross 2018-10-27 12:59:29 -04:00
Jeffrey Walton e9e317525e
Whitespace check-in 2018-10-27 12:49:22 -04:00
Jeffrey Walton 1cf4f98df8
Update comments 2018-10-27 12:46:01 -04:00
Jeffrey Walton 06d0072d6a
Add CRYPTOPP_DISABLE_ASM to dependency recipe
This stops the inclusion of SSE headers without arch options that break the recipe
2018-10-27 11:34:11 -04:00
Jeffrey Walton d7d76fa5f7
Add ChaCha Power8 implementation 2018-10-27 08:40:07 -04:00
Jeffrey Walton 04306f86ac
Sync CRYPTOPP_{BIG|LITTLE}_ENDIAN with Autotools 2018-10-27 07:30:15 -04:00
Jeffrey Walton 8b00a9ff3f
Fix compile error on AIX
Apparently "hz" is an identifier somewhere in the bowels AIX standard headers
2018-10-27 06:52:59 -04:00
Jeffrey Walton 5dfa9086b7
Add VectorStore(byte*, vector) overload 2018-10-27 06:25:05 -04:00
Jeffrey Walton 5e897710e8
Update documentation 2018-10-27 06:19:59 -04:00
Jeffrey Walton 5d1de662bb
Spelling 2018-10-27 03:33:29 -04:00
Jeffrey Walton 55bb2c8b03
Update documentation 2018-10-27 02:05:49 -04:00
Jeffrey Walton 2b4911abee
Update documentation 2018-10-27 00:48:10 -04:00
Jeffrey Walton 16768df2e5
Update documentation 2018-10-26 19:29:15 -04:00
Jeffrey Walton ca97f6fafb
Add addition helper for Aarch32 and Aarch64
Update comments
2018-10-26 13:42:09 -04:00
Jeffrey Walton 21d69598ab
Add CRYPTOPP_DISABLE_ASM to dependency recipe
This stops the inclusion of SSE headers without arch options that break the recipe
2018-10-26 11:10:07 -04:00
Jeffrey Walton c0b273dac8
Remove xorInput parameter from ChaCha SIMD functions
We can use the input pointer directly after checking KeystreamOperation
2018-10-26 10:10:52 -04:00
Jeffrey Walton 61a696f710
Update comments 2018-10-26 04:26:18 -04:00
Jeffrey Walton 8da2b91cba
Add ChaCha AlgorithmName override 2018-10-26 03:13:06 -04:00
Jeffrey Walton 76ab8ffa4b
Update comments 2018-10-26 03:12:46 -04:00
Jeffrey Walton c992fe98a9
Fix failed compile on Ubuntu with -msse2
Also see https://github.com/noloader/cryptopp-cmake/issues/36
2018-10-26 02:43:35 -04:00
Jeffrey Walton 99c65bdb35
Rename ARM Shuffle() to Extract()
Extract() is the equivalent to SSE's _mm_shuffle_epi32(), but ARM naming calls it vector extract
2018-10-26 00:44:10 -04:00
Jeffrey Walton d3a3189ba3
Sync CRYPTOPP_ARM_ACLE_AVAILABLE with Autotools 2018-10-25 14:08:09 -04:00
Jeffrey Walton b4b3623938
Whitespace check-in 2018-10-25 12:15:33 -04:00
Jeffrey Walton b1050636a6
Add ChaCha NEON implementation 2018-10-25 12:08:32 -04:00
Jeffrey Walton 352083b1d0
Cleanup HC128 and HC256 OperateKeystream 2018-10-25 08:24:13 -04:00
Jeffrey Walton ba5ca6b8cd
Add XOP aware BLAKE2b and BLAKE2s 2018-10-25 06:35:43 -04:00
Jeffrey Walton f33b19bf00
Add XOP aware Salsa20 2018-10-25 05:24:02 -04:00
Jeffrey Walton daa07255ec
Fix ambiguous symbol BTEA::StaticAlgorithmName (GH #726) 2018-10-25 02:16:15 -04:00
Jeffrey Walton ecbf791015
Remove unneeded SIMON128 functions in simon64-simd.cpp
This looks like artifacts from when we split simon-simd.cpp into simon64-simd.cpp and simon128-simd.cpp.
2018-10-24 19:02:20 -04:00
Jeffrey Walton 67f421174c
Add XOP aware SIMECK 2018-10-24 17:49:04 -04:00
Jeffrey Walton babdf8b38b
Add XOP aware CHAM and LEA 2018-10-24 17:12:03 -04:00
Jeffrey Walton 210995b867
Add XOP aware SIMON and SPECK 2018-10-24 16:55:59 -04:00
Jeffrey Walton ed4d57cecb
Add XOP aware ChaCha
ChaCha is about 50% faster using XOP for the rotates on AMD machines
2018-10-24 16:15:13 -04:00
Jeffrey Walton b4c4c5aa14
Add SSSE3 rotates when available
This change obtains the remaining 0.1 to 0.15 cpb. It should be engaged with -march=native
2018-10-24 15:34:54 -04:00
Jeffrey Walton c43c47e590
Fix _mm_roti_epi32 and _mm_roti_epi64 redefined on Fedora ar -O0 2018-10-24 13:32:53 -04:00
Jeffrey Walton 18dcbdf514
Move input xor to ChaCha_OperateKeystream_SSE2
This picks up about 0.2 cpb in ChaCha::OperateKeystream. It may not sound like much but it puts SSE2 intrinsics version on par with the ASM version of Salsa20. Salsa20 leads ChaCha by 0.1 to 0.15 cpb, which equates to about 50 MB/s.
2018-10-24 11:00:35 -04:00
Jeffrey Walton d230999b40
Fix ChaCha compile on ARM and MIPS 2018-10-24 01:11:45 -04:00
Jeffrey Walton 6a5d2ab03d
Remove unneeded params from ChaCha_OperateKeystream_SSE2 2018-10-23 08:52:29 -04:00
Jeffrey Walton 028a9f0494
Remove old comments from chacha.cpp
This should have been done at 916c4484a2
2018-10-23 08:12:02 -04:00
Jeffrey Walton 4ad8fa9efe
Fix cryptest.vcxproj.user after 916c4484a2 check-in 2018-10-23 08:05:24 -04:00
Jeffrey Walton 916c4484a2
Add ChaCha SSE2 implementation
Thanks to Jack Lloyd and Botan for allowing us to use the implementation.
The numbers for SSE2 are very good. When compared with Salsa20 ASM the results are:
  * Salsa20 2.55 cpb; ChaCha/20 2.90 cpb
  * Salsa20/12 1.61 cpb; ChaCha/12 1.90 cpb
  * Salsa20/8 1.34 cpb; ChaCha/8 1.5 cpb
2018-10-23 07:57:59 -04:00
Jeffrey Walton 35b874b527
Add additional ChaCha tests 2018-10-23 07:35:41 -04:00
Jeffrey Walton dc840e49a6
Make datatest.cpp more tolerant of comments 2018-10-23 07:09:22 -04:00
Jeffrey Walton 322cda8e6e
Whitespace check-in 2018-10-23 07:08:33 -04:00
Jeffrey Walton 88af6d7230
Remove extraneous folder from PR (GH #723) 2018-10-22 07:53:23 -04:00
orangefour 253f1ba5da Fix unused variable warnings (GH #723) 2018-10-22 07:50:04 -04:00
Jeffrey Walton 8790467fac
Fix constants buffers in TestPadlockRNG 2018-10-21 12:23:31 -04:00
Jeffrey Walton e0d37b22f8
Remove unused variable from TestPadlockRNG 2018-10-21 11:48:41 -04:00
Jeffrey Walton 5e19ac7e48
Update comments in Doxygen config file 2018-10-20 22:55:21 -04:00
Jeffrey Walton 1d0c659fd7
Fix compile error when NO_OS_DEPENDENCE 2018-10-20 07:36:11 -04:00
Jeffrey Walton 1de4f39f86
Add CRYPTOPP_DISABLE_ASM for Google Native Client (GH #719) 2018-10-20 06:31:51 -04:00
Jeffrey Walton 3063c6e1d9
Whitespace check-in 2018-10-20 06:11:46 -04:00
Jeffrey Walton 180b39facc
Disable SecureWipe specializations when CRYPTOPP_DISABLE_ASM (GH #719) 2018-10-20 05:54:49 -04:00
Jeffrey Walton c315c669b7
Disable server-side Doxygen search
This may be contributing to OOM kills in our low-memory environment
2018-10-19 22:19:49 -04:00
Jeffrey Walton c0471236f4
Use version 7.0 rather than 6.2
We had to perform a major version bump due to an ABI break
2018-10-19 20:43:23 -04:00
Jeffrey Walton 9be27c86c6
Fix TestMersenne validation 2018-10-19 07:17:05 -04:00
Jeffrey Walton cab699d7c8
Bail early from test script if initial tests fail 2018-10-19 07:16:35 -04:00
Jeffrey Walton 26fcdb55cd
Add additional RNG tests 2018-10-19 04:57:10 -04:00
Jeffrey Walton ce4af5b85f
Add Test_RandomNumberGenerator function
Copy and paste gone wrong... This cleaned up a lot of tests by folding the code into one function.
2018-10-18 08:59:00 -04:00
Jeffrey Walton 6462152534
Clear MS LNK4221 and libtool warnings 2018-10-17 04:27:54 -04:00
Jeffrey Walton ca08d63a10
Add SIMON and SPECK to validation suite 2018-10-14 10:45:46 -04:00
Jeffrey Walton d6eaa5098e
Remove DEFAULT_BLOCKSIZE constants (GH #535)
This should have been removed around January 2018 with the other functions.
2018-10-14 09:18:45 -04:00
Jeffrey Walton 23279dcd45
Update documentation 2018-10-14 08:21:56 -04:00
Jeffrey Walton 7bd9ffcaca
Remove StaticGetValidBlockSize (GH #535)
This should have been removed around January 2018 with the other functions.
2018-10-14 08:01:25 -04:00
Jeffrey Walton 6660982a55
Allow Cryptogam's AES thunk to be inlined 2018-10-14 07:39:08 -04:00
Jeffrey Walton 4e78abe584
Use HertzToString for friendly CPU speed 2018-10-14 03:50:13 -04:00
Jeffrey Walton c65cd7c365
Use Cycles/Byte for table heading 2018-10-14 02:49:22 -04:00
Jeffrey Walton 0d6c86bae6
Update comments 2018-10-14 00:30:23 -04:00
Jeffrey Walton 49d852ee8c
Enable same buffer for in and out on ARM A-32 (GH #683) 2018-10-13 22:16:59 -04:00
Jeffrey Walton 1acbedd4f8
Fix spelling and grammar 2018-10-13 22:15:41 -04:00
Jeffrey Walton cc5baa9c33
Fix typo in AdvancedProcessBlocks64_6x2_NEON
AdvancedProcessBlocks64_6x2_NEON was only used by Simon and Speck. It was causing failures in wide-block tests for CBC decryption only.
2018-10-13 19:20:08 -04:00
Jeffrey Walton fb303f5180
Fix unset MAKE variable in test scripts 2018-09-26 16:22:19 -04:00
Jeffrey Walton 1d5eaf5268
Fix test scripts on ancient Bash
This showed up on Solaris 9 with Bash 2.05. Also see https://unix.stackexchange.com/q/468579/56041
2018-09-12 13:06:28 -04:00
Jeffrey Walton 590f8573c4
Fix LegacyDecryptor and LegacyDecryptorWithMAC (GH #714)
The classes used the wrong hash with the MAC. The legacy gear should have used SHA1, not SHA256.
2018-09-10 21:55:08 -04:00
Jeffrey Walton d0946abb0b
Use in cryptest-cmake.sh test 2018-09-10 09:00:25 -04:00
Jeffrey Walton fc5a73186f
Make config.sub and config.guess +w before download 2018-09-09 14:28:52 -04:00
Jeffrey Walton edbd57a41f
Make config.sub and config.guess +x after download 2018-09-09 12:00:54 -04:00
Jeffrey Walton b51faab9b3
Update comments in GNU Makefile 2018-09-09 03:44:50 -04:00
Jeffrey Walton 03297cdfa6
Add -xregs=no%appl for SunCC on Sparc 2018-09-09 03:01:10 -04:00
Jeffrey Walton 9a8b4a8024
Make TestStringSink a debug test 2018-09-08 21:52:14 -04:00
Jeffrey Walton ae34c2d2ff
Add throw to test recover plain text for DefaultDecryptorWithMAC 2018-09-08 17:08:44 -04:00
Jeffrey Walton 4ff34ee329
Add DefaultDecryptorWithMAC using binary file test
Also see https://groups.google.com/d/msg/cryptopp-users/QxPxSHkLM-4/pWmoBRuaBQAJ
2018-09-08 12:10:46 -04:00
Mouse ac43bee698
Merge pull request #334 from orangefour/feature/vector_sink
Add VectorSink
2018-09-05 15:56:55 -04:00
orangefour 9b81a545fc Add VectorSink 2018-09-05 09:25:09 +02:00
Jeffrey Walton 44cd7eb1ed
Fix missed conditions for XTR-DH domain parameters generation
Formerly we used asserts and they would fire on occassion. This commit makes the condition part of the generation process to avoid the assert.
2018-09-04 23:32:59 -04:00
Jeffrey Walton c01606e305
Add additional assert 2018-09-03 18:53:07 -04:00
Jeffrey Walton aa45eca561
Clear documentation warning due to specialization
The specialization pivoted on T_Align16 so it is not longer a template parameter
2018-08-28 21:27:48 -04:00
Jeffrey Walton a77f529ec2
Update cryptest-autotools.sh
Update config.sub and config.guess per GNU recommendations
2018-08-28 15:19:28 -04:00
Jeffrey Walton a552eff2fe
Break-up long lines in cryptest.nmake 2018-08-27 21:16:50 -04:00
Jeffrey Walton e8bf53cd9f
Fix Android Aarch32/Aarch64 code paths in neon-simd.cpp 2018-08-26 02:02:26 -04:00
Jeffrey Walton e8fc1b0422
Fix Android Aarch32/Aarch64 code paths in neon-simd.cpp 2018-08-26 01:54:38 -04:00
Jeffrey Walton eba078838f
Enable server-side search for Doxygen manual
It is too bad it does not work...
2018-08-24 14:09:08 -04:00
Jeffrey Walton 4fb9fbf5ac
Update comments 2018-08-24 12:19:42 -04:00
Jeffrey Walton beed647df2
Update assert 2018-08-24 09:25:19 -04:00
Jeffrey Walton 1bbbfb6b75
Fix partial specializations for FixedSizeAllocatorWithCleanup (PR #710)
Commit afbd3e60f6 effectively treated a symptom and not the underlying problem. The problem was linkers on 32-bit systems ignore CRYPTOPP_ALIGN_DAT(16) passed down by the compiler and align to 8-bytes or less. We have to use Wei's original code in some places. It is not a bad thing, but the bit fiddling is something we would like to contain a little more by depending more on language or platform features.

This commit keeps the original changes which improve partial specializations; but fixes 32-bit linker behavior by effectively reverting afbd3e60f6 and e054d36dc8. We also add more comments so the next person has understands why things are done they way they are.
2018-08-24 08:13:23 -04:00
Jeffrey Walton 243673c32a
Add notes on -stdlib=libc++ for MacOS 2018-08-24 04:43:12 -04:00
Jeffrey Walton afbd3e60f6
Fix alignment on Win32 and Solaris Sparc (PR #709)
These fixes were interesting in a morbid sort of way. I thought the FixedSizeAllocatorWithCleanup specializations faithfully reproduced semantics but I was wrong on Win32 and Sparc. Also see Commit e054d36dc8.

It seems there was another requirement or dependency that we missed, but it was not readily apparent. If I am parsing results correctly (which I may not be), it appears the bit twiddling using 8 byte alignment had more influence on alignment than I originally thought based on use of CRYPTOPP_BOOL_ALIGN16 and T_Align16. Or maybe the alignment attributes specified by CRYPTOPP_ALIGN_DATA are not being honored like they should for stack allocations.

This check-in avoids some uses of x86 movdqa (aligned) in favor of movdqu (unaligned). The uses were concentrated on memory operands which were 8-byte aligned instead of 16-byte aligned. It is not clear to me how the specializations lost 8-bytes of alignment. The check-in also enlists CRYPTOPP_ASSERT to tell us when there's a problem so we don't need to go hunting for bugs.
2018-08-23 14:42:29 -04:00
Jeffrey Walton e054d36dc8
Add partial specializations for FixedSizeAllocatorWithCleanup
This allocator still has some demons buried inside due to the bit fiddling. This commit should isolate the demons to aligned stack allocations when an alignment facility from the platform or OS is not available. That is, we use CRYPTOPP_ALIGN_DATA when we can because it is most reliable.
We can tell when things have gone sideways using Debug builds. The CRYPTOPP_ASSERT(m_allocated) will fire on destruction because the flag gets overwritten.
2018-08-23 07:08:34 -04:00
Jeffrey Walton 8382b49a1f
Fix compile using Nmake
LNK2019: unresolved external symbol CryptoPP::KeccakF1600(...)
2018-08-23 05:01:31 -04:00
Jeffrey Walton f3238742b2
Fix compile with IBM XLC
-pthread was causing "xlC: 1501-210 (W) command option t contains an incorrect subargument"
2018-08-23 04:56:45 -04:00
Jeffrey Walton 099883777d
Use ANONYMOUS_NAMESPACE_END 2018-08-23 01:11:45 -04:00
Jeffrey Walton 8c450a9f7a
Avoid Singleton when possible (GH #708)
Also clear several sign conversion warnings
2018-08-22 16:36:05 -04:00
Jeffrey Walton 0ba3687c39
Update comments 2018-08-22 14:46:30 -04:00
Jeffrey Walton af17fdf91b
Add -Wno-deprecated for PPC tests due to vec_ld and vec_st 2018-08-22 10:12:24 -04:00
Jeffrey Walton 4ab06b7803
Update Visual Studio 2005 project files 2018-08-22 03:17:04 -04:00
Jeffrey Walton 40d75271ec
Add keccakc.h and keccakc.cpp to Filelist.txt 2018-08-22 00:54:19 -04:00
Jeffrey Walton b9a6034a81
Add keccakc.h and keccakc.cpp for shared F1600 2018-08-22 00:40:30 -04:00
Jeffrey Walton 60c5146c5e
Update comments in integer.cpp 2018-08-21 15:10:22 -04:00
Jeffrey Walton a65cf70ff8
Update comments in integer.cpp 2018-08-21 15:03:20 -04:00
Jeffrey Walton 81f8c48faf
Avoid std::call_once (GH #707)
This commit also favors init priorities over C++ dynamic initialization. After the std::call_once problems on Sparc and PowerPC I'm worried about problems with Dynamic Initialization and Destruction with Concurrency.
We also do away with supressing warnings and use CRYPTOPP_UNUSED instead.
2018-08-21 12:53:10 -04:00
Jeffrey Walton 6b93c284fe
Use bitwise not 0 for last block flag 2018-08-21 11:25:39 -04:00
Jeffrey Walton a9c5c56d21
Switch to SaturatingSubtract to guard against wrap on user parameters 2018-08-21 11:21:20 -04:00
Jeffrey Walton 4a86ad67bf
Clear initialization warning due to non-trivial destructor 2018-08-21 10:45:44 -04:00
Jeffrey Walton 899236b99c
Tweak Makefile test to compile but not link (GH #707) 2018-08-21 06:28:28 -04:00
Jeffrey Walton c3dd09b93e
Update messages in cryptest.sh 2018-08-20 22:53:39 -04:00
Jeffrey Walton 87493974c7
Add Power8 VMULL tests to cryptest.sh 2018-08-20 22:48:38 -04:00
Jeffrey Walton c0b1116082
Fix compile on Visual Studio 2005 without service packs 2018-08-20 15:22:48 -04:00
Jeffrey Walton cb5795482d
Update Visual Studio 2005 project files 2018-08-20 15:12:35 -04:00
Jeffrey Walton 8db82708e3
Clear conversion wanrings under MSVC 2018-08-20 15:05:42 -04:00
Jeffrey Walton cb6f93c2ba
Update Visual Studio 2005 project files 2018-08-20 14:58:11 -04:00
Jeffrey Walton 3ad077ad82
Clear conversion wanrings under MSVC 2018-08-20 14:08:27 -04:00
Jeffrey Walton 2f906a031b
Clear conversion wanrings under MSVC 2018-08-20 14:01:05 -04:00
Jeffrey Walton 37828ff0ef
Clear conversion wanrings under MSVC 2018-08-20 13:58:58 -04:00
Jeffrey Walton d47f69acf3
Fix SecBlock ELEMS_MAX in Visual Studio .Net (2002 and 2003) 2018-08-20 12:52:33 -04:00
Jeffrey Walton d1a582e81a
Add /DEBUG to cryptest.nmake linker options 2018-08-20 11:42:57 -04:00
Jeffrey Walton c25a1e354d
Clear conversion wanrings under MSVC 2018-08-20 10:44:36 -04:00
Jeffrey Walton c24f17b7a2
Fix compiler crash in Visual Studio .Net (2002 and 2003) 2018-08-20 08:24:12 -04:00
Jeffrey Walton 3e9a5f17d2
Disable C4231 in Visual Studio 2005 project files 2018-08-20 07:27:07 -04:00
Jeffrey Walton 01779726db
Use consistent suffix for SSE2 ASM 2018-08-20 07:16:59 -04:00
Jeffrey Walton 8c5a558663
Update Visual Studio 2005 project files 2018-08-20 07:15:17 -04:00
Jeffrey Walton 874f79c320
Fix compile on Visual Studio 2005 without serve packs 2018-08-20 05:35:34 -04:00
Jeffrey Walton 5c3532597a
Whitespace check-in 2018-08-20 01:33:09 -04:00
Jeffrey Walton 082ad86132
Fix missing _xgetbv for Visual Studio 2008 and below 2018-08-19 10:19:29 -04:00
Jeffrey Walton d41b3c8211
Fix linking rdrand.obj twice on Windows using cryptest.nmake 2018-08-19 10:06:20 -04:00
Jeffrey Walton 5489cfe3c6
Remove Asan workaround from VMAC
I was not able to duplicate it under GCC. That includes the GCC's supplied with Debian 8 and Ubuntu 14. It looks like the problem was with Asan insread of the library
2018-08-19 08:32:23 -04:00
Jeffrey Walton 5e3f38cf86
Allow previous version of shared library on Solaris 2018-08-19 07:04:19 -04:00
Jeffrey Walton 3e23c55885
Remove makefile debug print statements 2018-08-19 06:12:09 -04:00
Jeffrey Walton 9886b555d0
Add SONAME to shared object for Solaris
Also see https://blogs.oracle.com/solaris/how-to-name-a-solaris-shared-object-v2
2018-08-19 06:10:30 -04:00
Jeffrey Walton 964b92b614
Rework -pthread test for GCC on Solaris
It looks like GCC is rejecting the -pthread option but it is advertising Pthread support by defining 39 related macros. I'm not sure what to make of it, but we can't use -pthread because it breaks the compile.
2018-08-18 23:51:14 -04:00
Jeffrey Walton 3929c3594c
Add SHACAL2 cipher AlgorithmProvider() 2018-08-18 22:26:01 -04:00
Jeffrey Walton 1f5d0d85cf
Add Tiger cipher AlgorithmProvider() 2018-08-18 21:41:55 -04:00
Jeffrey Walton 92163356db
Move constant table to unnamed namespace 2018-08-18 21:41:13 -04:00
Jeffrey Walton 03d78fb783
Add Panama cipher AlgorithmProvider() 2018-08-18 14:31:00 -04:00
Jeffrey Walton a6fadbad77
Remove Provider from public key operations
Everything is C++ so there's no value added by the column
2018-08-18 12:49:16 -04:00
Tanzinul Islam ea05f2fefd Fix build for MinGW due to deleted winpipes.cpp (#705)
On my MinGW-w64 setup, the build failed:

>mingw32-make: *** No rule to make target 'winpipes.o', needed by 'libcryptopp.a'.
>mingw32-make: Target 'default' not remade because of errors.

Looks like `winpipes.cpp` was removed in f2171cbe2 but not de-listed from the `GNUmakefile`. Remove it.
2018-08-18 11:17:50 -04:00
Jeffrey Walton ef58e71d77
Discard extra noise from Autotools test script 2018-08-18 08:28:32 -04:00
Jeffrey Walton 31ebabeb1e
Cleanup headers in vmac.cpp 2018-08-18 07:21:42 -04:00
Jeffrey Walton 4282f94712
Disable X32 inline assembly (GH #686, PR #704)
Also use CRYPTOPP_DISABLE_XXX_ASM consistently. The pattern is needed for Clang which still can't compile Intel assembly language. Also see http://llvm.org/bugs/show_bug.cgi?id=24232.
2018-08-18 04:44:53 -04:00
Jeffrey Walton 06cf2ede9e
Disable ASM and intrinsics for ARM big-endian
We don't have a test rig to test things. Based on our experience with Power8 and BE/LE, there will be trouble
2018-08-18 04:31:49 -04:00
Jeffrey Walton 48f2d95b0f
Fix ChaCha debug builds
This broke at https://github.com/weidai11/cryptopp/commit/e2be0cdecce7
2018-08-18 01:31:35 -04:00
Jeffrey Walton f2171cbe2f
Remove Thread and Socket classes (GH #208, PR #703)
Also see https://groups.google.com/forum/#!topic/cryptopp-users/5btwLoxXXD4.
2018-08-17 23:55:39 -04:00
Jeffrey Walton 522da15b13
Whitespace check-in 2018-08-17 23:44:01 -04:00
Jeffrey Walton 4fe078b4b6
Use BLAKE2B_G2 macro name 2018-08-17 20:39:28 -04:00
Jeffrey Walton 25116f5aae
Enable SSSE3 and SSE4 for SIMON and SPECK on Solaris with SunCC 5.13 and above 2018-08-17 09:02:24 -04:00
Jeffrey Walton 18bfe2a50a
Fix AlgorithmProvider for CHAM and LEA on Solaris 2018-08-17 07:55:35 -04:00
Jeffrey Walton b2c5616ede
Fix AlgorithmProvider for SIMON and SPECK on Solaris 2018-08-17 07:49:35 -04:00
Jeffrey Walton e2be0cdecc
Make ChaCha an Salsa use the same design pattern 2018-08-17 06:19:30 -04:00
Jeffrey Walton 3e55bfca7d
Cleanup header includes for SSE
Travis is failing because the system headers don't guard their functions and datatypess properly
2018-08-16 19:37:36 -04:00
Jeffrey Walton 2876371cea
Add GNUmakefile-cross flags SIMON and SPECK 2018-08-16 18:24:22 -04:00
Jeffrey Walton a4c5bdf821
Remove unneeded comments 2018-08-15 13:30:11 -04:00
Jeffrey Walton 16cf591f3c
Cutover to BLAKE2 team impl
The BLAKE2 team runs a tad bit slower but we want to push maintenance onto them
2018-08-15 13:25:53 -04:00
Jeffrey Walton f28fb0a176
Add SIMON-128 and SPECK-128 source files 2018-08-15 10:02:00 -04:00
Jeffrey Walton 7a43a04048
Split simon-simd.cpp and speck-simd.cpp into separate source files
SIMON-64 and SIMON-128 have different ISA requirements. The same applies to SPECK-64 and SPECK-128. GCC generated code that resulted in a SIGILL due to the ISA differences on a down level machine. The instructions was a mtfprwz from POWER8. It was prsent in a function prologue on a POWER7 machine.
2018-08-15 09:59:40 -04:00
Jeffrey Walton eb57dc5481
Whitespace check-in 2018-08-15 05:34:05 -04:00
Jeffrey Walton 014f3d08c2
Make AdvancedProcessBlocks64_6x2_ALTIVEC inline 2018-08-15 05:18:38 -04:00
Jeffrey Walton c26aad8a25
Use PtrSub to subtract offset from pointer 2018-08-15 03:16:08 -04:00
Jeffrey Walton 1253bccf06
Add VectorLoad(word32 arr[4]) overloads 2018-08-15 02:12:27 -04:00
Jeffrey Walton 6f1caab7c2
Move SIMON-64 and SPECK-64 to Power7 minimum
SIMON-64 and SPECK-64 don't use 64-bit type so they can run on Power7. We may be able to drop to Power4, but we need to test the effects of Loads and Stores without vec_vxs_ld and vec_vsx_st
2018-08-14 23:31:40 -04:00
Jeffrey Walton 62e95313af
Update comments 2018-08-14 20:49:26 -04:00
Jeffrey Walton 9d15a9ee16
Fix SIMON-64 on AIX 2018-08-14 20:44:50 -04:00
Jeffrey Walton 9a78b92429
Update comments 2018-08-14 20:04:28 -04:00
Jeffrey Walton cf0c487c2a
Fix SPECK-64 on AIX 2018-08-14 19:14:41 -04:00
Jeffrey Walton 9b91b94b05
Add POWER8 SIMON-64 implementation 2018-08-14 07:14:39 -04:00
Jeffrey Walton d8c28bdc2b
Make SPECK-64 more symmetrical 2018-08-14 06:19:34 -04:00
Jeffrey Walton f1b190740c
Update comments 2018-08-14 06:07:19 -04:00
Jeffrey Walton 93149e4c25
Update comments 2018-08-14 05:15:32 -04:00
Jeffrey Walton d221336f42
Add POWER8 SPECK-64 implementation 2018-08-14 03:36:49 -04:00
Jeffrey Walton 462851907f
Add AdvancedProcessBlocks64_6x2_ALTIVEC template 2018-08-14 03:32:45 -04:00
Jeffrey Walton b35632e89e
Cleanup SIMON-128 code
The check-in provides more unification and sets the pattern used with SIMON-64
2018-08-14 01:45:23 -04:00
Jeffrey Walton 9d60081619
Cleanup SPECK-128 code
The check-in provides more unification and sets the pattern used with SPECK-64
2018-08-14 01:22:17 -04:00
Jeffrey Walton 7c70b39d18
Cleanup DRBGs
The change picks up about 10 cpb or 20 MB/s on Power8.
2018-08-13 09:54:07 -04:00
Jeffrey Walton 9143a05508
Whitespace check-in 2018-08-13 07:47:56 -04:00
Jeffrey Walton b4c0404bce
Refactor lea-simd.cpp
This was part of a POWER8 LEA implementation. The numbers were awful but we still needed the code cleanup
2018-08-13 07:19:17 -04:00
Jeffrey Walton dbe7025356
Add AdvancedProcessBlocks128_4x1_ALTIVEC template 2018-08-13 06:38:30 -04:00
Jeffrey Walton 78939cb685
Update comments 2018-08-13 01:51:01 -04:00
Jeffrey Walton de7f4a0894
Fix carry bug in AdvancedProcessBlocks128_6x1_ALTIVEC 2018-08-13 01:44:23 -04:00
Jeffrey Walton 7dc2e6ea31
Switch to byte instead of uint8_t
Several places in ppc-simd.h used uint8_t rather than byte
2018-08-13 00:41:55 -04:00
Jeffrey Walton 39b1f60de5
Fix compile under XLC 2018-08-13 00:16:05 -04:00
Jeffrey Walton e0a35cf18a
Fix compile under XLC 2018-08-13 00:15:06 -04:00
Jeffrey Walton 89476e280d
Cleanup adv-simd.h for ARM 2018-08-12 19:51:50 -04:00
Jeffrey Walton 7f374faf52
Cleanup adv-simd.h for x86 2018-08-12 19:04:14 -04:00
Jeffrey Walton 6c621f91ce
Add POWER8 SIMON-128 implementation
Performance went from about 30 to 40 cpb to 5.5 to 9 cpb, depending on endian-ness
2018-08-12 09:21:09 -04:00
Jeffrey Walton aa806f3475
Add SPECK-128 provider for POWER8 2018-08-12 04:40:10 -04:00
Jeffrey Walton 3e26437249
Remove debug statement
Thus slipped by during commit 898dab99b8
2018-08-12 04:24:08 -04:00
Jeffrey Walton 898dab99b8
Add POWER8 SPECK-128 implementation
Performance went from about 14 cpb to 2-3 cpb, depending on endian-ness
2018-08-12 04:08:33 -04:00
Jeffrey Walton dd4f87fa11
Clear IBM XLC warnings on PowerPC 2018-08-12 04:06:06 -04:00
Jeffrey Walton afe72c50f0
Add VectorSub and VectorSwapWords 2018-08-12 04:05:14 -04:00
Jeffrey Walton 3d6c8d9589
Update comments 2018-08-12 01:12:00 -04:00
Jeffrey Walton 8d62b500cc
Add validat9.cpp to filter list 2018-08-11 23:05:58 -04:00
Jeffrey Walton d109ce09d0
Update comments and function names
Someone trying to make sense of POWER8 GCM is bound to be confused even with the expanded comments and updated function names
2018-08-11 06:40:21 -04:00
Jeffrey Walton 6993d1d0bd
Update comments 2018-08-11 00:55:52 -04:00
Jeffrey Walton 78d3a279dc
Remove specializations for VectorShiftLeft and VectorShiftRight 2018-08-10 23:29:20 -04:00
Jeffrey Walton 555f4742c7
Fix buffering and unusual tag output due to ostringstream 2018-08-10 06:40:44 -04:00
Jeffrey Walton 94eff2cdd6
Remove INLINE used for debugging
We needed to switch inlining off manually. GDB was not stepping into code for us. No longer needed
2018-08-10 05:19:08 -04:00
Jeffrey Walton 23e0ee44a0
Cleanup GCM code
I always thought the SSE code in GCM_ReverseHashBufferIfNeeded_CLMUL was a wart
2018-08-10 04:42:30 -04:00
Jeffrey Walton 1c224c8798
Switch to vector shifts instead of vector merge 2018-08-10 04:27:49 -04:00
Jeffrey Walton a2a520e5b9
Cleanup GCM mode 2018-08-10 01:57:14 -04:00
Jeffrey Walton 8c21b6af05
Use shifts for VectorGetLow 2018-08-10 01:25:59 -04:00
Jeffrey Walton eddc357981
Use shifts for VectorGetLow 2018-08-10 01:24:32 -04:00
Jeffrey Walton b44de10e18
Cleanup Aarch64 GCM mode 2018-08-10 01:00:26 -04:00
Jeffrey Walton 9f2d65409a
Add POWER8 GCM mode (GH #698)
Commit 3ed38e42f6 added the POWER8 infrastructure for GCM mode. It also added GCM_SetKeyWithoutResync_VMULL, GCM_Multiply_VMULL and GCM_Reduce_VMULL. This commit adds the remainder, which includes GCM_AuthenticateBlocks_VMULL.
GCC is OK on Linux (ppc64-le) and AIX (ppc64-be). We may need some touchups for XLC compiler
2018-08-09 23:28:49 -04:00
Jeffrey Walton 989c3bfbf2
Update comments 2018-08-09 18:18:40 -04:00
Jeffrey Walton 99ab11d1ed
Add TestAltivecOps for Debug builds 2018-08-09 17:23:35 -04:00
Jeffrey Walton 1b5422eb49
Update documentation 2018-08-09 08:16:46 -04:00
Jeffrey Walton 3ed38e42f6
Add POWER8 GCM mode (GH #698)
GCM_SetKeyWithoutResync_VMULL, GCM_Multiply_VMULL and GCM_Reduce_VMULL work as expected on Linux (ppc64-le) and AIX (ppc64-be). We are still working on GCM_AuthenticateBlocks_VMULL.
2018-08-09 08:09:13 -04:00
Jeffrey Walton 5b89e774cc Add Altivec vector extraction tests 2018-08-09 00:06:42 -04:00
Jeffrey Walton 13b6dac31d
Remove temporary variable 2018-08-08 21:48:07 -04:00
Jeffrey Walton ce5b6c9e23
Fix return value for Altivec VectorLoad 2018-08-08 21:31:25 -04:00
Jeffrey Walton 048c2721fb
Remove unneeded defines from cpu.cpp 2018-08-08 20:55:00 -04:00
Jeffrey Walton bcf05a6c6b
Add additional PowerPC self tests 2018-08-08 20:52:50 -04:00
Jeffrey Walton 0464641069
Remove unneeded enum from VectorShiftLeftVectorShiftRight 2018-08-08 20:17:14 -04:00
Jeffrey Walton 00e7d02a8a
Fix Altive VectorStore on little-endian
Remove unneeded VectorLeftShift(a,b) and VectorRightShift(a,b)
2018-08-08 19:59:14 -04:00
Jeffrey Walton 96405e14ec
Fix VectorShiftRight on PowerPC 2018-08-08 05:06:58 -04:00
Jeffrey Walton 4c30f57d1b
Update comments 2018-08-06 23:04:10 -04:00
Jeffrey Walton d4428d7f1c
Add VectorLoad and VectorStore test code
Applies to POWER4 and above only
2018-08-06 22:19:59 -04:00
Jeffrey Walton a4ebb75538
Update comments 2018-08-06 18:37:25 -04:00
Jeffrey Walton 194307308c
Cleanup VPMSUM probes 2018-08-06 18:06:32 -04:00
Jeffrey Walton 2ec9c9963c
Update documentation 2018-08-06 06:47:57 -04:00
Jeffrey Walton 9ff731824b
Prepare for POWER8 carryless multiplies using vpmsum 2018-08-06 05:40:38 -04:00
Jeffrey Walton 6cd7f83346
Cleanup PPC vector functions
The Crypto++ functions follow IBM's lead and provide VectorLoad, VectorLoadBE, VectorStore, and VectorStoreBE. Additionally, VectorLoadKey was removed in favor of vanilla VectorLoad.
2018-08-06 05:15:12 -04:00
Jeffrey Walton 9c27143522
Whitespace check-in 2018-08-05 13:31:25 -04:00
Jeffrey Walton 58b7abe106
Update comments 2018-08-05 12:32:36 -04:00
Jeffrey Walton 1dd0e321a6
Rework Makefile and ppc-simd.h for XLC and LLVM front-end changes 2018-08-05 05:39:42 -04:00
Tanzinul Islam da00422d3c Fix build with Embarcadero C++Builder 10.2.3 (#696)
Fix two compilation errors encountered with C++Builder (Starter Edition):

 - In `cpu.cpp`, 0ccdc197b introduced a dependency on `_xgetbv()` from `<immintrin.h>` that doesn't exist on C++Builder. Enlist it for the workaround, similar to SunCC in 692ed2a2b.

 - In `adv-simd.h`, `<pmmintrin.h>` is being #included under the `CRYPTOPP_SSE2_INTRIN_AVAILABLE` macro. This header, [which apparently provides SSE3 intrinsics](https://stackoverflow.com/a/11228864/1433768), is not shipped with C++Builder. (This section of code was recently downgraded from a SSSE3 to a SSE2 block in 09c8ae28, followed by moving away from `<immintrin.h>` in bc8da71a, followed by reintroducing the SSSE3 check in d1e646a5.) Split the SSE2 and SSSE3 cases such that `<pmmintrin.h>` is not #included for SSE2. This seems safe to do, because some `git grep` analysis shows that:
    - `adv-simd.h` is not #included by any other header, but only directly #included by some `.cpp` files.
    - Among those `.cpp` files, only `sm4-simd.cpp` has a `CRYPTOPP_SSE2_INTRIN_AVAILABLE` preprocessor block, and there it again includes the other two headers (`<emmintrin.h>` and `<xmmintrin.h>`).

NOTE: I was compiling via the IDE after [setting up a project file](https://github.com/tanzislam/cryptopals/wiki/Importing-into-Embarcadero-C%E2%94%BC%E2%94%BCBuilder-Starter-10.2#using-the-crypto-library). My compilation command was effectively:

```
bcc32c.exe -DCRYPTOPP_NO_CXX11 -DCRYPTOPP_DISABLE_SSSE3 -D__SSE2__ -D__SSE__ -D__MMX__
```
2018-08-04 22:54:36 -04:00
Jeffrey Walton e82ee1c6f0
Fix typo in SM4 recipe on PowerPC 2018-08-04 20:28:31 -04:00
Jeffrey Walton aee00b69ad
Clean *.lst files created by XLC 2018-08-04 20:18:50 -04:00
Jeffrey Walton 9ce1648f83
Update comments 2018-08-03 16:16:08 -04:00
Jeffrey Walton f67efe75c9
Remove POWER5 define. We don't use it
The 64-bit 'vector long long' is POWER8
2018-08-03 14:17:13 -04:00
Jeffrey Walton 4540ab4f10
Rework PPC probes for XLC and LLVM 2018-08-03 07:02:27 -04:00
Jeffrey Walton 8019362bd6
Clear unused variable warnings under MSVC 2018-08-03 06:17:22 -04:00
Jeffrey Walton 81a5429e56
Remove iPhoneSimulator from Travis allowed failures 2018-08-03 05:44:30 -04:00
Jeffrey Walton eca0458d03
Update comments 2018-08-03 05:08:21 -04:00
Jeffrey Walton 1bd18dd5ba
Simplify RDRAND and RDSEED logic
Travis testing on GitHub showed a RDSEED failure with a "no implementation" failure. Stepping back the RDRAND and RDSEED impl logic was too complex. It offered choices when there was no need for them. For MSC we only need the MASM implementation. For U&L we only need the inline assembly that emits the byte codes (and not the instruction). The byte codes cover from GCC 3.2, Clang 2.8 and onwards
2018-08-03 04:34:20 -04:00
Jeffrey Walton 7e14cab8a3
Rework PPC probes for XLC and LLVM 2018-08-03 02:54:50 -04:00
Jeffrey Walton c4eb38b856
Improve CPU_ProbePower8() test 2018-08-03 01:27:39 -04:00
Jeffrey Walton c4ef77bcdb
Attempt to use glibtool if available 2018-08-02 23:21:59 -04:00
Jeffrey Walton fdc3045e34
Copy setenv-ios.sh into TestScripts
This is one of the scripts we have in two places due to historical reasons. The current practice is to put them in TestScripts/
2018-08-02 00:29:25 -04:00
Jeffrey Walton 85ea200ff0 Revert "Copy setenv-ios.sh into TestScripts"
The copy happened the wrong way.

This reverts commit a6143862a3.
2018-08-02 00:28:35 -04:00
Jeffrey Walton f0fdb3bc16
Bump Travis OS X image to 9.4 2018-08-02 00:16:02 -04:00
Jeffrey Walton a6143862a3
Copy setenv-ios.sh into TestScripts
This is one of the scripts we have in two places due to historical reasons. The current practice is to put them in TestScripts/
2018-08-02 00:13:13 -04:00
Jeffrey Walton 3753a4301d
Disable ASM for iOS simulators 2018-08-01 23:10:01 -04:00
Jeffrey Walton 5eec90bee5
Cleared unused variable warning 2018-08-01 22:32:26 -04:00
Jeffrey Walton 70c9fe4712
Remove calls to chmod and xattr 2018-08-01 22:01:52 -04:00
Jeffrey Walton f9f307668b
Add false DOCUMENT_DIRECTORY for GNUmakefile-cross 2018-08-01 21:52:46 -04:00
Jeffrey Walton a1b30685ab
Fix distclean rule in GNUmakefile-cross 2018-08-01 21:33:24 -04:00
Jeffrey Walton 89ec3c4a25
Guard for missing libtoolize 2018-08-01 13:57:35 -04:00
Jeffrey Walton 57521bd22a
Add calls to 'make clean' to ensure building artifacts 2018-07-31 19:53:40 -04:00
Jeffrey Walton 27968af8a9
Update to support IBM XLC and LLVM backend 2018-07-31 18:21:44 -04:00
Jeffrey Walton 5367d26327
Fix compile when adhoc.cpp is missing 2018-07-31 13:33:57 -04:00
Jeffrey Walton 7ff5f0dcf1
Try fix Travis testing on OS X 2018-07-31 11:48:54 -04:00
Jeffrey Walton 319698e43f
Rework GNUmakefiles for XL C/C++ changes 2018-07-31 02:17:13 -04:00
Jeffrey Walton 8c3658fce8
Rework GNUmakefiles for XL C/C++ changes 2018-07-31 02:13:17 -04:00
Jeffrey Walton b4a041a71b
Add -qxlcompatmacros for IBM XL C/C++ when available
Also see https://lists.tetaneutral.net/pipermail/cfarm-users/2018-July/000331.html
2018-07-30 23:22:10 -04:00
Jeffrey Walton 4b13ccea5d
Remove automatic bitness selection on PPC64 2018-07-30 20:40:05 -04:00
Jeffrey Walton 00135f5b5b
Add CRYPTOPP_ALIGN_DATA for IBM XL C/C++ 2018-07-30 20:32:45 -04:00
Jeffrey Walton d563c5da94
Fix SHA-256 on AIX using IBM XL C/C++ and POWER8 crypto
We were using aligned loads of the key table SHA256_K. The key table was declared as 16-byte aligned but it appears the table was not aligned in memory.
2018-07-30 19:53:39 -04:00
Jeffrey Walton 0c8a9458cc
Fix compile for AIX using GCC and IBM XL C/C++ 2018-07-30 19:14:51 -04:00
Jeffrey Walton 9396dc46ec
Update comments 2018-07-30 15:58:44 -04:00
Jeffrey Walton f36562218f
Add call to ls upon failure of script 2018-07-30 15:40:13 -04:00
Jeffrey Walton 12bb4866dd
Add check for setenv-*.sh scripts 2018-07-30 15:32:53 -04:00
Jeffrey Walton 4fc5b8da13
Update comments 2018-07-30 15:18:59 -04:00
Jeffrey Walton 36318790a2
Whitespace check-in 2018-07-30 14:11:54 -04:00
Jeffrey Walton 2510d978a0
Try fix Travis and "cryptest-ios.sh not found" 2018-07-30 14:10:52 -04:00
Jeffrey Walton d952cb99c2
Update comments 2018-07-30 12:42:53 -04:00
Jeffrey Walton 973fbf0e2f
Fix FixedSizeAllocatorWithCleanup assert on Solaris 2018-07-30 11:27:50 -04:00
Jeffrey Walton f290746a36
Remove Coverity worakaround StreamState
Use std::ostringstream instead. Eventually I'd like to see the output stream passed into the function of interest. It will avoid problems on some mobile OSes that don't have standard inputs and outputs.
2018-07-29 22:35:36 -04:00
Jeffrey Walton bf37ccda6d
Fix initialization of 'pass' variable
Copy/paste error from https://github.com/weidai11/cryptopp/commit/d51f701e0638
2018-07-29 21:25:48 -04:00
Jeffrey Walton afd1ff651a
Add assert to RunTestDataFile 2018-07-29 21:11:36 -04:00
Jeffrey Walton 25a32d3544
Fix HMQV self tests 2018-07-29 20:53:48 -04:00
Jeffrey Walton 0210e54310
Update comments 2018-07-29 20:34:29 -04:00
Jeffrey Walton d51f701e06
Refactor validat5.cpp and validat6.cpp
Also see https://groups.google.com/forum/#\!topic/cryptopp-users/j_aQj6r-PoI
2018-07-29 20:30:19 -04:00
Jeffrey Walton 98e35d2925
Remove addition of -m32|-m64 from GNUmakefile
Sun recommends 32-bit binaries instead of 64-bit ones, even on amd64 and sparcv9
2018-07-29 14:37:25 -04:00
Jeffrey Walton 6f64671e4a
Update comments to make it clear the keystream is written 2018-07-29 12:18:22 -04:00
Jeffrey Walton 375b38554e
Use 64-bit multiply for Rabbit 2018-07-29 12:11:45 -04:00
Jeffrey Walton 32d2ad1ca5
Fix "error: ‘MaurerRandomnessTest’ was not declared in this scope" 2018-07-28 18:52:22 -04:00
Jeffrey Walton 138ce8f626
Cleanup Makefiles and Android and iOS scripts 2018-07-28 18:45:37 -04:00
Jeffrey Walton 86a212b85f
Add missing header to validat3.cpp 2018-07-28 16:39:21 -04:00
Jeffrey Walton 28fe1a6a4d
Split validat*.cpp source files
Also see https://groups.google.com/forum/#\!topic/cryptopp-users/j_aQj6r-PoI
2018-07-28 14:57:12 -04:00
Jeffrey Walton 0ea807f2eb
Add additional artifacts to autotools-clean rule 2018-07-28 12:38:15 -04:00
Jeffrey Walton a411ac350b
Cleanup cryptest-autotools.sh script 2018-07-28 10:58:51 -04:00
Jeffrey Walton 4066d70731
Cleanup cryptest-autotools.sh script 2018-07-28 10:57:53 -04:00
Jeffrey Walton 5cc3f72d33
Add -Wa,--noexecstack for aes-armv4.S 2018-07-28 10:36:40 -04:00
Jeffrey Walton 3657f8c235
Add cryptest-results.txt to clean rule 2018-07-28 09:31:41 -04:00
Jeffrey Walton ef5a3d3905
Add autotools-clean and cmake-clean rules to GNUmakefile 2018-07-28 09:21:31 -04:00
Jeffrey Walton a0ad5e815c
Remove -marm from aes-armv4.S flags 2018-07-27 22:00:28 -04:00
Jeffrey Walton fa513df380
Cleanup head notes and includes 2018-07-27 21:18:51 -04:00
Jeffrey Walton 97e283c8fd
Cleanup head notes and includes 2018-07-27 21:04:30 -04:00
Jeffrey Walton 884851cd9a
Update failure message 2018-07-27 19:17:25 -04:00
Jeffrey Walton 5861d9342d
Split regtest2.cpp into two files
Rename regtest3.cpp to regtest4.cpp. Split regtest2.cpp into regtest2.cpp and regtest3.cpp
2018-07-27 18:16:25 -04:00
Jeffrey Walton ed91b278bb
Run autoupdate and libtoolize if available 2018-07-27 16:51:32 -04:00
Jeffrey Walton f201bc9493
Remove calls to format script 2018-07-27 16:10:43 -04:00
Jeffrey Walton a3efa68da7
Add call to autoupdate if available 2018-07-27 16:09:27 -04:00
Jeffrey Walton c7332c22aa
Split bench1.cpp into two files
Renamed bench2.cpp to bench3.cpp. Split bench1.cpp into bench1.cpp and bench2.cpp
2018-07-27 14:21:36 -04:00
Jeffrey Walton 1f914feaf9
Split bench1.cpp into two files
Renamed bench2.cpp to bench3.cpp. Split bench1.cpp into bench1.cpp and bench2.cpp
2018-07-27 14:13:58 -04:00
Jeffrey Walton 7afd05c336
Save/restore 64-bit registers for Padlock on x86_64 2018-07-27 11:21:54 -04:00
Jeffrey Walton 5ea410c1d3
Update comments 2018-07-27 01:57:33 -04:00
Jeffrey Walton f165d1822d
More SunStudio/SunCC workarounds 2018-07-27 01:51:27 -04:00
Jeffrey Walton 2f83777e9b
Backout ChaCha changes to Crypto++ 7.0
These changes made it in by accident at Commit b74a6f4445. We were going to try to let them ride but they broke versioning. They may be added later but we should avoid the change at this time.
2018-07-25 16:25:41 -04:00
Jeffrey Walton e50a40ec59
Fix 'make sources' recipe 2018-07-25 00:11:09 -04:00
Jeffrey Walton 4aafb0e6a3
Cleanup SHA512::Transform code
The extra code paths added at GH #689 were no longer needed after GH #691
2018-07-21 10:28:48 -04:00
Jeffrey Walton f1192fd044
Update comments in IterHashBase and friends
We also switched to "IsAligned<HashWordType>(input)". Using word64 was due to debug testing on Solaris (the alignment check is needed). Hard coding word64 should not have been checked in.
2018-07-21 06:51:41 -04:00
Jeffrey Walton 61f1456a5a
Disable X32 inline ASM for Tiger
See Peter Cordes comments at Issue 686
2018-07-21 06:36:15 -04:00
Jeffrey Walton d4f86d7320
Add SunCC code path to GetAlignmentOf
It looks like GetAlignmentOf was returning the "UnsignedMin(4U, sizeof(T))" for SunCC. It was causing SIGBUSes on Sparc when T=word64. OpenCSW provided access to their build farm and we were able to test "__alignof__(T)" back to an early SunCC on Solaris 9.
2018-07-21 06:29:20 -04:00
Jeffrey Walton baff390f28
Fix older Solaris and SunCC compile
Found during testing on OpenCSW compile farm on Solaris 9 (host unstable9s)
2018-07-21 06:15:40 -04:00
Jeffrey Walton aeaa4f623f
Use blockSize throughout HashMultipleBlocks 2018-07-20 20:28:07 -04:00
Jeffrey Walton 414c5c5438
Fix Tiger crash on Sparc (GH #690)
Man, Sparc does not mess around with unaligned buffers. Without -xmemalign=4i the hardware wants 8-byte aligned word64's so it can use the high performance 64-bit move or add.
Since we do not use -xmemalign we get the default behavior of either -xmemalgin=8i or -xmemalgin=8s. It shoul dnot matter to us since we removed unaligned data access at GH #682.
2018-07-20 20:12:54 -04:00
Jeffrey Walton 0c0b68a4a2
Align input buffer in HashMultipleBlocks
IteratedHashBase::Update aligns the buffer, but IteratedHashBase::HashBlock does not. It was causing a fair number of asserts to fire when the code was instrumented with alignment checks. Linux benchmarks shows the code does not run materially slower on i686 or x86_64.
2018-07-20 18:56:41 -04:00
Jeffrey Walton 365e65c2eb
Whitespace check-in 2018-07-20 13:38:55 -04:00
Jeffrey Walton ca302c952e
Fix Solaris 11/Sparc crash in SHA-384 (GH #689, GH #403)
I believe Andrew Marlow first reported it. At the time we could not get our hands on hardware to fully test things. Instead we were using -xmemalign=4i option as a band-aide to avoid running afoul of the Sparc instruction that moves 64-bits of data in one shot.
2018-07-20 13:24:04 -04:00
Jeffrey Walton 45ffb7e827
Fix crash in SHA-512 when using different compile options (GH #661)
This also helps clear a crash on Sparc due to unaligned access to an uint64_t (GH #689)
2018-07-20 13:15:29 -04:00
Jeffrey Walton 8d6b1af4cf
Update documentation 2018-07-17 11:52:34 -04:00
Jeffrey Walton d8946df8eb
Add crypto_sign_sk2pk (PR #668)
This should allow users to convert a ed25519 seret key to a public key without rolling their own code
2018-07-17 08:28:33 -04:00
Jeffrey Walton e1433536bc
Use CRYPTOPP_DISABLE_INTEL_ASM for Clang in GCM
Clang 6.0 is still broke. It cannot compile a simple "neg %rcx" using Intel syntax
2018-07-16 19:40:56 -04:00
Jeffrey Walton 076d0cd604
Remove s_clmulConstants table in GCM mode
Local scopes and loading the constants with _mm_set_epi32 saves about 0.03 cpb. It does not sound like much but it improves GMAC by about 500 MB/s. GMAC is just shy of 8 GB/s.
2018-07-16 19:04:24 -04:00
Jeffrey Walton e6fb540c4c
Allow iPhoneSimulator failures (GH #684)
We still need to figure out what to do with this.
2018-07-16 17:12:02 -04:00
Jeffrey Walton c9d53ad340
Fix "error C2719: formal parameter with requested alignment of 16 won't be aligned"
This was somewhat expected due to the Solaris knob turning.
2018-07-16 17:09:26 -04:00
Jeffrey Walton ee8c141d3c
Fix xompile on downlevel assemblers
This surfaced on Solaris with an ancient Binutils
2018-07-16 15:27:25 -04:00
Jeffrey Walton b91491da4f
Fix Solaris i386 compile of CHAM and LEA for SunStudio 12.3 and below 2018-07-16 12:21:44 -04:00
Jeffrey Walton 14dd03544e
Update cryptest-automake test script for Solaris 2018-07-16 10:53:11 -04:00
Jeffrey Walton 8197732756
Fix SunStudio 12.6 runtime crash on i386
This bug has been around since the Sun Studio 11/SunCC 5.8 days
2018-07-16 10:33:14 -04:00
Jeffrey Walton 28f079ba64
Fix SunStudio 12.3 compile on i386 2018-07-16 10:22:21 -04:00
Jeffrey Walton bd9ca55c44
Cleanup gcm.cpp after Commit 9d954efcde 2018-07-16 09:48:35 -04:00
Jeffrey Walton 9d954efcde
Disable CLMUL again on SunStudio (GH# 188, GH #224)
We got reports that x86_64 was producing incorrect results. Also, the problem persisted in i386 builds. I don't think we can work around this issue. Oracle must fix it.
2018-07-16 09:39:01 -04:00
Jeffrey Walton d1e646a589
Fix SunStudio 12.6 compile on i386 2018-07-16 09:37:08 -04:00
Jeffrey Walton a0166d9546
Fix SunStudio 12.4 compile on Solaris 2018-07-16 04:42:52 -04:00
Jeffrey Walton eb55cc0ae5
Fix SunStudio 12.6 GCM compile on Solaris (GH #188, GH #224)
I think we have this issue somewhat sorted out. First, there is a compiler bug. Second, it seems to be triggered when function parameters mix const and non-const references. Third, to work around it, all parameters need to be non-const (as in this patch).
I'm really glad we kind of got to the bottom of things. The crash when compiling GCM has been bothering me for nearly 3 years.
2018-07-15 22:31:50 -04:00
Jeffrey Walton 017886a2ea
Fix SunStudio 12.2 compile on Solaris 2018-07-15 22:22:18 -04:00
Jeffrey Walton 339cc240a2
Fix SunStudio compile on Solaris (GH #226) 2018-07-15 19:26:15 -04:00
Jeffrey Walton 692ed2a2bb
Fix SunStudio compile on Solaris 2018-07-15 19:24:55 -04:00
Jeffrey Walton 916fe7db26
Remove unneeded code from Blake2 2018-07-15 12:59:28 -04:00
Jeffrey Walton f143534d99
Cleanup defines in sha.cpp
There's no need for extra guards with CRYPTOPP_DISABLE_SHA_ASM because relevant macros are undefined
2018-07-15 12:47:34 -04:00
Jeffrey Walton 7e7d86f6fd
Whitespace check-in 2018-07-15 11:45:48 -04:00
Jeffrey Walton 31533db421
Disable X32 for SHA (GH #686)
Thanks to Peter Cordes for the feedback
2018-07-15 11:39:41 -04:00
Jeffrey Walton 7d1eb4fc8b
Fix AppVeyor Win32 build 2018-07-15 11:31:12 -04:00
Jeffrey Walton c2a9958d9c
Make m4/ directory during testing 2018-07-15 10:13:33 -04:00
Jeffrey Walton 437b2f9b7d
Set LC_ALL=C for Darwin Autotools testing 2018-07-15 09:35:26 -04:00
Jeffrey Walton 4e3a1ea962
Add ARMv8.4 cpu feature detection support (GH #685) (#687)
This PR adds ARMv8.4 cpu feature detection support. Previously we only needed ARMv8.1 and things were much easier. For example, ARMv8.1 `__ARM_FEATURE_CRYPTO` meant PMULL, AES, SHA-1 and SHA-256 were available. ARMv8.4 `__ARM_FEATURE_CRYPTO` means PMULL, AES, SHA-1, SHA-256, SHA-512, SHA-3, SM3 and SM4 are  available. 

We still use the same pattern as before. We make something available based on compiler version and/or preprocessor macros. But this time around we had to tighten things up a bit to ensure ARMv8.4 did not cross-pollinate down into ARMv8.1.

ARMv8.4 is largely untested at the moment. There is no hardware in the field and CI lacks QEMU with the relevant patches/support. We will probably have to revisit some of this stuff in the future.

Since this update applies to ARM gadgets we took the time to expand Android and iOS testing on Travis. Travis now tests more platforms, and includes Autotools and CMake builds, too.
2018-07-15 08:35:14 -04:00
Jeffrey Walton 2600f6dcc2
Clear unused variable warning 2018-07-14 13:26:49 -04:00
Jeffrey Walton 5460f14857
Clear unused variable warning 2018-07-14 13:01:48 -04:00
Jeffrey Walton 7cc6531dd2
Clear unused variable warning 2018-07-14 12:59:42 -04:00
Jeffrey Walton 7a67e43b27
Fix Apple feature detection (GH #685) 2018-07-14 08:40:06 -04:00
Jeffrey Walton d11a7b3436
Add ARMv8 CPU feature queries (GH #685)
CPU feature probes are still outstanding. They are going to be trickier because if CRYPTOPP_XXX_FEATURE_AVAILABLE
2018-07-14 08:20:16 -04:00
Jeffrey Walton 25abe71e69
Fix failed compile with Clang 2018-07-14 04:48:26 -04:00
Jeffrey Walton 28e20d6e5f
Fix "Error: symbol SHA512_Round is already defined" (GH #684) 2018-07-13 17:05:14 -04:00
Jeffrey Walton 26ae1fb7e9
Fix ARM compile for sm4-simd.cpp 2018-07-13 10:39:08 -04:00
Jeffrey Walton 380829284c
Update documentation 2018-07-13 09:54:06 -04:00
Jeffrey Walton 678bdb1735
Add AES-NI accelerated SM4 encryption (GH #540)
Thanks to Markku-Juhani Olavi Saarinen for the code. Also see https://github.com/mjosaarinen/sm4ni
2018-07-13 08:48:43 -04:00
Jeffrey Walton 3c21233440
Add AES-NI accelerated SM4 encryption (GH #540)
Thanks to Markku-Juhani Olavi Saarinen for the code. Also see https://github.com/mjosaarinen/sm4ni
2018-07-13 08:33:13 -04:00
Jeffrey Walton 2f71e4d7d9
Fix header include 2018-07-13 05:48:03 -04:00
Jeffrey Walton 90e7b85814
Update documentation 2018-07-12 12:04:37 -04:00
Jeffrey Walton 40d70375a9
Increase use of ptrdiff_t when performing pointer math 2018-07-12 09:48:46 -04:00
Jeffrey Walton ed143608a8 Revert "Increase use of ptrdiff_t when performing pointer math"
This reverts commit bbf9a109f2. It did not fix A-32. Something got crossed in my test case.
2018-07-12 09:43:18 -04:00
Jeffrey Walton 25179e00d3
Fix PtrByteDiff cast
A quick testing pass that loaded the code with asserts caused a compile failure
2018-07-12 09:37:43 -04:00
Jeffrey Walton bbf9a109f2
Increase use of ptrdiff_t when performing pointer math
This fixes the incorrect result with CFB mode on A-32 in CFB_CipherTemplate<BASE>::ProcessData
2018-07-12 08:29:46 -04:00
Jeffrey Walton 6434ec597d
Update comments 2018-07-12 07:59:05 -04:00
Jeffrey Walton e580ed588a
Disable same buffer for in and out on ARM A-32 (GH #683) 2018-07-12 07:05:18 -04:00
Jeffrey Walton 7eb0535a98
Call Deflator::IsolatedInitialize during Gzip init (GH #660) 2018-07-11 17:10:32 -04:00
Jeffrey Walton 9b4476ef7b
Update symbol script for Crypto++ 7.x 2018-07-11 16:16:32 -04:00
Jeffrey Walton d094bc61cd
Update comments 2018-07-11 15:12:53 -04:00
Jeffrey Walton b3fe24b8b5
Remove CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS support (GH #682)
We were able to gut CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS for everything except Rijndael. Rijndael uses unaligned accesses on x86 to harden against timing attacks.
There's a little more to CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS and Rijndael. If we remove unaligned access then AliasedWithTable hangs in an endless loop on non-AESNI machines. So care must be taken when trying to remove the vestige from Rijndael.
2018-07-11 11:40:25 -04:00
Jeffrey Walton 1e77a72ed6
Disable Cryptogams AES under Clang
What a surprise... Clang pretends to be GCC with __GNUC__ but fails to consume the source file
2018-07-11 09:19:11 -04:00
Jeffrey Walton 3ff7d7f028
Add ARM AES asm implementation from Cryptogams (GH #683) 2018-07-11 06:59:44 -04:00
Jeffrey Walton bdac2de36e
Increase use of ptrdiff_t when performing pointer math 2018-07-10 17:41:23 -04:00
Jeffrey Walton 1836a7feb4
Cleanup datatest.cpp
Switch to non-blocking rngs for Linux and Windows
2018-07-10 17:34:55 -04:00
Jeffrey Walton 004d213e29
Increase use of ptrdiff_t when performing pointer math 2018-07-10 17:31:01 -04:00
Jeffrey Walton 961e9b483c Revert "Clear conversion warning"
This reverts commit 9748c3cf3e. It broke Windows.
2018-07-10 17:18:11 -04:00
Jeffrey Walton a2ca2cfc0f
Use OS rng as alternate test generator 2018-07-10 17:08:13 -04:00
Jeffrey Walton 722d3e38c1
Avoid cast in PtrDiff
ptrdiff_t is the return type
2018-07-10 11:55:50 -04:00
Jeffrey Walton 9748c3cf3e
Clear conversion warning 2018-07-10 11:54:13 -04:00
Jeffrey Walton 45fcd47c07
Clear conversion warning 2018-07-10 11:37:21 -04:00
Jeffrey Walton 3b6872a8cd
Avoid cast in PtrDiff
ptrdiff_t is the return type
2018-07-10 11:36:48 -04:00
Jeffrey Walton 9e50eae673
Clear unused variable warning 2018-07-10 11:30:32 -04:00
Jeffrey Walton 33a1baa1a5
Clear conversion warning 2018-07-10 11:30:13 -04:00
Jeffrey Walton 50f99ae802
Increase use of ptrdiff_t when performing pointer math 2018-07-10 09:21:52 -04:00
Jeffrey Walton 59d8ccd64f
Switch to PtrAdd and PtrSub in ByteQueue 2018-07-10 08:25:35 -04:00
Jeffrey Walton 8dc15f4c56
Fix ARMv7 detection after c6c44aa5d1 2018-07-10 05:08:27 -04:00
Jeffrey Walton c6c44aa5d1
Add PtrAdd and PtrSub helper functions
This helps contain UB on pointer subtraction by ensuring a ptrdiff_t is used. The code is a little uglier but it is also more portable.
2018-07-10 05:00:02 -04:00
Jeffrey Walton c186689273
Add RandomizedTransfer overload 2018-07-10 02:55:29 -04:00
Jeffrey Walton 4c5487b0e4
Increase use of ptrdiff_t when performing pointer math
Increase use of ptrdiff_t when performing pointer math
Reduce AlgorithmProvider overrides
Fix CPU_ProbeARMv7 on Aarch64
2018-07-09 06:31:17 -04:00
Jeffrey Walton 86773e942c
Make GNUmakefile aware of *.S files 2018-07-09 06:19:58 -04:00
Jeffrey Walton 03bceda159
Use C++ style casts and take addr of elem 0 for non-const pointers 2018-07-09 03:08:28 -04:00
Jeffrey Walton 664d67e0f6
Add additional asserts in modes.cpp 2018-07-08 22:14:17 -04:00
Jeffrey Walton 517d552a91
Add ARMv7 cpu detection 2018-07-08 02:49:21 -04:00
Jeffrey Walton 886e48d85d
Fix failed link on ARM and friends 2018-07-07 21:34:00 -04:00
Jeffrey Walton f065f193c1
Fixed failed ChaCha tests
We switched to the pattern used for Salsa but did not update the name in the test vector file
2018-07-06 22:30:11 -04:00
Jeffrey Walton 71cc002fd5
Update documentation 2018-07-06 22:12:15 -04:00
Jeffrey Walton 6d1bb00b05
Update Makefile DLLSRCS to include latest files 2018-07-06 22:10:11 -04:00
Jeffrey Walton e6f87274c1
Update Makefile DLLSRCS to include latest files 2018-07-06 21:54:55 -04:00
Jeffrey Walton b74a6f4445
Add algorithm provider member function to Algorithm class 2018-07-06 09:23:37 -04:00
Jeffrey Walton 6d9047b444
Fix spelling 2018-07-06 09:21:13 -04:00
Jeffrey Walton 3dcceb55f5
Squash MS LNK4221 and libtool warnings 2018-07-06 03:46:25 -04:00
Jeffrey Walton 77cd5c69d0
Update documentation 2018-07-06 03:18:45 -04:00
Jeffrey Walton 9117d074ea
Update documentation 2018-07-06 03:09:22 -04:00
Jeffrey Walton ecababa006
Update documentation 2018-07-06 02:57:48 -04:00
Jeffrey Walton 0cee6f01f0
Squash MS LNK4221 and libtool warnings 2018-07-06 01:22:38 -04:00
Jeffrey Walton bc8da71ab3
Fix early Fedora compiles 2018-07-06 01:14:28 -04:00
Jeffrey Walton 30b304b0f1
Update comments 2018-07-06 00:35:01 -04:00
Jeffrey Walton 97a1e8cae2
Use SecBlock for keys and IVs 2018-07-06 00:11:10 -04:00
Jeffrey Walton 320c68ecbf
Add *.cxx to .gitignore 2018-07-05 23:33:44 -04:00
Jeffrey Walton 8c871b40ae
Update comments 2018-07-05 22:42:17 -04:00
Jeffrey Walton d7a751b39a
Fix missing test vector in FileList 2018-07-05 19:40:17 -04:00
Jeffrey Walton a1887d4824
Add missing HC-256 2018-07-05 19:20:35 -04:00
Jeffrey Walton 24d54f06e6
Remove GetOptimalBlockSize from Rabbit
The AdditiveCipherConcretePolicy adapter already provides it
2018-07-05 11:48:52 -04:00
Jeffrey Walton 717a81484a
Switch to size_t datatype 2018-07-05 10:42:55 -04:00
Jeffrey Walton c9c51a5e01
Rework OperateKeystream (GH #678)
This improves Rabbit performance on a Core i5 6400 from 5.5 cpb to 4.7 cpb
2018-07-05 08:41:44 -04:00
Jeffrey Walton 665e16d340
Remove unneeded input variable 2018-07-05 08:22:59 -04:00
Jeffrey Walton fd5dc95f96
Fix spelling 2018-07-05 07:13:04 -04:00
Jeffrey Walton 23c8bfde7e
Rework OperateKeystream (GH #680)
This improves performance on a Core i5 6400 from 5.4 cpb to 2.9 cpb
2018-07-05 07:11:44 -04:00
Jeffrey Walton 989bf6dc5e
Add HC-256 stream cipher (GH #680) 2018-07-05 06:43:04 -04:00
Jeffrey Walton 069d85d3f8
Update comments 2018-07-05 06:07:47 -04:00
Jeffrey Walton ccc1b71bc8
Move TEA and XTEA to lightweight block ciphers 2018-07-05 01:59:42 -04:00
Jeffrey Walton 4feb3731ff
Fix HC-128 benchmark 2018-07-05 01:57:30 -04:00
Jeffrey Walton 541cdf373c
Update documentation 2018-07-05 01:26:48 -04:00
Jeffrey Walton 8e430daadf
Add additional HC-128 test vectors (GH #679) 2018-07-05 00:45:52 -04:00
Jeffrey Walton dd31eb80c0
Add HC-128 stream cipher (GH #679) 2018-07-05 00:29:07 -04:00
Jeffrey Walton 93f46e4302
Update comments 2018-07-04 21:53:08 -04:00
Jeffrey Walton bfe91dc732
Add additional Rabbit test vectors (GH #678) 2018-07-04 19:34:51 -04:00
Jeffrey Walton 07be1caeb3
Update documentation 2018-07-04 07:08:14 -04:00
Jeffrey Walton c73b471dec
Fix CHAM compile on ARMv7 2018-07-04 06:48:54 -04:00
Jeffrey Walton 476559e763
Update documentation 2018-07-04 04:08:33 -04:00
Jeffrey Walton 5e0d31fa8b
Update documentation 2018-07-04 04:05:56 -04:00
Jeffrey Walton 0ebee8708e
Update documentation 2018-07-04 03:59:22 -04:00
Jeffrey Walton ffc0198991
Update documentation 2018-07-04 03:55:58 -04:00
Jeffrey Walton d00777e1d7
Add Rabbit stream cipher (GH #678) 2018-07-04 03:47:28 -04:00
Jeffrey Walton 94e0b3c954
Update documentation 2018-07-03 23:35:36 -04:00
Jeffrey Walton 65806e5ee9
Switch back to _mm_load_sd to load subkeys
We performed an intermediate copy while attempting to isolate GH #677.
2018-07-03 23:13:40 -04:00
Jeffrey Walton 78ece1b2aa
Fix temporary array size (GH #675)
cryptest.sh and UBsan caught a "secblock.h:389:4: runtime error: load of value 206, which is not a valid value for type 'bool'". m_t[4] is accessed in UncheckedSetKey. The extra m_t[] element was inadvertently removed when ProcessAndXorBlock no longer used it.
2018-07-03 22:41:04 -04:00
Jeffrey Walton f8f6afd1fa
Use IsZero()/NotZero() for 0 denominator test 2018-07-03 22:04:27 -04:00
Jeffrey Walton ac1439de59
Update documentation 2018-07-01 22:25:07 -04:00
Jeffrey Walton 904e8ce283
Remove code to accomodate variable block size (GH #535)
This should have occured when we yanked the variable block size experiment
2018-07-01 22:20:45 -04:00
Jeffrey Walton 3b92255b8b
Add recipe to trim trailing whitespace 2018-07-01 21:45:01 -04:00
Jeffrey Walton 7bfeb4f3a2
Add recipe to call dos2unix if available 2018-07-01 21:38:47 -04:00
Jeffrey Walton aa80c7d4ac
Fix bad CHAM-64/ECB decryption with Clang at -O1 (GH #677)
This changes both the encryption and decryption loops to perform 4 rounds per iteration rather than 8 rounds. Decryption was necessary for this bug. Encryption was included to keep things symmetrical in case of future maintenance
2018-07-01 11:01:34 -04:00
Jeffrey Walton 1d7358e971
Switch to _mm_loadu_si128 for SIMECK key loading 2018-07-01 08:47:09 -04:00
Jeffrey Walton 350a47f8b3
Clear unused variable warnings 2018-07-01 08:09:54 -04:00
Jeffrey Walton 9a6a0cbc9e
Used fixed rounds in encrypt and decrypt functions 2018-07-01 07:10:39 -04:00
Jeffrey Walton 7eaccfa47b
Update comments 2018-07-01 04:03:30 -04:00
Jeffrey Walton d6cde47bbd
Update documentation 2018-07-01 03:53:45 -04:00
Jeffrey Walton da32ed4679
Fix versioning that cross-pollinated when building docs 2018-07-01 03:46:11 -04:00
Jeffrey Walton c58ea35e23
Update documentation 2018-07-01 03:42:17 -04:00
Jeffrey Walton 64d15aff66
Update documentation 2018-07-01 03:29:12 -04:00
Jeffrey Walton b35df75890
Update attribution for SIMECK 2018-07-01 03:21:42 -04:00
Jeffrey Walton 01f11727ad
Fix bench1.cpp from SIMECK testing 2018-07-01 03:14:53 -04:00
Jeffrey Walton 08e6137082
Add SIMECK-64 SSSE3 implementation (GH #675) 2018-07-01 03:11:00 -04:00
Jeffrey Walton 4a7814be7e
Remove alignment of double for 64-bit template 2018-07-01 02:00:10 -04:00
Jeffrey Walton 810f5c1859
Remove GCC_NO_UBSAN and double casts 2018-07-01 01:23:35 -04:00
Jeffrey Walton 7f86f498d6
Remove GCC_NO_UBSAN attribute 2018-07-01 01:02:33 -04:00
Jeffrey Walton 011a66d03b
Clear sign compare warning 2018-07-01 01:01:36 -04:00
Jeffrey Walton 3d29f99af7
Clear warnings at -Wall -Wextra 2018-06-30 19:40:47 -04:00
Jeffrey Walton 1be58db828
Avoid casting among datatypes in CHAM
Clang 5.0 and 6.0 at -O1 is producing code that fails for CHAM-64/ECB
2018-06-30 18:48:20 -04:00
Jeffrey Walton 5fd0e98a41
Add additional SIMECK tests (GH #675) 2018-06-30 09:48:09 -04:00
Jeffrey Walton 8b3c472333
Add additional SIMECK tests (GH #675) 2018-06-30 09:41:38 -04:00
Jeffrey Walton 61f635b837
Add additional SIMECK tests (GH #675) 2018-06-30 08:25:32 -04:00
Jeffrey Walton 7fdb66d46e
Fix cryptest-cmake message 2018-06-30 04:30:58 -04:00
Jeffrey Walton ac036496d3
Add Simeck lightweight block cipher (GH #675)
Add Simeck lightweight block cipher (GH #675)
2018-06-30 02:43:12 -04:00
Jeffrey Walton e18de4d5f9
Re-engage SSE2 ASM for SHA-256 (GH# 674)
I'm not usre where exactly the break occured, but it was probably due to the BASE+SIMD rewrite. Thanks to tesbayda for tracking it down.
2018-06-29 21:02:53 -04:00
Jeffrey Walton 9a75d09ca4
Add cleanup function to cryptest-cmake.sh 2018-06-29 19:43:31 -04:00
Jeffrey Walton 598e371b8a
Add cryptest-cmake.sh 2018-06-29 19:28:16 -04:00
Jeffrey Walton 574097bd6f
Add cryptest-autotools.sh 2018-06-29 17:04:22 -04:00
Jeffrey Walton b613522794
Fix copy/paste error 2018-06-25 15:38:50 -04:00
Jeffrey Walton f5c86217c0
Use default alignment for GetBlock 2018-06-24 16:05:37 -04:00
Jeffrey Walton afd3b5c596
Place HIGHT F0 and F1 in unnamed namespace 2018-06-24 01:39:09 -04:00
Jeffrey Walton b53842bcdc
Fix CRYPTOPP_DISABLE_ASM build 2018-06-24 01:22:37 -04:00
Jeffrey Walton d12229d463
Fix bench1.cpp from HIGHT testing 2018-06-24 01:01:39 -04:00
Jeffrey Walton 2f5b110b52
Add HIGHT lightweight block cipher (GH #672) 2018-06-24 00:54:16 -04:00
Jeffrey Walton 32e2be647a
Make CHAM_Info public 2018-06-23 21:21:42 -04:00
Jeffrey Walton 404e6cfae3
Remove CRYPTOPP_LEA_ARM_SPLAT_ROUNDKEYS
GCC 8 was producing bad decryption results for CBC mode on x86. NEON and Aarch64 was fine. We lose 0.6 cpb so LEA runs around 3.5 cpb instead of 2.9 cpb. It would be nice to pinpoint the GCC issue but it is kind of difficult at the moment.
2018-06-23 20:55:17 -04:00
Jeffrey Walton 3af3b8019b
Add additional LEA test vectors (GH #669) 2018-06-23 17:58:12 -04:00
Jeffrey Walton 72d5d42746
Add additional LEA test vectors (GH #669) 2018-06-23 17:38:07 -04:00
Jeffrey Walton d9797c414a
Add CRYPTOPP_LEA_ARM_SPLAT_ROUNDKEYS for LEA 2018-06-23 14:19:18 -04:00
Jeffrey Walton 2d0d87b57a
Use pre-splatted key table for LEA NEON and Aarch64 2018-06-23 13:47:59 -04:00
Jeffrey Walton 09c8ae2835
Use inline for LEA_Encryption and LEA_Decryption 2018-06-23 12:58:55 -04:00
Jeffrey Walton 8279fab432
Fix AdvancedProcessBlocks128_6x1_NEON template name 2018-06-23 12:35:06 -04:00
Jeffrey Walton 527613df22
Update documentation 2018-06-23 12:27:25 -04:00
Jeffrey Walton d0b5dac162
Update comments 2018-06-23 04:49:10 -04:00
Jeffrey Walton 9980d30734
Add LEA-128 NEON and ARMv8 implementation (GH #669)
LEA-128(128) from 35.6 cpb to 14.11 cpb on a LeMaker HiKey dev-board. LEA-128 from 12.60 cpb to 11.89 cpb on AMD Opteron 1100.
2018-06-23 03:54:51 -04:00
Jeffrey Walton 80ae9f4f0a
Add AVX512 rotates to RotateLeft and RotateRight templates 2018-06-22 17:44:16 -04:00
Jeffrey Walton fa7714f6cb
Add LEA-128 SSSE3 implementation (GH #669)
LEA-128(128) from 6.73 cpb to 2.84 cpb on modern Core-i5 6400. LEA-128 from 10.12 cpb to 7.84 cpb antique Core2 Duo.
2018-06-22 16:26:27 -04:00
Jeffrey Walton ea109e0f8f
Add CHAM and LEA to cryptest.nmake 2018-06-21 13:34:18 -04:00
Jeffrey Walton 68305324ef
Fix C2719 on MSVC
"error C2719: 'value': formal parameter with __declspec(align('16')) won't be aligned"
2018-06-21 13:32:27 -04:00
Jeffrey Walton 73513d0d04
Whitespace check-in 2018-06-21 01:29:30 -04:00
Jeffrey Walton b00a378a8d
Add CHAM64 SSSE3 implementation (PR #670)
CHAM64 from 20 cpb to 14 cpb on modern iCore. CHAM64 from 90 cpb to 18 cpb antique Core2 Duo
2018-06-21 00:37:10 -04:00
Jeffrey Walton a80b1d35b0
Parameterize word type for subkeys in AdvancedProcessBlocks templates
This was needed a while ago but we mostly side-stepped the issues with casts. CHAM64 uses a word16 type for subkeys and a cast won't fix it because we favor word32 for 64-bit block sizes.
2018-06-20 19:25:52 -04:00
Jeffrey Walton a6cdf2bfd1
Switch to _mm_loadu_pd to load round keys
This is profitable by 0.1 to 0.2 cpb on a modern Core-i5
2018-06-20 01:20:27 -04:00
Jeffrey Walton 1fd8d612ea
Specialize single word UnpackXMM 2018-06-19 21:35:44 -04:00
Jeffrey Walton 5e41d5d9b6
Fix SSSE3 include guard
Use single XMM word for subkeys
2018-06-19 20:15:30 -04:00
Jeffrey Walton 6138829572
Add CHAM128 SSSE3 implementation (PR #670)
CHAM-128(128) from 10.5 cpb to 4.1 cpb. CHAM-128(256) from 12.5 cpb to 4.7 cpb.
2018-06-19 18:03:28 -04:00
Jeffrey Walton 34dcb0d4cd
Add additional CHAM test vectors (PR #670)
This is in preparation for SSE and large block processing. CTR mode is used because AdvancedProcessBlocks128_4x1_SSE
2018-06-19 17:09:43 -04:00
Jeffrey Walton 55ba5de9b5
Fix typo 2018-06-18 19:00:30 -04:00
Jeffrey Walton 0ccdc197b7
Add AVX and AVX2 runtime feature detection (GH #671)
There are no corresponding defines in config.h at the moment. Programs will have to use the preprocessor macros __AVX__ and __AVX2__ to determine when they are available.
2018-06-18 18:33:17 -04:00
Jeffrey Walton 207c6fcb1a
Update documentation 2018-06-18 00:14:31 -04:00
Jeffrey Walton 54d5100344
Add CHAM lightweight block cipher (PR #670)
Add CHAM lightweight block cipher
2018-06-17 23:24:47 -04:00
Jeffrey Walton 30b2de26f4
Update documentation 2018-06-17 22:49:59 -04:00
Jeffrey Walton 1f06c512c4
Add LEA lightweight block cipher (GH #669) 2018-06-17 22:36:41 -04:00
Jeffrey Walton f320e7d92a
Fix missing constants in Threefish (GH #664) 2018-06-03 09:10:45 -04:00
Jeffrey Walton 1543de863c
Fix Kalyna512_Info parameter (GH #662) 2018-06-02 16:50:28 -04:00
Jeffrey Walton d286f89b3f
Fix Threefish blocksize parameter (GH #663) 2018-06-02 16:28:25 -04:00
Jeffrey Walton edc7689a7f
Fix overcommit resources for Scrypt parallelization (GH #641) 2018-05-20 08:33:21 -04:00
Mouse a0f91aeb25
Merge pull request #640 from alanbirtles/patch-1
Workaround for #636
2018-05-13 12:37:18 -04:00
Jeffrey Walton 4fc0fefc6e
Add missing include to pwdbased.h (GH #657) 2018-05-13 10:42:50 -04:00
Marcel Raad 7c1d296283 Fix clang warnings in headers (#655)
* remove superfluous semicolon

* Remove C-style casts from public headers

clang warns about them with -Wold-style-cast. It also warns about
implicitly casting away const with -Wcast-qual. Fix both by removing
unnecessary casts and converting the remaining ones to C++ casts.
2018-05-10 19:59:21 -04:00
Jeffrey Walton a07a0e5e5f
Add recipe to install the library only (GH #653)
Some distros don't want to install cryptest.exe. For folks who don't want to install the test program, they can issue 'make install-lib'.
install-lib is a non-standard target, but the GNU Coding Standard does not have a standard target for the task.
2018-05-06 00:10:38 -04:00
Jeffrey Walton 3e965ac9b3
Back-off on Hash asserts (GH #652)
The asserts were a little aggressive and caused very noisy Debug runs. The library itself was one of the biggest offenders.
2018-05-05 23:27:55 -04:00
Jeffrey Walton d1087291b3
Back-off on Hash asserts (GH #652)
The asserts were a little aggressive and caused very noisy Debug runs. The library itself was one of the biggest offenders.
2018-05-05 23:17:44 -04:00
Jeffrey Walton 3159969808
Back-off on Hash asserts (GH #652)
The asserts were a little aggressive and caused very noisy Debug runs. The library itself was one of the biggest offenders.
2018-05-05 22:56:15 -04:00
Jeffrey Walton 3deb24b7de
Fix Android build after renaming defines for CMake
This change should have occurred during commits 188e0df650 and 5422f0c13a.
2018-05-05 21:46:17 -04:00
Jeffrey Walton 188e0df650
Rename CRYPTOPP_DISABLE_SHA → CRYPTOPP_DISABLE_SHANI …
This aligns both config.h and Cmake. Also see Gentoo Issue 654598 (https://bugs.gentoo.org/654598)
2018-05-04 10:10:50 -04:00
Jeffrey Walton 5422f0c13a
Rename CRYPTOPP_DISABLE_AES → CRYPTOPP_DISABLE_AESNI
This aligns both config.h and Cmake. Also see Gentoo Issue 654598 (https://bugs.gentoo.org/654598)
2018-05-03 21:28:17 -04:00
Asen Kovachev 039db17da7 Add CRYPTOPP_ASSERT to match Keccak and SHA3 (#654)
As described in https://github.com/weidai11/cryptopp/issues/652 for consistency we should add assert in all hash transformations. The expectation is to have a good pointer and a non-0 length or a null pointer and 0-length.
2018-05-03 20:12:34 -04:00
Jeffrey Walton 91faa5d399
Add AdditionalOptions property to VCXPROJ files (GH #649) 2018-05-01 23:42:04 -04:00
Jeffrey Walton 55071c49c1
Fix failed Android tests on Travis
This change should have been made at https://github.com/weidai11/cryptopp/commit/e2bc3b55caab
2018-04-26 21:35:01 -04:00
PetteriHuusko d132639881 Fix ios build for cases where Xcode is installed in a path with spaces (PR #646) 2018-04-26 06:56:26 -04:00
Flo 63b655d7ee Access modifiers for SIMON and SPECK ciphers modified. (#644)
- ProcessAndXorBlock
- AdvancedProcessBlocks
now public instead of protected.
2018-04-20 20:54:02 -04:00
Jeffrey Walton e2bc3b55ca
Rename setenv-android.sh to setenv-android-gcc.sh (GH #637)
This makes room for a Clang/LLVM version of the script
2018-04-19 22:39:07 -04:00
alanbirtles a4acbb38da
Workaround for #636
Temporarily switch to AT&T syntax in ASJ for clang 5.0.0+ and apple clang 9.0.0+ to workaround https://bugs.llvm.org/show_bug.cgi?id=36144
2018-04-12 14:59:15 +01:00
Jeffrey Walton bdd0f02867
Make chenage-version.sh OS X friendly 2018-04-08 16:19:16 -04:00
Jeffrey Walton 4bb331f5d0
Post-release version increment 2018-04-08 15:58:25 -04:00
371 changed files with 92473 additions and 31828 deletions

7
.gitignore vendored
View File

@ -1,3 +1,10 @@
####################################
# C++ generic ignore
# Allows you to use test.cxx and
# avoid getting in the way of things
####################################
*.cxx
####################
## Crypto++ specific
####################

View File

@ -4,14 +4,13 @@ os:
- linux
- osx
dist: trusty
dist: xenial
sudo: required
# OS X only supports one image. Use the latest.
osx_image: xcode9.1
osx_image: xcode10.1
git:
depth: 3
depth: 5
compiler:
- clang
@ -20,10 +19,11 @@ compiler:
env:
global:
- BUILD_JOBS=2
- ANDROID_HOME=$HOME/android/sdk
- ANDROID_NDK=$HOME/android/sdk/ndk-bundle
- ANDROID_SDK_ROOT=$ANDROID_HOME
- ANDROID_NDK_ROOT=$ANDROID_NDK
- ANDROID_HOME="$HOME/.android"
- ANDROID_SDK="$HOME/android/sdk/"
- ANDROID_NDK="$HOME/android/sdk/ndk-bundle"
- ANDROID_SDK_ROOT="$ANDROID_SDK"
- ANDROID_NDK_ROOT="$ANDROID_NDK"
matrix:
- BUILD_MODE="all"
@ -39,85 +39,183 @@ matrix:
# Skip GCC on OS X entirely
- os: osx
compiler: gcc
# Skip UBsan due to GCC 4.8
- os: linux
compiler: gcc
env: BUILD_MODE="ubsan"
# Skip UBsan due to Clang 3.4
- os: osx
compiler: clang
env: BUILD_MODE="ubsan"
include:
- os: linux
env:
- BUILD_MODE=android
- PLATFORM=armeabi
- BUILD_OS=linux
- BUILD_MODE=autotools
- os: linux
env:
- BUILD_OS=linux
- BUILD_MODE=cmake
- os: osx
env:
- BUILD_OS=osx
- BUILD_MODE=autotools
- os: osx
env:
- BUILD_OS=osx
- BUILD_MODE=cmake
- os: linux
env:
- BUILD_OS=linux
- BUILD_MODE=android
- PLATFORM=armeabi-v7a
- os: linux
env:
- BUILD_OS=linux
- BUILD_MODE=android
- PLATFORM=armv7a-neon
- os: linux
env:
- BUILD_OS=linux
- BUILD_MODE=android
- PLATFORM=aarch64
- os: linux
env:
- BUILD_OS=linux
- BUILD_MODE=android
- PLATFORM=mipsel
- os: linux
env:
- BUILD_OS=linux
- BUILD_MODE=android
- PLATFORM=mipsel64
- os: linux
env:
- BUILD_OS=linux
- BUILD_MODE=android
- PLATFORM=x86
- os: linux
env:
- BUILD_OS=linux
- BUILD_MODE=android
- PLATFORM=x86_64
- os: osx
env:
- BUILD_OS=osx
- BUILD_MODE=ios
- PLATFORM=iPhoneOS
- os: osx
env:
- BUILD_OS=osx
- BUILD_MODE=ios
- PLATFORM=Arm64
- os: osx
env:
- BUILD_OS=osx
- BUILD_MODE=ios
- PLATFORM=WatchOS
- os: osx
env:
- BUILD_OS=osx
- BUILD_MODE=ios
- PLATFORM=AppleTVOS
- os: osx
env:
- BUILD_OS=osx
- BUILD_MODE=ios
- PLATFORM=iPhoneSimulator
- PLATFORM=WatchSimulator
- os: osx
env:
- BUILD_OS=osx
- BUILD_MODE=ios
- PLATFORM=AppleTVSimulator
allow_failures:
- os: osx
env:
- BUILD_OS=osx
- BUILD_MODE=ios
- PLATFORM=WatchOS
- os: osx
env:
- BUILD_OS=osx
- BUILD_MODE=ios
- PLATFORM=iPhoneSimulator
- os: osx
env:
- BUILD_OS=osx
- BUILD_MODE=ios
- PLATFORM=WatchSimulator
- os: osx
env:
- BUILD_OS=osx
- BUILD_MODE=ios
- PLATFORM=AppleTVSimulator
- os: linux
env:
- BUILD_OS=linux
- BUILD_MODE=android
- PLATFORM=armeabi
- os: linux
env:
- BUILD_OS=linux
- BUILD_MODE=android
- PLATFORM=mipsel
- os: linux
env:
- BUILD_OS=linux
- BUILD_MODE=android
- PLATFORM=mipsel64
- os: linux
env:
- BUILD_OS=linux
- BUILD_MODE=android
- PLATFORM=aarch64
- os: linux
env:
- BUILD_OS=linux
- BUILD_MODE=android
- PLATFORM=armeabi-v7a
- os: linux
env:
- BUILD_OS=linux
- BUILD_MODE=android
- PLATFORM=armv7a-neon
- os: linux
env:
- BUILD_OS=linux
- BUILD_MODE=android
- PLATFORM=x86
- os: linux
env:
- BUILD_OS=linux
- BUILD_MODE=android
- PLATFORM=x86_64
before_install:
- |
if [[ "$BUILD_MODE" == "android" ]]; then
TestScripts/install-android.sh
if [[ "$BUILD_OS" == "linux" ]] && [[ "$BUILD_MODE" == "android" ]]; then
# https://github.com/travis-ci/travis-ci/issues/9037
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A145
sudo apt-get update
source TestScripts/setenv-travis.sh
bash TestScripts/install-android.sh
fi
if [[ "$BUILD_OS" == "linux" ]] && [[ "$BUILD_MODE" == "autotools" ]]; then
# https://github.com/travis-ci/travis-ci/issues/9037
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A145
sudo apt-get install -y autoconf automake libtool
fi
script:
- |
if [[ "$BUILD_MODE" == "ios" ]]; then
cp ./TestScripts/setenv-ios.sh .
TestScripts/cryptest-ios.sh
cp TestScripts/setenv-ios.sh .
cp TestScripts/cryptest-ios.sh .
bash cryptest-ios.sh
elif [[ "$BUILD_MODE" == "android" ]]; then
cp ./TestScripts/setenv-android.sh .
TestScripts/cryptest-android.sh
cp TestScripts/setenv-android-gcc.sh .
cp TestScripts/cryptest-android.sh .
bash cryptest-android.sh
elif [[ "$BUILD_MODE" == "autotools" ]]; then
cp TestScripts/cryptest-autotools.sh .
bash cryptest-autotools.sh
elif [[ "$BUILD_MODE" == "cmake" ]]; then
cp TestScripts/cryptest-cmake.sh .
bash cryptest-cmake.sh
elif [[ "$BUILD_MODE" == "debug" ]]; then
CXXFLAGS="-DDEBUG -g2 -O1" make -j "$BUILD_JOBS"
./cryptest.exe v

View File

@ -41,7 +41,7 @@ PROJECT_NAME = Crypto++
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = 7.0
PROJECT_NUMBER = 8.3
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
@ -1225,8 +1225,7 @@ DOCSET_PUBLISHER_NAME = Crypto++
# compressed HTML files.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.
GENERATE_HTMLHELP = YES
GENERATE_HTMLHELP = NO
# The CHM_FILE tag can be used to specify the file name of the resulting .chm
# file. You can add a path in front of the file if the result should not be
@ -1494,7 +1493,10 @@ MATHJAX_CODEFILE =
# The default value is: YES.
# This tag requires that the tag GENERATE_HTML is set to YES.
SEARCHENGINE = NO
# JW: Do _not_ enable server-side search. It consumes too many resources
# and results in OOM Kills on MySQL, which corrupts the database.
# https://github.com/weidai11/cryptopp/issues/720
SEARCHENGINE = NO
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
# implemented using a web server instead of a web client using Javascript. There
@ -1506,7 +1508,10 @@ SEARCHENGINE = NO
# The default value is: NO.
# This tag requires that the tag SEARCHENGINE is set to YES.
SERVER_BASED_SEARCH = NO
# JW: Do _not_ enable server-side search. It consumes too many resources
# and results in OOM Kills on MySQL, which corrupts the database.
# https://github.com/weidai11/cryptopp/issues/720
SERVER_BASED_SEARCH = NO
# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
# script for searching. Instead the search results are written to an XML file

View File

@ -1,10 +1,12 @@
3way.cpp
3way.h
adhoc.cpp.proto
adv-simd.h
adv_simd.h
adler32.cpp
adler32.h
aes.h
aes_armv4.h
aes_armv4.S
algebra.cpp
algebra.h
algparam.cpp
@ -13,9 +15,10 @@ arc4.cpp
arc4.h
ariatab.cpp
aria.cpp
aria-simd.cpp
aria_simd.cpp
aria.h
argnames.h
arm_simd.h
asn.cpp
asn.h
authenc.cpp
@ -30,9 +33,11 @@ bench.h
bds10.zip
bench1.cpp
bench2.cpp
bench3.cpp
bfinit.cpp
blake2.cpp
blake2-simd.cpp
blake2s_simd.cpp
blake2b_simd.cpp
blake2.h
blowfish.cpp
blowfish.h
@ -48,16 +53,33 @@ cbcmac.h
ccm.cpp
ccm.h
chacha.cpp
chacha_avx.cpp
chacha_simd.cpp
chacha.h
chachapoly.cpp
chachapoly.h
cham.cpp
cham_simd.cpp
cham.h
channels.cpp
channels.h
cmac.cpp
cmac.h
config.h
config_align.h
config_asm.h
config_cpu.h
config_cxx.h
config_dll.h
config_int.h
config_misc.h
config_ns.h
config_os.h
config_ver.h
cpu.cpp
cpu.h
crc.cpp
crc-simd.cpp
crc_simd.cpp
crc.h
cryptdll.vcxproj
cryptdll.vcxproj.filters
@ -73,6 +95,8 @@ cryptlib.h
cryptlib.vcxproj
cryptlib.vcxproj.filters
cryptopp.rc
darn.cpp
darn.h
datatest.cpp
default.cpp
default.h
@ -90,6 +114,13 @@ dlltest.vcxproj
dlltest.vcxproj.filters
dmac.h
drbg.h
donna.h
donna_32.h
donna_64.h
donna_sse.h
donna_32.cpp
donna_64.cpp
donna_sse.cpp
dsa.cpp
dsa.h
eax.cpp
@ -121,13 +152,14 @@ fips140.h
fipsalgt.cpp
fipstest.cpp
fltrimpl.h
gcm-simd.cpp
gcm_simd.cpp
gcm.cpp
gcm.h
gf256.cpp
gf256.h
gf2_32.cpp
gf2_32.h
gf2n_simd.cpp
gf2n.cpp
gf2n.h
gfpcrypt.cpp
@ -137,8 +169,14 @@ gost.h
gzip.cpp
gzip.h
hashfwd.h
hc128.cpp
hc128.h
hc256.cpp
hc256.h
hex.cpp
hex.h
hight.h
hight.cpp
hkdf.h
hmac.cpp
hmac.h
@ -158,8 +196,13 @@ kalynatab.cpp
kalyna.cpp
kalyna.h
keccak.cpp
keccak_core.cpp
keccak_simd.cpp
keccak.h
lubyrack.h
lea.cpp
lea_simd.cpp
lea.h
luc.cpp
luc.h
mars.cpp
@ -186,9 +229,7 @@ mqv.h
naclite.h
nbtheory.cpp
nbtheory.h
neon-simd.cpp
network.cpp
network.h
neon_simd.cpp
nr.h
oaep.cpp
oaep.h
@ -208,8 +249,11 @@ poly1305.cpp
poly1305.h
polynomi.cpp
polynomi.h
ppc-simd.h
ppc-simd.cpp
ppc_power7.cpp
ppc_power8.cpp
ppc_power9.cpp
ppc_simd.cpp
ppc_simd.h
pssr.cpp
pssr.h
pubkey.cpp
@ -221,6 +265,8 @@ rabin.cpp
rabin.h
randpool.cpp
randpool.h
rabbit.cpp
rabbit.h
rc2.cpp
rc2.h
rc5.cpp
@ -233,13 +279,15 @@ rdrand.s
rdrand.asm
rdrand.cpp
rdrand.h
rdseed.asm
rdtables.cpp
regtest1.cpp
regtest2.cpp
regtest3.cpp
regtest4.cpp
resource.h
rijndael.cpp
rijndael-simd.cpp
rijndael_simd.cpp
rijndael.h
ripemd.cpp
ripemd.h
@ -265,40 +313,52 @@ serpent.cpp
serpent.h
serpentp.h
sha.cpp
sha-simd.cpp
sha_simd.cpp
sha.h
sha1_armv4.h
sha1_armv4.S
sha256_armv4.h
sha256_armv4.S
sha512_armv4.h
sha512_armv4.S
sha3.cpp
sha3.h
shacal2.cpp
shacal2-simd.cpp
shacal2_simd.cpp
shacal2.h
shake.cpp
shake.h
shark.cpp
shark.h
sharkbox.cpp
simple.cpp
simple.h
siphash.h
simeck.cpp
simeck_simd.cpp
simeck.h
simon.cpp
simon-simd.cpp
simon64_simd.cpp
simon128_simd.cpp
simon.h
skipjack.cpp
skipjack.h
sm3.cpp
sm3.h
sm4.cpp
sm4_simd.cpp
sm4.h
smartptr.h
socketft.cpp
socketft.h
sosemanuk.cpp
sosemanuk.h
speck.cpp
speck-simd.cpp
speck64_simd.cpp
speck128_simd.cpp
speck.h
square.cpp
square.h
squaretb.cpp
sse-simd.cpp
sse_simd.cpp
stdcpp.h
strciphr.cpp
strciphr.h
@ -312,8 +372,6 @@ threefish.h
tiger.cpp
tiger.h
tigertab.cpp
trdlocal.cpp
trdlocal.h
trunhash.h
ttmac.cpp
ttmac.h
@ -326,21 +384,25 @@ validat1.cpp
validat2.cpp
validat3.cpp
validat4.cpp
validat5.cpp
validat6.cpp
validat7.cpp
validat8.cpp
validat9.cpp
validat10.cpp
validate.h
vmac.cpp
vmac.h
vs2005.zip
wait.cpp
wait.h
wake.cpp
wake.h
whrlpool.cpp
whrlpool.h
winpipes.cpp
winpipes.h
words.h
x64dll.asm
x64masm.asm
xed25519.h
xed25519.cpp
xtr.cpp
xtr.h
xtrcrypt.cpp
@ -366,6 +428,8 @@ TestData/aria.dat
TestData/camellia.dat
TestData/cast128v.dat
TestData/cast256v.dat
TestData/defdmac1.bin
TestData/defdmac2.bin
TestData/descert.dat
TestData/dh1024.dat
TestData/dh2048.dat
@ -374,6 +438,12 @@ TestData/dlie2048.dat
TestData/dsa1024.dat
TestData/dsa1024b.dat
TestData/dsa512.dat
TestData/ecies_p160.dat
TestData/ecies_t163.dat
TestData/ed25519.dat
TestData/ed25519_ver.dat
TestData/ed25519v0.dat
TestData/ed25519v1.dat
TestData/elgc1024.dat
TestData/esig1023.dat
TestData/esig1536.dat
@ -409,10 +479,10 @@ TestData/rc6val.dat
TestData/rijndael.dat
TestData/rsa1024.dat
TestData/rsa2048.dat
TestData/rsa2048a.dat
TestData/rsa400pb.dat
TestData/rsa400pv.dat
TestData/rsa512a.dat
TestData/rsa2048a.dat
TestData/rw1024.dat
TestData/rw2048.dat
TestData/saferval.dat
@ -423,59 +493,75 @@ TestData/skipjack.dat
TestData/squareva.dat
TestData/twofishv.dat
TestData/usage.dat
TestData/x25519.dat
TestData/x25519v0.dat
TestData/x25519v1.dat
TestData/xtrdh171.dat
TestData/xtrdh342.dat
TestVectors/Readme.txt
TestVectors/aead.txt
TestVectors/aes.txt
TestVectors/all.txt
TestVectors/aria.txt
TestVectors/blake2.txt
TestVectors/blake2b.txt
TestVectors/blake2s.txt
TestVectors/aria.txt
TestVectors/camellia.txt
TestVectors/ccm.txt
TestVectors/chacha.txt
TestVectors/chacha_tls.txt
TestVectors/chacha20poly1305.txt
TestVectors/cham.txt
TestVectors/cmac.txt
TestVectors/dlies.txt
TestVectors/dsa.txt
TestVectors/dsa_1363.txt
TestVectors/dsa_rfc6979.txt
TestVectors/eax.txt
TestVectors/esign.txt
TestVectors/gcm.txt
TestVectors/hc128.txt
TestVectors/hc256.txt
TestVectors/hight.txt
TestVectors/hkdf.txt
TestVectors/hmac.txt
TestVectors/kalyna.txt
TestVectors/keccak.txt
TestVectors/lea.txt
TestVectors/mars.txt
TestVectors/nr.txt
TestVectors/panama.txt
TestVectors/poly1305aes.txt
TestVectors/poly1305_tls.txt
TestVectors/rabbit.txt
TestVectors/Readme.txt
TestVectors/rsa_oaep.txt
TestVectors/rsa_pkcs1_1_5.txt
TestVectors/rsa_pss.txt
TestVectors/dsa_rfc6979.txt
TestVectors/rw.txt
TestVectors/salsa.txt
TestVectors/seal.txt
TestVectors/seed.txt
TestVectors/sha.txt
TestVectors/sha2.txt
TestVectors/sha3.txt
TestVectors/sha1_fips_180.txt
TestVectors/sha1_160_fips_180.txt
TestVectors/sha2_fips_180.txt
TestVectors/sha1_fips_180.txt
TestVectors/sha2.txt
TestVectors/sha2_224_fips_180.txt
TestVectors/sha2_256_fips_180.txt
TestVectors/sha2_384_fips_180.txt
TestVectors/sha2_512_fips_180.txt
TestVectors/sha3_fips_202.txt
TestVectors/sha2_fips_180.txt
TestVectors/sha3.txt
TestVectors/sha3_224_fips_202.txt
TestVectors/sha3_256_fips_202.txt
TestVectors/sha3_384_fips_202.txt
TestVectors/sha3_512_fips_202.txt
TestVectors/sha3_fips_202.txt
TestVectors/shake.txt
TestVectors/shacal2.txt
TestVectors/simeck.txt
TestVectors/simon.txt
TestVectors/siphash.txt
TestVectors/skipjack.txt
TestVectors/sm3.txt
TestVectors/sm4.txt
TestVectors/sosemanuk.txt
@ -486,3 +572,43 @@ TestVectors/ttmac.txt
TestVectors/vmac.txt
TestVectors/wake.txt
TestVectors/whrlpool.txt
TestVectors/xchacha.txt
TestPrograms/test_32bit.cxx
TestPrograms/test_64bit.cxx
TestPrograms/test_arm_acle.cxx
TestPrograms/test_arm_aes.cxx
TestPrograms/test_arm_asimd.cxx
TestPrograms/test_arm_crc.cxx
TestPrograms/test_arm_neon.cxx
TestPrograms/test_arm_pmull.cxx
TestPrograms/test_arm_sha1.cxx
TestPrograms/test_arm_sha256.cxx
TestPrograms/test_arm_sha512.cxx
TestPrograms/test_arm_sha3.cxx
TestPrograms/test_arm_sm3.cxx
TestPrograms/test_arm_sm4.cxx
TestPrograms/test_cxx.cxx
TestPrograms/test_mixed_asm.cxx
TestPrograms/test_newlib.cxx
TestPrograms/test_ppc_aes.cxx
TestPrograms/test_ppc_altivec.cxx
TestPrograms/test_ppc_power7.cxx
TestPrograms/test_ppc_power8.cxx
TestPrograms/test_ppc_power9.cxx
TestPrograms/test_ppc_sha.cxx
TestPrograms/test_ppc_vmull.cxx
TestPrograms/test_pthreads.cxx
TestPrograms/test_x86_aes.cxx
TestPrograms/test_x86_avx.cxx
TestPrograms/test_x86_avx2.cxx
TestPrograms/test_x86_avx512.cxx
TestPrograms/test_x86_clmul.cxx
TestPrograms/test_x86_cpuid.cxx
TestPrograms/test_x86_rdrand.cxx
TestPrograms/test_x86_rdseed.cxx
TestPrograms/test_x86_sha.cxx
TestPrograms/test_x86_sse2.cxx
TestPrograms/test_x86_sse3.cxx
TestPrograms/test_x86_sse41.cxx
TestPrograms/test_x86_sse42.cxx
TestPrograms/test_x86_ssse3.cxx

File diff suppressed because it is too large Load Diff

View File

@ -3,6 +3,20 @@
SHELL = /bin/sh
# If needed
TMPDIR ?= /tmp
# Used for ARMv7 and NEON.
FP_ABI ?= hard
# Used for feature tests
TOUT ?= a.out
TOUT := $(strip $(TOUT))
# Allow override for the cryptest.exe recipe. Change to
# ./libcryptopp.so or ./libcryptopp.dylib to suit your
# taste. https://github.com/weidai11/cryptopp/issues/866
LINK_LIBRARY ?= ./libcryptopp.a
LINK_LIBRARY_PATH ?= ./
# Default CXXFLAGS if none were provided
CXXFLAGS ?= -DNDEBUG -g2 -O3 -fPIC -pipe
@ -13,44 +27,44 @@ CP ?= cp
MV ?= mv
CHMOD ?= chmod
MKDIR ?= mkdir -p
EGREP ?= egrep
GREP ?= grep
SED ?= sed
LN ?= ln -sf
LDCONF ?= /sbin/ldconfig -n
INSTALL = install
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL) -m 644
# Attempt to determine host machine, fallback to "this" machine.
# The host machine is the one the package runs on. Most people
# call this the "target", but not Autotools.
HOSTX := $(shell $(CXX) $(CXXFLAGS) -dumpmachine 2>/dev/null | cut -f 1 -d '-')
ifeq ($(HOSTX),)
HOSTX := $(shell uname -m 2>/dev/null)
endif
IS_i686 := $(shell echo "$HOSTX" | $(EGREP) -v 64 | $(EGREP) -i -c 'i.86')
IS_x86_64 := $(shell echo "$HOSTX" | $(EGREP) -i -c 'x86_64|amd64')
IS_ARM := $(shell echo "$HOSTX" | $(EGREP) -i -c 'arm')
IS_ARMv8 := $(shell echo "$HOSTX" | $(EGREP) -i -c 'aarch32|aarch64')
CLANG_COMPILER := $(shell $(CXX) --version 2>&1 | $(EGREP) -i -c "clang")
IS_IOS ?= 0
IS_ANDROID ?= 0
IS_ARM_EMBEDDED ?= 0
IS_NEON ?= 0
# Fixup ARM
ifeq ($(IS_ARMv8),1)
IS_ARM := 0
# Yet another Clang hack. I think the LLVM devs are making the shit up
# as they go. Also see https://github.com/weidai11/cryptopp/issues/831.
MACHINEX := $(shell $(CXX) $(CXXFLAGS) -dumpmachine 2>/dev/null)
ifeq ($(MACHINEX),armv8l-unknown-linux-gnueabihf)
MACHINEX := armv7l-unknown-linux-gnueabihf
endif
HOSTX := $(shell echo $(MACHINEX) | cut -f 1 -d '-')
ifeq ($(HOSTX),)
HOSTX := $(shell uname -m 2>/dev/null)
endif
IS_LINUX := $(shell echo $(MACHINEX) | $(GREP) -i -c "Linux")
# Can be used by Android and Embeeded cross-compiles. Disable by default because
# Android and embedded users typically don't run this configuration.
HAS_SOLIB_VERSION ?= 0
# Formely adhoc.cpp was created from adhoc.cpp.proto when needed.
# This is now needed because ISA tests are performed using adhoc.cpp.
ifeq ($(wildcard adhoc.cpp),)
$(shell cp adhoc.cpp.proto adhoc.cpp)
endif
###########################################################
##### General Variables #####
###########################################################
# Default prefix for make install
ifeq ($(PREFIX),)
PREFIX = /usr/local
@ -72,29 +86,37 @@ endif
# We honor ARFLAGS, but the "v" option used by default causes a noisy make
ifeq ($(ARFLAGS),rv)
ARFLAGS = r
ARFLAGS = r
endif
# Sadly, we can't actually use GCC_PRAGMA_AWARE because of GCC bug 53431.
# Its a shame because GCC has so much to offer by the way of analysis.
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431
ifneq ($(CLANG_COMPILER),0)
CXXFLAGS += -Wall
CXXFLAGS += -Wall
endif
###########################################################
##### iOS #####
###########################################################
# iOS cross-compile configuration.
# See http://www.cryptopp.com/wiki/iOS_(Command_Line).
ifeq ($(IS_IOS),1)
CXX = clang++
CXXFLAGS += $(IOS_FLAGS) -arch $(IOS_ARCH)
CXXFLAGS += -isysroot $(IOS_SYSROOT) -stdlib=libc++
CXXFLAGS += -isysroot "$(IOS_SYSROOT)" -stdlib=libc++
AR = libtool
ARFLAGS = -static -o
RANLIB = ranlib
endif
###########################################################
##### Android #####
###########################################################
# Android cross-compile configuration.
# See http://www.cryptopp.com/wiki/Android_(Command_Line).
ifeq ($(IS_ANDROID),1)
@ -116,6 +138,10 @@ ifeq ($(IS_ANDROID),1)
AOSP_CPU_OBJ = cpu-features.o
endif
###########################################################
##### Embedded #####
###########################################################
# ARM embedded cross-compile configuration.
# See http://www.cryptopp.com/wiki/ARM_Embedded_(Command_Line)
# and http://www.cryptopp.com/wiki/ARM_Embedded_(Bare Metal).
@ -124,6 +150,373 @@ ifeq ($(IS_ARM_EMBEDDED),1)
CXXFLAGS += $(ARM_EMBEDDED_FLAGS) --sysroot=$(ARM_EMBEDDED_SYSROOT)
endif
###########################################################
##### Compiler and Platform #####
###########################################################
# Wait until CXXFLAGS have been set by setenv scripts.
GCC_COMPILER := $(shell $(CXX) --version 2>/dev/null | $(GREP) -v -E 'llvm|clang' | $(GREP) -i -c -E '(gcc|g\+\+)')
CLANG_COMPILER := $(shell $(CXX) --version 2>/dev/null | $(GREP) -i -c -E 'llvm|clang')
HOSTX := $(shell $(CXX) $(CXXFLAGS) -dumpmachine 2>/dev/null | cut -f 1 -d '-')
ifeq ($(HOSTX),)
HOSTX := $(shell uname -m 2>/dev/null)
endif
# This dance is because Clang reports the host architecture instead
# of the target architecture. Running Clang on an x86_64 machine with
# -arch arm64 yields x86_64 instead of aarch64 or arm64.
ifeq ($(CLANG_COMPILER),1)
IS_X86 := $(shell echo $(CXXFLAGS) | $(GREP) -v 64 | $(GREP) -i -c -E 'i.86')
IS_X64 := $(shell echo $(CXXFLAGS) | $(GREP) -i -c -E 'x86_64|amd64')
IS_ARM32 := $(shell echo $(CXXFLAGS) | $(GREP) -v 64 | $(GREP) -i -c -E 'arm|armhf|arm7l|eabihf')
IS_ARMV8 := $(shell echo $(CXXFLAGS) | $(GREP) -i -c -E 'aarch32|aarch64|arm64|armv8')
else
IS_X86 := $(shell echo $(HOSTX) | $(GREP) -v 64 | $(GREP) -i -c -E 'i.86')
IS_X64 := $(shell echo $(HOSTX) | $(GREP) -i -c -E 'x86_64|amd64')
IS_ARM32 := $(shell echo $(HOSTX) | $(GREP) -v 64 | $(GREP) -i -c -E 'arm|armhf|arm7l|eabihf')
IS_ARMV8 := $(shell echo $(HOSTX) | $(GREP) -i -c -E 'aarch32|aarch64|arm64|armv8')
endif
$(info Here's what we found... IS_X86: $(IS_X86), IS_X64: $(IS_X64), IS_ARM32: $(IS_ARM32), IS_ARMV8: $(IS_ARMV8))
###########################################################
##### Test Program #####
###########################################################
# Hack to skip CPU feature tests for some recipes
DETECT_FEATURES ?= 1
ifeq ($(findstring -DCRYPTOPP_DISABLE_ASM,$(CXXFLAGS)),-DCRYPTOPP_DISABLE_ASM)
DETECT_FEATURES := 0
else ifeq ($(findstring clean,$(MAKECMDGOALS)),clean)
DETECT_FEATURES := 0
else ifeq ($(findstring distclean,$(MAKECMDGOALS)),distclean)
DETECT_FEATURES := 0
else ifeq ($(findstring distclean,$(MAKECMDGOALS)),trim)
DETECT_FEATURES := 0
endif
# Strip out -Wall, -Wextra and friends for feature testing. FORTIFY_SOURCE is removed
# because it requires -O1 or higher, but we use -O0 to tame the optimizer.
ifeq ($(DETECT_FEATURES),1)
TCXXFLAGS := $(filter-out -D_FORTIFY_SOURCE=% -Wall -Wextra -Werror% -Wunused -Wconversion -Wp%, $(CXXFLAGS))
ifneq ($(strip $(TCXXFLAGS)),)
$(info Using testing flags: $(TCXXFLAGS))
endif
#TPROG = TestPrograms/test_cxx.cxx
#$(info Testing compile... )
#$(info $(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 1>/dev/null))
endif
# For the previous messages
$(info )
###########################################################
##### X86/X32/X64 Options #####
###########################################################
ifneq ($(IS_X86)$(IS_X64),00)
ifeq ($(DETECT_FEATURES),1)
SSE2_FLAG = -msse2
SSE3_FLAG = -msse3
SSSE3_FLAG = -mssse3
SSE41_FLAG = -msse4.1
SSE42_FLAG = -msse4.2
CLMUL_FLAG = -mpclmul
AESNI_FLAG = -maes
AVX_FLAG = -mavx
AVX2_FLAG = -mavx2
SHANI_FLAG = -msha
TPROG = TestPrograms/test_x86_sse2.cxx
TOPT = $(SSE2_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | tr ' ' '\n' | wc -l)
ifeq ($(strip $(HAVE_OPT)),0)
CHACHA_FLAG = $(SSE2_FLAG)
else
SSE2_FLAG =
endif
TPROG = TestPrograms/test_x86_ssse3.cxx
TOPT = $(SSSE3_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | tr ' ' '\n' | wc -l)
ifeq ($(strip $(HAVE_OPT)),0)
ARIA_FLAG = $(SSSE3_FLAG)
CHAM_FLAG = $(SSSE3_FLAG)
LEA_FLAG = $(SSSE3_FLAG)
SIMECK_FLAG = $(SSSE3_FLAG)
SIMON128_FLAG = $(SSSE3_FLAG)
SPECK128_FLAG = $(SSSE3_FLAG)
else
SSSE3_FLAG =
endif
TPROG = TestPrograms/test_x86_sse41.cxx
TOPT = $(SSE41_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | tr ' ' '\n' | wc -l)
ifeq ($(strip $(HAVE_OPT)),0)
BLAKE2B_FLAG = $(SSE41_FLAG)
BLAKE2S_FLAG = $(SSE41_FLAG)
SIMON64_FLAG = $(SSE41_FLAG)
SPECK64_FLAG = $(SSE41_FLAG)
else
SSE41_FLAG =
endif
TPROG = TestPrograms/test_x86_sse42.cxx
TOPT = $(SSE42_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | tr ' ' '\n' | wc -l)
ifeq ($(strip $(HAVE_OPT)),0)
CRC_FLAG = $(SSE42_FLAG)
else
SSE42_FLAG =
endif
TPROG = TestPrograms/test_x86_clmul.cxx
TOPT = $(CLMUL_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | tr ' ' '\n' | wc -l)
ifeq ($(strip $(HAVE_OPT)),0)
GCM_FLAG = $(SSSE3_FLAG) $(CLMUL_FLAG)
else
CLMUL_FLAG =
endif
TPROG = TestPrograms/test_x86_aes.cxx
TOPT = $(AESNI_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | tr ' ' '\n' | wc -l)
ifeq ($(strip $(HAVE_OPT)),0)
AES_FLAG = $(SSE41_FLAG) $(AESNI_FLAG)
SM4_FLAG = $(SSSE3_FLAG) $(AESNI_FLAG)
else
AESNI_FLAG =
endif
TPROG = TestPrograms/test_x86_avx.cxx
TOPT = $(AVX_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | tr ' ' '\n' | wc -l)
ifeq ($(strip $(HAVE_OPT)),0)
# XXX_FLAG = $(AVX_FLAG)
else
AVX_FLAG =
endif
TPROG = TestPrograms/test_x86_avx2.cxx
TOPT = $(AVX2_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | tr ' ' '\n' | wc -l)
ifeq ($(strip $(HAVE_OPT)),0)
CHACHA_AVX2_FLAG = $(AVX2_FLAG)
else
AVX2_FLAG =
endif
TPROG = TestPrograms/test_x86_sha.cxx
TOPT = $(SHANI_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | tr ' ' '\n' | wc -l)
ifeq ($(strip $(HAVE_OPT)),0)
SHA_FLAG = $(SSE42_FLAG) $(SHANI_FLAG)
else
SHANI_FLAG =
endif
ifeq ($(SSE2_FLAG),)
CXXFLAGS += -DCRYPTOPP_DISABLE_ASM
else ifeq ($(SSE3_FLAG),)
CXXFLAGS += -DCRYPTOPP_DISABLE_SSE3
else ifeq ($(SSSE3_FLAG),)
CXXFLAGS += -DCRYPTOPP_DISABLE_SSSE3
else ifeq ($(SSE41_FLAG),)
CXXFLAGS += -DCRYPTOPP_DISABLE_SSE4
else ifeq ($(SSE42_FLAG),)
CXXFLAGS += -DCRYPTOPP_DISABLE_SSE4
endif
ifneq ($(SSE42_FLAG),)
# Unusual GCC/Clang on Macports. It assembles AES, but not CLMUL.
# test_x86_clmul.s:15: no such instruction: 'pclmulqdq $0, %xmm1,%xmm0'
ifeq ($(CLMUL_FLAG),)
CXXFLAGS += -DCRYPTOPP_DISABLE_CLMUL
endif
ifeq ($(AESNI_FLAG),)
CXXFLAGS += -DCRYPTOPP_DISABLE_AESNI
endif
ifeq ($(AVX_FLAG),)
CXXFLAGS += -DCRYPTOPP_DISABLE_AVX
else ifeq ($(AVX2_FLAG),)
CXXFLAGS += -DCRYPTOPP_DISABLE_AVX2
else ifeq ($(SHANI_FLAG),)
CXXFLAGS += -DCRYPTOPP_DISABLE_SHANI
endif
endif
# Drop to SSE2 if available
ifeq ($(GCM_FLAG),)
ifneq ($(SSE2_FLAG),)
GCM_FLAG = $(SSE2_FLAG)
endif
endif
# DETECT_FEATURES
endif
# IS_X86, IS_X32 and IS_X64
endif
###########################################################
##### ARM A-32, Aach64 and NEON #####
###########################################################
ifneq ($(IS_ARM32)$(IS_ARMV8),00)
ifeq ($(DETECT_FEATURES),1)
ifeq ($(IS_ARM32),1)
ifneq ($(IS_IOS)$(IS_ANDROID),00)
NEON_FLAG =
else
NEON_FLAG = -march=armv7-a -mfloat-abi=$(FP_ABI) -mfpu=neon
endif
TPROG = TestPrograms/test_arm_neon.cxx
TOPT = $(NEON_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | tr ' ' '\n' | wc -l)
ifeq ($(strip $(HAVE_OPT)),0)
ARIA_FLAG = $(NEON_FLAG)
AES_FLAG = $(NEON_FLAG)
CRC_FLAG = $(NEON_FLAG)
GCM_FLAG = $(NEON_FLAG)
BLAKE2B_FLAG = $(NEON_FLAG)
BLAKE2S_FLAG = $(NEON_FLAG)
CHACHA_FLAG = $(NEON_FLAG)
CHAM_FLAG = $(NEON_FLAG)
LEA_FLAG = $(NEON_FLAG)
SHA_FLAG = $(NEON_FLAG)
SIMECK_FLAG = $(NEON_FLAG)
SIMON64_FLAG = $(NEON_FLAG)
SIMON128_FLAG = $(NEON_FLAG)
SPECK64_FLAG = $(NEON_FLAG)
SPECK128_FLAG = $(NEON_FLAG)
SM4_FLAG = $(NEON_FLAG)
else
NEON_FLAG =
CXXFLAGS += -DCRYPTOPP_DISABLE_ASM
endif
# IS_ARM32
endif
ifeq ($(IS_ARMV8),1)
ifeq ($(IS_IOS),1)
ASIMD_FLAG =
CRC_FLAG =
AES_FLAG =
PMUL_FLAG =
SHA_FLAG =
else
ASIMD_FLAG = -march=armv8-a
CRC_FLAG = -march=armv8-a+crc
AES_FLAG = -march=armv8-a+crypto
PMULL_FLAG = -march=armv8-a+crypto
SHA_FLAG = -march=armv8-a+crypto
endif
TPROG = TestPrograms/test_arm_acle.cxx
TOPT = $(ASIMD_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | tr ' ' '\n' | wc -l)
ifeq ($(strip $(HAVE_OPT)),0)
ACLE_FLAG += -DCRYPTOPP_ARM_ACLE_AVAILABLE=1
else
CXXFLAGS += -DCRYPTOPP_ARM_ACLE_AVAILABLE=0
endif
TPROG = TestPrograms/test_arm_asimd.cxx
TOPT = $(ASIMD_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ACLE_FLAG) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | tr ' ' '\n' | wc -l)
ifeq ($(strip $(HAVE_OPT)),0)
ARIA_FLAG = $(ASIMD_FLAG)
BLAKE2B_FLAG = $(ASIMD_FLAG)
BLAKE2S_FLAG = $(ASIMD_FLAG)
CHACHA_FLAG = $(ASIMD_FLAG)
CHAM_FLAG = $(ASIMD_FLAG)
LEA_FLAG = $(ASIMD_FLAG)
NEON_FLAG = $(ASIMD_FLAG)
SIMECK_FLAG = $(ASIMD_FLAG)
SIMON64_FLAG = $(ASIMD_FLAG)
SIMON128_FLAG = $(ASIMD_FLAG)
SPECK64_FLAG = $(ASIMD_FLAG)
SPECK128_FLAG = $(ASIMD_FLAG)
SM4_FLAG = $(ASIMD_FLAG)
else
ASIMD_FLAG =
CXXFLAGS += -DCRYPTOPP_DISABLE_ASM
endif
TPROG = TestPrograms/test_arm_crc.cxx
TOPT = $(CRC_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ACLE_FLAG) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | tr ' ' '\n' | wc -l)
ifneq ($(strip $(HAVE_OPT)),0)
CRC_FLAG =
CXXFLAGS += -DCRYPTOPP_ARM_CRC32_AVAILABLE=0
endif
TPROG = TestPrograms/test_arm_aes.cxx
TOPT = $(AES_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ACLE_FLAG) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | tr ' ' '\n' | wc -l)
ifneq ($(strip $(HAVE_OPT)),0)
AES_FLAG =
CXXFLAGS += -DCRYPTOPP_ARM_AES_AVAILABLE=0
endif
TPROG = TestPrograms/test_arm_pmull.cxx
TOPT = $(PMULL_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ACLE_FLAG) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | tr ' ' '\n' | wc -l)
ifneq ($(strip $(HAVE_OPT)),0)
PMULL_FLAG =
CXXFLAGS += -DCRYPTOPP_ARM_PMULL_AVAILABLE=0
endif
TPROG = TestPrograms/test_arm_sha1.cxx
TOPT = $(SHA_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ACLE_FLAG) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | tr ' ' '\n' | wc -l)
ifneq ($(strip $(HAVE_OPT)),0)
SHA_FLAG =
CXXFLAGS += -DCRYPTOPP_ARM_SHA_AVAILABLE=0
endif
TPROG = TestPrograms/test_arm_sm3.cxx
TOPT = -march=armv8.4-a+crypto
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ACLE_FLAG) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | tr ' ' '\n' | wc -l)
ifeq ($(strip $(HAVE_OPT)),0)
SM3_FLAG = -march=armv8.4-a+crypto
SM4_FLAG = -march=armv8.4-a+crypto
endif
TPROG = TestPrograms/test_arm_sha3.cxx
TOPT = -march=armv8.4-a+crypto
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ACLE_FLAG) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | tr ' ' '\n' | wc -l)
ifeq ($(strip $(HAVE_OPT)),0)
SHA3_FLAG = -march=armv8.4-a+crypto
SHA512_FLAG = -march=armv8.4-a+crypto
endif
# IS_ARMV8
endif
# DETECT_FEATURES
endif
# IS_ARM32, IS_ARMV8, IS_NEON
endif
###########################################################
##### Common #####
###########################################################
# No ASM for Travis testing
ifeq ($(findstring no-asm,$(MAKECMDGOALS)),no-asm)
ifeq ($(findstring -DCRYPTOPP_DISABLE_ASM,$(CXXFLAGS)),)
@ -157,7 +550,7 @@ endif # Asan
# LD gold linker testing. Triggered by 'LD=ld.gold'.
ifeq ($(findstring ld.gold,$(LD)),ld.gold)
ifeq ($(findstring -fuse-ld=gold,$(CXXFLAGS)),)
ELF_FORMAT := $(shell file `which ld.gold` 2>&1 | cut -d":" -f 2 | $(EGREP) -i -c "elf")
ELF_FORMAT := $(shell file `which ld.gold` 2>&1 | cut -d":" -f 2 | $(GREP) -i -c "elf")
ifneq ($(ELF_FORMAT),0)
LDFLAGS += -fuse-ld=gold
endif # ELF/ELF64
@ -170,15 +563,15 @@ ifneq ($(filter valgrind,$(MAKECMDGOALS)),)
CXXFLAGS := $(CXXFLAGS:-g%=-g3)
CXXFLAGS := $(CXXFLAGS:-O%=-O1)
CXXFLAGS := $(CXXFLAGS:-xO%=-xO1)
ifeq ($(findstring -DCRYPTOPP_VALGRIND,$(CXXFLAGS)),)
CXXFLAGS += -DCRYPTOPP_VALGRIND
endif # -DCRYPTOPP_VALGRIND
ifeq ($(findstring -DCRYPTOPP_COVERAGE,$(CXXFLAGS)),)
CXXFLAGS += -DCRYPTOPP_COVERAGE
endif # -DCRYPTOPP_COVERAGE
endif # Valgrind
# Debug testing on GNU systems. Triggered by -DDEBUG.
# Newlib test due to http://sourceware.org/bugzilla/show_bug.cgi?id=20268
ifneq ($(filter -DDEBUG -DDEBUG=1,$(CXXFLAGS)),)
USING_GLIBCXX := $(shell $(CXX) -x c++ $(CXXFLAGS) -E adhoc.cpp.proto 2>&1 | $(EGREP) -i -c "__GLIBCXX__")
USING_GLIBCXX := $(shell $(CXX) $(CXXFLAGS) -E pch.cpp 2>&1 | $(GREP) -i -c "__GLIBCXX__")
ifneq ($(USING_GLIBCXX),0)
ifeq ($(HAS_NEWLIB),0)
ifeq ($(findstring -D_GLIBCXX_DEBUG,$(CXXFLAGS)),)
@ -207,120 +600,43 @@ ifeq ($(findstring lean,$(MAKECMDGOALS)),lean)
endif # MAKECMDGOALS
endif # Dead code stripping
# Pickup ARMv7 and NEON. Do it after Android, iOS and Embedded flags have been set.
ifeq ($(IS_ARM),1)
IS_ARMv7 := $(shell echo | $(CXX) -x c++ $(CXXFLAGS) -dM -E - 2>/dev/null | $(EGREP) -i -c '__ARM_ARCH 7')
ifeq ($(IS_ARMv7),1)
IS_NEON := 1
else
IS_NEON := $(shell echo | $(CXX) -x c++ $(CXXFLAGS) -dM -E - 2>/dev/null | $(EGREP) -i -c -E '\<__ARM_NEON\>')
endif
endif
# ARMv7-a
ifeq ($(IS_ARMv7),1)
ifeq ($(findstring -march=armv7-a,$(CXXFLAGS)),)
NEON_FLAG = -march=armv7-a
GCM_FLAG = -march=armv7-a
ARIA_FLAG = -march=armv7-a
BLAKE2_FLAG = -march=armv7-a
endif
endif
# NEON
ifeq ($(IS_NEON),1)
ifeq ($(findstring -mfpu=neon,$(CXXFLAGS)),)
NEON_FLAG += -mfpu=neon
GCM_FLAG += -mfpu=neon
ARIA_FLAG += -mfpu=neon
BLAKE2_FLAG += -mfpu=neon
SIMON_FLAG += -mfpu=neon
SPECK_FLAG += -mfpu=neon
ifeq ($(IS_ANDROID),1)
ifeq ($(findstring -mfloat-abi=softfp,$(CXXFLAGS)),)
NEON_FLAG += -mfloat-abi=softfp
GCM_FLAG += -mfloat-abi=softfp
ARIA_FLAG += -mfloat-abi=softfp
BLAKE2_FLAG += -mfloat-abi=softfp
SIMON_FLAG += -mfloat-abi=softfp
SPECK_FLAG += -mfloat-abi=softfp
endif
endif
endif
endif
# ARMv8-a
ifneq ($(IS_ARMv8),0)
IS_NEON := $(shell echo | $(CXX) -x c++ $(CXXFLAGS) -march=armv8-a -dM -E - 2>/dev/null | $(EGREP) -i -c __ARM_NEON)
ifeq ($(IS_NEON),1)
ARIA_FLAG = -march=armv8-a
BLAKE2_FLAG = -march=armv8-a
NEON_FLAG = -march=armv8-a
SIMON_FLAG = -march=armv8-a
SPECK_FLAG = -march=armv8-a
endif
HAVE_CRC := $(shell echo | $(CXX) -x c++ $(CXXFLAGS) -march=armv8-a+crc -dM -E - 2>/dev/null | $(EGREP) -i -c __ARM_FEATURE_CRC32)
ifeq ($(HAVE_CRC),1)
CRC_FLAG = -march=armv8-a+crc
endif
HAVE_CRYPTO := $(shell echo | $(CXX) -x c++ $(CXXFLAGS) -march=armv8-a+crypto -dM -E - 2>/dev/null | $(EGREP) -i -c __ARM_FEATURE_CRYPTO)
ifeq ($(HAVE_CRYPTO),1)
AES_FLAG = -march=armv8-a+crypto
GCM_FLAG = -march=armv8-a+crypto
SHA_FLAG = -march=armv8-a+crypto
endif
endif
# i686 and x86_64
ifneq ($(IS_i686)$(IS_x86_64),00)
HAVE_SSSE3 = $(shell echo | $(CXX) -x c++ $(CXXFLAGS) -mssse3 -dM -E - 2>/dev/null | $(EGREP) -i -c __SSSE3__)
ifeq ($(HAVE_SSSE3),1)
ARIA_FLAG = -mssse3
SSSE3_FLAG = -mssse3
SIMON_FLAG = -mssse3
SPECK_FLAG = -mssse3
endif
HAVE_SSE4 = $(shell echo | $(CXX) -x c++ $(CXXFLAGS) -msse4.1 -dM -E - 2>/dev/null | $(EGREP) -i -c __SSE4_1__)
ifeq ($(HAVE_SSE4),1)
SIMON_FLAG = -msse4.1
SPECK_FLAG = -msse4.1
endif
HAVE_SSE4 = $(shell echo | $(CXX) -x c++ $(CXXFLAGS) -msse4.2 -dM -E - 2>/dev/null | $(EGREP) -i -c __SSE4_2__)
ifeq ($(HAVE_SSE4),1)
BLAKE2_FLAG = -msse4.2
CRC_FLAG = -msse4.2
endif
HAVE_CLMUL = $(shell echo | $(CXX) -x c++ $(CXXFLAGS) -mssse3 -mpclmul -dM -E - 2>/dev/null | $(EGREP) -i -c __PCLMUL__ )
ifeq ($(HAVE_CLMUL),1)
GCM_FLAG = -mssse3 -mpclmul
endif
HAVE_AES = $(shell echo | $(CXX) -x c++ $(CXXFLAGS) -msse4.1 -maes -dM -E - 2>/dev/null | $(EGREP) -i -c __AES__)
ifeq ($(HAVE_AES),1)
AES_FLAG = -msse4.1 -maes
endif
HAVE_SHA = $(shell echo | $(CXX) -x c++ $(CXXFLAGS) -msse4.2 -msha -dM -E - 2>/dev/null | $(EGREP) -i -c __SHA__)
ifeq ($(HAVE_SHA),1)
SHA_FLAG = -msse4.2 -msha
endif
endif
###########################################################
##### Source and object files #####
###########################################################
# List cryptlib.cpp first, then cpu.cpp, then integer.cpp to tame C++ static initialization problems.
SRCS := cryptlib.cpp cpu.cpp integer.cpp $(filter-out cryptlib.cpp cpu.cpp integer.cpp pch.cpp simple.cpp winpipes.cpp cryptlib_bds.cpp,$(sort $(wildcard *.cpp)))
SRCS := cryptlib.cpp cpu.cpp integer.cpp $(filter-out cryptlib.cpp cpu.cpp integer.cpp pch.cpp simple.cpp cryptlib_bds.cpp,$(sort $(wildcard *.cpp)))
# For Makefile.am; resource.h is Windows
INCL := $(filter-out resource.h,$(sort $(wildcard *.h)))
# Cryptogams source files. We couple to ARMv7.
# Limit to Linux. The source files target the GNU assembler.
# Also see https://www.cryptopp.com/wiki/Cryptogams.
ifeq ($(IS_ARM32)$(IS_LINUX),11)
ifeq ($(CLANG_COMPILER),1)
CRYPTOGAMS_ARMV7_FLAG = -march=armv7-a -Wa,--noexecstack
CRYPTOGAMS_ARMV7_THUMB_FLAG = -march=armv7-a -mthumb -Wa,--noexecstack
else
CRYPTOGAMS_ARMV7_FLAG = -march=armv7-a -Wa,--noexecstack
CRYPTOGAMS_ARMV7_THUMB_FLAG = -march=armv7-a -Wa,--noexecstack
endif
SRCS += aes_armv4.S sha1_armv4.S sha256_armv4.S sha512_armv4.S
endif
# List cryptlib.cpp first, then cpu.cpp, then integer.cpp to tame C++ static initialization problems.
OBJS := $(SRCS:.cpp=.o)
OBJS := $(OBJS:.S=.o)
# List test.cpp first to tame C++ static initialization problems.
TESTSRCS := adhoc.cpp test.cpp bench1.cpp bench2.cpp validat0.cpp validat1.cpp validat2.cpp validat3.cpp validat4.cpp datatest.cpp regtest1.cpp regtest2.cpp regtest3.cpp fipsalgt.cpp dlltest.cpp
TESTSRCS := adhoc.cpp test.cpp bench1.cpp bench2.cpp bench3.cpp datatest.cpp dlltest.cpp fipsalgt.cpp validat0.cpp validat1.cpp validat2.cpp validat3.cpp validat4.cpp validat5.cpp validat6.cpp validat7.cpp validat8.cpp validat9.cpp validat10.cpp regtest1.cpp regtest2.cpp regtest3.cpp regtest4.cpp
TESTINCL := bench.h factory.h validate.h
# Test objects
TESTOBJS := $(TESTSRCS:.cpp=.o)
LIBOBJS := $(filter-out $(TESTOBJS),$(OBJS))
# For Shared Objects, Diff, Dist/Zip rules
LIB_VER := $(shell $(EGREP) "define CRYPTOPP_VERSION" config.h | cut -d" " -f 3)
LIB_VER := $(shell $(GREP) "define CRYPTOPP_VERSION" config_ver.h | cut -d" " -f 3)
LIB_MAJOR := $(shell echo $(LIB_VER) | cut -c 1)
LIB_MINOR := $(shell echo $(LIB_VER) | cut -c 2)
LIB_PATCH := $(shell echo $(LIB_VER) | cut -c 3)
@ -337,11 +653,15 @@ SOLIB_COMPAT_SUFFIX=.$(LIB_MAJOR)
SOLIB_FLAGS=-Wl,-soname,libcryptopp.so$(SOLIB_COMPAT_SUFFIX)
endif # HAS_SOLIB_VERSION
###########################################################
##### Targets and Recipes #####
###########################################################
# Default builds program with static library only
.PHONY: default
default: cryptest.exe
.PHONY: all
.PHONY: all static dynamic
all: static dynamic cryptest.exe
ifneq ($(IS_IOS),0)
@ -363,10 +683,10 @@ lean: static dynamic cryptest.exe
.PHONY: clean
clean:
-$(RM) adhoc.cpp.o adhoc.cpp.proto.o $(LIBOBJS) $(AOSP_CPU_OBJ) $(TESTOBJS) $(DLLOBJS) $(LIBIMPORTOBJS) $(TESTIMPORTOBJS) $(DLLTESTOBJS)
-$(RM) adhoc.cpp.o adhoc.cpp.proto.o $(LIBOBJS) $(AOSP_CPU_OBJ) rdrand-*.o $(TESTOBJS) $(DLLOBJS) $(LIBIMPORTOBJS) $(TESTIMPORTOBJS) $(DLLTESTOBJS)
@-$(RM) libcryptopp.a libcryptopp.dylib cryptopp.dll libcryptopp.dll.a libcryptopp.import.a
@-$(RM) libcryptopp.so libcryptopp.so$(SOLIB_COMPAT_SUFFIX) libcryptopp.so$(SOLIB_VERSION_SUFFIX)
@-$(RM) cryptest.exe dlltest.exe cryptest.import.exe cryptest.info ct rdrand-???.o
@-$(RM) cryptest.exe dlltest.exe cryptest.import.exe cryptest.info ct et
@-$(RM) *.la *.lo *.gcov *.gcno *.gcda *.stackdump core core-*
@-$(RM) /tmp/adhoc.exe
@-$(RM) -r /tmp/cryptopp_test/
@ -374,47 +694,75 @@ clean:
@-$(RM) -r *.dylib.dSYM/
@-$(RM) -r cov-int/
.PHONY: distclean
distclean: clean
-$(RM) adhoc.cpp adhoc.cpp.copied GNUmakefile.deps benchmarks.html cryptest.txt cryptest-*.txt
@-$(RM) cryptopp.tgz *.o *.bc *.ii *~
@-$(RM) -r $(SRCS:.cpp=.obj) cryptlib.lib cryptest.exe *.suo *.sdf *.pdb Win32/ x64/ ipch/
.PHONY: autotools-clean
autotools-clean:
@-$(RM) -f configure.ac configure configure.in Makefile.am Makefile.in Makefile
@-$(RM) -f config.guess config.status config.sub depcomp install-sh compile
@-$(RM) -f stamp-h1 ar-lib *.m4 local.* lt*.sh missing libtool* libcryptopp.pc*
@-$(RM) -f config.guess config.status config.sub config.h.in compile depcomp
@-$(RM) -f install-sh stamp-h1 ar-lib *.lo *.la *.m4 local.* lt*.sh missing
@-$(RM) -f cryptest cryptestcwd libtool* libcryptopp.la libcryptopp.pc*
@-$(RM) -rf m4/ auto*.cache/ .deps/ .libs/
@-$(RM) -r TestCoverage/
@-$(RM) cryptopp$(LIB_VER)\.*
@-$(RM) CryptoPPRef.zip
.PHONY: cmake-clean
cmake-clean:
@-$(RM) -f cryptopp-config.cmake CMakeLists.txt
@-$(RM) -rf cmake_build/
.PHONY: distclean
distclean: clean autotools-clean cmake-clean
-$(RM) adhoc.cpp adhoc.cpp.copied GNUmakefile.deps benchmarks.html cryptest.txt
@-$(RM) cryptest-*.txt cryptopp.tgz libcryptopp.pc *.o *.bc *.ii *~
@-$(RM) -r cryptlib.lib cryptest.exe *.suo *.sdf *.pdb Win32/ x64/ ipch/
@-$(RM) -r $(LIBOBJS:.o=.obj) $(TESTOBJS:.o=.obj)
@-$(RM) -r $(LIBOBJS:.o=.lst) $(TESTOBJS:.o=.lst)
@-$(RM) -r TestCoverage/ ref*/
@-$(RM) cryptopp$(LIB_VER)\.* CryptoPPRef.zip
# Install cryptest.exe, libcryptopp.a and libcryptopp.so.
# The library install was broken-out into its own recipe at GH #653.
.PHONY: install
install:
@-$(MKDIR) $(DESTDIR)$(INCLUDEDIR)/cryptopp
$(INSTALL_DATA) *.h $(DESTDIR)$(INCLUDEDIR)/cryptopp
ifneq ($(wildcard cryptest.exe),)
install: cryptest.exe install-lib
@-$(MKDIR) $(DESTDIR)$(BINDIR)
$(INSTALL_PROGRAM) cryptest.exe $(DESTDIR)$(BINDIR)
$(CP) cryptest.exe $(DESTDIR)$(BINDIR)
$(CHMOD) 0755 $(DESTDIR)$(BINDIR)/cryptest.exe
@-$(MKDIR) $(DESTDIR)$(DATADIR)/cryptopp/TestData
@-$(MKDIR) $(DESTDIR)$(DATADIR)/cryptopp/TestVectors
$(INSTALL_DATA) TestData/*.dat $(DESTDIR)$(DATADIR)/cryptopp/TestData
$(INSTALL_DATA) TestVectors/*.txt $(DESTDIR)$(DATADIR)/cryptopp/TestVectors
endif
$(CP) TestData/*.dat $(DESTDIR)$(DATADIR)/cryptopp/TestData
$(CHMOD) 0644 $(DESTDIR)$(DATADIR)/cryptopp/TestData/*.dat
$(CP) TestVectors/*.txt $(DESTDIR)$(DATADIR)/cryptopp/TestVectors
$(CHMOD) 0644 $(DESTDIR)$(DATADIR)/cryptopp/TestVectors/*.txt
# A recipe to install only the library, and not cryptest.exe. Also
# see https://github.com/weidai11/cryptopp/issues/653.
.PHONY: install-lib
install-lib:
@-$(MKDIR) $(DESTDIR)$(INCLUDEDIR)/cryptopp
$(CP) *.h $(DESTDIR)$(INCLUDEDIR)/cryptopp
$(CHMOD) 0644 $(DESTDIR)$(INCLUDEDIR)/cryptopp/*.h
ifneq ($(wildcard libcryptopp.a),)
@-$(MKDIR) $(DESTDIR)$(LIBDIR)
$(INSTALL_DATA) libcryptopp.a $(DESTDIR)$(LIBDIR)
$(CP) libcryptopp.a $(DESTDIR)$(LIBDIR)
$(CHMOD) 0644 $(DESTDIR)$(LIBDIR)/libcryptopp.a
endif
ifneq ($(wildcard libcryptopp.dylib),)
@-$(MKDIR) $(DESTDIR)$(LIBDIR)
$(INSTALL_PROGRAM) libcryptopp.dylib $(DESTDIR)$(LIBDIR)
$(CP) libcryptopp.dylib $(DESTDIR)$(LIBDIR)
$(CHMOD) 0755 $(DESTDIR)$(LIBDIR)/libcryptopp.dylib
-install_name_tool -id $(DESTDIR)$(LIBDIR)/libcryptopp.dylib $(DESTDIR)$(LIBDIR)/libcryptopp.dylib
endif
ifneq ($(wildcard libcryptopp.so$(SOLIB_VERSION_SUFFIX)),)
@-$(MKDIR) $(DESTDIR)$(LIBDIR)
$(INSTALL_PROGRAM) libcryptopp.so$(SOLIB_VERSION_SUFFIX) $(DESTDIR)$(LIBDIR)
$(CP) libcryptopp.so$(SOLIB_VERSION_SUFFIX) $(DESTDIR)$(LIBDIR)
$(CHMOD) 0755 $(DESTDIR)$(LIBDIR)/libcryptopp.so$(SOLIB_VERSION_SUFFIX)
ifeq ($(HAS_SOLIB_VERSION),1)
-$(LN) libcryptopp.so$(SOLIB_VERSION_SUFFIX) $(DESTDIR)$(LIBDIR)/libcryptopp.so
$(LDCONF) $(DESTDIR)$(LIBDIR)
endif
endif
ifneq ($(wildcard libcryptopp.pc),)
@-$(MKDIR) $(DESTDIR)$(LIBDIR)/pkgconfig
$(CP) libcryptopp.pc $(DESTDIR)$(LIBDIR)/pkgconfig
$(CHMOD) 0644 $(DESTDIR)$(LIBDIR)/pkgconfig/libcryptopp.pc
endif
.PHONY: remove uninstall
remove uninstall:
@ -435,29 +783,33 @@ ifeq ($(HAS_SOLIB_VERSION),1)
libcryptopp.so: libcryptopp.so$(SOLIB_VERSION_SUFFIX)
endif
libcryptopp.so$(SOLIB_VERSION_SUFFIX): $(LIBOBJS)
$(CXX) -shared $(SOLIB_FLAGS) -o $@ $(strip $(CXXFLAGS)) -Wl,--exclude-libs,ALL $(LIBOBJS) $(LDFLAGS) $(LDLIBS)
libcryptopp.so$(SOLIB_VERSION_SUFFIX): $(LIBOBJS) $(AOSP_CPU_OBJ)
$(CXX) -shared $(SOLIB_FLAGS) -o $@ $(strip $(CXXFLAGS)) -Wl,--exclude-libs,ALL $(LIBOBJS) $(AOSP_CPU_OBJ) $(LDFLAGS) $(LDLIBS)
ifeq ($(HAS_SOLIB_VERSION),1)
-$(LN) libcryptopp.so$(SOLIB_VERSION_SUFFIX) libcryptopp.so
-$(LN) libcryptopp.so$(SOLIB_VERSION_SUFFIX) libcryptopp.so$(SOLIB_COMPAT_SUFFIX)
endif
libcryptopp.dylib: $(LIBOBJS)
$(CXX) -dynamiclib -o $@ $(strip $(CXXFLAGS)) -install_name "$@" -current_version "$(LIB_MAJOR).$(LIB_MINOR).$(LIB_PATCH)" -compatibility_version "$(LIB_MAJOR).$(LIB_MINOR)" -headerpad_max_install_names $(LDFLAGS) $(LIBOBJS)
libcryptopp.dylib: $(LIBOBJS) $(AOSP_CPU_OBJ)
$(CXX) -dynamiclib -o $@ $(strip $(CXXFLAGS)) -install_name "$@" -current_version "$(LIB_MAJOR).$(LIB_MINOR).$(LIB_PATCH)" -compatibility_version "$(LIB_MAJOR).$(LIB_MINOR)" -headerpad_max_install_names $(LDFLAGS) $(LIBOBJS) $(AOSP_CPU_OBJ)
cryptest.exe: libcryptopp.a $(TESTOBJS)
$(CXX) -o $@ $(strip $(CXXFLAGS)) $(TESTOBJS) ./libcryptopp.a $(LDFLAGS) $(LDLIBS)
cryptest.exe: $(LINK_LIBRARY) $(TESTOBJS)
$(CXX) -o $@ $(strip $(CXXFLAGS)) $(TESTOBJS) $(LINK_LIBRARY_PATH)$(LINK_LIBRARY) $(LDFLAGS) $(LDLIBS)
# Used to generate list of source files for Autotools, CMakeList and Android.mk
.PHONY: sources
sources:
$(info Library sources: $(filter-out $(TESTSRCS),$(SRCS)))
$(info ***** Library sources *****)
$(info $(filter-out $(TESTSRCS),$(SRCS)))
$(info )
$(info Library headers: $(filter-out $(TESTINCL),$(INCL)))
$(info ***** Library headers *****)
$(info $(filter-out $(TESTINCL),$(INCL)))
$(info )
$(info Test sources: $(TESTSRCS))
$(info ***** Test sources *****)
$(info $(TESTSRCS))
$(info )
$(info Test headers: $(TESTINCL))
$(info ***** Test headers *****)
$(info $(TESTINCL))
adhoc.cpp: adhoc.cpp.proto
ifeq ($(wildcard adhoc.cpp),)
@ -471,55 +823,120 @@ ifeq ($(wildcard GNUmakefile.deps),GNUmakefile.deps)
-include GNUmakefile.deps
endif # Dependencies
# Cryptogams ARM asm implementation. AES needs -mthumb for Clang
aes_armv4.o : aes_armv4.S
$(CXX) $(strip $(CXXFLAGS) $(CRYPTOGAMS_ARMV7_THUMB_FLAG) -c) $<
cpu-features.o: cpu-features.h cpu-features.c
$(CXX) $(strip $(CXXFLAGS) -fpermissive -c) cpu-features.c
# SSE4.2 or NEON available
aria-simd.o : aria-simd.cpp
# SSSE3 or NEON available
aria_simd.o : aria_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(ARIA_FLAG) -c) $<
# SSE4.2 or ARMv8a available
blake2-simd.o : blake2-simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(BLAKE2_FLAG) -c) $<
# SSE, NEON or POWER7 available
blake2s_simd.o : blake2s_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(BLAKE2S_FLAG) -c) $<
# SSE2 on i586
cpu.o : cpu.cpp
$(CXX) $(strip $(CXXFLAGS) $(CPU_FLAG) -c) $<
# SSE, NEON or POWER8 available
blake2b_simd.o : blake2b_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(BLAKE2B_FLAG) -c) $<
# SSE2 or NEON available
chacha_simd.o : chacha_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(CHACHA_FLAG) -c) $<
# AVX2 available
chacha_avx.o : chacha_avx.cpp
$(CXX) $(strip $(CXXFLAGS) $(CHACHA_AVX2_FLAG) -c) $<
# SSSE3 available
cham_simd.o : cham_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(CHAM_FLAG) -c) $<
# Power9 available
darn.o : darn.cpp
$(CXX) $(strip $(CXXFLAGS) $(DARN_FLAG) -c) $<
# SSE2 on i686
donna_sse.o : donna_sse.cpp
$(CXX) $(strip $(CXXFLAGS) $(SSE2_FLAG) -c) $<
# SSE2 on i686
sse_simd.o : sse_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(SSE2_FLAG) -c) $<
# SSE4.2 or ARMv8a available
crc-simd.o : crc-simd.cpp
crc_simd.o : crc_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(CRC_FLAG) -c) $<
# PCLMUL or ARMv7a/ARMv8a available
gcm-simd.o : gcm-simd.cpp
gcm_simd.o : gcm_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(GCM_FLAG) -c) $<
# SSSE3 available
lea_simd.o : lea_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(LEA_FLAG) -c) $<
# NEON available
neon-simd.o : neon-simd.cpp
neon_simd.o : neon_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(NEON_FLAG) -c) $<
# AESNI or ARMv7a/ARMv8a available
rijndael-simd.o : rijndael-simd.cpp
rijndael_simd.o : rijndael_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(AES_FLAG) -c) $<
# SSE4.2/SHA-NI or ARMv8a available
sha-simd.o : sha-simd.cpp
sha_simd.o : sha_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(SHA_FLAG) -c) $<
# Cryptogams SHA1 asm implementation.
sha1_armv4.o : sha1_armv4.S
$(CXX) $(strip $(CXXFLAGS) $(CRYPTOGAMS_ARMV7_FLAG) -c) $<
# Cryptogams SHA256 asm implementation.
sha256_armv4.o : sha256_armv4.S
$(CXX) $(strip $(CXXFLAGS) $(CRYPTOGAMS_ARMV7_FLAG) -c) $<
# Cryptogams SHA512 asm implementation.
sha512_armv4.o : sha512_armv4.S
$(CXX) $(strip $(CXXFLAGS) $(CRYPTOGAMS_ARMV7_FLAG) -c) $<
# SSE4.2/SHA-NI or ARMv8a available
shacal2-simd.o : shacal2-simd.cpp
shacal2_simd.o : shacal2_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(SHA_FLAG) -c) $<
# SSSE3 or NEON available
simon-simd.o : simon-simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(SIMON_FLAG) -c) $<
simeck_simd.o : simeck_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(SIMECK_FLAG) -c) $<
# SSSE3 or NEON available
speck-simd.o : speck-simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(SPECK_FLAG) -c) $<
# SSE4.1, NEON or POWER7 available
simon64_simd.o : simon64_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(SIMON64_FLAG) -c) $<
# SSSE3, NEON or POWER8 available
simon128_simd.o : simon128_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(SIMON128_FLAG) -c) $<
# SSE4.1, NEON or POWER7 available
speck64_simd.o : speck64_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(SPECK64_FLAG) -c) $<
# SSSE3, NEON or POWER8 available
speck128_simd.o : speck128_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(SPECK128_FLAG) -c) $<
# ARMv8.4 available
sm3_simd.o : sm3_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(SM3_FLAG) -c) $<
# AESNI available
sm4_simd.o : sm4_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(SM4_FLAG) -c) $<
%.o : %.cpp
$(CXX) $(strip $(CXXFLAGS) -c) $<
GNUmakefile.deps:
$(CXX) $(strip $(CXXFLAGS) -MM) *.cpp > GNUmakefile.deps
.PHONY: dep deps depend
dep deps depend GNUmakefile.deps:
$(CXX) $(strip $(CXXFLAGS) -DCRYPTOPP_DISABLE_ASM) -MM *.cpp > GNUmakefile.deps

View File

@ -4,7 +4,8 @@ The History file contains the items that comprise the release notes. The
items in the list below used to be in Readme.txt. Readme.txt now contans the
last several releases.
1.0 - First public release. Withdrawn at the request of RSA DSI.
1.0 - First public release
- Withdrawn at the request of RSA DSI over patent claims
- included Blowfish, BBS, DES, DH, Diamond, DSA, ElGamal, IDEA,
MD5, RC4, RC5, RSA, SHA, WAKE, secret sharing, DEFLATE compression
- had a serious bug in the RSA key generation code.
@ -432,3 +433,50 @@ last several releases.
- remove s_nullNameValuePairs from unnamed namespace
- ported to MSVC 2017, Xcode 9.3, Sun Studio 12.5, GCC 8.0.1,
MacPorts GCC 7.0, Clang 4.0, Intel C++ 17.00, IBM XL C/C++ 13.1
8.0.0 - December 28, 2018
- major release, recompile of programs required
- expanded community input and support
* 54 unique contributors as of this release
- add x25519 key exchange and ed25519 signature scheme
- add limited Asymmetric Key Package support from RFC 5958
- add Power9 DARN random number generator support
- add CHAM, HC-128, HC-256, Hight, LEA, Rabbit, Simeck
- fix FixedSizeAllocatorWithCleanup may be unaligned on some platforms
- cutover to GNU Make-based cpu feature tests
- rename files with dashes to underscores
- fix LegacyDecryptor and LegacyDecryptorWithMAC use wrong MAC
- fix incorrect AES/CBC decryption on Windows
- avoid Singleton<T> when possible, avoid std::call_once completely
- fix SPARC alignment problems due to GetAlignmentOf<T>() on word64
- add ARM AES asm implementation from Cryptogams
- remove CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS support
8.1.0 - February 22, 2019
- minor release, no recompile of programs required
- expanded community input and support
* 56 unique contributors as of this release
- fix OS X PowerPC builds with Clang
- add Microsoft ARM64 support
- fix iPhone Simulator build due to missing symbols
- add CRYPTOPP_BUGGY_SIMD_LOAD_AND_STORE
- add carryless multiplies for NIST b233 and k233 curves
- fix OpenMP build due to use of OpenMP 4 with down-level compilers
- add SignStream and VerifyStream for ed25519 and large files
- fix missing AlgorithmProvider in PanamaHash
- add SHAKE-128 and SHAKE-256
- fix AVX2 build due to _mm256_broadcastsi128_si256
- add IETF ChaCha, XChaCha, ChaChaPoly1305 and XChaChaPoly1305
8.2.0 - April 28, 2019
- minor release, no recompile of programs required
- expanded community input and support
* 56 unique contributors as of this release
- use PowerPC unaligned loads and stores with Power8
- add SKIPJACK test vectors
- fix SHAKE-128 and SHAKE-256 compile
- removed IS_NEON from Makefile
- fix Aarch64 build on Fedora 29
- fix missing GF2NT_233_Multiply_Reduce_CLMUL in FIPS DLL
- add missing BLAKE2 constructors
- fix missing BlockSize() in BLAKE2 classes

View File

@ -1,4 +1,4 @@
Compilation Copyright (c) 1995-2016 by Wei Dai. All rights reserved.
Compilation Copyright (c) 1995-2019 by Wei Dai. All rights reserved.
This copyright applies only to this software distribution package
as a compilation, and does not imply a copyright on any particular
file in the package.
@ -22,6 +22,19 @@ Richard De Moliner - safer.cpp
Matthew Skala - twofish.cpp
Kevin Springle - camellia.cpp, shacal2.cpp, ttmac.cpp, whrlpool.cpp, ripemd.cpp
Ronny Van Keer - sha3.cpp
Aumasson, Neves, Wilcox-O'Hearn and Winnerlein - blake2.cpp, blake2b_simd.cpp, blake2s_simd.cpp
Aaram Yun - aria.cpp, aria_simd.cpp
Han Lulu, Markku-Juhani O. Saarinen - sm4.cpp sm4_simd.cpp
Daniel J. Bernstein, Jack Lloyd - chacha.cpp, chacha_simd.cpp, chacha_avx.cpp
Andrew Moon - ed25519, x25519, donna_32.cpp, donna_64.cpp, donna_sse.cpp
The Crypto++ Library uses portions of Andy Polyakov's CRYPTOGAMS for Poly1305
scalar multiplication, aes_armv4.S, sha1_armv4.S and sha256_armv4.S. CRYPTOGAMS
is dual licensed with a permissive BSD-style license. The CRYPTOGAMS license is
reproduced below.
The Crypto++ Library uses portions of Jack Lloyd's Botan for ChaCha SSE2 and
AVX. Botan placed the code in public domain for Crypto++ to use.
The Crypto++ Library (as a compilation) is currently licensed under the Boost
Software License 1.0 (http://www.boost.org/users/license.html).
@ -49,3 +62,22 @@ SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
CRYPTOGAMS License
Copyright (c) 2006-2017, CRYPTOGAMS by <appro@openssl.org>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain copyright notices,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials
provided with the distribution.
* Neither the name of the CRYPTOGAMS nor the names of its copyright
holder and contributors may be used to endorse or promote products
derived from this software without specific prior written permission.

View File

@ -1,35 +1,37 @@
Crypto++: free C++ Class Library of Cryptographic Schemes
Version 7.0 - APR/08/2018
Version 8.3 - TBD
Crypto++ Library is a free C++ class library of cryptographic schemes.
Currently the library contains the following algorithms:
algorithm type name
authenticated encryption schemes GCM, CCM, EAX
authenticated encryption schemes GCM, CCM, EAX, ChaCha20Poly1305 and
XChaCha20Poly1305
high speed stream ciphers ChaCha (8/12/20), Panama, Sosemanuk, Salsa20,
XSalsa20
high speed stream ciphers ChaCha (8/12/20), ChaCha (IETF), Panama, Salsa20,
Sosemanuk, XSalsa20, XChaCha20
AES and AES candidates AES (Rijndael), RC6, MARS, Twofish, Serpent,
CAST-256
ARIA, IDEA, Blowfish, Triple-DES (DES-EDE2 and
DES-EDE3), Camellia, SEED, Kalyna (128/256/512),
other block ciphers RC5, SIMON-64, SIMON-128, SPECK-64, SPECK-128,
Skipjack, SHACAL-2, SM4, Threefish (256/512/1024),
TEA, XTEA
ARIA, Blowfish, Camellia, CHAM, HIGHT, IDEA,
Kalyna (128/256/512), LEA, SEED, RC5, SHACAL-2,
other block ciphers SIMON (64/128), Skipjack, SPECK (64/128),
Simeck, SM4, Threefish (256/512/1024),
Triple-DES (DES-EDE2 and DES-EDE3), TEA, XTEA
block cipher modes of operation ECB, CBC, CBC ciphertext stealing (CTS),
CFB, OFB, counter mode (CTR)
message authentication codes BLAKE2s, BLAKE2b, CMAC, CBC-MAC, DMAC, GMAC, HMAC,
Poly1305, SipHash, Two-Track-MAC, VMAC,
Poly1305, Poly1305 (IETF), SipHash, Two-Track-MAC,
VMAC
BLAKE2s, BLAKE2b, Keccack (F1600), SHA-1,
hash functions SHA-2 (224/256/384/512), SHA-3 (224/256/384/512),
SipHash, SM3, Tiger, RIPEMD-128, RIPEMD-160,
RIPEMD-256, RIPEMD-320, WHIRLPOOL
SHAKE (128/256), SipHash, SM3, Tiger,
RIPEMD (128/160/256/320), WHIRLPOOL
RSA, DSA, Determinsitic DSA, ElGamal,
public-key cryptography Nyberg-Rueppel (NR), Rabin-Williams (RW), LUC,
@ -39,11 +41,12 @@ Currently the library contains the following algorithms:
padding schemes for public-key PKCS#1 v2.0, OAEP, PSS, PSSR, IEEE P1363
systems EMSA2 and EMSA5
Diffie-Hellman (DH), Unified Diffie-Hellman
key agreement schemes (DH2), Menezes-Qu-Vanstone (MQV), Hashed MQV (HMQV),
Diffie-Hellman (DH), Unified Diffie-Hellman (DH2),
key agreement schemes Menezes-Qu-Vanstone (MQV), Hashed MQV (HMQV),
Fully Hashed MQV (FHMQV), LUCDIF, XTR-DH
elliptic curve cryptography ECDSA, Determinsitic ECDSA, ECNR, ECIES, ECDH, ECMQV
elliptic curve cryptography ECDSA, Determinsitic ECDSA, ed25519, ECNR, ECIES,
ECDH, ECMQV, x25519
insecure or obsolescent MD2, MD4, MD5, Panama Hash, DES, ARC4, SEAL
algorithms retained for backwards 3.0, WAKE-OFB, DESX (DES-XEX3), RC2,
@ -53,7 +56,7 @@ algorithms retained for backwards 3.0, WAKE-OFB, DESX (DES-XEX3), RC2,
Other features include:
* pseudo random number generators (PRNG): ANSI X9.17 appendix C, RandomPool,
VIA Padlock, RDRAND, RDSEED, NIST Hash and HMAC DRBGs
DARN, VIA Padlock, RDRAND, RDSEED, NIST Hash and HMAC DRBGs
* password based key derivation functions: PBKDF1 and PBKDF2 from PKCS #5,
PBKDF from PKCS #12 appendix B, HKDF from RFC 5869, Scrypt from RFC 7914
* Shamir's secret sharing scheme and Rabin's information dispersal algorithm
@ -68,8 +71,6 @@ Other features include:
+ 32-bit CRC, CRC-C and Adler32 checksum
* class wrappers for these platform and operating system features (optional):
+ high resolution timers on Windows, Unix, and Mac OS
+ Berkeley and Windows style sockets
+ Windows named pipes
+ /dev/random, /dev/urandom, /dev/srandom
+ Microsoft's CryptGenRandom or BCryptGenRandom on Windows
* A high level interface for most of the above, using a filter/pipeline
@ -91,13 +92,13 @@ The following compilers are supported for this release. Please visit
http://www.cryptopp.com the most up to date build instructions and porting notes.
* Visual Studio 2003 - 2017
* GCC 3.3 - 8.0
* GCC 3.3 - 9.0
* Apple Clang 4.3 - 9.3
* LLVM Clang 2.9 - 4.0
* C++Builder 2010
* LLVM Clang 2.9 - 7.0
* C++Builder 2015
* Intel C++ Compiler 9 - 16.0
* Sun Studio 12u1 - 12.5
* IBM XL C/C++ 10.0 - 13.1
* Sun Studio 12u1 - 12.6
* IBM XL C/C++ 10.0 - 13.3
*** Important Usage Notes ***
@ -204,16 +205,29 @@ library in your programs to help avoid unwanted redirections.
*** Side Channel Attacks ***
Crypto++ attempts to resist side channel attacks using various remediations. We
believe the library is hardened but the remdiations may be incomplete. The first
line of defense uses hardware instructions when possible. The library also uses
cache-aware algoirthms and access patterns to minimize leakage. If you suspect
or find an information leak then please report it.
Crypto++ attempts to resist side channel attacks using various remediations.
The remdiations are applied as a best effort but are probably incomplete. They
are incomplete due to cpu speculation bugs like Spectre, Meltdown, Foreshadow.
The attacks target both cpu caches and internal buffers. Intel generally refers
to internal buffer attacks as "Microarchitectural Data Sampling" (MDS).
Crypto++ does not enagage Specter remediations at this time. The GCC options for
Specter are -mfunction-return=thunk and -mindirect-branch=thunk, and the library
uses them during testing. If you want the Specter workarounds then add the GCC
options to your CXXFLAGS when building the library.
The library uses hardware instructions when possible for block ciphers, hashes
and other operations. The hardware acceleration remediates some timing
attacks. The library also uses cache-aware algoirthms and access patterns
to minimize leakage cache evictions.
Some of the public key algorithms have branches and some of the branches depend
on data that can be private or secret. The branching occurs in some field
operations like exponentiation over integers and elliptic curves. The branching
has been minimized but not completely eliminated.
Crypto++ does not enagage Specter remediations at this time. The GCC options
for Specter are -mfunction-return=thunk and -mindirect-branch=thunk, and the
library uses them during testing. If you want the Specter workarounds then add
the GCC options to your CXXFLAGS when building the library.
To help resist attacks you should disable hyperthreading on cpus. If you
suspect or find an information leak then please report it.
*** Documentation and Support ***
@ -282,6 +296,53 @@ documentation is one of the highest returns on investment.
The items in this section comprise the most recent history. Please see History.txt
for the record back to Crypto++ 1.0.
8.2.0 - April 28, 2019
- minor release, no recompile of programs required
- expanded community input and support
* 56 unique contributors as of this release
- use PowerPC unaligned loads and stores with Power8
- add SKIPJACK test vectors
- fix SHAKE-128 and SHAKE-256 compile
- removed IS_NEON from Makefile
- fix Aarch64 build on Fedora 29
- fix missing GF2NT_233_Multiply_Reduce_CLMUL in FIPS DLL
- add missing BLAKE2 constructors
- fix missing BlockSize() in BLAKE2 classes
8.1.0 - February 22, 2019
- minor release, no recompile of programs required
- expanded community input and support
* 56 unique contributors as of this release
- fix OS X PowerPC builds with Clang
- add Microsoft ARM64 support
- fix iPhone Simulator build due to missing symbols
- add CRYPTOPP_BUGGY_SIMD_LOAD_AND_STORE
- add carryless multiplies for NIST b233 and k233 curves
- fix OpenMP build due to use of OpenMP 4 with down-level compilers
- add SignStream and VerifyStream for ed25519 and large files
- fix missing AlgorithmProvider in PanamaHash
- add SHAKE-128 and SHAKE-256
- fix AVX2 build due to _mm256_broadcastsi128_si256
- add IETF ChaCha, XChaCha, ChaChaPoly1305 and XChaChaPoly1305
8.0.0 - December 28, 2018
- major release, recompile of programs required
- expanded community input and support
* 54 unique contributors as of this release
- add x25519 key exchange and ed25519 signature scheme
- add limited Asymmetric Key Package support from RFC 5958
- add Power9 DARN random number generator support
- add CHAM, HC-128, HC-256, Hight, LEA, Rabbit, Simeck
- fix FixedSizeAllocatorWithCleanup may be unaligned on some platforms
- cutover to GNU Make-based cpu feature tests
- rename files with dashes to underscores
- fix LegacyDecryptor and LegacyDecryptorWithMAC use wrong MAC
- fix incorrect AES/CBC decryption on Windows
- avoid Singleton<T> when possible, avoid std::call_once completely
- fix SPARC alignment problems due to GetAlignmentOf<T>() on word64
- add ARM AES asm implementation from Cryptogams
- remove CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS support
7.0.0 - April 8, 2018
- major release, recompile of programs required
- expanded community input and support
@ -340,67 +401,6 @@ for the record back to Crypto++ 1.0.
- ported to MSVC 2017, Xcode 8.1, Sun Studio 12.5, GCC 7.3,
MacPorts GCC 7.0, Clang 4.0, Intel C++ 17.00, IBM XL C/C++ 13.1
5.6.5 - October 11, 2016
- maintenance release, recompile of programs recommended
- expanded community input and support
* 25 unique contributors as of this release
- fixed CVE-2016-7420 (Issue 277, document NDEBUG for production/release)
- fixed CVE-2016-7544 (Issue 302, avoid _malloca and _freea)
- shipped library in recommended state
* backwards compatibility achieved with <config.compat>
- Visual Studio project file cleanup
* improved X86 and X64 MSBuild support
* added ARM-based MSBuild awareness
- improved Testing and QA
* expanded platforms and compilers
* expanded Coverity into OS X and Windows platforms
* added Windows test scripts using Strawberry Perl
- ported to MSVC 2015 SP3, Xcode 7.3, Sun Studio 12.5, GCC 7.0,
MacPorts GCC 7.0, Clang 3.8, Intel C++ 17.00
5.6.4 - September 11, 2016
- maintenance release, honored API/ABI/Versioning requirements
- expanded community input and support
* 22 unique contributors for this release
- fixed CVE-2016-3995
- changed SHA3 to FIPS 202 (F1600, XOF d=0x06)
- added Keccak (F1600, XOF d=0x01)
- added ChaCha (ChaCha8/12/20)
- added HMQV and FHMQV
* Hashed and Fully Hashed MQV
- added BLAKE2 (BLAKE2s and BLAKE2b)
* C++, SSE2, SSE4, ARM NEON and ARMv8 ASIMD
- added CRC32-C
* C/C++, Amd64 CRC, and ARMv8 CRC
- improved Rabin-William signatures
* Tweaked roots <em>e</em> and <em>f</em>
- improved C++11 support
* atomics, threads and fences
* alginof, alignas
* constexpr
* noexcept
- improved GCM mode
* ARM NEON and ARMv8 ASIMD
* ARMv8 carry-less multiply
- improved Windows 8 and 10 support
* Windows Phone, Universal Windows Platform, Windows Store
- improved MIPS, ARMv7 and ARMv8 support
* added scripts setenv-{android|embedded|ios}.sh for GNUmakefile-cross
* aggressive use of -march=<arch> and -mfpu=<fpu> in cryptest.sh
- improved build systems
* Visual Studio 2010 default
* added CMake support (lacks FindCryptopp.cmake)
* archived VC++ 5/0/6.0 project files (vc60.zip)
* archived VS2005 project files (vs2005.zip)
* archived Borland project files (bds10.zip)
- improved Testing and QA
* expanded platforms and compilers
* added code generation tests based on CPU features
* added C++03, C++11, C++14, C++17 testing
* added -O3, -O5, -Ofast and -Os testing
- ported to MSVC 2015 SP3, Xcode 9.0, Sun Studio 12.5, GCC 7.0,
MacPorts GCC 7.0, Clang 3.8, Intel C++ 17.00
June 2015 - Changing of the guard. Wei Dai turned the library over to the
community. The first community release was Crypto++ 5.6.3. Wei is
no longer involved with the daily operations of the project. Wei

1
TestData/defdmac1.bin Normal file
View File

@ -0,0 +1 @@
nCBţ pIbź_¤_ĺ|źâ+"w˙¶¶†Ž˝í#Aýíż‡„nŢmÖéŠČ‡ű%±kXřťąRňłüw`Ză^s.+ÚÚµ<C39A>ř„Š`ŠÝBf]zó•}¦R`}\ŘdiśbfttÉ^ř˛

BIN
TestData/defdmac2.bin Normal file

Binary file not shown.

1
TestData/ecies_p160.dat Normal file
View File

@ -0,0 +1 @@
3081C80201003081A406072A8648CE3D0201308198020101302006072A8648CE3D0101021500FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF302C0414FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC04141C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA450429044A96B5688EF573284664698968C38BB913CBFC8223A628553168947D59DCC912042351377AC5FB3202150100000000000000000001F4C8F927AED3CA752257020101041C301A02010104150023A68821ABB99DBB8429ED2320D61A8EA4C6D81B

1
TestData/ecies_t163.dat Normal file
View File

@ -0,0 +1 @@
3081D10201003081AD06072A8648CE3D02013081A1020101302506072A8648CE3D0102301A020200A306092A8648CE3D010203033009020103020106020107302E041507B6882CAAEFA84F9554FF8428BD88E246D2782AE204150713612DCDDCB40AAB946BDA29CA91F73AF958AFD9042B040369979697AB43897789566789567F787A7876A65400435EDB42EFAFB2989D51FEFCE3C80988F41FF883021503FFFFFFFFFFFFFFFFFFFF48AAB689C29CA710279B020102041C301A02010104150003693AB4D83EE8B544548BE7647AEA0EA64E8211

1
TestData/ed25519.dat Normal file
View File

@ -0,0 +1 @@
302E020100300506032B65700422042098C59D3F097FB23D44BA90791281B453258D691A55AF5CE4F1EE712FDF91AE6D

1
TestData/ed25519v0.dat Normal file
View File

@ -0,0 +1 @@
302E020100300506032B65700422042030BF776A497D7F1E0E26AC4FB03F5BE7E187DDFEFB914CD292A6FEDB7F70CE6B

1
TestData/ed25519v1.dat Normal file
View File

@ -0,0 +1 @@
3053020101300506032B6570042204206861FD53C7643DABDCDF4C3969CE44A156BAC261242A5AAEC140EDE510071C6CA12303210029CF90E6C1CF1ADC7105720303B2EE303412D2B682C6FEEF3D8736A286B2E27F

View File

@ -1 +1 @@
308201A40201003082011706072A8648CE3804013082010A028181008B333697371663F8869E3EC80A414E46BBAFE41F6D40E754A01ADA60FE7D12ACD16DE311C4115293114F6B92A54195909276380F04BCD4ED5CD993ED7F516DF7A752B928E5035E0D3A1A979A1CDE8387734338793C02001D59B662D4FC8F2BF0EABB1F553F9F46F57E74BCABCBA4E458812DB601FCD04609D435317181236B9702818045999B4B9B8B31FC434F1F640520A7235DD7F20FB6A073AA500D6D307F3E895668B6F188E208A94988A7B5C952A0CAC8493B1C07825E6A76AE6CC9F6BFA8B6FBD3A95C947281AF069D0D4BCD0E6F41C3B9A19C3C9E01000EACDB316A7E4795F8755D8FAA9FCFA37ABF3A5E55E5D2722C4096DB00FE682304EA1A98B8C091B5CB02010204818302818045999B4B9B8B31FC434F1F640520A7235DD7F20FB6A073AA500D6D307F3E895668B6F188E208A94988A7B5C952A0CAC8493B1C07825E6A76AE6CC9F6BFA8B6FBD3A95C947281AF069D0D4BCD0E6F41C3B9A19C3C9E01000EACDB316A7E4795F8755D8FAA9FCFA37ABF3A5E2958F40032EF29CB145C7481380458812D62F09287
308201360201003082011606062B0E070201013082010A02818100D18892CC35AD9E532C53810019E525CDE08882E6344D6787C366B171D68948F53D74F7923B148E0A0B4C9B956D695384DE24AC3034000B3C4AD4C8226470BBD88B5B053BCCB01E608B1352D6ED16324745253BDB204308E065368CB9D75ACDB290E671BD4CA1608500BFACD758E6E9EFAC8CCBAD83BE7E397A62E4F55634FC3B02818068C449661AD6CF299629C0800CF292E6F04441731A26B3C3E1B358B8EB44A47A9EBA7BC91D8A470505A64DCAB6B4A9C26F1256181A00059E256A641132385DEC45AD829DE6580F304589A96B768B1923A2929DED90218470329B465CEBAD66D9487338DEA650B042805FD66BAC7374F7D64665D6C1DF3F1CBD31727AAB1A7E1D0201030417021504ED7AED68B1A5EFDE11262210D9F1121D4A119CE8

1
TestData/x25519.dat Normal file
View File

@ -0,0 +1 @@
302E020100300506032B656E0422042030D407BB0CC97D0EC493BDB00A4A8EFA06A50D2388F5BA62947030E7D9873F49

1
TestData/x25519v0.dat Normal file
View File

@ -0,0 +1 @@
302E020100300506032B656E042204202818E54DE6B88EEF3E99E25042CB98E69373B222E4C1E8B3FB10AC9B26C1007B

1
TestData/x25519v1.dat Normal file
View File

@ -0,0 +1 @@
3053020101300506032B656E04220420A00FADD6D29BE764B851F64F7620E80B700DF65914BED31E486362281BB5D061A123032100E9AD4CC54DAA36F312D98B253854F0076E2BC26FCE5802B3AC79A5B59B3D2C4F

214
TestPrograms/dump2def.cxx Normal file
View File

@ -0,0 +1,214 @@
// dump2def.cxx - Written and placed in public domain by Jeffrey Walton
// Create a module definitions file from a dumpbin file.
// dump2def can be used to create a list of exports from
// a static library. Then, the exports can used to build
// a dynamic link library with the same exports.
//
// If you wish to compile this source file using cl.exe, then:
// cl.exe /DNDEBUG /Oi /Oy /O2 /Zi /TP /GR /EHsc /MT dump2def.cxx
//
// The intended workflow in Crypto++ is:
//
// 1. Open a Developer Prompt
// 2. CD to cryptopp/ directory
// 3. nmake /f cryptest.nmake cryptopp.dll
//
// The cryptopp.dll recipe first builds cryptlib.lib. Then it calls
// dumpbin.exe to export all symbols from cryptlib.lib and writes them
// to cryptopp.dump. The recipe then calls dump2def.exe to create a
// module definition file. Finally, the recipe builds cryptopp.dll
// using the module definition file cryptopp.def. The linker creates
// the import lib cryptopp.lib and export cryptopp.exp automatically.
//
// This is only "half the problem solved" for those who wish to use
// a DLL. The program must import the import lib cryptopp.lib. Then
// the program must ensure the library headers export the symbol or
// class with CRYPTOPP_DLL. CRYPTOPP_DLL is only present on some classes
// because the FIPS module only allowed approved algorithms like AES and
// SHA. Other classes like Base64Encoder and HexEncoder lack CRYPTOPP_DLL.
//
// CRYPTOPP_DLL simply adds declspec(dllimport) when CRYPTOPP_IMPORTS is
// defined. The limitation of requiring declspec(dllimport) is imposed by
// Microsoft. Microsoft does not allow a program to "import everything".
//
// If you would like to read more about the FIPS module and the pain it
// causes then see https://www.cryptopp.com/wiki/FIPS_DLL. In fact we
// recommend you delete the CryptDll and DllTest projects from the
// Visual Studio solution file.
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <vector>
#include <set>
// Friendly name
#define LIBRARY_DESC "Crypto++ Library"
typedef std::set<std::string> SymbolMap;
const int ErrorSuccess = 0;
const int ErrorDumpExtension = 1;
const int ErrorTooFewOpts = 2;
const int ErrorTooManyOpts = 3;
const int ErrorOpenInputFailed = 4;
const int ErrorOpenOutputFailed = 5;
const int ErrorReadException = 6;
const int ErrorWriteException = 7;
void PrintHelpAndExit(int code)
{
std::cout << "dump2def - create a module definitions file from a dumpbin file" << std::endl;
std::cout << " Written and placed in public domain by Jeffrey Walton" << std::endl;
std::cout << std::endl;
switch (code)
{
case ErrorDumpExtension:
std::cout << "Error: input file is missing \".dump\" extension.\n" << std::endl;
break;
case ErrorTooFewOpts:
std::cout << "Error: Too few options were supplied.\n" << std::endl;
break;
case ErrorTooManyOpts:
std::cout << "Error: Too many options were supplied.\n" << std::endl;
break;
case ErrorOpenInputFailed:
std::cout << "Error: Failed to open input file.\n" << std::endl;
break;
case ErrorOpenOutputFailed:
std::cout << "Error: Failed to open output file.\n" << std::endl;
break;
default:
;;
}
std::cout << "Usage: " << std::endl;
std::cout << " dump2def <infile>" << std::endl;
std::cout << " - Create a def file from <infile> and write it to a file with" << std::endl;
std::cout << " the same name as <infile> but using the .def extension" << std::endl;
std::cout << " dump2def <infile> <outfile>" << std::endl;
std::cout << " - Create a def file from <infile> and write it to <outfile>" << std::endl;
std::exit((code == ErrorSuccess ? 0 : 1));
}
int main(int argc, char* argv[])
{
// ******************** Handle Options ******************** //
// Convenience item
std::vector<std::string> opts;
for (size_t i=0; i<argc; ++i)
opts.push_back(argv[i]);
// Look for help
std::string opt = (opts.size() > 1 ? opts[1].substr(0,2) : "");
if (opt == "/h" || opt == "-h" || opt == "/?" || opt == "-?")
PrintHelpAndExit(ErrorSuccess);
// Add <outfile> as needed
if (opts.size() == 2)
{
std::string outfile = opts[1];
std::string::size_type pos = outfile.length() < 5 ? std::string::npos : outfile.length() - 5;
if (pos == std::string::npos || outfile.substr(pos) != ".dump")
PrintHelpAndExit(ErrorDumpExtension);
outfile.replace(pos, 5, ".def");
opts.push_back(outfile);
}
// Check or exit
if (opts.size() < 2)
PrintHelpAndExit(ErrorTooFewOpts);
if (opts.size() > 3)
PrintHelpAndExit(ErrorTooManyOpts);
// ******************** Read MAP file ******************** //
SymbolMap symbols;
try
{
std::ifstream infile(opts[1].c_str());
if (infile.is_open() == false)
PrintHelpAndExit(ErrorOpenInputFailed);
std::string::size_type pos;
std::string line;
// Find start of the symbol table
while (std::getline(infile, line))
{
pos = line.find("public symbols");
if (pos == std::string::npos) { continue; }
// Eat the whitespace after the table heading
infile >> std::ws;
break;
}
while (std::getline(infile, line))
{
// End of table
if (line.empty()) { break; }
std::istringstream iss(line);
std::string address, symbol;
iss >> address >> symbol;
symbols.insert(symbol);
}
}
catch (const std::exception& ex)
{
std::cerr << "Unexpected exception:" << std::endl;
std::cerr << ex.what() << std::endl;
std::cerr << std::endl;
PrintHelpAndExit(ErrorReadException);
}
// ******************** Write DEF file ******************** //
try
{
std::ofstream outfile(opts[2].c_str());
if (outfile.is_open() == false)
PrintHelpAndExit(ErrorOpenOutputFailed);
// Library name, cryptopp.dll
std::string name = opts[2];
std::string::size_type pos = name.find_last_of(".");
if (pos != std::string::npos)
name.erase(pos);
outfile << "LIBRARY " << name << std::endl;
outfile << "DESCRIPTION \"" << LIBRARY_DESC << "\"" << std::endl;
outfile << "EXPORTS" << std::endl;
outfile << std::endl;
outfile << "\t;; " << symbols.size() << " symbols" << std::endl;
// Symbols from our object files
SymbolMap::const_iterator it = symbols.begin();
for ( ; it != symbols.end(); ++it)
outfile << "\t" << *it << std::endl;
}
catch (const std::exception& ex)
{
std::cerr << "Unexpected exception:" << std::endl;
std::cerr << ex.what() << std::endl;
std::cerr << std::endl;
PrintHelpAndExit(ErrorWriteException);
}
return 0;
}

View File

@ -0,0 +1,7 @@
#include <cstddef>
int main(int argc, char* argv[])
{
enum {N = (sizeof(std::size_t) == 4 ? 4 : -1)};
int x[N];
return 0;
}

View File

@ -0,0 +1,7 @@
#include <cstddef>
int main(int argc, char* argv[])
{
enum {N = (sizeof(std::size_t) == 8 ? 8 : -1)};
int x[N];
return 0;
}

View File

@ -0,0 +1,5 @@
#include <arm_acle.h>
int main(int argc, char* argv[])
{
return 0;
}

View File

@ -0,0 +1,19 @@
#include <arm_neon.h>
#include <stdint.h>
// test_acle.h determines if this is available. Then,
// -DCRYPTOPP_ARM_ACLE_AVAILABLE=0 is added to CXXFLAGS
// if the ACLE header is not available.
#if (CRYPTOPP_ARM_ACLE_AVAILABLE)
# include <arm_acle.h>
#endif
int main(int argc, char* argv[])
{
uint8x16_t x={0};
x=vaeseq_u8(x,x);
x=vaesmcq_u8(x);
x=vaesdq_u8(x,x);
x=vaesimcq_u8(x);
return 0;
}

View File

@ -0,0 +1,16 @@
#include <arm_neon.h>
#include <stdint.h>
// test_acle.h determines if this is available. Then,
// -DCRYPTOPP_ARM_ACLE_AVAILABLE=0 is added to CXXFLAGS
// if the ACLE header is not available.
#if (CRYPTOPP_ARM_ACLE_AVAILABLE)
# include <arm_acle.h>
#endif
int main(int argc, char* argv[])
{
uint32x4_t x={0};
x=veorq_u32(x,x);
return 0;
}

View File

@ -0,0 +1,23 @@
#include <arm_neon.h>
#include <stdint.h>
// test_acle.h determines if this is available. Then,
// -DCRYPTOPP_ARM_ACLE_AVAILABLE=0 is added to CXXFLAGS
// if the ACLE header is not available.
#if (CRYPTOPP_ARM_ACLE_AVAILABLE)
# include <arm_acle.h>
#endif
int main(int argc, char* argv[])
{
uint32_t w=0xffffffff;
w = __crc32w(w,w);
w = __crc32h(w,w);
w = __crc32b(w,w);
w = __crc32cw(w,w);
w = __crc32ch(w,w);
w = __crc32cb(w,w);
return 0;
}

View File

@ -0,0 +1,9 @@
#include <arm_neon.h>
#include <stdint.h>
int main(int argc, char* argv[])
{
uint32x4_t x={0};
x=veorq_u32(x,x);
return 0;
}

View File

@ -0,0 +1,22 @@
#include <arm_neon.h>
#include <stdint.h>
// test_acle.h determines if this is available. Then,
// -DCRYPTOPP_ARM_ACLE_AVAILABLE=0 is added to CXXFLAGS
// if the ACLE header is not available.
#if (CRYPTOPP_ARM_ACLE_AVAILABLE)
# include <arm_acle.h>
#endif
int main(int argc, char* argv[])
{
const poly64_t a=0x60606060, b=0x90909090, c=0xb0b0b0b0;
const poly64x2_t d={0x60606060,0x90909090};
const poly8x16_t e={0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0};
const poly128_t r1 = vmull_p64(a, b);
const poly128_t r2 = vmull_high_p64(d, d);
return 0;
}

View File

@ -0,0 +1,18 @@
#include <arm_neon.h>
#include <stdint.h>
// test_acle.h determines if this is available. Then,
// -DCRYPTOPP_ARM_ACLE_AVAILABLE=0 is added to CXXFLAGS
// if the ACLE header is not available.
#if (CRYPTOPP_ARM_ACLE_AVAILABLE)
# include <arm_acle.h>
#endif
int main(int argc, char* argv[])
{
uint32x4_t y = {0};
y=vsha1cq_u32(y,0,y);
y=vsha1mq_u32(y,1,y);
y=vsha1pq_u32(y,2,y);
return 0;
}

View File

@ -0,0 +1,18 @@
#include <arm_neon.h>
#include <stdint.h>
// test_acle.h determines if this is available. Then,
// -DCRYPTOPP_ARM_ACLE_AVAILABLE=0 is added to CXXFLAGS
// if the ACLE header is not available.
#if (CRYPTOPP_ARM_ACLE_AVAILABLE)
# include <arm_acle.h>
#endif
int main(int argc, char* argv[])
{
uint32x4_t y = {0};
y=vsha256hq_u32(y, y, y);
y=vsha256h2q_u32(y, y, y);
y=vsha256su1q_u32(y, y, y);
return 0;
}

View File

@ -0,0 +1,29 @@
#include <arm_neon.h>
#include <stdint.h>
// test_acle.h determines if this is available. Then,
// -DCRYPTOPP_ARM_ACLE_AVAILABLE=0 is added to CXXFLAGS
// if the ACLE header is not available.
#if (CRYPTOPP_ARM_ACLE_AVAILABLE)
# include <arm_acle.h>
#endif
int main(int argc, char* argv[])
{
// SM4 block cipher
uint32x4_t x;
x=vsm4ekeyq_u32(x,x);
x=vsm4eq_u32(x,x);
// SM3 hash
uint32x4_t y;
y=vsm3ss1q_u32(x,y,y);
y=vsm3tt1aq_u32(x,y,y,3);
y=vsm3tt1bq_u32(x,y,y,1);
y=vsm3tt2aq_u32(x,y,y,2);
y=vsm3tt2bq_u32(x,y,y,3);
y=vsm3partw1q_u32(x,y,y);
y=vsm3partw2q_u32(x,y,y);
return 0;
}

View File

@ -0,0 +1,29 @@
#include <arm_neon.h>
#include <stdint.h>
// test_acle.h determines if this is available. Then,
// -DCRYPTOPP_ARM_ACLE_AVAILABLE=0 is added to CXXFLAGS
// if the ACLE header is not available.
#if (CRYPTOPP_ARM_ACLE_AVAILABLE)
# include <arm_acle.h>
#endif
int main(int argc, char* argv[])
{
// SM4 block cipher
uint32x4_t x;
x=vsm4ekeyq_u32(x,x);
x=vsm4eq_u32(x,x);
// SM3 hash
uint32x4_t y;
y=vsm3ss1q_u32(x,y,y);
y=vsm3tt1aq_u32(x,y,y,3);
y=vsm3tt1bq_u32(x,y,y,1);
y=vsm3tt2aq_u32(x,y,y,2);
y=vsm3tt2bq_u32(x,y,y,3);
y=vsm3partw1q_u32(x,y,y);
y=vsm3partw2q_u32(x,y,y);
return 0;
}

View File

@ -0,0 +1,23 @@
#include <arm_neon.h>
#include <stdint.h>
// test_acle.h determines if this is available. Then,
// -DCRYPTOPP_ARM_ACLE_AVAILABLE=0 is added to CXXFLAGS
// if the ACLE header is not available.
#if (CRYPTOPP_ARM_ACLE_AVAILABLE)
# include <arm_acle.h>
#endif
int main(int argc, char* argv[])
{
// SM3 hash
uint32x4_t y;
y=vsm3ss1q_u32(x,y,y);
y=vsm3tt1aq_u32(x,y,y,3);
y=vsm3tt1bq_u32(x,y,y,1);
y=vsm3tt2aq_u32(x,y,y,2);
y=vsm3tt2bq_u32(x,y,y,3);
y=vsm3partw1q_u32(x,y,y);
y=vsm3partw2q_u32(x,y,y);
return 0;
}

View File

@ -0,0 +1,18 @@
#include <arm_neon.h>
#include <stdint.h>
// test_acle.h determines if this is available. Then,
// -DCRYPTOPP_ARM_ACLE_AVAILABLE=0 is added to CXXFLAGS
// if the ACLE header is not available.
#if (CRYPTOPP_ARM_ACLE_AVAILABLE)
# include <arm_acle.h>
#endif
int main(int argc, char* argv[])
{
// SM4 block cipher
uint32x4_t x;
x=vsm4ekeyq_u32(x,x);
x=vsm4eq_u32(x,x);
return 0;
}

View File

@ -0,0 +1,6 @@
#include <string>
int main(int argc, char* argv[])
{
unsigned int x=0;
return x;
}

View File

@ -0,0 +1,31 @@
// Most Clang cannot handle mixed asm with positional arguments, where the
// body is Intel style with no prefix and the templates are AT&T style.
// Also see https://bugs.llvm.org/show_bug.cgi?id=39895 .
#include <cstddef>
int main(int argc, char* argv[])
{
size_t ret = 1, N = 1;
asm __volatile__
(
#if defined(__amd64__) || defined(__x86_64__)
".intel_syntax noprefix ;\n"
"xor rsi, rsi ;\n"
"neg %1 ;\n"
"inc %1 ;\n"
"push %1 ;\n"
"pop rax ;\n"
".att_syntax prefix ;\n"
: "=a" (ret) : "c" (N) : "%rsi"
#else
".intel_syntax noprefix ;\n"
"xor esi, esi ;\n"
"neg %1 ;\n"
"inc %1 ;\n"
"push %1 ;\n"
"pop eax ;\n"
".att_syntax prefix ;\n"
: "=a" (ret) : "c" (N) : "%esi"
#endif
);
return (int)ret;
}

View File

@ -0,0 +1,8 @@
#include <string>
int main(int argc, char* argv[])
{
#ifndef __NEWLIB__
XXX
#endif
return 0;
}

View File

@ -0,0 +1,26 @@
#include <altivec.h>
int main(int argc, char* argv[])
{
#if defined(__ibmxl__) || (defined(_AIX) && defined(__xlC__))
__vector unsigned char x = {1,2,3,4,5,6,7,8};
x=__vcipher(x,x);
x=__vcipherlast(x,x);
x=__vncipher(x,x);
x=__vncipherlast(x,x);
#elif defined(__clang__)
__vector unsigned long long x = {1,2};
x=__builtin_altivec_crypto_vcipher(x,x);
x=__builtin_altivec_crypto_vcipherlast(x,x);
x=__builtin_altivec_crypto_vncipher(x,x);
x=__builtin_altivec_crypto_vncipherlast(x,x);
#elif defined(__GNUC__)
__vector unsigned long long x = {1,2};
x=__builtin_crypto_vcipher(x,x);
x=__builtin_crypto_vcipherlast(x,x);
x=__builtin_crypto_vncipher(x,x);
x=__builtin_crypto_vncipherlast(x,x);
#else
int XXX[-1];
#endif
return 0;
}

View File

@ -0,0 +1,8 @@
#include <altivec.h>
int main(int argc, char* argv[])
{
__vector unsigned char x;
x=vec_ld(0, (unsigned char*)argv[0]);
x=vec_add(x,x);
return 0;
}

View File

@ -0,0 +1,41 @@
#include <altivec.h>
// This follows ppc_simd.h. XLC compilers for POWER7 use vec_xlw4 and
// vec_xstw4. Some XLC compilers for POWER7 and above use vec_xl and
// vec_xst. The way to tell the difference is, XLC compilers version
// 13.0 and earlier use use vec_xlw4 and vec_xstw4 XLC compilers 13.1
// and later are use vec_xl and vec_xst. The open question is, how to
// handle early Clang compilers for POWER7. We know the latest Clang
// compilers support vec_xl and vec_xst. Also see
// https://www-01.ibm.com/support/docview.wss?uid=swg21683541
#if defined(__xlc__) && (__xlc__ < 0x0d01)
# define __early_xlc__ 1
#endif
#if defined(__xlC__) && (__xlC__ < 0x0d01)
# define __early_xlC__ 1
#endif
int main(int argc, char* argv[])
{
__vector unsigned char x;
unsigned char res[16];
#if defined(_ARCH_PWR7) && (defined(__early_xlc__) || defined(__early_xlC__))
x=vec_xlw4(0, (unsigned char*)argv[0]);
x=vec_add(x,x);
vec_xstw4(x, 0, res);
#elif defined(_ARCH_PWR7) && (defined(__xlc__) || defined(__xlC__) || defined(__clang__))
x=vec_xl(0, (unsigned char*)argv[0]);
x=vec_add(x,x);
vec_xst(x, 0, res);
#elif defined(_ARCH_PWR7) && defined(__GNUC__)
x=vec_vsx_ld(0, (unsigned char*)argv[0]);
x=vec_add(x,x);
vec_vsx_st(x, 0, res);
#else
int XXX[-1];
#endif
return 0;
}

View File

@ -0,0 +1,7 @@
#include <altivec.h>
int main(int argc, char* argv[])
{
__vector unsigned long long z = {1, 2};
z=vec_add(z,z);
return 0;
}

View File

@ -0,0 +1,36 @@
// The problem we have here is, it appears only GCC 7.0 and above
// support Power9 builtins. Clang 7.0 has support for some (all?)
// assembly instructions but we don't see builtin support. We can't
// determine the state of XLC. Searching IBM's website for
// terms like 'darn' 'random number' is returning irrelevant hits.
// Searching with Google from the outside returns 0 hits.
//
// The support disconnect means we may report Power9 as unavailable
// and support DARN at the same time. We get into that state because
// we use inline asm to detect DARN availablity in the compiler.
// Also see cpu.cpp and the two query functions; and ppc_power9.cpp
// and the two probe functions.
#include <altivec.h>
int main(int argc, char* argv[])
{
#if 0
const unsigned char b = (unsigned char)argc;
const unsigned int r = (0xf << 24) | (0x3 << 16) | (0xf << 8) | (0x3 << 0);
#if defined(__clang__)
bool x = __builtin_altivec_byte_in_range(b, r);
#elif defined(__GNUC__)
bool x = __builtin_byte_in_range(b, r);
#else
int XXX[-1];
#endif
#endif
#if defined(__GNUC__) || defined(__IBM_GCC_ASM)
unsigned int y = __builtin_darn_32();
#else
int XXX[-1];
#endif
return 0;
}

View File

@ -0,0 +1,23 @@
#include <altivec.h>
int main(int argc, char* argv[])
{
#if defined(__ibmxl__) || (defined(_AIX) && defined(__xlC__))
__vector unsigned int x = {1,2,3,4};
x=__vshasigmaw(x, 0, 0);
__vector unsigned long long y = {1,2};
y=__vshasigmad(y, 0, 0);
#elif defined(__clang__)
__vector unsigned int x = {1,2,3,4};
x=__builtin_altivec_crypto_vshasigmaw(x, 0, 0);
__vector unsigned long long y = {1,2};
y=__builtin_altivec_crypto_vshasigmad(y, 0, 0);
#elif defined(__GNUC__)
__vector unsigned int x = {1,2,3,4};
x=__builtin_crypto_vshasigmaw(x, 0, 0);
__vector unsigned long long y = {1,2};
y=__builtin_crypto_vshasigmad(y, 0, 0);
#else
int XXX[-1];
#endif
return 0;
}

View File

@ -0,0 +1,17 @@
#include <altivec.h>
int main(int argc, char* argv[])
{
__vector unsigned long long x = {1,2};
__vector unsigned long long y = {3,4};
#if defined(__ibmxl__) || (defined(_AIX) && defined(__xlC__))
__vector unsigned long long z=__vpmsumd(x,y);
#elif defined(__clang__)
__vector unsigned long long z=__builtin_altivec_crypto_vpmsumd(x,y);
#elif defined(__GNUC__)
__vector unsigned long long z=__builtin_crypto_vpmsumd(x,y);
#else
int XXX[-1];
#endif
return 0;
}

View File

@ -0,0 +1,15 @@
#include <string>
#include <pthread.h>
void* function(void *ptr)
{
return 0;
}
int main(int argc, char* argv[])
{
pthread_t thread;
int ret = pthread_create(&thread, NULL, function, (void*)0);
pthread_join(thread, NULL);
return 0;
}

View File

@ -0,0 +1,11 @@
#include <emmintrin.h>
#include <wmmintrin.h>
int main(int argc, char* argv[])
{
__m128i x = _mm_setzero_si128();
x=_mm_aesenc_si128(x,x);
x=_mm_aesenclast_si128(x,x);
x=_mm_aesdec_si128(x,x);
x=_mm_aesdeclast_si128(x,x);
return 0;
}

View File

@ -0,0 +1,7 @@
#include <immintrin.h>
int main(int argc, char* argv[])
{
__m256d x = _mm256_setzero_pd();
x=_mm256_addsub_pd(x,x);
return 0;
}

View File

@ -0,0 +1,9 @@
#include <immintrin.h>
int main(int argc, char* argv[])
{
// _mm256_broadcastsi128_si256 due to Clang
__m128i x = _mm_setzero_si128 ();
__m256i y = _mm256_broadcastsi128_si256 (x);
y = _mm256_add_epi64 (y,y);
return 0;
}

View File

@ -0,0 +1,8 @@
#include <stdint.h>
#include <immintrin.h>
int main(int argc, char* argv[])
{
uint64_t x[8] = {0};
__m512i y = _mm512_loadu_si512((__m512i*)x);
return 0;
}

View File

@ -0,0 +1,8 @@
#include <emmintrin.h>
#include <wmmintrin.h>
int main(int argc, char* argv[])
{
__m128i x = _mm_setzero_si128();
x=_mm_clmulepi64_si128(x,x,0x11);
return 0;
}

View File

@ -0,0 +1,7 @@
int main(int argc, char* argv[])
{
unsigned int a, b, c, d;
asm volatile ( "cpuid" : "+a"(a), "=b"(b), "+c"(c), "=d"(d) );
return 0;
}

View File

@ -0,0 +1,7 @@
#include <immintrin.h>
int main(int argc, char* argv[])
{
unsigned int x=0;
(void)_rdrand32_step (&x);
return x == 0 ? 0 : 0;
}

View File

@ -0,0 +1,7 @@
#include <immintrin.h>
int main(int argc, char* argv[])
{
unsigned int x=0;
(void)_rdseed32_step (&x);
return x == 0 ? 0 : 0;
}

View File

@ -0,0 +1,14 @@
#include <emmintrin.h>
#include <immintrin.h>
int main(int argc, char* argv[])
{
__m128i x = _mm_setzero_si128();
x=_mm_sha1msg1_epu32(x,x);
x=_mm_sha1msg2_epu32(x,x);
x=_mm_sha1nexte_epu32(x,x);
x=_mm_sha1rnds4_epu32(x,x,0);
x=_mm_sha256msg1_epu32(x,x);
x=_mm_sha256msg2_epu32(x,x);
x=_mm_sha256rnds2_epu32(x,x,x);
return 0;
}

View File

@ -0,0 +1,7 @@
#include <emmintrin.h>
int main(int argc, char* argv[])
{
__m128i x = _mm_setzero_si128();
x=_mm_add_epi64(x,x);
return 0;
}

View File

@ -0,0 +1,8 @@
#include <emmintrin.h>
#include <pmmintrin.h>
int main(int argc, char* argv[])
{
__m128d x = _mm_setzero_pd();
x=_mm_addsub_pd(x,x);
return 0;
}

View File

@ -0,0 +1,10 @@
#include <emmintrin.h>
#include <smmintrin.h>
int main(int argc, char* argv[])
{
__m128i x = _mm_setzero_si128();
__m128i a = _mm_setzero_si128();
__m128i b = _mm_setzero_si128();
x=_mm_blend_epi16(a,b,4);
return 0;
}

View File

@ -0,0 +1,7 @@
#include <nmmintrin.h>
int main(int argc, char* argv[])
{
unsigned int x=32;
x=_mm_crc32_u8(x,4);
return 0;
}

View File

@ -0,0 +1,8 @@
#include <emmintrin.h>
#include <tmmintrin.h>
int main(int argc, char* argv[])
{
__m128i x = _mm_setzero_si128();
x=_mm_alignr_epi8(x,x,2);
return 0;
}

View File

@ -4,6 +4,14 @@
# building the docs. Before running the script, copy it to the root
# directory. After running this script, you can 'make docs'
sed -i 's|Library 6.2 API|Library 6.1 API|g' cryptlib.h
sed -i 's|= 6.2|= 6.1|g' Doxyfile
sed -i 's|CRYPTOPP_VERSION 620|CRYPTOPP_VERSION 610|g' config.h
sed 's|Library 8.3 API|Library 8.2 API|g' cryptlib.h > cryptlib.h.new
mv cryptlib.h.new cryptlib.h
sed 's|= 8.3|= 8.2|g' Doxyfile > Doxyfile.new
mv Doxyfile.new Doxyfile
sed 's|CRYPTOPP_MINOR 3|CRYPTOPP_MINOR 2|g' config_ver.h > config_ver.h.new
mv config_ver.h.new config_ver.h
sed 's|CRYPTOPP_VERSION 830|CRYPTOPP_VERSION 820|g' config_ver.h > config_ver.h.new
mv config_ver.h.new config_ver.h

View File

@ -11,12 +11,19 @@
# ====================================================================
set +e
if [ -z $(command -v ./setenv-android-gcc.sh) ]; then
echo "Failed to locate setenv-android-gcc.sh"
ls -Al *.sh
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi
if [ -z "${PLATFORM-}" ]; then
PLATFORMS=(armeabi armeabi-v7a armv7a-neon aarch64 mipsel mipsel64 x86 x86_64)
else
PLATFORMS=(${PLATFORM})
fi
RUNTIMES=(gnu-static gnu-shared stlport-static stlport-shared) #llvm-static llvm-shared
for platform in ${PLATFORMS[@]}
do
for runtime in ${RUNTIMES[@]}
@ -28,30 +35,33 @@ do
echo "Testing for Android support of $platform using $runtime"
# Test if we can set the environment for the platform
./setenv-android.sh "$platform" "$runtime"
./setenv-android-gcc.sh "$platform" "$runtime"
if [ "$?" -eq "0" ]; then
if [ "$?" -ne "0" ];
then
echo
echo "Building for $platform using $runtime..."
echo
# run in subshell to not keep any env vars
(
. ./setenv-android.sh "$platform" "$runtime" > /dev/null 2>&1
make -f GNUmakefile-cross static dynamic cryptest.exe
if [ "$?" -eq "0" ]; then
echo "$platform:$runtime ==> SUCCESS" >> /tmp/build.log
else
echo "$platform:$runtime ==> FAILURE" >> /tmp/build.log
touch /tmp/build.failed
fi
)
else
echo
echo "$platform with $runtime not supported by Android"
echo "There were problems testing $platform with $runtime"
echo "$platform:$runtime ==> FAILURE" >> /tmp/build.log
touch /tmp/build.failed
continue
fi
echo
echo "Building for $platform using $runtime..."
echo
# run in subshell to not keep any env vars
(
source ./setenv-android-gcc.sh "$platform" "$runtime" > /dev/null 2>&1
make -f GNUmakefile-cross static dynamic cryptest.exe
if [ "$?" -eq "0" ]; then
echo "$platform:$runtime ==> SUCCESS" >> /tmp/build.log
else
echo "$platform:$runtime ==> FAILURE" >> /tmp/build.log
touch /tmp/build.failed
fi
)
done
done

173
TestScripts/cryptest-autotools.sh Executable file
View File

@ -0,0 +1,173 @@
#!/usr/bin/env bash
PWD_DIR=$(pwd)
function cleanup {
cd "$PWD_DIR"
}
trap cleanup EXIT
#############################################################################
GREP=grep
SED=sed
AWK=awk
MAKE=make
# Fixup, Solaris and friends
if [[ (-d /usr/xpg4/bin) ]]; then
SED=/usr/xpg4/bin/sed
AWK=/usr/xpg4/bin/awk
GREP=/usr/xpg4/bin/grep
elif [[ (-d /usr/bin/posix) ]]; then
SED=/usr/bin/posix/sed
AWK=/usr/bin/posix/awk
GREP=/usr/bin/posix/grep
fi
# Fixup for sed and "illegal byte sequence"
IS_DARWIN=$(uname -s | "$GREP" -i -c darwin)
if [[ "$IS_DARWIN" -ne 0 ]]; then
export LC_ALL=C
fi
# Fixup for Solaris and BSDs
if [[ ! -z $(command -v gmake) ]]; then
MAKE=gmake
else
MAKE=make
fi
# Fixup for missing libtool
if [[ ! -z $(command -v libtoolize) ]]; then
LIBTOOLIZE=$(command -v libtoolize)
elif [[ ! -z $(command -v glibtoolize) ]]; then
LIBTOOLIZE=$(command -v glibtoolize)
elif [[ ! -z $(command -v libtool) ]]; then
LIBTOOLIZE=$(command -v libtool)
elif [[ ! -z $(command -v glibtool) ]]; then
LIBTOOLIZE=$(command -v glibtool)
fi
#############################################################################
echo "Downloading configure.ac"
if ! wget -O configure.ac -q --no-check-certificate 'https://raw.githubusercontent.com/noloader/cryptopp-autotools/master/configure.ac'; then
echo "configure.ac download failed"
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi
echo "Downloading Makefile.am"
if ! wget -O Makefile.am -q --no-check-certificate 'https://raw.githubusercontent.com/noloader/cryptopp-autotools/master/Makefile.am'; then
echo "Makefile.am download failed"
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi
echo "Downloading libcryptopp.pc.in"
if ! wget -O libcryptopp.pc.in -q --no-check-certificate 'https://raw.githubusercontent.com/noloader/cryptopp-autotools/master/libcryptopp.pc.in'; then
echo "libcryptopp.pc.in download failed"
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi
mkdir -p m4/
#############################################################################
if [[ -z $(command -v autoupdate) ]]; then
echo "Cannot find autoupdate. Things may fail."
fi
if [[ -z "$LIBTOOLIZE" ]]; then
echo "Cannot find libtoolize. Things may fail."
fi
if [[ -z $(command -v automake) ]]; then
echo "Cannot find automake. Things may fail."
fi
if [[ -z $(command -v autoreconf) ]]; then
echo "Cannot find autoreconf. Things may fail."
fi
echo "Running autoupdate"
if ! autoupdate &>/dev/null; then
echo "autoupdate failed."
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi
echo "Running libtoolize"
if ! "$LIBTOOLIZE" --force --install &>/dev/null; then
echo "libtoolize failed... skipping."
# [[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi
# Run autoreconf twice on failure. Also see
# https://github.com/tracebox/tracebox/issues/57
echo "Running autoreconf"
if ! autoreconf --force --install &>/dev/null; then
echo "autoreconf failed, running again."
if ! autoreconf --force --install; then
echo "autoreconf failed, again."
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi
fi
#############################################################################
# Update config.sub config.guess. GNU recommends using the latest for all projects.
echo "Updating config.sub"
wget -O config.sub.new -q --no-check-certificate 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub'
# Solaris removes +w, can't overwrite
chmod +w config.sub
mv config.sub.new config.sub
chmod +x config.sub
if [[ "$IS_DARWIN" -ne 0 ]] && [[ -n $(command -v xattr) ]]; then
echo "Removing config.sub quarantine"
xattr -d "com.apple.quarantine" config.sub &>/dev/null
fi
echo "Updating config.guess"
wget -O config.guess.new -q --no-check-certificate 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess'
# Solaris removes +w, can't overwrite
chmod +w config.guess
mv config.guess.new config.guess
chmod +x config.guess
if [[ "$IS_DARWIN" -ne 0 ]] && [[ -n $(command -v xattr) ]]; then
echo "Removing config.guess quarantine"
xattr -d "com.apple.quarantine" config.guess &>/dev/null
fi
#############################################################################
echo "Running configure"
echo ""
if ! ./configure; then
echo "configure failed."
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi
"$MAKE" clean 2>/dev/null
#############################################################################
if ! "$MAKE" -j2 -f Makefile; then
echo "make failed."
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi
if ! ./cryptest v; then
echo "cryptest v failed."
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi
if ! ./cryptest tv all; then
echo "cryptest tv all failed."
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi
# Return success
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 0 || return 0

73
TestScripts/cryptest-cmake.sh Executable file
View File

@ -0,0 +1,73 @@
#!/usr/bin/env bash
PWD_DIR=$(pwd)
function cleanup {
cd "$PWD_DIR"
}
trap cleanup EXIT
# Fixup ancient Bash
# https://unix.stackexchange.com/q/468579/56041
if [[ -z "$BASH_SOURCE" ]]; then
BASH_SOURCE="$0"
fi
# Fixup for Solaris and BSDs
if [[ ! -z $(command -v gmake) ]]; then
MAKE=gmake
else
MAKE=make
fi
# Fixup for AIX
if [[ -z "$CMAKE" ]]; then
CMAKE=cmake
fi
# Feth the three required files
if ! wget --no-check-certificate https://raw.githubusercontent.com/noloader/cryptopp-cmake/master/CMakeLists.txt -O CMakeLists.txt; then
echo "CMakeLists.txt download failed"
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi
if ! wget --no-check-certificate https://github.com/noloader/cryptopp-cmake/blob/master/cryptopp-config.cmake -O cryptopp-config.cmake; then
echo "cryptopp-config.cmake download failed"
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi
rm -rf "$PWD_DIR/cmake_build"
mkdir -p "$PWD_DIR/cmake_build"
cd "$PWD_DIR/cmake_build"
if [[ ! -z "$CXX" ]];
then
if ! CXX="$CXX" "$CMAKE" -DCMAKE_CXX_COMPILER="$CXX" ../; then
echo "cmake failed"
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi
else
if ! "$CMAKE" ../; then
echo "cmake failed"
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi
fi
"$MAKE" clean 2>/dev/null
if ! "$MAKE" -j2 -f Makefile VERBOSE=1; then
echo "make failed"
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi
if ! ./cryptest.exe v; then
echo "cryptest.exe v failed"
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi
if ! ./cryptest.exe tv all; then
echo "cryptest.exe v failed"
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi
# Return success
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 0 || return 0

View File

@ -10,8 +10,14 @@
# See http://www.cryptopp.com/wiki/iOS_(Command_Line) for more details
# ====================================================================
if [ -z $(command -v ./setenv-ios.sh) ]; then
echo "Failed to locate setenv-ios.sh"
ls -Al *.sh
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi
if [ -z "${PLATFORM-}" ]; then
PLATFORMS=(iPhoneOS iPhoneSimulator WatchOS WatchSimulator AppleTVOS AppleTVSimulator)
PLATFORMS=(iPhoneOS iPhoneSimulator Arm64 WatchOS WatchSimulator AppleTVOS AppleTVSimulator)
else
PLATFORMS=(${PLATFORM})
fi
@ -27,28 +33,31 @@ do
# Test if we can set the environment for the platform
./setenv-ios.sh "$platform"
if [ "$?" -eq "0" ]; then
echo
echo "Building for $platform using $runtime..."
echo
# run in subshell to not keep any env vars
(
. ./setenv-ios.sh "$platform" > /dev/null 2>&1
make -f GNUmakefile-cross static dynamic cryptest.exe
if [ "$?" -eq "0" ]; then
echo "$platform ==> SUCCESS" >> /tmp/build.log
else
echo "$platform ==> FAILURE" >> /tmp/build.log
touch /tmp/build.failed
fi
)
else
if [ "$?" -ne "0" ];
then
echo
echo "$platform not supported by Xcode"
echo "$platform ==> FAILURE" >> /tmp/build.log
touch /tmp/build.failed
continue
fi
echo
echo "Building for $platform using $runtime..."
echo
# run in subshell to not keep any env vars
(
source ./setenv-ios.sh "$platform" > /dev/null 2>&1
make -f GNUmakefile-cross static dynamic cryptest.exe
if [ "$?" -eq "0" ]; then
echo "$platform ==> SUCCESS" >> /tmp/build.log
else
echo "$platform ==> FAILURE" >> /tmp/build.log
touch /tmp/build.failed
fi
)
done
cat /tmp/build.log

View File

@ -1,15 +1,32 @@
#!/usr/bin/env bash
# cryptest.sh - written and placed in public domain by Jeffrey Walton and Uri Blumenthal.
# Copyright assigned to Crypto++ project.
# cryptest.sh - written and placed in public domain by Jeffrey Walton and Uri
# Blumenthal.
# This is a test script that can be used on some Linux/Unix/Apple machines to automate testing
# of the shared object to ensure linking and symbols don't go missing from release to release.
# This is a test script that can be used on some Linux/Unix/Apple machines to
# automate testing of the shared object to ensure linking and symbols don't go
# missing from release to release.
# Fixup ancient Bash
# https://unix.stackexchange.com/q/468579/56041
if [[ -z "$BASH_SOURCE" ]]; then
BASH_SOURCE="$0"
fi
############################################
# Cleanup
PWD_DIR=$(pwd)
function cleanup {
rm -f adhoc.cpp *.a *.o *.so *.dylib
cd "$PWD_DIR"
}
trap cleanup EXIT
############################################
# Tags to test
OLD_VERSION_TAG=CRYPTOPP_6_1_0
OLD_VERSION_TAG=CRYPTOPP_8_2_0
NEW_VERSION_TAG=master
############################################
@ -23,7 +40,7 @@ if [[ ! (-z "$DIRTY") ]]; then
read -p "Type 'Y' to proceed or 'N' to exit. Proceed? " -n 1 -r
echo # (optional) move to a new line
if [[ !($REPLY =~ ^[Yy]$) ]]; then
[[ "$0" = "$BASH_SOURCE" ]] && exit 0 || return 0
exit 0
fi
else
echo
@ -34,11 +51,8 @@ fi
echo
echo "****************************************************************"
echo "****************************************************************"
echo "Testing '$NEW_VERSION_TAG' against '$OLD_VERSION_TAG'"
echo "****************************************************************"
echo "****************************************************************"
echo
############################################
# Setup tools and platforms
@ -208,30 +222,13 @@ fi
"$MAKE" distclean &>/dev/null
rm -f GNUmakefile-symbols
git checkout master -f &>/dev/null
cp GNUmakefile GNUmakefile-symbols
git checkout "$OLD_VERSION_TAG" -f &>/dev/null
if [[ "$?" -ne "0" ]]; then
echo "Failed to checkout $OLD_VERSION_TAG"
[[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1
fi
echo
echo "****************************************************************"
echo "Patching makefile for dynamic linking by cryptest.exe"
echo "****************************************************************"
echo
if [[ "$IS_DARWIN" -ne "0" ]]; then
"$SED" "$SED_OPTS" -e 's|libcryptopp.a $(TESTOBJS)|libcryptopp.dylib $(TESTOBJS)|g' GNUmakefile-symbols
"$SED" "$SED_OPTS" -e 's|$(TESTOBJS) ./libcryptopp.a |$(TESTOBJS) ./libcryptopp.dylib |g' GNUmakefile-symbols
else
"$SED" "$SED_OPTS" -e 's|libcryptopp.a $(TESTOBJS)|libcryptopp.so $(TESTOBJS)|g' GNUmakefile-symbols
"$SED" "$SED_OPTS" -e 's|$(TESTOBJS) ./libcryptopp.a |$(TESTOBJS) ./libcryptopp.so |g' GNUmakefile-symbols
exit 1
fi
echo
@ -240,17 +237,17 @@ echo "Building dynamic library for $OLD_VERSION_TAG"
echo "****************************************************************"
echo
"$MAKE" "${MAKEARGS[@]}" -f GNUmakefile-symbols dynamic
if [[ "$IS_DARWIN" -ne "0" ]]; then
LIBNAME=libcryptopp.dylib
LINK_LIBRARY=libcryptopp.dylib
else
LIBNAME=libcryptopp.so
LINK_LIBRARY=libcryptopp.so
fi
if [[ ! -f "$LIBNAME" ]]; then
LINK_LIBRARY="$LINK_LIBRARY" "$MAKE" "${MAKEARGS[@]}" -f GNUmakefile dynamic
if [[ ! -f "$LINK_LIBRARY" ]]; then
echo "Failed to make $OLD_VERSION_TAG library"
[[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1
exit 1
fi
echo
@ -259,11 +256,11 @@ echo "Building cryptest.exe for $OLD_VERSION_TAG"
echo "****************************************************************"
echo
"$MAKE" "${MAKEARGS[@]}" -f GNUmakefile-symbols cryptest.exe
"$MAKE" "${MAKEARGS[@]}" -f GNUmakefile cryptest.exe
if [[ ! -f "cryptest.exe" ]]; then
echo "Failed to make cryptest.exe"
[[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1
exit 1
fi
echo
@ -282,17 +279,16 @@ fi
echo
echo "****************************************************************"
echo "Removing dynamic library for $OLD_VERSION_TAG"
echo "Removing dynamic library and artifacts for $OLD_VERSION_TAG"
echo "****************************************************************"
echo
rm -f adhoc.cpp *.o *.so *.dylib
rm -f adhoc.cpp *.a *.o *.so *.dylib
git checkout "$NEW_VERSION_TAG" -f &>/dev/null
if [[ "$?" -ne "0" ]]; then
echo "Failed to checkout $OLD_VERSION_TAG"
[[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1
exit 1
fi
echo
@ -301,11 +297,11 @@ echo "Building dynamic library for $NEW_VERSION_TAG"
echo "****************************************************************"
echo
"$MAKE" "${MAKEARGS[@]}" -f GNUmakefile-symbols dynamic
LINK_LIBRARY="$LINK_LIBRARY" "$MAKE" "${MAKEARGS[@]}" -f GNUmakefile dynamic
if [[ ! -f "$LIBNAME" ]]; then
if [[ ! -f "$LINK_LIBRARY" ]]; then
echo "Failed to make $NEW_VERSION_TAG library"
[[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1
exit 1
fi
echo
@ -326,7 +322,7 @@ git checkout master -f &>/dev/null
if [[ "$?" -ne "0" ]]; then
echo "Failed to checkout Master"
[[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1
exit 1
fi
[[ "$0" = "$BASH_SOURCE" ]] && exit 0 || return 0
exit 0

File diff suppressed because it is too large Load Diff

View File

@ -1,14 +1,25 @@
#!/usr/bin/env bash
# This scripts queries and modifies CPU scaling frequencies to produce more
# accurate benchmark results. To move from a low energy state C-state to a
# higher one, run 'governor.sh performance'. To move back to a low power state
# run 'governor.sh powersave' or reboot. The script is based on code by
# Andy Polyakov, http://www.openssl.org/~appro/cryptogams/.
# accurate benchmark results. To move from a low energy state to a higher
# one, run 'governor.sh performance'. To move back to a low power state
# run 'governor.sh powersave' or 'governor.sh ondemand' or reboot. The script
# based on code by Andy Polyakov, http://www.openssl.org/~appro/cryptogams/.
# Fixup ancient Bash
# https://unix.stackexchange.com/q/468579/56041
if [[ -z "${BASH_SOURCE[0]}" ]]; then
BASH_SOURCE="$0"
fi
if [[ "$EUID" -ne 0 ]]; then
echo "This script must be run as root"
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi
if [ "x$1" = "x" ]; then
echo "usage: $0 on[demand]|pe[rformance]|po[wersave]|us[erspace]?"
[[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi
# "on demand" may result in a "invalid write argument" or similar
@ -16,40 +27,41 @@ case $1 in
on*|de*) governor="ondemand";;
po*|pw*) governor="powersave";;
pe*) governor="performance";;
co*) governor="conservative";;
us*) governor="userspace";;
\?) ;;
*) echo "$1: unrecognized governor";;
esac
if [ -z "$governor" ]; then
[[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi
cpus=$(ls /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor 2>/dev/null)
if [ -z "$cpus" ]; then
echo "Failed to read CPU system device tree"
[[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi
echo "Current CPU governor scaling settings:"
count=0
for cpu in $cpus; do
echo " CPU $count:" $(cat "$cpu")
echo " CPU $count: $(cat "$cpu")"
((count++))
done
if [ "x$governor" != "x" ]; then
for cpu in $cpus; do
echo $governor > $cpu
echo "$governor" > "$cpu"
done
fi
echo "New CPU governor scaling settings:"
count=0
for cpu in $cpus; do
echo " CPU $count:" $(cat "$cpu")
echo " CPU $count: $(cat "$cpu")"
((count++))
done
[[ "$0" = "$BASH_SOURCE" ]] && exit 0 || return 0
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 0 || return 0

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
# install android deps
@ -7,11 +7,10 @@ sudo apt-get -qq install --no-install-recommends openjdk-8-jdk unzip
# android skd/ndk
curl -Lo /tmp/android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip
mkdir $HOME/android
unzip -qq /tmp/android-sdk.zip -d $HOME/android/sdk/
unzip -qq /tmp/android-sdk.zip -d "$ANDROID_SDK"
rm -f /tmp/android-sdk.zip
echo y | $HOME/android/sdk/tools/bin/sdkmanager --update > /dev/null
echo y | "$ANDROID_SDK/tools/bin/sdkmanager" --update > /dev/null
for package in "ndk-bundle"; do
echo install android $package
echo y | $HOME/android/sdk/tools/bin/sdkmanager "$package" > /dev/null
echo y | "$ANDROID_SDK/tools/bin/sdkmanager" "$package" > /dev/null
done

455
TestScripts/setenv-android-gcc.sh Executable file
View File

@ -0,0 +1,455 @@
#!/usr/bin/env bash
# ====================================================================
# Sets the cross compile environment for Android
# Based upon OpenSSL's setenv-android.sh (by TH, JW, and SM).
# Updated by Skycoder42 to the latest NDK.
# These changes are based on the current recommendations for Android
# for their "Unified Headers". Details can be found at:
# https://android.googlesource.com/platform/ndk.git/+/HEAD/docs/UnifiedHeaders.md
# https://android.googlesource.com/platform/ndk/+/master/docs/PlatformApis.md
#
# Crypto++ Library is copyrighted as a compilation and (as of version 5.6.2)
# licensed under the Boost Software License 1.0, while the individual files
# in the compilation are all public domain.
#
# See http://www.cryptopp.com/wiki/Android_(Command_Line) for more details
# ====================================================================
# set -eu
# Sanity check
if [ "$0" = "${BASH_SOURCE[0]}" ]; then
echo "Please source this setenv script"
exit 0
fi
unset IS_CROSS_COMPILE
unset IS_IOS
unset IS_ANDROID
unset IS_ARM_EMBEDDED
# Variables used in GNUmakefile-cross
unset AOSP_FLAGS
unset AOSP_SYSROOT
unset AOSP_LD_SYSROOT
unset AOSP_SYS_ARCH_INC
unset AOSP_STL_INC
unset AOSP_STL_LIB
unset AOSP_BITS_INC
# Tools set by this script
unset CPP CC CXX LD AS AR RANLIB STRIP
# Similar to a "make clean"
if [ x"${1-}" = "xunset" ]; then
echo "Unsetting script variables. PATH may remain tainted"
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 0 || return 0
fi
# Set AOSP_TOOLCHAIN_SUFFIX to your preference of tools and STL library.
# Note: 4.9 is required for the latest architectures, like ARM64/AARCH64.
# AOSP_TOOLCHAIN_SUFFIX=4.8
# AOSP_TOOLCHAIN_SUFFIX=4.9
if [ -z "${AOSP_TOOLCHAIN_SUFFIX-}" ]; then
AOSP_TOOLCHAIN_SUFFIX=4.9
fi
# Set AOSP_API_VERSION to the API you want to use. 'armeabi' and 'armeabi-v7a' need
# API 3 (or above), 'mips' and 'x86' need API 9 (or above), etc.
# AOSP_API_VERSION="3" # Android 1.5 and above
# AOSP_API_VERSION="4" # Android 1.6 and above
# AOSP_API_VERSION="5" # Android 2.0 and above
# AOSP_API_VERSION="8" # Android 2.2 and above
# AOSP_API_VERSION="9" # Android 2.3 and above
# AOSP_API_VERSION="14" # Android 4.0 and above
# AOSP_API_VERSION="18" # Android 4.3 and above
# AOSP_API_VERSION="19" # Android 4.4 and above
# AOSP_API_VERSION="21" # Android 5.0 and above
# AOSP_API_VERSION="23" # Android 6.0 and above
if [ -z "${AOSP_API_VERSION-}" ]; then
AOSP_API_VERSION="21"
fi
if [ -z "${AOSP_API-}" ]; then
AOSP_API="android-${AOSP_API_VERSION}"
else
echo "WARNING: Using AOSP_API has been deprecated. Please use AOSP_API_VERSION instead."
echo "If you set for example AOSP_API=android-23 then now instead set AOSP_API_VERSION=23"
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
#####################################################################
# ANDROID_NDK_ROOT should always be set by the user (even when not running this script)
# http://groups.google.com/group/android-ndk/browse_thread/thread/a998e139aca71d77.
# If the user did not specify the NDK location, try and pick it up. We expect something
# like ANDROID_NDK_ROOT=/opt/android-ndk-r10e or ANDROID_NDK_ROOT=/usr/local/android-ndk-r10e.
if [ -z "${ANDROID_NDK_ROOT-}" ]; then
ANDROID_NDK_ROOT=$(find /opt -maxdepth 1 -type d -name android-ndk* 2>/dev/null | tail -1)
if [ -z "$ANDROID_NDK_ROOT" ]; then
ANDROID_NDK_ROOT=$(find /usr/local -maxdepth 1 -type d -name android-ndk* 2>/dev/null | tail -1)
fi
if [ -z "$ANDROID_NDK_ROOT" ]; then
ANDROID_NDK_ROOT=$(find $HOME -maxdepth 1 -type d -name android-ndk* 2>/dev/null | tail -1)
fi
if [ -d "$HOME/Library/Android/sdk/ndk-bundle" ]; then
ANDROID_NDK_ROOT="$HOME/Library/Android/sdk/ndk-bundle"
fi
fi
# Error checking
if [ ! -d "$ANDROID_NDK_ROOT/toolchains" ]; then
echo "ERROR: ANDROID_NDK_ROOT is not a valid path. Please set it."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
#####################################################################
if [ "$#" -lt 1 ]; then
THE_ARCH=armv7a-neon
else
THE_ARCH=$(tr [A-Z] [a-z] <<< "$1")
fi
# https://developer.android.com/ndk/guides/abis.html
case "$THE_ARCH" in
arm|armv5|armv6|armv7|armeabi)
TOOLCHAIN_ARCH="arm-linux-androideabi"
TOOLCHAIN_NAME="arm-linux-androideabi"
AOSP_ABI="armeabi"
AOSP_ARCH="arch-arm"
AOSP_FLAGS="-march=armv5te -mtune=xscale -mthumb -msoft-float -DCRYPTOPP_DISABLE_ASM -funwind-tables -fexceptions -frtti"
;;
armv7a|armv7-a|armeabi-v7a)
TOOLCHAIN_ARCH="arm-linux-androideabi"
TOOLCHAIN_NAME="arm-linux-androideabi"
AOSP_ABI="armeabi-v7a"
AOSP_ARCH="arch-arm"
AOSP_FLAGS="-march=armv7-a -mthumb -mfpu=vfpv3-d16 -mfloat-abi=softfp -DCRYPTOPP_DISABLE_ASM -Wl,--fix-cortex-a8 -funwind-tables -fexceptions -frtti"
;;
hard|armv7a-hard|armeabi-v7a-hard)
echo hard, armv7a-hard and armeabi-v7a-hard are not supported, as android uses softfloats
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
#TOOLCHAIN_ARCH="arm-linux-androideabi"
#TOOLCHAIN_NAME="arm-linux-androideabi"
#AOSP_ABI="armeabi-v7a"
#AOSP_ARCH="arch-arm"
#AOSP_FLAGS="-mhard-float -D_NDK_MATH_NO_SOFTFP=1 -march=armv7-a -mfpu=vfpv3-d16 -DCRYPTOPP_DISABLE_ASM -mfloat-abi=softfp -Wl,--fix-cortex-a8 -funwind-tables -fexceptions -frtti -Wl,--no-warn-mismatch -Wl,-lm_hard"
;;
neon|armv7a-neon)
TOOLCHAIN_ARCH="arm-linux-androideabi"
TOOLCHAIN_NAME="arm-linux-androideabi"
AOSP_ABI="armeabi-v7a"
AOSP_ARCH="arch-arm"
AOSP_FLAGS="-march=armv7-a -mfpu=neon -mfloat-abi=softfp -Wl,--fix-cortex-a8 -funwind-tables -fexceptions -frtti"
;;
armv8|armv8a|aarch64|arm64|arm64-v8a)
TOOLCHAIN_ARCH="aarch64-linux-android"
TOOLCHAIN_NAME="aarch64-linux-android"
AOSP_ABI="arm64-v8a"
AOSP_ARCH="arch-arm64"
AOSP_FLAGS="-funwind-tables -fexceptions -frtti"
;;
mips|mipsel)
TOOLCHAIN_ARCH="mipsel-linux-android"
TOOLCHAIN_NAME="mipsel-linux-android"
AOSP_ABI="mips"
AOSP_ARCH="arch-mips"
AOSP_FLAGS="-funwind-tables -fexceptions -frtti"
;;
mips64|mipsel64|mips64el)
TOOLCHAIN_ARCH="mips64el-linux-android"
TOOLCHAIN_NAME="mips64el-linux-android"
AOSP_ABI="mips64"
AOSP_ARCH="arch-mips64"
AOSP_FLAGS="-funwind-tables -fexceptions -frtti"
;;
x86)
TOOLCHAIN_ARCH="x86"
TOOLCHAIN_NAME="i686-linux-android"
AOSP_ABI="x86"
AOSP_ARCH="arch-x86"
AOSP_FLAGS="-mtune=intel -mssse3 -mfpmath=sse -funwind-tables -fexceptions -frtti"
;;
x86_64|x64)
TOOLCHAIN_ARCH="x86_64"
TOOLCHAIN_NAME="x86_64-linux-android"
AOSP_ABI="x86_64"
AOSP_ARCH="arch-x86_64"
AOSP_FLAGS="-march=x86-64 -msse4.2 -mpopcnt -mtune=intel -funwind-tables -fexceptions -frtti"
;;
*)
echo "ERROR: Unknown architecture $1"
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
;;
esac
#####################################################################
# add missing android API version flag as of https://android.googlesource.com/platform/ndk.git/+/HEAD/docs/UnifiedHeaders.md
AOSP_FLAGS="-D__ANDROID_API__=$AOSP_API_VERSION $AOSP_FLAGS"
# GNUmakefile-cross expects these to be set. They are also used in the tests below.
export IS_ANDROID=1
export AOSP_FLAGS
export CPP="$TOOLCHAIN_NAME-cpp"
export CC="$TOOLCHAIN_NAME-gcc"
export CXX="$TOOLCHAIN_NAME-g++"
export LD="$TOOLCHAIN_NAME-ld"
export AS="$TOOLCHAIN_NAME-as"
export AR="$TOOLCHAIN_NAME-ar"
export RANLIB="$TOOLCHAIN_NAME-ranlib"
export STRIP="$TOOLCHAIN_NAME-strip"
export AOSP_SYS_ARCH_INC="$ANDROID_NDK_ROOT/sysroot/usr/include/$TOOLCHAIN_NAME"
#####################################################################
# Based on ANDROID_NDK_ROOT, try and pick up the path for the tools. We expect something
# like /opt/android-ndk-r10e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin
# Once we locate the tools, we add it to the PATH.
AOSP_TOOLCHAIN_PATH=""
for host in "linux-x86_64" "darwin-x86_64" "linux-x86" "darwin-x86"
do
if [ -d "$ANDROID_NDK_ROOT/toolchains/$TOOLCHAIN_ARCH-$AOSP_TOOLCHAIN_SUFFIX/prebuilt/$host/bin" ]; then
AOSP_TOOLCHAIN_PATH="$ANDROID_NDK_ROOT/toolchains/$TOOLCHAIN_ARCH-$AOSP_TOOLCHAIN_SUFFIX/prebuilt/$host/bin"
break
fi
done
# Error checking
if [ -z "$AOSP_TOOLCHAIN_PATH" ] || [ ! -d "$AOSP_TOOLCHAIN_PATH" ]; then
echo "ERROR: AOSP_TOOLCHAIN_PATH is not valid. Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# Error checking
if [ ! -e "$AOSP_TOOLCHAIN_PATH/$CPP" ]; then
echo "ERROR: Failed to find Android cpp. Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# Error checking
if [ ! -e "$AOSP_TOOLCHAIN_PATH/$CC" ]; then
echo "ERROR: Failed to find Android gcc. Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
if [ ! -e "$AOSP_TOOLCHAIN_PATH/$CXX" ]; then
echo "ERROR: Failed to find Android g++. Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# Error checking
if [ ! -e "$AOSP_TOOLCHAIN_PATH/$RANLIB" ]; then
echo "ERROR: Failed to find Android ranlib. Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# Error checking
if [ ! -e "$AOSP_TOOLCHAIN_PATH/$AR" ]; then
echo "ERROR: Failed to find Android ar. Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# Error checking
if [ ! -e "$AOSP_TOOLCHAIN_PATH/$AS" ]; then
echo "ERROR: Failed to find Android as. Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# Error checking
if [ ! -e "$AOSP_TOOLCHAIN_PATH/$LD" ]; then
echo "ERROR: Failed to find Android ld. Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# Only modify/export PATH if AOSP_TOOLCHAIN_PATH good
if [ -d "$AOSP_TOOLCHAIN_PATH" ]; then
# And only modify PATH if AOSP_TOOLCHAIN_PATH is not present
LEN=${#AOSP_TOOLCHAIN_PATH}
SUBSTR=${PATH:0:$LEN}
if [ "$SUBSTR" != "$AOSP_TOOLCHAIN_PATH" ]; then
export PATH="$AOSP_TOOLCHAIN_PATH":"$PATH"
fi
fi
#####################################################################
# Error checking
if [ ! -d "$ANDROID_NDK_ROOT/platforms/$AOSP_API" ]; then
echo "ERROR: AOSP_API is not valid. Does the NDK support the API? Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
elif [ ! -d "$ANDROID_NDK_ROOT/platforms/$AOSP_API/$AOSP_ARCH" ]; then
echo "ERROR: AOSP_ARCH is not valid. Does the NDK support the architecture? Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# Android SYSROOT. It will be used on the command line with --sysroot
# http://android.googlesource.com/platform/ndk/+/ics-mr0/docs/STANDALONE-TOOLCHAIN.html
export AOSP_SYSROOT="$ANDROID_NDK_ROOT/sysroot"
export AOSP_LD_SYSROOT="$ANDROID_NDK_ROOT/platforms/$AOSP_API/$AOSP_ARCH"
#####################################################################
# Android STL. We support GNU, LLVM and STLport out of the box.
if [ "$#" -lt 2 ]; then
THE_STL=gnu-shared
else
THE_STL=$(tr [A-Z] [a-z] <<< "$2")
fi
# LLVM include directory may be different depending on NDK version. Default to new location (latest NDK checked: r16beta1).
LLVM_INCLUDE_DIR="$ANDROID_NDK_ROOT/sources/cxx-stl/llvm-libc++/include"
if [ ! -d "$LLVM_INCLUDE_DIR" ]; then
LLVM_INCLUDE_DIR="$ANDROID_NDK_ROOT/sources/cxx-stl/llvm-libc++/libcxx/include"
fi
case "$THE_STL" in
stlport-static)
AOSP_STL_INC="$ANDROID_NDK_ROOT/sources/cxx-stl/stlport/stlport/"
AOSP_STL_LIB="$ANDROID_NDK_ROOT/sources/cxx-stl/stlport/libs/$AOSP_ABI/libstlport_static.a"
;;
stlport|stlport-shared)
AOSP_STL_INC="$ANDROID_NDK_ROOT/sources/cxx-stl/stlport/stlport/"
AOSP_STL_LIB="$ANDROID_NDK_ROOT/sources/cxx-stl/stlport/libs/$AOSP_ABI/libstlport_shared.so"
;;
gabi++-static|gnu-static)
AOSP_STL_INC="$ANDROID_NDK_ROOT/sources/cxx-stl/gnu-libstdc++/$AOSP_TOOLCHAIN_SUFFIX/include"
AOSP_BITS_INC="$ANDROID_NDK_ROOT/sources/cxx-stl/gnu-libstdc++/$AOSP_TOOLCHAIN_SUFFIX/libs/$AOSP_ABI/include"
AOSP_STL_LIB="$ANDROID_NDK_ROOT/sources/cxx-stl/gnu-libstdc++/$AOSP_TOOLCHAIN_SUFFIX/libs/$AOSP_ABI/libgnustl_static.a"
;;
gnu|gabi++|gnu-shared|gabi++-shared)
AOSP_STL_INC="$ANDROID_NDK_ROOT/sources/cxx-stl/gnu-libstdc++/$AOSP_TOOLCHAIN_SUFFIX/include"
AOSP_BITS_INC="$ANDROID_NDK_ROOT/sources/cxx-stl/gnu-libstdc++/$AOSP_TOOLCHAIN_SUFFIX/libs/$AOSP_ABI/include"
AOSP_STL_LIB="$ANDROID_NDK_ROOT/sources/cxx-stl/gnu-libstdc++/$AOSP_TOOLCHAIN_SUFFIX/libs/$AOSP_ABI/libgnustl_shared.so"
;;
llvm-static)
echo WARNING: llvm is still in experimental state and migth not work as expected
if [ ! -d "$LLVM_INCLUDE_DIR" ]; then
echo "ERROR: Unable to locate include LLVM directory at $LLVM_INCLUDE_DIR -- has it moved since NDK r16beta1?"
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
AOSP_STL_INC="$LLVM_INCLUDE_DIR"
AOSP_STL_LIB="$ANDROID_NDK_ROOT/sources/cxx-stl/llvm-libc++/libs/$AOSP_ABI/libc++_static.a"
;;
llvm|llvm-shared)
echo WARNING: llvm is still in experimental state and migth not work as expected
if [ ! -d "$LLVM_INCLUDE_DIR" ]; then
echo "ERROR: Unable to locate LLVM include directory at $LLVM_INCLUDE_DIR -- has it moved since NDK r16beta1?"
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
AOSP_STL_INC="$LLVM_INCLUDE_DIR"
AOSP_STL_LIB="$ANDROID_NDK_ROOT/sources/cxx-stl/llvm-libc++/libs/$AOSP_ABI/libc++_shared.so"
;;
*)
echo "ERROR: Unknown STL library $2"
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
esac
# Error checking
if [ ! -d "$AOSP_STL_INC" ] || [ ! -e "$AOSP_STL_INC/memory" ]; then
echo "ERROR: AOSP_STL_INC is not valid. Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# Error checking
if [ ! -e "$AOSP_STL_LIB" ]; then
echo "ERROR: AOSP_STL_LIB is not valid. Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
export AOSP_STL_INC
export AOSP_STL_LIB
if [ ! -z "$AOSP_BITS_INC" ]; then
export AOSP_BITS_INC
fi
# Now that we are using cpu-features from Android rather than CPU probing, we
# need to copy cpu-features.h and cpu-features.c from the NDK into our source
# directory and then build it.
if [[ ! -e "$ANDROID_NDK_ROOT/sources/android/cpufeatures/cpu-features.h" ]]; then
echo "ERROR: Unable to locate cpu-features.h"
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
cp "$ANDROID_NDK_ROOT/sources/android/cpufeatures/cpu-features.h" .
if [[ ! -e "$ANDROID_NDK_ROOT/sources/android/cpufeatures/cpu-features.c" ]]; then
echo "ERROR: Unable to locate cpu-features.c"
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
cp "$ANDROID_NDK_ROOT/sources/android/cpufeatures/cpu-features.c" .
#####################################################################
VERBOSE=1
if [ ! -z "$VERBOSE" ] && [ "$VERBOSE" != "0" ]; then
echo "ANDROID_NDK_ROOT: $ANDROID_NDK_ROOT"
echo "AOSP_TOOLCHAIN_PATH: $AOSP_TOOLCHAIN_PATH"
echo "AOSP_ABI: $AOSP_ABI"
echo "AOSP_API: $AOSP_API"
echo "AOSP_SYSROOT: $AOSP_SYSROOT"
echo "AOSP_LD_SYSROOT: $AOSP_LD_SYSROOT"
echo "AOSP_FLAGS: $AOSP_FLAGS"
echo "AOSP_SYS_ARCH_INC: $AOSP_SYS_ARCH_INC"
echo "AOSP_STL_INC: $AOSP_STL_INC"
echo "AOSP_STL_LIB: $AOSP_STL_LIB"
if [ ! -z "$AOSP_BITS_INC" ]; then
echo "AOSP_BITS_INC: $AOSP_BITS_INC"
fi
if [ -e "cpu-features.h" ] && [ -e "cpu-features.c" ]; then
echo "CPU FEATURES: cpu-features.h and cpu-features.c are present"
fi
fi
#####################################################################
COUNT=$(echo -n "$AOSP_STL_LIB" | egrep -i -c 'libstdc\+\+')
if [[ ("$COUNT" -ne "0") ]]; then
echo
echo "*******************************************************************************"
echo "You are using GNU's runtime and STL library. Please ensure the resulting"
echo "binary meets licensing requirements. If you can't use GNU's runtime"
echo "and STL library, then reconfigure with stlport or llvm. Also see"
echo "http://code.google.com/p/android/issues/detail?id=216331"
echo "*******************************************************************************"
fi
COUNT=$(echo -n "$AOSP_STL_LIB" | grep -i -c 'libstlport')
if [[ ("$COUNT" -ne "0") ]]; then
echo
echo "*******************************************************************************"
echo "You are using STLport's runtime and STL library. STLport could cause problems"
echo "if the resulting binary is used in other environments, like a QT project."
echo "Also see http://code.google.com/p/android/issues/detail?id=216331"
echo "*******************************************************************************"
fi
COUNT=$(echo -n "$AOSP_STL_LIB" | egrep -i -c 'libc\+\+')
if [[ ("$COUNT" -ne "0") ]]; then
echo
echo "*******************************************************************************"
echo "You are using LLVM's runtime and STL library. LLVM could cause problems"
echo "if the resulting binary is used in other environments, like a QT project."
echo "Also see http://code.google.com/p/android/issues/detail?id=216331"
echo "*******************************************************************************"
fi
echo
echo "*******************************************************************************"
echo "It looks the the environment is set correctly. Your next step is build"
echo "the library with 'make -f GNUmakefile-cross'. You can create a versioned"
echo "shared object using 'HAS_SOLIB_VERSION=1 make -f GNUmakefile-cross'"
echo "*******************************************************************************"
echo
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 0 || return 0

View File

@ -20,6 +20,12 @@
# set -eu
# Sanity check
if [ "$0" = "${BASH_SOURCE[0]}" ]; then
echo "Please source this setenv script"
exit 0
fi
unset IS_CROSS_COMPILE
unset IS_IOS
@ -38,8 +44,8 @@ unset CPP CC CXX LD AS AR RANLIB STRIP
# Similar to a "make clean"
if [ x"${1-}" = "xunset" ]; then
echo "Unsetting script variables. PATH may remain tainted"
[ "$0" = "$BASH_SOURCE" ] && exit 0 || return 0
echo "Unsetting script variables. PATH may remain tainted"
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 0 || return 0
fi
# Set AOSP_TOOLCHAIN_SUFFIX to your preference of tools and STL library.
@ -47,7 +53,7 @@ fi
# AOSP_TOOLCHAIN_SUFFIX=4.8
# AOSP_TOOLCHAIN_SUFFIX=4.9
if [ -z "${AOSP_TOOLCHAIN_SUFFIX-}" ]; then
AOSP_TOOLCHAIN_SUFFIX=4.9
AOSP_TOOLCHAIN_SUFFIX=4.9
fi
# Set AOSP_API to the API you want to use. 'armeabi' and 'armeabi-v7a' need
@ -63,7 +69,7 @@ fi
# AOSP_API="android-21" # Android 5.0 and above
# AOSP_API="android-23" # Android 6.0 and above
if [ -z "${AOSP_API-}" ]; then
AOSP_API="android-21"
AOSP_API="android-21"
fi
#####################################################################
@ -74,102 +80,102 @@ fi
# like ANDROID_NDK_ROOT=/opt/android-ndk-r10e or ANDROID_NDK_ROOT=/usr/local/android-ndk-r10e.
if [ -z "${ANDROID_NDK_ROOT-}" ]; then
ANDROID_NDK_ROOT=$(find /opt -maxdepth 1 -type d -name android-ndk* 2>/dev/null | tail -1)
ANDROID_NDK_ROOT=$(find /opt -maxdepth 1 -type d -name android-ndk* 2>/dev/null | tail -1)
if [ -z "$ANDROID_NDK_ROOT" ]; then
ANDROID_NDK_ROOT=$(find /usr/local -maxdepth 1 -type d -name android-ndk* 2>/dev/null | tail -1)
fi
if [ -z "$ANDROID_NDK_ROOT" ]; then
ANDROID_NDK_ROOT=$(find $HOME -maxdepth 1 -type d -name android-ndk* 2>/dev/null | tail -1)
fi
if [ -d "$HOME/Library/Android/sdk/ndk-bundle" ]; then
ANDROID_NDK_ROOT="$HOME/Library/Android/sdk/ndk-bundle"
fi
if [ -z "$ANDROID_NDK_ROOT" ]; then
ANDROID_NDK_ROOT=$(find /usr/local -maxdepth 1 -type d -name android-ndk* 2>/dev/null | tail -1)
fi
if [ -z "$ANDROID_NDK_ROOT" ]; then
ANDROID_NDK_ROOT=$(find $HOME -maxdepth 1 -type d -name android-ndk* 2>/dev/null | tail -1)
fi
if [ -d "$HOME/Library/Android/sdk/ndk-bundle" ]; then
ANDROID_NDK_ROOT="$HOME/Library/Android/sdk/ndk-bundle"
fi
fi
# Error checking
if [ ! -d "$ANDROID_NDK_ROOT/toolchains" ]; then
echo "ERROR: ANDROID_NDK_ROOT is not a valid path. Please set it."
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
echo "ERROR: ANDROID_NDK_ROOT is not a valid path. Please set it."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
#####################################################################
if [ "$#" -lt 1 ]; then
THE_ARCH=armv7a-neon
THE_ARCH=armv7a-neon
else
THE_ARCH=$(tr [A-Z] [a-z] <<< "$1")
THE_ARCH=$(tr [A-Z] [a-z] <<< "$1")
fi
# https://developer.android.com/ndk/guides/abis.html
case "$THE_ARCH" in
arm|armv5|armv6|armv7|armeabi)
TOOLCHAIN_ARCH="arm-linux-androideabi"
TOOLCHAIN_NAME="arm-linux-androideabi"
AOSP_ABI="armeabi"
AOSP_ARCH="arch-arm"
AOSP_FLAGS="-march=armv5te -mtune=xscale -mthumb -msoft-float -DCRYPTOPP_DISABLE_ASM -funwind-tables -fexceptions -frtti"
;;
TOOLCHAIN_ARCH="arm-linux-androideabi"
TOOLCHAIN_NAME="arm-linux-androideabi"
AOSP_ABI="armeabi"
AOSP_ARCH="arch-arm"
AOSP_FLAGS="-march=armv5te -mtune=xscale -mthumb -msoft-float -DCRYPTOPP_DISABLE_ASM -funwind-tables -fexceptions -frtti"
;;
armv7a|armv7-a|armeabi-v7a)
TOOLCHAIN_ARCH="arm-linux-androideabi"
TOOLCHAIN_NAME="arm-linux-androideabi"
AOSP_ABI="armeabi-v7a"
AOSP_ARCH="arch-arm"
AOSP_FLAGS="-march=armv7-a -mthumb -mfpu=vfpv3-d16 -mfloat-abi=softfp -DCRYPTOPP_DISABLE_ASM -Wl,--fix-cortex-a8 -funwind-tables -fexceptions -frtti"
;;
TOOLCHAIN_ARCH="arm-linux-androideabi"
TOOLCHAIN_NAME="arm-linux-androideabi"
AOSP_ABI="armeabi-v7a"
AOSP_ARCH="arch-arm"
AOSP_FLAGS="-march=armv7-a -mthumb -mfpu=vfpv3-d16 -mfloat-abi=softfp -DCRYPTOPP_DISABLE_ASM -Wl,--fix-cortex-a8 -funwind-tables -fexceptions -frtti"
;;
hard|armv7a-hard|armeabi-v7a-hard)
TOOLCHAIN_ARCH="arm-linux-androideabi"
TOOLCHAIN_NAME="arm-linux-androideabi"
AOSP_ABI="armeabi-v7a"
AOSP_ARCH="arch-arm"
AOSP_FLAGS="-mhard-float -D_NDK_MATH_NO_SOFTFP=1 -march=armv7-a -mfpu=vfpv3-d16 -DCRYPTOPP_DISABLE_ASM -mfloat-abi=softfp -Wl,--fix-cortex-a8 -funwind-tables -fexceptions -frtti -Wl,--no-warn-mismatch -Wl,-lm_hard"
;;
TOOLCHAIN_ARCH="arm-linux-androideabi"
TOOLCHAIN_NAME="arm-linux-androideabi"
AOSP_ABI="armeabi-v7a"
AOSP_ARCH="arch-arm"
AOSP_FLAGS="-mhard-float -D_NDK_MATH_NO_SOFTFP=1 -march=armv7-a -mfpu=vfpv3-d16 -DCRYPTOPP_DISABLE_ASM -mfloat-abi=softfp -Wl,--fix-cortex-a8 -funwind-tables -fexceptions -frtti -Wl,--no-warn-mismatch -Wl,-lm_hard"
;;
neon|armv7a-neon)
TOOLCHAIN_ARCH="arm-linux-androideabi"
TOOLCHAIN_NAME="arm-linux-androideabi"
AOSP_ABI="armeabi-v7a"
AOSP_ARCH="arch-arm"
AOSP_FLAGS="-march=armv7-a -mfpu=neon -mfloat-abi=softfp -Wl,--fix-cortex-a8 -funwind-tables -fexceptions -frtti"
;;
TOOLCHAIN_ARCH="arm-linux-androideabi"
TOOLCHAIN_NAME="arm-linux-androideabi"
AOSP_ABI="armeabi-v7a"
AOSP_ARCH="arch-arm"
AOSP_FLAGS="-march=armv7-a -mfpu=neon -mfloat-abi=softfp -Wl,--fix-cortex-a8 -funwind-tables -fexceptions -frtti"
;;
armv8|armv8a|aarch64|arm64|arm64-v8a)
TOOLCHAIN_ARCH="aarch64-linux-android"
TOOLCHAIN_NAME="aarch64-linux-android"
AOSP_ABI="arm64-v8a"
AOSP_ARCH="arch-arm64"
AOSP_FLAGS="-funwind-tables -fexceptions -frtti"
;;
TOOLCHAIN_ARCH="aarch64-linux-android"
TOOLCHAIN_NAME="aarch64-linux-android"
AOSP_ABI="arm64-v8a"
AOSP_ARCH="arch-arm64"
AOSP_FLAGS="-funwind-tables -fexceptions -frtti"
;;
mips|mipsel)
TOOLCHAIN_ARCH="mipsel-linux-android"
TOOLCHAIN_NAME="mipsel-linux-android"
AOSP_ABI="mips"
AOSP_ARCH="arch-mips"
AOSP_FLAGS="-funwind-tables -fexceptions -frtti"
;;
TOOLCHAIN_ARCH="mipsel-linux-android"
TOOLCHAIN_NAME="mipsel-linux-android"
AOSP_ABI="mips"
AOSP_ARCH="arch-mips"
AOSP_FLAGS="-funwind-tables -fexceptions -frtti"
;;
mips64|mipsel64|mips64el)
TOOLCHAIN_ARCH="mips64el-linux-android"
TOOLCHAIN_NAME="mips64el-linux-android"
AOSP_ABI="mips64"
AOSP_ARCH="arch-mips64"
AOSP_FLAGS="-funwind-tables -fexceptions -frtti"
;;
TOOLCHAIN_ARCH="mips64el-linux-android"
TOOLCHAIN_NAME="mips64el-linux-android"
AOSP_ABI="mips64"
AOSP_ARCH="arch-mips64"
AOSP_FLAGS="-funwind-tables -fexceptions -frtti"
;;
x86)
TOOLCHAIN_ARCH="x86"
TOOLCHAIN_NAME="i686-linux-android"
AOSP_ABI="x86"
AOSP_ARCH="arch-x86"
AOSP_FLAGS="-mtune=intel -mssse3 -mfpmath=sse -DCRYPTOPP_DISABLE_SSE4 -DCRYPTOPP_DISABLE_CLMUL -DCRYPTOPP_DISABLE_AES -DCRYPTOPP_DISABLE_SHA -funwind-tables -fexceptions -frtti"
;;
TOOLCHAIN_ARCH="x86"
TOOLCHAIN_NAME="i686-linux-android"
AOSP_ABI="x86"
AOSP_ARCH="arch-x86"
AOSP_FLAGS="-mtune=intel -mssse3 -mfpmath=sse -funwind-tables -fexceptions -frtti"
;;
x86_64|x64)
TOOLCHAIN_ARCH="x86_64"
TOOLCHAIN_NAME="x86_64-linux-android"
AOSP_ABI="x86_64"
AOSP_ARCH="arch-x86_64"
AOSP_FLAGS="-march=x86-64 -msse4.2 -mpopcnt -mtune=intel -DCRYPTOPP_DISABLE_CLMUL -DCRYPTOPP_DISABLE_AES -DCRYPTOPP_DISABLE_SHA -funwind-tables -fexceptions -frtti"
;;
TOOLCHAIN_ARCH="x86_64"
TOOLCHAIN_NAME="x86_64-linux-android"
AOSP_ABI="x86_64"
AOSP_ARCH="arch-x86_64"
AOSP_FLAGS="-march=x86-64 -msse4.2 -mpopcnt -mtune=intel -funwind-tables -fexceptions -frtti"
;;
*)
echo "ERROR: Unknown architecture $1"
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
;;
echo "ERROR: Unknown architecture $1"
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
;;
esac
#####################################################################
@ -195,79 +201,79 @@ export STRIP="$TOOLCHAIN_NAME-strip"
AOSP_TOOLCHAIN_PATH=""
for host in "linux-x86_64" "darwin-x86_64" "linux-x86" "darwin-x86"
do
if [ -d "$ANDROID_NDK_ROOT/toolchains/$TOOLCHAIN_ARCH-$AOSP_TOOLCHAIN_SUFFIX/prebuilt/$host/bin" ]; then
AOSP_TOOLCHAIN_PATH="$ANDROID_NDK_ROOT/toolchains/$TOOLCHAIN_ARCH-$AOSP_TOOLCHAIN_SUFFIX/prebuilt/$host/bin"
break
fi
if [ -d "$ANDROID_NDK_ROOT/toolchains/$TOOLCHAIN_ARCH-$AOSP_TOOLCHAIN_SUFFIX/prebuilt/$host/bin" ]; then
AOSP_TOOLCHAIN_PATH="$ANDROID_NDK_ROOT/toolchains/$TOOLCHAIN_ARCH-$AOSP_TOOLCHAIN_SUFFIX/prebuilt/$host/bin"
break
fi
done
# Error checking
if [ -z "$AOSP_TOOLCHAIN_PATH" ] || [ ! -d "$AOSP_TOOLCHAIN_PATH" ]; then
echo "ERROR: AOSP_TOOLCHAIN_PATH is not valid. Please edit this script."
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
echo "ERROR: AOSP_TOOLCHAIN_PATH is not valid. Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# Error checking
if [ ! -e "$AOSP_TOOLCHAIN_PATH/$CPP" ]; then
echo "ERROR: Failed to find Android cpp. Please edit this script."
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
echo "ERROR: Failed to find Android cpp. Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# Error checking
if [ ! -e "$AOSP_TOOLCHAIN_PATH/$CC" ]; then
echo "ERROR: Failed to find Android gcc. Please edit this script."
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
echo "ERROR: Failed to find Android gcc. Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
if [ ! -e "$AOSP_TOOLCHAIN_PATH/$CXX" ]; then
echo "ERROR: Failed to find Android g++. Please edit this script."
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
echo "ERROR: Failed to find Android g++. Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# Error checking
if [ ! -e "$AOSP_TOOLCHAIN_PATH/$RANLIB" ]; then
echo "ERROR: Failed to find Android ranlib. Please edit this script."
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
echo "ERROR: Failed to find Android ranlib. Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# Error checking
if [ ! -e "$AOSP_TOOLCHAIN_PATH/$AR" ]; then
echo "ERROR: Failed to find Android ar. Please edit this script."
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
echo "ERROR: Failed to find Android ar. Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# Error checking
if [ ! -e "$AOSP_TOOLCHAIN_PATH/$AS" ]; then
echo "ERROR: Failed to find Android as. Please edit this script."
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
echo "ERROR: Failed to find Android as. Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# Error checking
if [ ! -e "$AOSP_TOOLCHAIN_PATH/$LD" ]; then
echo "ERROR: Failed to find Android ld. Please edit this script."
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
echo "ERROR: Failed to find Android ld. Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# Only modify/export PATH if AOSP_TOOLCHAIN_PATH good
if [ -d "$AOSP_TOOLCHAIN_PATH" ]; then
# And only modify PATH if AOSP_TOOLCHAIN_PATH is not present
LEN=${#AOSP_TOOLCHAIN_PATH}
SUBSTR=${PATH:0:$LEN}
if [ "$SUBSTR" != "$AOSP_TOOLCHAIN_PATH" ]; then
export PATH="$AOSP_TOOLCHAIN_PATH":"$PATH"
fi
# And only modify PATH if AOSP_TOOLCHAIN_PATH is not present
LEN=${#AOSP_TOOLCHAIN_PATH}
SUBSTR=${PATH:0:$LEN}
if [ "$SUBSTR" != "$AOSP_TOOLCHAIN_PATH" ]; then
export PATH="$AOSP_TOOLCHAIN_PATH":"$PATH"
fi
fi
#####################################################################
# Error checking
if [ ! -d "$ANDROID_NDK_ROOT/platforms/$AOSP_API" ]; then
echo "ERROR: AOSP_API is not valid. Does the NDK support the API? Please edit this script."
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
echo "ERROR: AOSP_API is not valid. Does the NDK support the API? Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
elif [ ! -d "$ANDROID_NDK_ROOT/platforms/$AOSP_API/$AOSP_ARCH" ]; then
echo "ERROR: AOSP_ARCH is not valid. Does the NDK support the architecture? Please edit this script."
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
echo "ERROR: AOSP_ARCH is not valid. Does the NDK support the architecture? Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# Android SYSROOT. It will be used on the command line with --sysroot
@ -279,74 +285,74 @@ export AOSP_SYSROOT="$ANDROID_NDK_ROOT/platforms/$AOSP_API/$AOSP_ARCH"
# Android STL. We support GNU, LLVM and STLport out of the box.
if [ "$#" -lt 2 ]; then
THE_STL=gnu-shared
THE_STL=gnu-shared
else
THE_STL=$(tr [A-Z] [a-z] <<< "$2")
THE_STL=$(tr [A-Z] [a-z] <<< "$2")
fi
# LLVM include directory may be different depending on NDK version. Default to new location (latest NDK checked: r16beta1).
LLVM_INCLUDE_DIR="$ANDROID_NDK_ROOT/sources/cxx-stl/llvm-libc++/include"
if [ ! -d "$LLVM_INCLUDE_DIR" ]; then
LLVM_INCLUDE_DIR="$ANDROID_NDK_ROOT/sources/cxx-stl/llvm-libc++/libcxx/include"
LLVM_INCLUDE_DIR="$ANDROID_NDK_ROOT/sources/cxx-stl/llvm-libc++/libcxx/include"
fi
case "$THE_STL" in
stlport-static)
AOSP_STL_INC="$ANDROID_NDK_ROOT/sources/cxx-stl/stlport/stlport/"
AOSP_STL_LIB="$ANDROID_NDK_ROOT/sources/cxx-stl/stlport/libs/$AOSP_ABI/libstlport_static.a"
;;
AOSP_STL_INC="$ANDROID_NDK_ROOT/sources/cxx-stl/stlport/stlport/"
AOSP_STL_LIB="$ANDROID_NDK_ROOT/sources/cxx-stl/stlport/libs/$AOSP_ABI/libstlport_static.a"
;;
stlport|stlport-shared)
AOSP_STL_INC="$ANDROID_NDK_ROOT/sources/cxx-stl/stlport/stlport/"
AOSP_STL_LIB="$ANDROID_NDK_ROOT/sources/cxx-stl/stlport/libs/$AOSP_ABI/libstlport_shared.so"
;;
AOSP_STL_INC="$ANDROID_NDK_ROOT/sources/cxx-stl/stlport/stlport/"
AOSP_STL_LIB="$ANDROID_NDK_ROOT/sources/cxx-stl/stlport/libs/$AOSP_ABI/libstlport_shared.so"
;;
gabi++-static|gnu-static)
AOSP_STL_INC="$ANDROID_NDK_ROOT/sources/cxx-stl/gnu-libstdc++/$AOSP_TOOLCHAIN_SUFFIX/include"
AOSP_BITS_INC="$ANDROID_NDK_ROOT/sources/cxx-stl/gnu-libstdc++/$AOSP_TOOLCHAIN_SUFFIX/libs/$AOSP_ABI/include"
AOSP_STL_LIB="$ANDROID_NDK_ROOT/sources/cxx-stl/gnu-libstdc++/$AOSP_TOOLCHAIN_SUFFIX/libs/$AOSP_ABI/libgnustl_static.a"
;;
AOSP_STL_INC="$ANDROID_NDK_ROOT/sources/cxx-stl/gnu-libstdc++/$AOSP_TOOLCHAIN_SUFFIX/include"
AOSP_BITS_INC="$ANDROID_NDK_ROOT/sources/cxx-stl/gnu-libstdc++/$AOSP_TOOLCHAIN_SUFFIX/libs/$AOSP_ABI/include"
AOSP_STL_LIB="$ANDROID_NDK_ROOT/sources/cxx-stl/gnu-libstdc++/$AOSP_TOOLCHAIN_SUFFIX/libs/$AOSP_ABI/libgnustl_static.a"
;;
gnu|gabi++|gnu-shared|gabi++-shared)
AOSP_STL_INC="$ANDROID_NDK_ROOT/sources/cxx-stl/gnu-libstdc++/$AOSP_TOOLCHAIN_SUFFIX/include"
AOSP_BITS_INC="$ANDROID_NDK_ROOT/sources/cxx-stl/gnu-libstdc++/$AOSP_TOOLCHAIN_SUFFIX/libs/$AOSP_ABI/include"
AOSP_STL_LIB="$ANDROID_NDK_ROOT/sources/cxx-stl/gnu-libstdc++/$AOSP_TOOLCHAIN_SUFFIX/libs/$AOSP_ABI/libgnustl_shared.so"
;;
AOSP_STL_INC="$ANDROID_NDK_ROOT/sources/cxx-stl/gnu-libstdc++/$AOSP_TOOLCHAIN_SUFFIX/include"
AOSP_BITS_INC="$ANDROID_NDK_ROOT/sources/cxx-stl/gnu-libstdc++/$AOSP_TOOLCHAIN_SUFFIX/libs/$AOSP_ABI/include"
AOSP_STL_LIB="$ANDROID_NDK_ROOT/sources/cxx-stl/gnu-libstdc++/$AOSP_TOOLCHAIN_SUFFIX/libs/$AOSP_ABI/libgnustl_shared.so"
;;
llvm-static)
if [ ! -d "$LLVM_INCLUDE_DIR" ]; then
echo "ERROR: Unable to locate include LLVM directory at $LLVM_INCLUDE_DIR -- has it moved since NDK r16beta1?"
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
fi
AOSP_STL_INC="$LLVM_INCLUDE_DIR"
AOSP_STL_LIB="$ANDROID_NDK_ROOT/sources/cxx-stl/llvm-libc++/libs/$AOSP_ABI/libc++_static.a"
;;
if [ ! -d "$LLVM_INCLUDE_DIR" ]; then
echo "ERROR: Unable to locate include LLVM directory at $LLVM_INCLUDE_DIR -- has it moved since NDK r16beta1?"
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
AOSP_STL_INC="$LLVM_INCLUDE_DIR"
AOSP_STL_LIB="$ANDROID_NDK_ROOT/sources/cxx-stl/llvm-libc++/libs/$AOSP_ABI/libc++_static.a"
;;
llvm|llvm-shared)
if [ ! -d "$LLVM_INCLUDE_DIR" ]; then
echo "ERROR: Unable to locate LLVM include directory at $LLVM_INCLUDE_DIR -- has it moved since NDK r16beta1?"
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
fi
AOSP_STL_INC="$LLVM_INCLUDE_DIR"
AOSP_STL_LIB="$ANDROID_NDK_ROOT/sources/cxx-stl/llvm-libc++/libs/$AOSP_ABI/libc++_shared.so"
;;
if [ ! -d "$LLVM_INCLUDE_DIR" ]; then
echo "ERROR: Unable to locate LLVM include directory at $LLVM_INCLUDE_DIR -- has it moved since NDK r16beta1?"
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
AOSP_STL_INC="$LLVM_INCLUDE_DIR"
AOSP_STL_LIB="$ANDROID_NDK_ROOT/sources/cxx-stl/llvm-libc++/libs/$AOSP_ABI/libc++_shared.so"
;;
*)
echo "ERROR: Unknown STL library $2"
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
echo "ERROR: Unknown STL library $2"
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
esac
# Error checking
if [ ! -d "$AOSP_STL_INC" ] || [ ! -e "$AOSP_STL_INC/memory" ]; then
echo "ERROR: AOSP_STL_INC is not valid. Please edit this script."
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
echo "ERROR: AOSP_STL_INC is not valid. Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# Error checking
if [ ! -e "$AOSP_STL_LIB" ]; then
echo "ERROR: AOSP_STL_LIB is not valid. Please edit this script."
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
echo "ERROR: AOSP_STL_LIB is not valid. Please edit this script."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
export AOSP_STL_INC
export AOSP_STL_LIB
if [ ! -z "$AOSP_BITS_INC" ]; then
export AOSP_BITS_INC
export AOSP_BITS_INC
fi
# Now that we are using cpu-features from Android rather than CPU probing, we
@ -354,14 +360,14 @@ fi
# directory and then build it.
if [[ ! -e "$ANDROID_NDK_ROOT/sources/android/cpufeatures/cpu-features.h" ]]; then
echo "ERROR: Unable to locate cpu-features.h"
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
echo "ERROR: Unable to locate cpu-features.h"
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
cp "$ANDROID_NDK_ROOT/sources/android/cpufeatures/cpu-features.h" .
if [[ ! -e "$ANDROID_NDK_ROOT/sources/android/cpufeatures/cpu-features.c" ]]; then
echo "ERROR: Unable to locate cpu-features.c"
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
echo "ERROR: Unable to locate cpu-features.c"
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
cp "$ANDROID_NDK_ROOT/sources/android/cpufeatures/cpu-features.c" .
@ -390,33 +396,33 @@ fi
COUNT=$(echo -n "$AOSP_STL_LIB" | egrep -i -c 'libstdc\+\+')
if [[ ("$COUNT" -ne "0") ]]; then
echo
echo "*******************************************************************************"
echo "You are using GNU's runtime and STL library. Please ensure the resulting"
echo "binary meets licensing requirements. If you can't use GNU's runtime"
echo "and STL library, then reconfigure with stlport or llvm. Also see"
echo "http://code.google.com/p/android/issues/detail?id=216331"
echo "*******************************************************************************"
echo
echo "*******************************************************************************"
echo "You are using GNU's runtime and STL library. Please ensure the resulting"
echo "binary meets licensing requirements. If you can't use GNU's runtime"
echo "and STL library, then reconfigure with stlport or llvm. Also see"
echo "http://code.google.com/p/android/issues/detail?id=216331"
echo "*******************************************************************************"
fi
COUNT=$(echo -n "$AOSP_STL_LIB" | grep -i -c 'libstlport')
if [[ ("$COUNT" -ne "0") ]]; then
echo
echo "*******************************************************************************"
echo "You are using STLport's runtime and STL library. STLport could cause problems"
echo "if the resulting binary is used in other environments, like a QT project."
echo "Also see http://code.google.com/p/android/issues/detail?id=216331"
echo "*******************************************************************************"
echo
echo "*******************************************************************************"
echo "You are using STLport's runtime and STL library. STLport could cause problems"
echo "if the resulting binary is used in other environments, like a QT project."
echo "Also see http://code.google.com/p/android/issues/detail?id=216331"
echo "*******************************************************************************"
fi
COUNT=$(echo -n "$AOSP_STL_LIB" | egrep -i -c 'libc\+\+')
if [[ ("$COUNT" -ne "0") ]]; then
echo
echo "*******************************************************************************"
echo "You are using LLVM's runtime and STL library. LLVM could cause problems"
echo "if the resulting binary is used in other environments, like a QT project."
echo "Also see http://code.google.com/p/android/issues/detail?id=216331"
echo "*******************************************************************************"
echo
echo "*******************************************************************************"
echo "You are using LLVM's runtime and STL library. LLVM could cause problems"
echo "if the resulting binary is used in other environments, like a QT project."
echo "Also see http://code.google.com/p/android/issues/detail?id=216331"
echo "*******************************************************************************"
fi
echo
@ -427,4 +433,4 @@ echo "shared object using 'HAS_SOLIB_VERSION=1 make -f GNUmakefile-cross'"
echo "*******************************************************************************"
echo
[ "$0" = "$BASH_SOURCE" ] && exit 0 || return 0
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 0 || return 0

View File

@ -15,6 +15,12 @@
# set -eu
# Sanity check
if [ "$0" = "${BASH_SOURCE[0]}" ]; then
echo "Please source this setenv script"
exit 0
fi
# Unset old options
unset IS_CROSS_COMPILE
@ -24,12 +30,12 @@ unset IS_ANDROID
unset IS_ARM_EMBEDDED
if [ -z "${ARM_EMBEDDED_TOOLCHAIN-}" ]; then
ARM_EMBEDDED_TOOLCHAIN="/usr/bin"
ARM_EMBEDDED_TOOLCHAIN="/usr/bin"
fi
if [ ! -d "$ARM_EMBEDDED_TOOLCHAIN" ]; then
echo "ARM_EMBEDDED_TOOLCHAIN is not valid"
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
echo "ARM_EMBEDDED_TOOLCHAIN is not valid"
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# Fedora
@ -50,37 +56,37 @@ export RANLIB="$ARM_EMBEDDED_TOOLCHAIN/$TOOL_PREFIX-ranlib"
# Test a few of the tools
if [ ! -e "$CPP" ]; then
echo "ERROR: CPP is not valid"
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
if [ ! -e "$CC" ]; then
echo "ERROR: CC is not valid"
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
if [ ! -e "$CXX" ]; then
echo "ERROR: CXX is not valid"
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
if [ ! -e "$AR" ]; then
echo "ERROR: AR is not valid"
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
if [ ! -e "$AS" ]; then
echo "ERROR: AS is not valid"
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
if [ ! -e "$RANLIB" ]; then
echo "ERROR: RANLIB is not valid"
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
if [ ! -e "$LD" ]; then
echo "ERROR: LD is not valid"
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# The Crypto++ Makefile uses these to disable host settings like
@ -94,7 +100,7 @@ fi
if [ ! -d "$ARM_EMBEDDED_SYSROOT" ]; then
echo "ERROR: ARM_EMBEDDED_SYSROOT is not valid"
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# Fix C++ header paths for Ubuntu
@ -104,12 +110,12 @@ ARM_EMBEDDED_CXX_HEADERS="$ARM_EMBEDDED_SYSROOT/include/c++/$ARM_EMBEDDED_TOOLCH
if [ ! -d "$ARM_EMBEDDED_CXX_HEADERS" ]; then
echo "ERROR: ARM_EMBEDDED_CXX_HEADERS is not valid"
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
if [ ! -d "$ARM_EMBEDDED_CXX_HEADERS/arm-linux-gnueabi" ]; then
echo "ERROR: ARM_EMBEDDED_CXX_HEADERS is not valid"
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# Finally, the flags...
@ -142,4 +148,4 @@ echo "shared object using 'HAS_SOLIB_VERSION=1 make -f GNUmakefile-cross'"
echo "*******************************************************************************"
echo
[ "$0" = "$BASH_SOURCE" ] && exit 0 || return 0
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 0 || return 0

View File

@ -13,6 +13,12 @@
# set -eu
# Sanity check
if [ "$0" = "${BASH_SOURCE[0]}" ]; then
echo "Please source this setenv script"
exit 0
fi
#########################################
##### Clear old options #####
#########################################
@ -42,6 +48,7 @@ SETENV_VERBOSE=1
APPLE_SDK=
IOS_ARCH=
BACK_ARCH=
for ARG in "$@"
do
@ -49,66 +56,79 @@ do
# i386 (simulator)
if [ "$CL" == "i386" ]; then
IOS_ARCH=i386
BACK_ARCH=i386
APPLE_SDK=iPhoneSimulator
fi
# x86_64 (simulator)
if [ "$CL" == "x86_64" ]; then
IOS_ARCH=x86_64
BACK_ARCH=x86_64
APPLE_SDK=iPhoneSimulator
fi
# ARMv5
if [ "$CL" == "armv5" ]; then
IOS_ARCH=armv5
BACK_ARCH=armv5
APPLE_SDK=iPhoneOS
fi
# ARMv6
if [ "$CL" == "armv6" ]; then
IOS_ARCH=armv6
BACK_ARCH=armv6
APPLE_SDK=iPhoneOS
fi
# ARMv7
if [ "$CL" == "armv7" ]; then
IOS_ARCH=armv7
BACK_ARCH=armv7
APPLE_SDK=iPhoneOS
fi
# ARMv7s
if [ "$CL" == "armv7s" ]; then
IOS_ARCH=armv7s
BACK_ARCH=armv7s
APPLE_SDK=iPhoneOS
fi
# ARM64
if [[ ("$CL" == "arm64" || "$CL" == "armv8" || "$CL" == "aarch64") ]]; then
IOS_ARCH=arm64
BACK_ARCH=arm64
APPLE_SDK=iPhoneOS
fi
# iPhone
if [[ ("$CL" == "iphone" || "$CL" == "iphoneos") ]]; then
BACK_ARCH=armv7
APPLE_SDK=iPhoneOS
fi
# iPhone Simulator
if [[ ("$CL" == "simulator" || "$CL" == "iphonesimulator") ]]; then
BACK_ARCH=i386
APPLE_SDK=iPhoneSimulator
fi
# Watch
if [[ ("$CL" == "watch" || "$CL" == "watchos" || "$CL" == "applewatch") ]]; then
BACK_ARCH=armv7
APPLE_SDK=WatchOS
fi
# Watch Simulator
if [ "$CL" == "watchsimulator" ]; then
BACK_ARCH=i386
APPLE_SDK=WatchSimulator
fi
# Apple TV
if [[ ("$CL" == "tv" || "$CL" == "appletv" || "$CL" == "appletvos") ]]; then
BACK_ARCH=arm64
APPLE_SDK=AppleTVOS
fi
# Apple TV Simulator
if [[ ("$CL" == "tvsimulator" || "$CL" == "appletvsimulator") ]]; then
BACK_ARCH=x86_64
APPLE_SDK=AppleTVSimulator
fi
@ -116,21 +136,13 @@ done
# Defaults if not set
if [ -z "$APPLE_SDK" ]; then
APPLE_SDK=iPhoneOS
BACK_ARCH=armv7
APPLE_SDK=iPhoneOS
fi
# Defaults if not set
if [ -z "$IOS_ARCH" ]; then
if [ "$APPLE_SDK" == "iPhoneOS" ]; then
IOS_ARCH=armv7
elif [ "$APPLE_SDK" == "iPhoneSimulator" ]; then
IOS_ARCH=i386
elif [ "$APPLE_SDK" == "AppleTVOS" ]; then
IOS_ARCH=arm64
elif [ "$APPLE_SDK" == "WatchOS" ]; then
IOS_ARCH=armv7
fi
# TODO: fill in missing simulator architectures
IOS_ARCH="$BACK_ARCH"
fi
# Allow a user override? I think we should be doing this. The use case is:
@ -143,7 +155,7 @@ fi
if [ ! -d "$XCODE_DEVELOPER" ]; then
echo "ERROR: unable to find XCODE_DEVELOPER directory."
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# Default toolchain location
@ -151,7 +163,7 @@ XCODE_TOOLCHAIN="$XCODE_DEVELOPER/usr/bin"
if [ ! -d "$XCODE_TOOLCHAIN" ]; then
echo "ERROR: unable to find XCODE_TOOLCHAIN directory."
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# XCODE_DEVELOPER_TOP is the top of the development tools tree
@ -159,7 +171,7 @@ XCODE_DEVELOPER_TOP="$XCODE_DEVELOPER/Platforms/$APPLE_SDK.platform/Developer"
if [ ! -d "$XCODE_DEVELOPER_TOP" ]; then
echo "ERROR: unable to find XCODE_DEVELOPER_TOP directory."
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# IOS_TOOLCHAIN is the location of the actual compiler tools.
@ -171,7 +183,7 @@ fi
if [ -z "$IOS_TOOLCHAIN" ] || [ ! -d "$IOS_TOOLCHAIN" ]; then
echo "ERROR: unable to find Xcode cross-compiler tools."
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
#
@ -181,21 +193,21 @@ fi
unset XCODE_SDK
for i in $(seq -f "%.1f" 20.0 -0.1 1.0)
do
if [ -d "$XCODE_DEVELOPER/Platforms/$APPLE_SDK.platform/Developer/SDKs/$APPLE_SDK$i.sdk" ]; then
XCODE_SDK="$APPLE_SDK$i.sdk"
break
fi
if [ -d "$XCODE_DEVELOPER/Platforms/$APPLE_SDK.platform/Developer/SDKs/$APPLE_SDK$i.sdk" ]; then
XCODE_SDK="$APPLE_SDK$i.sdk"
break
fi
done
# Error checking
if [ -z "$XCODE_SDK" ]; then
echo "ERROR: unable to find a SDK."
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# https://github.com/weidai11/cryptopp/issues/635
if [ "$APPLE_SDK" == "iPhoneSimulator" ]; then
IOS_FLAGS="$IOS_FLAGS -DCRYPTOPP_DISABLE_SSSE3"
IOS_FLAGS="$IOS_FLAGS -DCRYPTOPP_DISABLE_ASM"
fi
# Simulator fixup. LD fails to link dylib.
@ -218,9 +230,20 @@ if [ "$APPLE_SDK" == "AppleTVOS" ]; then
IOS_FLAGS=""
fi
# ARM64 Simulator fixup. Under Xcode 6/iOS 8, it uses x86_64 and not i386
if [ "$IOS_ARCH" == "x86_64" ]; then
IOS_FLAGS="$IOS_FLAGS -miphoneos-version-min=8"
# Disable ASM for simulator. We are failing on Travis due to missing _start.
# We may need to link against crt1.o for simulator builds. Also see
# https://stackoverflow.com/q/24841283/608639
# -watchos_simulator_version_min does not work though it is in LLVM sources.
if [ "$APPLE_SDK" == "WatchSimulator" ]; then
IOS_FLAGS="$IOS_FLAGS -DCRYPTOPP_DISABLE_ASM"
fi
# Disable ASM for simulator. We are failing on Travis due to missing _start.
# We may need to link against crt1.o for simulator builds. Also see
# https://stackoverflow.com/q/24841283/608639
# -tvos_simulator_version_min does not work though it is in LLVM sources.
if [ "$APPLE_SDK" == "AppleTVSimulator" ]; then
IOS_FLAGS="$IOS_FLAGS -DCRYPTOPP_DISABLE_ASM"
fi
# Simulator uses i386 or x86_64, Device uses ARMv5, ARMv6, ARMv7, ARMv7s or ARMv8
@ -259,16 +282,16 @@ fi
# Only modify/export PATH if IOS_TOOLCHAIN good
if [ ! -z "$IOS_TOOLCHAIN" ] && [ ! -z "$XCODE_TOOLCHAIN" ]; then
# And only modify PATH if IOS_TOOLCHAIN is not present
TOOL_PATH="$IOS_TOOLCHAIN:$XCODE_TOOLCHAIN"
LEN=${#TOOL_PATH}
SUBSTR=${PATH:0:$LEN}
if [ "$SUBSTR" != "$TOOL_PATH" ]; then
export PATH="$TOOL_PATH":"$PATH"
fi
# And only modify PATH if IOS_TOOLCHAIN is not present
TOOL_PATH="$IOS_TOOLCHAIN:$XCODE_TOOLCHAIN"
LEN=${#TOOL_PATH}
SUBSTR=${PATH:0:$LEN}
if [ "$SUBSTR" != "$TOOL_PATH" ]; then
export PATH="$TOOL_PATH":"$PATH"
fi
else
echo "ERROR: unable to set new PATH."
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
echo "ERROR: unable to set new PATH."
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
########################################
@ -283,14 +306,14 @@ FOUND_ALL=1
TOOLS=(clang clang++ libtool ld)
for tool in ${TOOLS[@]}
do
if [ ! -e "$IOS_TOOLCHAIN/$tool" ] && [ ! -e "$XCODE_TOOLCHAIN/$tool" ]; then
echo "ERROR: unable to find $tool at IOS_TOOLCHAIN or XCODE_TOOLCHAIN"
FOUND_ALL=0
fi
if [ ! -e "$IOS_TOOLCHAIN/$tool" ] && [ ! -e "$XCODE_TOOLCHAIN/$tool" ]; then
echo "ERROR: unable to find $tool at IOS_TOOLCHAIN or XCODE_TOOLCHAIN"
FOUND_ALL=0
fi
done
if [ "$FOUND_ALL" -eq "0" ]; then
[ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 1 || return 1
fi
# Exports added for Autotools. GNUmakefile-cross does not use them.
@ -312,4 +335,4 @@ echo "shared object using 'HAS_SOLIB_VERSION=1 make -f GNUmakefile-cross'"
echo "*******************************************************************************"
echo
[ "$0" = "$BASH_SOURCE" ] && exit 0 || return 0
[ "$0" = "${BASH_SOURCE[0]}" ] && exit 0 || return 0

18
TestScripts/setenv-travis.sh Executable file
View File

@ -0,0 +1,18 @@
#/usr/bin/env bash
# This file should be source'd when required.
export ANDROID_HOME="$HOME/.android"
export ANDROID_SDK="$HOME/android/sdk/"
export ANDROID_NDK="$HOME/android/sdk/ndk-bundle"
export ANDROID_SDK_ROOT="$ANDROID_SDK"
export ANDROID_NDK_ROOT="$ANDROID_NDK"
mkdir -p "$ANDROID_HOME"
mkdir -p "$ANDROID_SDK_ROOT"
mkdir -p "$ANDROID_NDK_ROOT"
# https://stackoverflow.com/a/47028911/608639
touch "$ANDROID_HOME/repositories.cfg"
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 0 || return 0

File diff suppressed because it is too large Load Diff

View File

@ -24,7 +24,8 @@ before the Test field.
Data Types
==========
int - small integer (less than 2^32) in decimal representation
signed int - small integer (less than 2^32) in decimal representation
unsigned long - large integer (less than 2^64) convertible by strtoul or strtoull
string - human readable string
encoded string - can be one of the following
- quoted string: "message" means "message" without the quotes
@ -68,6 +69,7 @@ DerivedLength - encoded string
Digest - encoded string
TruncatedSize - int, size of truncated digest in bytes
Seek - int, seek location for random access ciphers
Seek64 - unsigned long, seek location for random access ciphers
(more to come here)
Possible Tests

6
TestVectors/aead.txt Normal file
View File

@ -0,0 +1,6 @@
AlgorithmType: FileList
Name: aead.txt collection
Test: TestVectors/ccm.txt
Test: TestVectors/eax.txt
Test: TestVectors/gcm.txt
Test: TestVectors/chacha20poly1305.txt

View File

@ -1,48 +1,62 @@
AlgorithmType: FileList
Name: all.txt collection
Test: TestVectors/tea.txt
Test: TestVectors/wake.txt
Test: TestVectors/aes.txt
Test: TestVectors/aria.txt
Test: TestVectors/blake2b.txt
Test: TestVectors/blake2s.txt
Test: TestVectors/camellia.txt
Test: TestVectors/shacal2.txt
Test: TestVectors/ttmac.txt
Test: TestVectors/whrlpool.txt
Test: TestVectors/ccm.txt
Test: TestVectors/chacha_tls.txt
Test: TestVectors/chacha20poly1305.txt
Test: TestVectors/chacha.txt
Test: TestVectors/xchacha.txt
Test: TestVectors/cham.txt
Test: TestVectors/cmac.txt
Test: TestVectors/dlies.txt
Test: TestVectors/dsa.txt
Test: TestVectors/dsa_1363.txt
Test: TestVectors/dsa_rfc6979.txt
Test: TestVectors/dsa.txt
Test: TestVectors/eax.txt
Test: TestVectors/esign.txt
Test: TestVectors/gcm.txt
Test: TestVectors/hc128.txt
Test: TestVectors/hc256.txt
Test: TestVectors/hight.txt
Test: TestVectors/hkdf.txt
Test: TestVectors/hmac.txt
Test: TestVectors/kalyna.txt
Test: TestVectors/keccak.txt
Test: TestVectors/lea.txt
Test: TestVectors/mars.txt
Test: TestVectors/nr.txt
Test: TestVectors/panama.txt
Test: TestVectors/poly1305aes.txt
Test: TestVectors/poly1305_tls.txt
Test: TestVectors/rabbit.txt
Test: TestVectors/rsa_oaep.txt
Test: TestVectors/rsa_pkcs1_1_5.txt
Test: TestVectors/rsa_pss.txt
Test: TestVectors/rw.txt
Test: TestVectors/salsa.txt
Test: TestVectors/seal.txt
Test: TestVectors/sha.txt
Test: TestVectors/keccak.txt
Test: TestVectors/seed.txt
Test: TestVectors/sha1_fips_180.txt
Test: TestVectors/sha2_fips_180.txt
Test: TestVectors/sha3_fips_202.txt
Test: TestVectors/panama.txt
Test: TestVectors/sm3.txt
Test: TestVectors/aes.txt
Test: TestVectors/aria.txt
Test: TestVectors/kalyna.txt
Test: TestVectors/threefish.txt
Test: TestVectors/sm4.txt
Test: TestVectors/shake.txt
Test: TestVectors/shacal2.txt
Test: TestVectors/sha.txt
Test: TestVectors/simeck.txt
Test: TestVectors/simon.txt
Test: TestVectors/speck.txt
Test: TestVectors/salsa.txt
Test: TestVectors/chacha.txt
#Test: TestVectors/tls_chacha.txt
Test: TestVectors/vmac.txt
Test: TestVectors/sosemanuk.txt
Test: TestVectors/ccm.txt
Test: TestVectors/gcm.txt
Test: TestVectors/cmac.txt
Test: TestVectors/eax.txt
Test: TestVectors/mars.txt
Test: TestVectors/blake2s.txt
Test: TestVectors/blake2b.txt
Test: TestVectors/siphash.txt
Test: TestVectors/hkdf.txt
Test: TestVectors/skipjack.txt
Test: TestVectors/sm3.txt
Test: TestVectors/sm4.txt
Test: TestVectors/sosemanuk.txt
Test: TestVectors/speck.txt
Test: TestVectors/tea.txt
Test: TestVectors/threefish.txt
Test: TestVectors/ttmac.txt
Test: TestVectors/vmac.txt
Test: TestVectors/wake.txt
Test: TestVectors/whrlpool.txt

View File

@ -1,36 +1,43 @@
AlgorithmType: SymmetricCipher
Name: ChaCha8
Name: ChaCha
Source: http://tools.ietf.org/html/draft-strombergson-chacha-test-vectors
#
Comment: TC1 - All zero key and IV (16-byte key).
Key: r16 00
IV: r8 00
Rounds: 8
Plaintext: r64 00
Ciphertext: e28a5fa4a67f8c5defed3e6fb7303486aa8427d31419a729572d777953491120b64ab8e72b8deb85cd6aea7cb6089a101824beeb08814a428aab1fa2c816081b
Test: Encrypt
#
Comment: TC1 - All zero key and IV (32-byte key).
Key: r32 00
IV: r8 00
Plaintext: r64 00
Ciphertext: 3e00ef2f895f40d67f5bb8e81f09a5a12c840ec3ce9a7f3b181be188ef711a1e984ce172b9216f419f445367456d5619314a42a3da86b001387bfdb80e0cfe42
Test: Encrypt
#
Comment: TC2 - Single bit in key set. All zero IV (16-byte key).
Key: 0x01000000000000000000000000000000
IV: r8 00
Plaintext: r64 00
Ciphertext: 03a7669888605a0765e8357475e58673f94fc8161da76c2a3aa2f3caf9fe5449e0fcf38eb882656af83d430d410927d55c972ac4c92ab9da3713e19f761eaa14
Test: Encrypt
#
Comment: TC2 - Single bit in key set. All zero IV (32-byte key).
Key: 0x0100000000000000000000000000000000000000000000000000000000000000
IV: r8 00
Plaintext: r64 00
Ciphertext: cf5ee9a0494aa9613e05d5ed725b804b12f4a465ee635acc3a311de8740489ea289d04f43c7518db56eb4433e498a1238cd8464d3763ddbb9222ee3bd8fae3c8
Test: Encrypt
#
Comment: TC3 - Single bit in IV set. All zero key (16-byte key).
Key: r16 00
IV: 0x0100000000000000
Plaintext: r64 00
Ciphertext: 25f5bec6683916ff44bccd12d102e692176663f4cac53e719509ca74b6b2eec85da4236fb29902012adc8f0d86c8187d25cd1c486966930d0204c4ee88a6ab35
Test: Encrypt
#
Comment: TC3 - Single bit in IV set. All zero key (32-byte key).
Key: r32 00
IV: 0x0100000000000000
@ -39,31 +46,236 @@ Ciphertext: 2b8f4bb3798306ca5130d47c4f8d4ed13aa0edccc1be6942090faeeca0d7599b7ff0
Test: Encrypt
AlgorithmType: SymmetricCipher
Name: ChaCha12
Name: ChaCha
Source: https://cr.yp.to/streamciphers/timings/estreambench/submissions/salsa20/chacha8/ref/chacha.c
#
Comment: All one's key and IV (16-byte key).
Key: r16 ff
IV: r8 ff
Rounds: 8
Plaintext: r512 00
Ciphertext: \
2204D5B81CE662193E00966034F91302F14A3FB047F58B6E6EF0D72113230416 \
3E0FB640D76FF9C3B9CD99996E6E38FAD13F0E31C82244D33ABBC1B11E8BF12D \
9A81D78E9E56604DDFAE136921F51C9D81AE15119DB8E756DD28024493EE571D \
363AE4BBCD6E7D300F99D2673AEB92CCFC6E43A38DC31BACD66B28F17B22B28A \
B9A347AC756CF16B39683DFE4907D76E9318C53E3B892B4C4D477E3649A412DF \
641722732D6B4B4E73541FEEA26F36163B860A6FFEFF2BD736DCB9E40BB49DFB \
18E5060462F7EC41EF61C8EAED8F68987F4BBA84FF37DF645677AA26D59D1608 \
201932E2F91565FC50BCCAE19370BEA3F4F6C9B40C69E1E7EF4993FB5C543246 \
8AD37BDFA57F8C0A27AFABA186B20E08D08009C9AAAEC5BE1DB6A5FFD0F6D122 \
F000015BB76329B170CBE114A17C0CBC8A721C3075EEDF5F131944F3BEA2E84C \
009BF03FC47FAD2A7BA01573FA67FE859AD950A3E40190AA2FA3834D2FB604E0 \
51F919D4C93CBC6272156BE543785691F698304071BA0D8722CD2694F711E4A2 \
6E511837F4C46CDF9EB2A4573E2FBFF7F4320ACCD35DD64F9B2A40C7F017B971 \
0CD9BC404FD17DC6E474B7EBFE03F5526409160760FB7915DACED8358B8B78C4 \
FA9F0C53D408593CBE63FB1C86D34ACF2B412CD114A542A09BA915D091125542 \
A72DBCA31889D0FC5CCC5F07FA227694100EE57E97C6C2B601273AA438F72693
Test: Encrypt
#
Comment: All one's key and IV (32-byte key).
Key: r32 ff
IV: r8 ff
Rounds: 8
Plaintext: r512 00
Ciphertext: \
E163BBF8C9A739D18925EE8362DAD2CDC973DF05225AFB2AA26396F2A9849A4A \
445E0547D31C1623C537DF4BA85C70A9884A35BCBF3DFAB077E98B0F68135F54 \
81D4933F8B322AC0CD762C27235CE2B31534E0244A9A2F1FD5E94498D47FF108 \
790C009CF9E1A348032A7694CB28024CD96D3498361EDB1785AF752D187AB54B \
4194B9407D743285217760B19D0548294855D4C1620CDFF381657E106CA539E3 \
E41CC0EAAFCB1C502BCE537275567F72CAE2C076B7DE295233132517E140ECF1 \
B7B4F9DE5E87123D72AE0FA8672BBE5B73C5382DDD779A963C91E40B6B9EAF39 \
F53B3982D9E4AC76DFAC3D5070373CF9E54036C9F0E9DBB327371D2E69308699 \
8991D340F91458804B2445641E24189956674BAEC8120AC451F9BDDD14B65E99 \
2C526CABF185EA53FD0ABD2DB88DE9FE88E19D3F26DC6BA4B9014924064D15E6 \
7901B9BF0F4EB76C3E06BE3D1CA73289FF819A9DBF456F73686C5CF9207510F3 \
7D95A24249E11E779D301237AF5A2BD3E6F34D7123811E26BB016C73D54A6D39 \
8B4E9BBCD2EE4C31CBD3326148004684F27847CEAC28C341A894A670A0818324 \
446468D08CA1C72BCBD1CE7EFD73D67D53C671C35EA57700D8B581E52E238A7E \
25DDA3E1C1E35D96BDB9CAD13546971B1E5FDB2E83216FEF93E5457DE48A5ED8 \
1F7E4B95484834A58B6AF8CCE9545BBBDC58929A1DEB2F6AEBF0DC2079F644E3
Test: Encrypt
#
Comment: All one's key and IV (16-byte key).
Key: r16 ff
IV: r8 ff
Rounds: 8
Seek: 32
Plaintext: r64 00
Ciphertext: \
3E0FB640D76FF9C3B9CD99996E6E38FAD13F0E31C82244D33ABBC1B11E8BF12D \
9A81D78E9E56604DDFAE136921F51C9D81AE15119DB8E756DD28024493EE571D
Test: Encrypt
#
Comment: All one's key and IV (32-byte key).
Key: r32 ff
IV: r8 ff
Rounds: 8
Seek: 32
Plaintext: r64 00
Ciphertext: \
445E0547D31C1623C537DF4BA85C70A9884A35BCBF3DFAB077E98B0F68135F54 \
81D4933F8B322AC0CD762C27235CE2B31534E0244A9A2F1FD5E94498D47FF108
Test: Encrypt
#
Comment: Counter crosses 32-bit boundary (0xfffffffe*64)
Key: r32 00
IV: r8 00
Rounds: 8
Seek64: 0x3FFFFFFF80
Plaintext: r1024 00
Ciphertext: \
AC22DD35E273D76E47D60D19AD753F578C38D4A8E28BA9F6055E8E0A1D7A6E53 \
CDC46EDD57430E0EB14CF19CC107EE6DFF4836500383CD683CA2E8F11BA754DD \
34A2B737751D19ECE0256B2BB87237F68188C02B10A6DC31939D4E5D319BD3BB \
EE280B968AD567C1F103089F4F7346D1FEA5DEC60DAF906C3C4E889BC49E0049 \
1CCC59A06308E05BE9D29E7288F166C58F2EE06003047710CBFDB7359DA916E8 \
43980F2C3BF39DF2A3E1F451BA18C37F986FF783075484265819602305557DCD \
B7BD167BDFD87E6E4DF89B2F110C9022F16325E2EC113E806A50774673CDB6AF \
B5BD48D1E66C7631EDB52D0941452DDBD67BC790A20CFE24213194AE75B2EE47 \
FE3B0698DD4E8DFA56E1841BC6F549097583143CB3A0D791C230D9C438EADCC9 \
F233969591EDF6EA904FF86C7A541AFE0905D18E62867028E15AEC0B2CD46BF1 \
E939F5026DD82A60AA06B99A3726EA6D76C2D48DDB8B1DCB365249859EDDC8C0 \
CF23BDB1CA6203201206BDDC4844A36D52A10828D0AB77CAACAF7FA680E4ED5D \
5D325C265A49436A691A54BC3D068A80D33187B17FBC4923879760C34DFFDA8F \
BDBEF388A3B86E839E2A83DED9FE816238EEE22B2120BC39D7B26D3ECE4D5FA3 \
8B6808FC587DF4D1E0C579FC6DBF10A0CF4C6696CD5501336EC05C45927565CB \
9CB7626BF510D1EAAD21B208E76D55C15CBDCD36F4CA84A6939DE0C29539DE25 \
E8D17BC489CB723682BE518CC695B127922C88BF8DC99245DBC146512735687F \
079F458CDA31CAA064A3D5AD1020A849B4A587BC60BDDCAEE9517936D30FF11E \
362D524675648DA360224DF3719D6AD569AF9E6B309119E3262FD3189891A140 \
971350EB320109802A664216635F400A1086F8197841457126E2AF7A8AA46924 \
FDD717270BB3A0C4F1723C507B143830E80D691300A1B477E4383D975BCAC73A \
0C33BE5330C83247E330184F7C5E613227FD321A29AC50B75B93FC0B8FD51184 \
648F3305432FC0177C319508D1025C1331EF78ED56D3405DF70980C07756F4F3 \
686B0B0F110BCE4F9CD07463964B67AD7CFC05A6182A3B88F5E7C408C3A4E4E0 \
1B446212735D2F31F53EE1DEEDEBDD353534CF69179DBB87E1C689C3C688CF6C \
C94217963B796CC7CC47C37027B909C9E2C88D55458B838A87953CD0974CE348 \
651E6126416AE7A81C855B1C856F542D76F9252D3EE78AE37C9B6C576E72E2C2 \
71AD7542F22C2B106E3FAFB399864AB1F8B8263CA8D3311951AD0F4463964B68 \
1E96FEBD06E4857986E7146981484DC6DF3692397B68CF953876FD1C2F6E5A80 \
1FBD636D2912A833EA9024450A3ED43ED5D5298BB451578FB279B5ACBE47E35F \
0B1D1094DCEA8272DF55897BEE2440B6B90D0B15F259D0BD2B402D434FFFF2E6 \
79DA0921D748D31B963618DE2D8036D9F54F75BC61A26A9DA0F10E81E075CF5C
Test: Encrypt
#
Comment: Counter crosses 32-bit boundary (0xffffffff*64)
Key: r32 00
IV: r8 00
Rounds: 8
Seek64: 0x3FFFFFFFC0
Plaintext: r1024 00
Ciphertext: \
34A2B737751D19ECE0256B2BB87237F68188C02B10A6DC31939D4E5D319BD3BB \
EE280B968AD567C1F103089F4F7346D1FEA5DEC60DAF906C3C4E889BC49E0049 \
1CCC59A06308E05BE9D29E7288F166C58F2EE06003047710CBFDB7359DA916E8 \
43980F2C3BF39DF2A3E1F451BA18C37F986FF783075484265819602305557DCD \
B7BD167BDFD87E6E4DF89B2F110C9022F16325E2EC113E806A50774673CDB6AF \
B5BD48D1E66C7631EDB52D0941452DDBD67BC790A20CFE24213194AE75B2EE47 \
FE3B0698DD4E8DFA56E1841BC6F549097583143CB3A0D791C230D9C438EADCC9 \
F233969591EDF6EA904FF86C7A541AFE0905D18E62867028E15AEC0B2CD46BF1 \
E939F5026DD82A60AA06B99A3726EA6D76C2D48DDB8B1DCB365249859EDDC8C0 \
CF23BDB1CA6203201206BDDC4844A36D52A10828D0AB77CAACAF7FA680E4ED5D \
5D325C265A49436A691A54BC3D068A80D33187B17FBC4923879760C34DFFDA8F \
BDBEF388A3B86E839E2A83DED9FE816238EEE22B2120BC39D7B26D3ECE4D5FA3 \
8B6808FC587DF4D1E0C579FC6DBF10A0CF4C6696CD5501336EC05C45927565CB \
9CB7626BF510D1EAAD21B208E76D55C15CBDCD36F4CA84A6939DE0C29539DE25 \
E8D17BC489CB723682BE518CC695B127922C88BF8DC99245DBC146512735687F \
079F458CDA31CAA064A3D5AD1020A849B4A587BC60BDDCAEE9517936D30FF11E \
362D524675648DA360224DF3719D6AD569AF9E6B309119E3262FD3189891A140 \
971350EB320109802A664216635F400A1086F8197841457126E2AF7A8AA46924 \
FDD717270BB3A0C4F1723C507B143830E80D691300A1B477E4383D975BCAC73A \
0C33BE5330C83247E330184F7C5E613227FD321A29AC50B75B93FC0B8FD51184 \
648F3305432FC0177C319508D1025C1331EF78ED56D3405DF70980C07756F4F3 \
686B0B0F110BCE4F9CD07463964B67AD7CFC05A6182A3B88F5E7C408C3A4E4E0 \
1B446212735D2F31F53EE1DEEDEBDD353534CF69179DBB87E1C689C3C688CF6C \
C94217963B796CC7CC47C37027B909C9E2C88D55458B838A87953CD0974CE348 \
651E6126416AE7A81C855B1C856F542D76F9252D3EE78AE37C9B6C576E72E2C2 \
71AD7542F22C2B106E3FAFB399864AB1F8B8263CA8D3311951AD0F4463964B68 \
1E96FEBD06E4857986E7146981484DC6DF3692397B68CF953876FD1C2F6E5A80 \
1FBD636D2912A833EA9024450A3ED43ED5D5298BB451578FB279B5ACBE47E35F \
0B1D1094DCEA8272DF55897BEE2440B6B90D0B15F259D0BD2B402D434FFFF2E6 \
79DA0921D748D31B963618DE2D8036D9F54F75BC61A26A9DA0F10E81E075CF5C \
BEDB7A4CB8F33DDC71A836FE332D8DB08CF2833FD582E786CA57B1F5599B0FA8 \
887E279E3863471FA282308B542EDE7741069929FF92B7A12884C074C1FEC48F
Test: Encrypt
#
Comment: Counter crosses 32-bit boundary (0xfffffffc*64)
Key: r32 00
IV: r8 00
Rounds: 8
Seek64: 0x3FFFFFFF00
Plaintext: r1024 00
Ciphertext: \
F75FC0AFC5A56D8F38FDFDD96233B42F926F5A21007D3412C7A28FEEED2B5401 \
07BCC1A5F8AE49260A63E2A5A7F547A56B4807DDCD63BAF082A40F57B3A36A6D \
B7B5E36ACFB9D060F2830903343264C1C3EC582110898C2650B559EE29B7411E \
87EE094887D1D8188563FF64F0755F1361381A6A1EF22D6B8732B2C9B7DE669D \
AC22DD35E273D76E47D60D19AD753F578C38D4A8E28BA9F6055E8E0A1D7A6E53 \
CDC46EDD57430E0EB14CF19CC107EE6DFF4836500383CD683CA2E8F11BA754DD \
34A2B737751D19ECE0256B2BB87237F68188C02B10A6DC31939D4E5D319BD3BB \
EE280B968AD567C1F103089F4F7346D1FEA5DEC60DAF906C3C4E889BC49E0049 \
1CCC59A06308E05BE9D29E7288F166C58F2EE06003047710CBFDB7359DA916E8 \
43980F2C3BF39DF2A3E1F451BA18C37F986FF783075484265819602305557DCD \
B7BD167BDFD87E6E4DF89B2F110C9022F16325E2EC113E806A50774673CDB6AF \
B5BD48D1E66C7631EDB52D0941452DDBD67BC790A20CFE24213194AE75B2EE47 \
FE3B0698DD4E8DFA56E1841BC6F549097583143CB3A0D791C230D9C438EADCC9 \
F233969591EDF6EA904FF86C7A541AFE0905D18E62867028E15AEC0B2CD46BF1 \
E939F5026DD82A60AA06B99A3726EA6D76C2D48DDB8B1DCB365249859EDDC8C0 \
CF23BDB1CA6203201206BDDC4844A36D52A10828D0AB77CAACAF7FA680E4ED5D \
5D325C265A49436A691A54BC3D068A80D33187B17FBC4923879760C34DFFDA8F \
BDBEF388A3B86E839E2A83DED9FE816238EEE22B2120BC39D7B26D3ECE4D5FA3 \
8B6808FC587DF4D1E0C579FC6DBF10A0CF4C6696CD5501336EC05C45927565CB \
9CB7626BF510D1EAAD21B208E76D55C15CBDCD36F4CA84A6939DE0C29539DE25 \
E8D17BC489CB723682BE518CC695B127922C88BF8DC99245DBC146512735687F \
079F458CDA31CAA064A3D5AD1020A849B4A587BC60BDDCAEE9517936D30FF11E \
362D524675648DA360224DF3719D6AD569AF9E6B309119E3262FD3189891A140 \
971350EB320109802A664216635F400A1086F8197841457126E2AF7A8AA46924 \
FDD717270BB3A0C4F1723C507B143830E80D691300A1B477E4383D975BCAC73A \
0C33BE5330C83247E330184F7C5E613227FD321A29AC50B75B93FC0B8FD51184 \
648F3305432FC0177C319508D1025C1331EF78ED56D3405DF70980C07756F4F3 \
686B0B0F110BCE4F9CD07463964B67AD7CFC05A6182A3B88F5E7C408C3A4E4E0 \
1B446212735D2F31F53EE1DEEDEBDD353534CF69179DBB87E1C689C3C688CF6C \
C94217963B796CC7CC47C37027B909C9E2C88D55458B838A87953CD0974CE348 \
651E6126416AE7A81C855B1C856F542D76F9252D3EE78AE37C9B6C576E72E2C2 \
71AD7542F22C2B106E3FAFB399864AB1F8B8263CA8D3311951AD0F4463964B68
Test: Encrypt
#################################################
AlgorithmType: SymmetricCipher
Name: ChaCha
Source: http://tools.ietf.org/html/draft-strombergson-chacha-test-vectors
#
Comment: TC1 - All zero key and IV (16-byte key).
Key: r16 00
IV: r8 00
Rounds: 12
Plaintext: r64 00
Ciphertext: e1047ba9476bf8ff312c01b4345a7d8ca5792b0ad467313f1dc412b5fdce32410dea8b68bd774c36a920f092a04d3f95274fbeff97bc8491fcef37f85970b450
Test: Encrypt
#
Comment: TC1 - All zero key and IV (32-byte key).
Key: r32 00
IV: r8 00
Plaintext: r64 00
Ciphertext: 9bf49a6a0755f953811fce125f2683d50429c3bb49e074147e0089a52eae155f0564f879d27ae3c02ce82834acfa8c793a629f2ca0de6919610be82f411326be
Test: Encrypt
#
Comment: TC2 - Single bit in key set. All zero IV (16-byte key).
Key: 0x01000000000000000000000000000000
IV: r8 00
Plaintext: r64 00
Ciphertext: 2a865a3b8999fa83ae8aacf33fc6be4f32c8aa9762738d26963270052f4eef8b86af758f7867560af6d0eeb973b5542bb24c8abceac8b1f36d026963d6c8a9b2
Test: Encrypt
#
Comment: TC2 - Single bit in key set. All zero IV (32-byte key).
Key: 0x0100000000000000000000000000000000000000000000000000000000000000
IV: r8 00
Plaintext: r64 00
Ciphertext: 12056e595d56b0f6eef090f0cd25a20949248c2790525d0f930218ff0b4ddd10a6002239d9a454e29e107a7d06fefdfef0210feba044f9f29b1772c960dc29c0
#
Test: Encrypt
Comment: TC3 - Single bit in IV set. All zero key (16-byte key).
Key: r16 00
@ -71,6 +283,7 @@ IV: 0x0100000000000000
Plaintext: r64 00
Ciphertext: 91cdb2f180bc89cfe86b8b6871cd6b3af61abf6eba01635db619c40a0b2e19edfa8ce5a9bd7f53cc2c9bcfea181e9754a9e245731f658cc282c2ae1cab1ae02c
Test: Encrypt
#
Comment: TC3 - Single bit in IV set. All zero key (32-byte key).
Key: r32 00
IV: 0x0100000000000000
@ -79,38 +292,244 @@ Ciphertext: 64b8bdf87b828c4b6dbaf7ef698de03df8b33f635714418f9836ade59be1296946c9
Test: Encrypt
AlgorithmType: SymmetricCipher
Name: ChaCha20
Name: ChaCha
Source: https://cr.yp.to/streamciphers/timings/estreambench/submissions/salsa20/chacha8/ref/chacha.c
#
Comment: All one's key and IV (16-byte key).
Key: r16 ff
IV: r8 ff
Rounds: 12
Plaintext: r512 00
Ciphertext: \
60E349E60C38B328C4BAAB90D44A7C727662770D36350D65A1433BD92B00ECF4 \
83D5597D7A616258EC3C5D5B30E1C5C85C5DFE2F92423B8E36870F3185B6ADD9 \
F34DAB6C2BC551898FBDCDFC783F09171CC8B59A8B2852983C3A9B91D29B5761 \
12464A9D8E050263E989906F42C7EFCAC8A70A85BB7FF2211273FBD4CAD96142 \
DB89BA6820D565E1DBA19B70DD2CEB8A9ECA55CA48B92B1B27D4676BE4985508 \
9AA6202B811799D95EA5A239C39861D7E4B56E0847C2CCF8FAAA3768268F80D6 \
87E6DA5D95C303A3A29D2AB10B392F223F426A1E5400D272083DE05B7BEAB22C \
46C667513885DE4EAB9A18660D1247ECFAC6EE049180A4E780158A29D4914F0C \
B87860D4C30C5F2BFADA2615D09907F7059BD6EA7278BAD8CAF57145B6C431CE \
E4EB781A9ADDB1CBDB0ADED70CDA2F195FF311888C9A23409A00529B654332BB \
0E566990895D96E264D56438619F515E29E023D0C434D56142A1916ED6529476 \
7DA1D97911C069FCBF711AA8682A9EA19A41F400BCDF6D9ABFDC518063F5F75D \
0060D6F03B9B78577B89C577643E69590518CEEA869665458E027EA27D002767 \
C22241E8E12C421623B86C667341E0C2E7E3F2FDCC058C26F9A64626CEDFDE08 \
35F6A77CF8BF99FB7ABCD3874366E3B8FDAEDF83B58701C08B1F39027A913868 \
CF84F5C9001701A6ACE8C05C05578E47CA7691F9058C8B7298B756B900BC535A
Test: Encrypt
#
Comment: All one's key and IV (32-byte key).
Key: r32 ff
IV: r8 ff
Rounds: 12
Plaintext: r512 00
Ciphertext: \
04BF88DAE8E47A228FA47B7E6379434BA664A7D28F4DAB84E5F8B464ADD20C3A \
CAA69C5AB221A23A57EB5F345C96F4D1322D0A2FF7A9CD43401CD536639A615A \
5C9429B55CA3C1B55354559669A154ACA46CD761C41AB8ACE385363B95675F06 \
8E18DB5A673C11291BD4187892A9A3A33514F3712B26C13026103298ED76BC9A \
19E1C370231E9F3351C2E71C5D0635D8E9908EBEBFBAA1F493C1ACCD015F7D50 \
4582C1B3D52449D7A707F5D136BF83E019643902FE052AD8577A037343E128F4 \
3514FED8B5B612EBDF26851DE269E2E2398358383CD0067864BFB4E835613E2F \
AA2B4759C7A615614176A133F6F30D063A64A8274A558773E537DCC0753A1208 \
9C90E1574D00E2E444EFC18F1CCFA8EC328163A909C45DFCDB1B92049B2D01D5 \
DEC0F6F102EB3E63B724B7B0ACD038962CA2A153E6B4756BFBB870D20D30C970 \
1EC3FA344E26B02D4CE834630D2A1889DF42F07D48EA08609FAC95DF29BAEF9B \
89BC66265947A35085F7C19BF30CA6019E48A736FDBB1E49236B3538F2F9FE98 \
2882B0524FD01F213F016326ADCD8503DCD928EFC1A02F824B9E9D998CD73EF2 \
5D52E6E6BB2FF8B0284C7565E26868EFD6C1A86DAD733417FB80606EB5BB3A9F \
5E16F52D6857A1A602A7FC6DDD578CA868F1E51AADD3209034A4740036DE08A7 \
A906067C997F01E4E334CBA913407C7A462A968B272834D2D66DF24922F4302C
Test: Encrypt
#
Comment: All one's key and IV (16-byte key).
Key: r16 ff
IV: r8 ff
Rounds: 12
Seek: 32
Plaintext: r64 00
Ciphertext: \
83D5597D7A616258EC3C5D5B30E1C5C85C5DFE2F92423B8E36870F3185B6ADD9 \
F34DAB6C2BC551898FBDCDFC783F09171CC8B59A8B2852983C3A9B91D29B5761
Test: Encrypt
#
Comment: All one's key and IV (32-byte key).
Key: r32 ff
IV: r8 ff
Rounds: 12
Seek: 32
Plaintext: r64 00
Ciphertext: \
CAA69C5AB221A23A57EB5F345C96F4D1322D0A2FF7A9CD43401CD536639A615A \
5C9429B55CA3C1B55354559669A154ACA46CD761C41AB8ACE385363B95675F06
Test: Encrypt
#
Comment: Counter crosses 32-bit boundary (0xffffffff*64)
Key: r32 00
IV: r8 00
Rounds: 12
Seek64: 0x3FFFFFFFC0
Plaintext: r1024 00
Ciphertext: \
D7A6AF50F1C92A29484252BBFCE206F17D01DD139530A3830AB583C1F62E0312 \
829361A19A8A956CEDEA380430FF932CD052DB5E9477835058B80A272406FC74 \
CC7B53DC11894D26240581B8A8F4F4E5AF406705801223B13F821FDCCBA6A618 \
8A63F8D3DC83CCBCED451F4BA4E0DAAB228ABB0D7439CC67E50DF7129F646BAD \
A0F5387AF3FAEC30DC25783285275137394EB539AF19DDC286C20DDFD252F85A \
5D1B9D76F6A4F4C97A49275C18DC040B77432865988C49D2EC9C4366BE926481 \
7F146661C007B7558ABB6C0B5EE94F722913A34AB3AB248031B5929DA1CDE7E3 \
B33DBF441151CD1770073C28D794351A4C42E6DC3B418ED7118BF314CF26AB99 \
E855F6C00854E00D63BFD389EDEA3D557C5016EEF3DFC00D8FF1FE76566AC486 \
51AF4F61CEE3290B007BE9ADF56C3DD30CD4403C78C5AF2603C60F8CC4DC625B \
44A2EB21492D383DF430D07E77DCEE44BA9DD8E806C7170D4AE3AD93586AD6A2 \
FD12501335D0AB7CE42675A0F3D129D25250537E544569EA4D659B052207AEEF \
F458FB1C81B45276B5A7A9BD1FA682FA4CBA0B9284291F11FBBAA363E7F4D1B6 \
9F6BB7FB3D7BBCF4E4C8F5722FE26DD5DE12E9A2722C71A075EBD5AE3BEDF296 \
1CD31D059EDB1E58DE97C9BD64A8C06F91F2699C47B950B3E4742E5423D6FA12 \
0F085C504E4A89F82C5ECAA2459C9F54057DEEE5CD201BF5B96BF1F7CC0A246C \
01EC149DCC8A5A59FCC7B38CE4EA15692CB65587D584414A8BC7EC9A982E92ED \
9275377792A06C5B8E594FFEFC630BA11209AEF8763531255E522B078CC8B4EC \
74BD3AFA9BC4A6C39B3B7A00A706BDD8FC24E97335BB22270BECDDB3E3580812 \
A414586C361D58A9F63836B3D458F2AC43A6099C4031F185E5FA7ACF6946D47A \
47CBA42630D0F39B741FBE29E105DF2DF833B790DE6E825DBF38123DE2C44521 \
A555300EA7FF7949DD19B09FFE192C109A3C132337B6ED69C50F552D658AB83C \
5A6966CAA246168FF5443B305CF53E1B601C44C7D402BEDB8BFFB066C9EC3B1B \
D886235BDFD5CD426323CCDF8E48A1EC39BCF51081683E54E68E7C680CA026DA \
7DC1AD922D2B8B28A815974A7D25FA363AF164A3359F88324E547EF36BE98247 \
E4A4698CAF902D5926EE148D0ED957AB34FE1BFAA82791B7BEB42E358611DF0F \
95FDA7D00918DC1CFA14AD34139DE2C14DB762F54BB5A475891C33BF4259B8CF \
DE0D19DA0CA374F40A48E32685C94795E085813D3DD3771C5B3B1EDF242897E5 \
DA6044325924559C49CC1F88957CEBB2E935772A831578604C898968F331B8D3 \
8B9CDE84C404515402C6A1D5E68C4115D86A571E1DD983CD56E8BF78A3C3C870 \
55674CAF12B50AD4A318899C62F0E549D24EB2FC2D63A57B1B9FA5474B7627A7 \
0DA5BD3D1899134E5546AF682E97517DD9C4FE5374C640DFCC134C5A4762FB1E
Test: Encrypt
#
Comment: Counter crosses 32-bit boundary (0xfffffffe*64)
Key: r32 00
IV: r8 00
Rounds: 12
Seek64: 0x3FFFFFFF80
Plaintext: r1024 00
Ciphertext: \
0502A68D6D5350892D5EE33F1286AEA1897CE4EF1DFE002C49C3D27A497994EB \
7DBE6CA85D5E0C80814D4BA29D57FA8AF838DCC5CD3E62D0D62331D8DAB0B50F \
D7A6AF50F1C92A29484252BBFCE206F17D01DD139530A3830AB583C1F62E0312 \
829361A19A8A956CEDEA380430FF932CD052DB5E9477835058B80A272406FC74 \
CC7B53DC11894D26240581B8A8F4F4E5AF406705801223B13F821FDCCBA6A618 \
8A63F8D3DC83CCBCED451F4BA4E0DAAB228ABB0D7439CC67E50DF7129F646BAD \
A0F5387AF3FAEC30DC25783285275137394EB539AF19DDC286C20DDFD252F85A \
5D1B9D76F6A4F4C97A49275C18DC040B77432865988C49D2EC9C4366BE926481 \
7F146661C007B7558ABB6C0B5EE94F722913A34AB3AB248031B5929DA1CDE7E3 \
B33DBF441151CD1770073C28D794351A4C42E6DC3B418ED7118BF314CF26AB99 \
E855F6C00854E00D63BFD389EDEA3D557C5016EEF3DFC00D8FF1FE76566AC486 \
51AF4F61CEE3290B007BE9ADF56C3DD30CD4403C78C5AF2603C60F8CC4DC625B \
44A2EB21492D383DF430D07E77DCEE44BA9DD8E806C7170D4AE3AD93586AD6A2 \
FD12501335D0AB7CE42675A0F3D129D25250537E544569EA4D659B052207AEEF \
F458FB1C81B45276B5A7A9BD1FA682FA4CBA0B9284291F11FBBAA363E7F4D1B6 \
9F6BB7FB3D7BBCF4E4C8F5722FE26DD5DE12E9A2722C71A075EBD5AE3BEDF296 \
1CD31D059EDB1E58DE97C9BD64A8C06F91F2699C47B950B3E4742E5423D6FA12 \
0F085C504E4A89F82C5ECAA2459C9F54057DEEE5CD201BF5B96BF1F7CC0A246C \
01EC149DCC8A5A59FCC7B38CE4EA15692CB65587D584414A8BC7EC9A982E92ED \
9275377792A06C5B8E594FFEFC630BA11209AEF8763531255E522B078CC8B4EC \
74BD3AFA9BC4A6C39B3B7A00A706BDD8FC24E97335BB22270BECDDB3E3580812 \
A414586C361D58A9F63836B3D458F2AC43A6099C4031F185E5FA7ACF6946D47A \
47CBA42630D0F39B741FBE29E105DF2DF833B790DE6E825DBF38123DE2C44521 \
A555300EA7FF7949DD19B09FFE192C109A3C132337B6ED69C50F552D658AB83C \
5A6966CAA246168FF5443B305CF53E1B601C44C7D402BEDB8BFFB066C9EC3B1B \
D886235BDFD5CD426323CCDF8E48A1EC39BCF51081683E54E68E7C680CA026DA \
7DC1AD922D2B8B28A815974A7D25FA363AF164A3359F88324E547EF36BE98247 \
E4A4698CAF902D5926EE148D0ED957AB34FE1BFAA82791B7BEB42E358611DF0F \
95FDA7D00918DC1CFA14AD34139DE2C14DB762F54BB5A475891C33BF4259B8CF \
DE0D19DA0CA374F40A48E32685C94795E085813D3DD3771C5B3B1EDF242897E5 \
DA6044325924559C49CC1F88957CEBB2E935772A831578604C898968F331B8D3 \
8B9CDE84C404515402C6A1D5E68C4115D86A571E1DD983CD56E8BF78A3C3C870
Test: Encrypt
#
Comment: Counter crosses 32-bit boundary (0xfffffffc*64)
Key: r32 00
IV: r8 00
Rounds: 12
Seek64: 0x3FFFFFFF00
Plaintext: r1024 00
Ciphertext: \
5892C27AFFC04BFF6D877D6958F973D7918E9423C8E92696658A8D47B7231F8E \
FEEC34D15E07621D51EE87D4FB3368483B3722B0CED3580C792C3988F781AF0D \
3460198B28EAB8115D4E75F4AD994CE2619B7942CFF8F862D77655A80F539097 \
4DB43CC4CFC895FECAD6465E81AF7174140D9D4F54A288A343EB1321207D4ADD \
0502A68D6D5350892D5EE33F1286AEA1897CE4EF1DFE002C49C3D27A497994EB \
7DBE6CA85D5E0C80814D4BA29D57FA8AF838DCC5CD3E62D0D62331D8DAB0B50F \
D7A6AF50F1C92A29484252BBFCE206F17D01DD139530A3830AB583C1F62E0312 \
829361A19A8A956CEDEA380430FF932CD052DB5E9477835058B80A272406FC74 \
CC7B53DC11894D26240581B8A8F4F4E5AF406705801223B13F821FDCCBA6A618 \
8A63F8D3DC83CCBCED451F4BA4E0DAAB228ABB0D7439CC67E50DF7129F646BAD \
A0F5387AF3FAEC30DC25783285275137394EB539AF19DDC286C20DDFD252F85A \
5D1B9D76F6A4F4C97A49275C18DC040B77432865988C49D2EC9C4366BE926481 \
7F146661C007B7558ABB6C0B5EE94F722913A34AB3AB248031B5929DA1CDE7E3 \
B33DBF441151CD1770073C28D794351A4C42E6DC3B418ED7118BF314CF26AB99 \
E855F6C00854E00D63BFD389EDEA3D557C5016EEF3DFC00D8FF1FE76566AC486 \
51AF4F61CEE3290B007BE9ADF56C3DD30CD4403C78C5AF2603C60F8CC4DC625B \
44A2EB21492D383DF430D07E77DCEE44BA9DD8E806C7170D4AE3AD93586AD6A2 \
FD12501335D0AB7CE42675A0F3D129D25250537E544569EA4D659B052207AEEF \
F458FB1C81B45276B5A7A9BD1FA682FA4CBA0B9284291F11FBBAA363E7F4D1B6 \
9F6BB7FB3D7BBCF4E4C8F5722FE26DD5DE12E9A2722C71A075EBD5AE3BEDF296 \
1CD31D059EDB1E58DE97C9BD64A8C06F91F2699C47B950B3E4742E5423D6FA12 \
0F085C504E4A89F82C5ECAA2459C9F54057DEEE5CD201BF5B96BF1F7CC0A246C \
01EC149DCC8A5A59FCC7B38CE4EA15692CB65587D584414A8BC7EC9A982E92ED \
9275377792A06C5B8E594FFEFC630BA11209AEF8763531255E522B078CC8B4EC \
74BD3AFA9BC4A6C39B3B7A00A706BDD8FC24E97335BB22270BECDDB3E3580812 \
A414586C361D58A9F63836B3D458F2AC43A6099C4031F185E5FA7ACF6946D47A \
47CBA42630D0F39B741FBE29E105DF2DF833B790DE6E825DBF38123DE2C44521 \
A555300EA7FF7949DD19B09FFE192C109A3C132337B6ED69C50F552D658AB83C \
5A6966CAA246168FF5443B305CF53E1B601C44C7D402BEDB8BFFB066C9EC3B1B \
D886235BDFD5CD426323CCDF8E48A1EC39BCF51081683E54E68E7C680CA026DA \
7DC1AD922D2B8B28A815974A7D25FA363AF164A3359F88324E547EF36BE98247 \
E4A4698CAF902D5926EE148D0ED957AB34FE1BFAA82791B7BEB42E358611DF0F
Test: Encrypt
#################################################
AlgorithmType: SymmetricCipher
Name: ChaCha
Source: http://tools.ietf.org/html/draft-strombergson-chacha-test-vectors
#
Comment: TC1 - All zero key and IV (16-byte key).
Key: r16 00
IV: r8 00
Rounds: 20
Plaintext: r64 00
Ciphertext: 89670952608364fd00b2f90936f031c8e756e15dba04b8493d00429259b20f46cc04f111246b6c2ce066be3bfb32d9aa0fddfbc12123d4b9e44f34dca05a103f
Test: Encrypt
#
Comment: TC1 - All zero key and IV (32-byte key).
Key: r32 00
IV: r8 00
Plaintext: r64 00
Ciphertext: 76b8e0ada0f13d90405d6ae55386bd28bdd219b8a08ded1aa836efcc8b770dc7da41597c5157488d7724e03fb8d84a376a43b8f41518a11cc387b669b2ee6586
Test: Encrypt
#
Comment: TC2 - Single bit in key set. All zero IV (16-byte key).
Key: 0x01000000000000000000000000000000
IV: r8 00
Plaintext: r64 00
Ciphertext: ae56060d04f5b597897ff2af1388dbceff5a2a4920335dc17a3cb1b1b10fbe70ece8f4864d8c7cdf0076453a8291c7dbeb3aa9c9d10e8ca36be4449376ed7c42
Test: Encrypt
#
Comment: TC2 - Single bit in key set. All zero IV (32-byte key).
Key: 0x0100000000000000000000000000000000000000000000000000000000000000
IV: r8 00
Plaintext: r64 00
Ciphertext: c5d30a7ce1ec119378c84f487d775a8542f13ece238a9455e8229e888de85bbd29eb63d0a17a5b999b52da22be4023eb07620a54f6fa6ad8737b71eb0464dac0
Test: Encrypt
#
Comment: TC3 - Single bit in IV set. All zero key (16-byte key).
Key: r16 00
IV: 0x0100000000000000
Plaintext: r64 00
Ciphertext: 1663879eb3f2c9949e2388caa343d361bb132771245ae6d027ca9cb010dc1fa7178dc41f8278bc1f64b3f12769a24097f40d63a86366bdb36ac08abe60c07fe8
Test: Encrypt
#
Comment: TC3 - Single bit in IV set. All zero key (32-byte key).
Key: r32 00
IV: 0x0100000000000000
@ -118,3 +537,240 @@ Plaintext: r64 00
Ciphertext: ef3fdfd6c61578fbf5cf35bd3dd33b8009631634d21e42ac33960bd138e50d32111e4caf237ee53ca8ad6426194a88545ddc497a0b466e7d6bbdb0041b2f586b
Test: Encrypt
AlgorithmType: SymmetricCipher
Name: ChaCha
Source: https://cr.yp.to/streamciphers/timings/estreambench/submissions/salsa20/chacha8/ref/chacha.c
#
Comment: All one's key and IV (16-byte key).
Key: r16 ff
IV: r8 ff
Rounds: 20
Plaintext: r512 00
Ciphertext: \
992947C3966126A0E660A3E95DB048DE091FB9E0185B1E41E41015BB7EE50150 \
399E4760B262F9D53F26D8DD19E56F5C506AE0C3619FA67FB0C408106D0203EE \
40EA3CFA61FA32A2FDA8D1238A2135D9D4178775240F99007064A6A7F0C731B6 \
7C227C52EF796B6BED9F9059BA0614BCF6DD6E38917F3B150E576375BE50ED67 \
B0EDE573FD64189655C22A452CA343A3F63DE7A2BF75DB4BC5EC87AE6B3818E0 \
E4FB1DE2CC047982D6A9FEF37B9D3A11D6329AB81A9ED9FDAB565EE99DDEA1FE \
D207921A4169C3F1B212A886E6AE48FB19E9AF414915B087F9AF7F74EEA49732 \
ED08500D8EEBD8083F9101984E30D4162D3C0A8BE4F18B22491A61DF53A7E629 \
3406AF356940F23C66A4E2A4CE7284C30DCAC3C58B4491D755B02BC91F864E24 \
9097953A8D81737B8CFA80407571E3CC6BA716D1FAAD50209B737665563684B0 \
201D668B79D23D68BA41C92EDB2C66119C662E19B3A317FE1D7F4B7E52211FC2 \
16EE14FB9E7B063D8010036C5C18F73084448A514A4EA32A8FB74E40ADBDBAEE \
14F371872A3864D80695049098ED1B69E425E55BE5B27DD41255E24A27484CDB \
EBD332BCCFE8CC4FFC4669E2EAC7B6202BF1D966AA24C0110DFB80E68A12973B \
5A9793643E862A891DBCF2321F362B9977306405EACD5BB0CB09316803F70F0D \
2CE2AF1C267EB944314DDC515412600FCB7D0A3EC16FDD105F5A4C8507DB36AA
Test: Encrypt
#
Comment: All one's key and IV (32-byte key).
Key: r32 ff
IV: r8 ff
Rounds: 20
Plaintext: r512 00
Ciphertext: \
D9BF3F6BCE6ED0B54254557767FB57443DD4778911B606055C39CC25E674B836 \
3FEABC57FDE54F790C52C8AE43240B79D49042B777BFD6CB80E931270B7F50EB \
5BAC2ACD86A836C5DC98C116C1217EC31D3A63A9451319F097F3B4D6DAB07787 \
19477D24D24B403A12241D7CCA064F790F1D51CCAFF6B1667D4BBCA1958C4306 \
2D83C32143F7D743A87F710C3202AF7D30046775865F3934958597BB38FFE32C \
7C5B456E3E5457D203BB45D304D014D46709EA4DB71A935EFC388CEFA5B894E5 \
D1076A95EC7791AB0AD55C2A2FAC3C61E35BAE153036763326D632C9E004BC6D \
A45D5FC9486C29F002E40A7AB619DDCA1A660765F853C77E1FF44C2A4F49344F \
7530DC05190BD9A256FE38CEDE7DAA540904135BEC993088E712276467166A63 \
04F1FC26C9DDA89CEE93D15441C88FC15E143DB941BBB42424A36E5C8F5AAA49 \
2BFEED0BA93348AA786F40114F4895A6B21A11DB8937A510B2A099F75C1E03E7 \
A6E3E281EC9C66D400F36C232798C6496048028C8D7320F43E97A56D6C4D1183 \
8FD5DD8F45DF7DE235225B5F1C41C3AFED4EC0526AB38DCB8597770803F1261C \
D22CFEAEC86612E53DEFC29848C055053C6B1D462A3CF09B228E47211AFBA0AF \
4E4C2B336E6EE2F471823808523F073C1BC8785D258AC2BD580209A82A875273 \
93DF828B6A6728ABD7AAD0485BFF5CE92C8DB78B1E63929FC76A905E8C7AF310
Test: Encrypt
#
Comment: All one's key and IV (16-byte key).
Key: r16 ff
IV: r8 ff
Rounds: 20
Seek: 32
Plaintext: r64 00
Ciphertext: \
399E4760B262F9D53F26D8DD19E56F5C506AE0C3619FA67FB0C408106D0203EE \
40EA3CFA61FA32A2FDA8D1238A2135D9D4178775240F99007064A6A7F0C731B6
Test: Encrypt
#
Comment: All one's key and IV (32-byte key).
Key: r32 ff
IV: r8 ff
Rounds: 20
Seek: 32
Plaintext: r64 00
Ciphertext: \
3FEABC57FDE54F790C52C8AE43240B79D49042B777BFD6CB80E931270B7F50EB \
5BAC2ACD86A836C5DC98C116C1217EC31D3A63A9451319F097F3B4D6DAB07787
Test: Encrypt
#
Comment: Counter crosses 32-bit boundary (0xffffffff*64)
Key: r32 00
IV: r8 00
Rounds: 20
Seek64: 0x3FFFFFFFC0
Plaintext: r1024 00
Ciphertext: \
ACE4CD09E294D1912D4AD205D06F95D9C2F2BFCF453E8753F128765B62215F4D \
92C74F2F626C6A640C0B1284D839EC81F1696281DAFC3E684593937023B58B1D \
3DB41D3AA0D329285DE6F225E6E24BD59C9A17006943D5C9B680E3873BDC683A \
5819469899989690C281CD17C96159AF0682B5B903468A61F50228CF09622B5A \
46F0F6EFEE15C8F1B198CB49D92B990867905159440CC723916DC00128269810 \
39CE1766AA2542B05DB3BD809AB142489D5DBFE1273E7399637B4B3213768AAA \
89B1889375E99FE2442C4F68ADF54158F4B8135713D00999B92B38E3AAFE5FF4 \
959B1834BE3DC54FC36AA9D32EB121E0F688B90E7C7E2649F4AAEF407BDD2B94 \
09EFEC03114CB5D4FFD1788E0FE1897BD176C1311E368368C657A5EE55C9CA03 \
CC71744F030822D53A0486A97B9D98240274FADEAF262BD81B58BCE3DFA98414 \
C24B5BC517FD91993A6B2E6232B0502125C6F48A6921E2DDA8EB6B3C4ECF2AAE \
889602AD90B5D2537FF45DF525C67B983B51DBD23E1280AA656EAE85B63CC42D \
E8C70E7C19C1D66E3F902BEA9D1ACFD3326B5985AD7C8CABD431ACBC62976CE5 \
23C938EA447D4AF0F560DC52B0AB1D7D66A42AB8272E2C40BD66470FE6F68846 \
12A11D899A0B7EB54907BBEDD6483EFCED1F15621D4673FF928C5AAB5F465257 \
123679EF17C39648C537E150108E0F6608732E9F5B240689EEB5402FA04CCB89 \
B7CA9649A361C526B41ED110402D9497715B03441118BC4953FCBEF395267570 \
BD43EC0EEF7B6167F14FED205EB812907D0C134DC49FA5B18F5A3A3A9BD0A71B \
2FFE445EE4FABEB4054CC922BA360E4589B681F01E2A43B5A0C0F0C39A5ADB94 \
B3BC2D20FF7F287FDF17F53B7CB5E3A1ABD46FC0819A3559C03C6B4106603066 \
359A4A09B468B6DFEF8A363C7B31D9E88ABB85914F4A27C30E9915C66AAC3576 \
9E481C87AEE4C3138CF40F288ED3C172FFC17D3D78F8D32C3C756C13CFBFB95F \
3ECCE6D8B54344D78998F58148C4B43B1A6201ABFF3D4FB4B76E3BBA104CFAA5 \
5D8DA4319A9E0606644B07DC204E9635502186C1EF9E43322EFD69F86D4DA1F6 \
A98BF0B800BA04BD9FBA5C5BE8EC49D48D9EECBADEE669EF69C9522C730110BB \
8339AF0E45185262C9183307C5EEA59DE5095CAC26E8428D4CA9E44DCF8FC7B4 \
1F9624A2DBA36F44415BAC489BF46CB6BB1BD2B70D719772FDABB3B166EA615A \
BDF208C39BA8A708D933CBC8A3236D4A15629FCAA35E00C2B361527326E7AB51 \
409A7DE42C9093346E41D3A3C4529D9557BBC01EEFF927F1052B5E02F74542B0 \
4E78F1E933C67DBC2C9187527C86DA77F045D4B07CF646BA9547646905F1F117 \
0C503C0AEC51EC93F303D61756318EF5999B4B8EFE1C7D74B8FF0E9FD0BAEB55 \
585F41AADA7A83ED42153BF9D87349AD100D40D25B1B05423E56761A32DD01A9
Test: Encrypt
#
Comment: Counter crosses 32-bit boundary (0xfffffffe*64)
Key: r32 00
IV: r8 00
Rounds: 20
Seek64: 0x3FFFFFFF80
Plaintext: r1024 00
Ciphertext: \
032CC123482C31711F94C941AF5AB1F4155784332ED5348FE79AEC5EAD4C06C3 \
F13C280D8CC49925E4A6A5922EC80E13A4CDFA840C70A1427A3CB699166991A5 \
ACE4CD09E294D1912D4AD205D06F95D9C2F2BFCF453E8753F128765B62215F4D \
92C74F2F626C6A640C0B1284D839EC81F1696281DAFC3E684593937023B58B1D \
3DB41D3AA0D329285DE6F225E6E24BD59C9A17006943D5C9B680E3873BDC683A \
5819469899989690C281CD17C96159AF0682B5B903468A61F50228CF09622B5A \
46F0F6EFEE15C8F1B198CB49D92B990867905159440CC723916DC00128269810 \
39CE1766AA2542B05DB3BD809AB142489D5DBFE1273E7399637B4B3213768AAA \
89B1889375E99FE2442C4F68ADF54158F4B8135713D00999B92B38E3AAFE5FF4 \
959B1834BE3DC54FC36AA9D32EB121E0F688B90E7C7E2649F4AAEF407BDD2B94 \
09EFEC03114CB5D4FFD1788E0FE1897BD176C1311E368368C657A5EE55C9CA03 \
CC71744F030822D53A0486A97B9D98240274FADEAF262BD81B58BCE3DFA98414 \
C24B5BC517FD91993A6B2E6232B0502125C6F48A6921E2DDA8EB6B3C4ECF2AAE \
889602AD90B5D2537FF45DF525C67B983B51DBD23E1280AA656EAE85B63CC42D \
E8C70E7C19C1D66E3F902BEA9D1ACFD3326B5985AD7C8CABD431ACBC62976CE5 \
23C938EA447D4AF0F560DC52B0AB1D7D66A42AB8272E2C40BD66470FE6F68846 \
12A11D899A0B7EB54907BBEDD6483EFCED1F15621D4673FF928C5AAB5F465257 \
123679EF17C39648C537E150108E0F6608732E9F5B240689EEB5402FA04CCB89 \
B7CA9649A361C526B41ED110402D9497715B03441118BC4953FCBEF395267570 \
BD43EC0EEF7B6167F14FED205EB812907D0C134DC49FA5B18F5A3A3A9BD0A71B \
2FFE445EE4FABEB4054CC922BA360E4589B681F01E2A43B5A0C0F0C39A5ADB94 \
B3BC2D20FF7F287FDF17F53B7CB5E3A1ABD46FC0819A3559C03C6B4106603066 \
359A4A09B468B6DFEF8A363C7B31D9E88ABB85914F4A27C30E9915C66AAC3576 \
9E481C87AEE4C3138CF40F288ED3C172FFC17D3D78F8D32C3C756C13CFBFB95F \
3ECCE6D8B54344D78998F58148C4B43B1A6201ABFF3D4FB4B76E3BBA104CFAA5 \
5D8DA4319A9E0606644B07DC204E9635502186C1EF9E43322EFD69F86D4DA1F6 \
A98BF0B800BA04BD9FBA5C5BE8EC49D48D9EECBADEE669EF69C9522C730110BB \
8339AF0E45185262C9183307C5EEA59DE5095CAC26E8428D4CA9E44DCF8FC7B4 \
1F9624A2DBA36F44415BAC489BF46CB6BB1BD2B70D719772FDABB3B166EA615A \
BDF208C39BA8A708D933CBC8A3236D4A15629FCAA35E00C2B361527326E7AB51 \
409A7DE42C9093346E41D3A3C4529D9557BBC01EEFF927F1052B5E02F74542B0 \
4E78F1E933C67DBC2C9187527C86DA77F045D4B07CF646BA9547646905F1F117
Test: Encrypt
#
Comment: Counter crosses 32-bit boundary (0xfffffffc*64)
Key: r32 00
IV: r8 00
Rounds: 20
Seek64: 0x3FFFFFFF00
Plaintext: r1024 00
Ciphertext: \
98E5E54215C14F994E957FD3DD6A0309DFC3512CF12937F859A58725F16E9D4C \
3BFBA511BE065C2AE7452DA187096671731A9954137BA780B808F9E93C919871 \
582CB23E8F29E3B966B29D19E01A01DEBB32A8635CF49A1B178C3CD53CBF3EC5 \
12DD6174690DA38FDA7C125351035F99E61042C5DCFA0C312E002F0DC99962DC \
032CC123482C31711F94C941AF5AB1F4155784332ED5348FE79AEC5EAD4C06C3 \
F13C280D8CC49925E4A6A5922EC80E13A4CDFA840C70A1427A3CB699166991A5 \
ACE4CD09E294D1912D4AD205D06F95D9C2F2BFCF453E8753F128765B62215F4D \
92C74F2F626C6A640C0B1284D839EC81F1696281DAFC3E684593937023B58B1D \
3DB41D3AA0D329285DE6F225E6E24BD59C9A17006943D5C9B680E3873BDC683A \
5819469899989690C281CD17C96159AF0682B5B903468A61F50228CF09622B5A \
46F0F6EFEE15C8F1B198CB49D92B990867905159440CC723916DC00128269810 \
39CE1766AA2542B05DB3BD809AB142489D5DBFE1273E7399637B4B3213768AAA \
89B1889375E99FE2442C4F68ADF54158F4B8135713D00999B92B38E3AAFE5FF4 \
959B1834BE3DC54FC36AA9D32EB121E0F688B90E7C7E2649F4AAEF407BDD2B94 \
09EFEC03114CB5D4FFD1788E0FE1897BD176C1311E368368C657A5EE55C9CA03 \
CC71744F030822D53A0486A97B9D98240274FADEAF262BD81B58BCE3DFA98414 \
C24B5BC517FD91993A6B2E6232B0502125C6F48A6921E2DDA8EB6B3C4ECF2AAE \
889602AD90B5D2537FF45DF525C67B983B51DBD23E1280AA656EAE85B63CC42D \
E8C70E7C19C1D66E3F902BEA9D1ACFD3326B5985AD7C8CABD431ACBC62976CE5 \
23C938EA447D4AF0F560DC52B0AB1D7D66A42AB8272E2C40BD66470FE6F68846 \
12A11D899A0B7EB54907BBEDD6483EFCED1F15621D4673FF928C5AAB5F465257 \
123679EF17C39648C537E150108E0F6608732E9F5B240689EEB5402FA04CCB89 \
B7CA9649A361C526B41ED110402D9497715B03441118BC4953FCBEF395267570 \
BD43EC0EEF7B6167F14FED205EB812907D0C134DC49FA5B18F5A3A3A9BD0A71B \
2FFE445EE4FABEB4054CC922BA360E4589B681F01E2A43B5A0C0F0C39A5ADB94 \
B3BC2D20FF7F287FDF17F53B7CB5E3A1ABD46FC0819A3559C03C6B4106603066 \
359A4A09B468B6DFEF8A363C7B31D9E88ABB85914F4A27C30E9915C66AAC3576 \
9E481C87AEE4C3138CF40F288ED3C172FFC17D3D78F8D32C3C756C13CFBFB95F \
3ECCE6D8B54344D78998F58148C4B43B1A6201ABFF3D4FB4B76E3BBA104CFAA5 \
5D8DA4319A9E0606644B07DC204E9635502186C1EF9E43322EFD69F86D4DA1F6 \
A98BF0B800BA04BD9FBA5C5BE8EC49D48D9EECBADEE669EF69C9522C730110BB \
8339AF0E45185262C9183307C5EEA59DE5095CAC26E8428D4CA9E44DCF8FC7B4
Test: Encrypt
#
Comment: Counter crosses 32-bit boundary (0xfffffff0*64)
Key: r32 00
IV: r8 00
Rounds: 20
Seek64: 0x3FFFFFFC00
Plaintext: r1024 00
Ciphertext: \
35C5DDFAD2617B5A6BEDDCE1AF0C115DBD221D7E6760D5520A74EEA6EB1F9C70 \
3307014CCC1AF56B7B72266E087C4193B4230DE3023D86CFAE19A9B71591E2C0 \
8513AFB2CD7D939B5703E6883D460489FF00E3CE6EB5E1ECA5E31B2A895BDB85 \
6B3DE177489BDFDD97AB26141F94C771EBB94D187F2BF64172D3DC5F6FEB7123 \
4C0715DCF16BA0EDD15E8505FA3A97DA766C9348030A4BBA5734617027FC9E47 \
1125AA19C74296AC9CEA414955EBF0F6781E447978F287C1201A481A07BB0F92 \
D7865365B38F87A915FC08A8925DB1124A6477F01B88EB0687606A8C53155E6F \
128FB6FFD03F83BFF2C719A94438CEF64219E1DEE94AD2371985B45BB8544335 \
BCF1CBBA01AAD69D86140AD06553B30817AC31AD88CCE6DC45E493BCF7903955 \
B4B4EB4EFD1537B6BC772AD80CCBC2721A5359A143B999FFFB5F85F9C46A1938 \
73554FD4FD66962C08D661323BD13E367EE6E64B0F7843BE9B91BD285184350C \
F9FF7710208FEFFB7B7F75E46504BC4EB1DB05021EAF656528F5D04C60D71152 \
7C307A8EDA4DE7F391B9924BC18EF13E4ACEF8622C724A2CDA344214415E0613 \
9C057CA6FD78417F38D7C86B53D3484F085397A21594409ECA7C5D193802D33C \
FD1C44E7C93185B3D8101E4A0C184B13F221BF40097A9C0DBBD5932D90BD342F \
A6F56654A7507E902AD9416EC69D692E19372707F530B4998BE876CD772B3933 \
7035102B0F813905C4339FF8F0DC621CA2BC76F6A99163E0751BE6F7968D9C22 \
863A2161DE3126ABB102FCA8AD47A035EA71358F1C418D2BA8AF1AFCB8CEB20D \
FE012D699B31D5F22828772A13A076F789B4B582E9736CDFA48E317AB1FF5443 \
60745F9EFF11847EB86365DC0AB980231B0ACCD8DA22E33867A6C2314D56688E \
17F6EC119B6AD7FE0A639F07EE6F7C0B5B88E8D0C97EC901636A7B62202D40D9 \
176CF64365065EE642430787DB981190A249B7771759157BA8AA3A253C48338C \
9E01BE363682292BB181A75A51C2EEB3069951075DC92CFE58E695AB35364667 \
1336BE145FE90B8C75982D565762F7C48B505B19868F36A6C3633450CB9E165E \
98E5E54215C14F994E957FD3DD6A0309DFC3512CF12937F859A58725F16E9D4C \
3BFBA511BE065C2AE7452DA187096671731A9954137BA780B808F9E93C919871 \
582CB23E8F29E3B966B29D19E01A01DEBB32A8635CF49A1B178C3CD53CBF3EC5 \
12DD6174690DA38FDA7C125351035F99E61042C5DCFA0C312E002F0DC99962DC \
032CC123482C31711F94C941AF5AB1F4155784332ED5348FE79AEC5EAD4C06C3 \
F13C280D8CC49925E4A6A5922EC80E13A4CDFA840C70A1427A3CB699166991A5 \
ACE4CD09E294D1912D4AD205D06F95D9C2F2BFCF453E8753F128765B62215F4D \
92C74F2F626C6A640C0B1284D839EC81F1696281DAFC3E684593937023B58B1D
Test: Encrypt

File diff suppressed because it is too large Load Diff

337
TestVectors/chacha_tls.txt Normal file
View File

@ -0,0 +1,337 @@
AlgorithmType: SymmetricCipher
Name: ChaChaTLS
Source: http://tools.ietf.org/html/draft-agl-tls-chacha20poly1305
#
Comment: Section A.1, ChaCha20 Block Function, Test 1
Key: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
IV: 00 00 00 00 00 00 00 00 00 00 00 00
Plaintext: r64 00
Ciphertext: 76 b8 e0 ad a0 f1 3d 90 40 5d 6a e5 53 86 bd 28 \
bd d2 19 b8 a0 8d ed 1a a8 36 ef cc 8b 77 0d c7 \
da 41 59 7c 51 57 48 8d 77 24 e0 3f b8 d8 4a 37 \
6a 43 b8 f4 15 18 a1 1c c3 87 b6 69 b2 ee 65 86
Test: Encrypt
#
Comment: Section A.1, ChaCha20 Block Function, Test 2
Key: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
IV: 00 00 00 00 00 00 00 00 00 00 00 00
Plaintext: r64 00
Ciphertext: 9f 07 e7 be 55 51 38 7a 98 ba 97 7c 73 2d 08 0d \
cb 0f 29 a0 48 e3 65 69 12 c6 53 3e 32 ee 7a ed \
29 b7 21 76 9c e6 4e 43 d5 71 33 b0 74 d8 39 d5 \
31 ed 1f 28 51 0a fb 45 ac e1 0a 1f 4b 79 4d 6f
InitialBlock: 1
Test: Encrypt
#
Comment: Section A.1, ChaCha20 Block Function, Test 3
Key: 0000000000000000 0000000000000000 0000000000000000 0000000000000001
IV: 00 00 00 00 00 00 00 00 00 00 00 00
Plaintext: r64 00
Ciphertext: 3a eb 52 24 ec f8 49 92 9b 9d 82 8d b1 ce d4 dd \
83 20 25 e8 01 8b 81 60 b8 22 84 f3 c9 49 aa 5a \
8e ca 00 bb b4 a7 3b da d1 92 b5 c4 2f 73 f2 fd \
4e 27 36 44 c8 b3 61 25 a6 4a dd eb 00 6c 13 a0
InitialBlock: 1
Test: Encrypt
#
Comment: Section A.1, ChaCha20 Block Function, Test 4
Key: 00ff000000000000 0000000000000000 0000000000000000 0000000000000000
IV: 00 00 00 00 00 00 00 00 00 00 00 00
Plaintext: r64 00
Ciphertext: 72 d5 4d fb f1 2e c4 4b 36 26 92 df 94 13 7f 32 \
8f ea 8d a7 39 90 26 5e c1 bb be a1 ae 9a f0 ca \
13 b2 5a a2 6c b4 a6 48 cb 9b 9d 1b e6 5b 2c 09 \
24 a6 6c 54 d5 45 ec 1b 73 74 f4 87 2e 99 f0 96
InitialBlock: 2
Test: Encrypt
#
Comment: Section A.1, ChaCha20 Block Function, Test 5
Key: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
IV: 00 00 00 00 00 00 00 00 00 00 00 02
Plaintext: r64 00
Ciphertext: c2 c6 4d 37 8c d5 36 37 4a e2 04 b9 ef 93 3f cd \
1a 8b 22 88 b3 df a4 96 72 ab 76 5b 54 ee 27 c7 \
8a 97 0e 0e 95 5c 14 f3 a8 8e 74 1b 97 c2 86 f7 \
5f 8f c2 99 e8 14 83 62 fa 19 8a 39 53 1b ed 6d
Test: Encrypt
#
Comment: Section A.2, ChaCha20 Encryption, Test 1
Key: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
IV: 00 00 00 00 00 00 00 00 00 00 00 00
Plaintext: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Ciphertext: 76 b8 e0 ad a0 f1 3d 90 40 5d 6a e5 53 86 bd 28 \
bd d2 19 b8 a0 8d ed 1a a8 36 ef cc 8b 77 0d c7 \
da 41 59 7c 51 57 48 8d 77 24 e0 3f b8 d8 4a 37 \
6a 43 b8 f4 15 18 a1 1c c3 87 b6 69 b2 ee 65 86
Test: Encrypt
#
Comment: Section A.2, ChaCha20 Encryption, Test 2
Key: 0000000000000000 0000000000000000 0000000000000000 0000000000000001
IV: 00 00 00 00 00 00 00 00 00 00 00 02
Plaintext: 41 6e 79 20 73 75 62 6d 69 73 73 69 6f 6e 20 74 \
6f 20 74 68 65 20 49 45 54 46 20 69 6e 74 65 6e \
64 65 64 20 62 79 20 74 68 65 20 43 6f 6e 74 72 \
69 62 75 74 6f 72 20 66 6f 72 20 70 75 62 6c 69 \
63 61 74 69 6f 6e 20 61 73 20 61 6c 6c 20 6f 72 \
20 70 61 72 74 20 6f 66 20 61 6e 20 49 45 54 46 \
20 49 6e 74 65 72 6e 65 74 2d 44 72 61 66 74 20 \
6f 72 20 52 46 43 20 61 6e 64 20 61 6e 79 20 73 \
74 61 74 65 6d 65 6e 74 20 6d 61 64 65 20 77 69 \
74 68 69 6e 20 74 68 65 20 63 6f 6e 74 65 78 74 \
20 6f 66 20 61 6e 20 49 45 54 46 20 61 63 74 69 \
76 69 74 79 20 69 73 20 63 6f 6e 73 69 64 65 72 \
65 64 20 61 6e 20 22 49 45 54 46 20 43 6f 6e 74 \
72 69 62 75 74 69 6f 6e 22 2e 20 53 75 63 68 20 \
73 74 61 74 65 6d 65 6e 74 73 20 69 6e 63 6c 75 \
64 65 20 6f 72 61 6c 20 73 74 61 74 65 6d 65 6e \
74 73 20 69 6e 20 49 45 54 46 20 73 65 73 73 69 \
6f 6e 73 2c 20 61 73 20 77 65 6c 6c 20 61 73 20 \
77 72 69 74 74 65 6e 20 61 6e 64 20 65 6c 65 63 \
74 72 6f 6e 69 63 20 63 6f 6d 6d 75 6e 69 63 61 \
74 69 6f 6e 73 20 6d 61 64 65 20 61 74 20 61 6e \
79 20 74 69 6d 65 20 6f 72 20 70 6c 61 63 65 2c \
20 77 68 69 63 68 20 61 72 65 20 61 64 64 72 65 \
73 73 65 64 20 74 6f
Ciphertext: a3 fb f0 7d f3 fa 2f de 4f 37 6c a2 3e 82 73 70 \
41 60 5d 9f 4f 4f 57 bd 8c ff 2c 1d 4b 79 55 ec \
2a 97 94 8b d3 72 29 15 c8 f3 d3 37 f7 d3 70 05 \
0e 9e 96 d6 47 b7 c3 9f 56 e0 31 ca 5e b6 25 0d \
40 42 e0 27 85 ec ec fa 4b 4b b5 e8 ea d0 44 0e \
20 b6 e8 db 09 d8 81 a7 c6 13 2f 42 0e 52 79 50 \
42 bd fa 77 73 d8 a9 05 14 47 b3 29 1c e1 41 1c \
68 04 65 55 2a a6 c4 05 b7 76 4d 5e 87 be a8 5a \
d0 0f 84 49 ed 8f 72 d0 d6 62 ab 05 26 91 ca 66 \
42 4b c8 6d 2d f8 0e a4 1f 43 ab f9 37 d3 25 9d \
c4 b2 d0 df b4 8a 6c 91 39 dd d7 f7 69 66 e9 28 \
e6 35 55 3b a7 6c 5c 87 9d 7b 35 d4 9e b2 e6 2b \
08 71 cd ac 63 89 39 e2 5e 8a 1e 0e f9 d5 28 0f \
a8 ca 32 8b 35 1c 3c 76 59 89 cb cf 3d aa 8b 6c \
cc 3a af 9f 39 79 c9 2b 37 20 fc 88 dc 95 ed 84 \
a1 be 05 9c 64 99 b9 fd a2 36 e7 e8 18 b0 4b 0b \
c3 9c 1e 87 6b 19 3b fe 55 69 75 3f 88 12 8c c0 \
8a aa 9b 63 d1 a1 6f 80 ef 25 54 d7 18 9c 41 1f \
58 69 ca 52 c5 b8 3f a3 6f f2 16 b9 c1 d3 00 62 \
be bc fd 2d c5 bc e0 91 19 34 fd a7 9a 86 f6 e6 \
98 ce d7 59 c3 ff 9b 64 77 33 8f 3d a4 f9 cd 85 \
14 ea 99 82 cc af b3 41 b2 38 4d d9 02 f3 d1 ab \
7a c6 1d d2 9c 6f 21 ba 5b 86 2f 37 30 e3 7c fd \
c4 fd 80 6c 22 f2 21
InitialBlock: 1
Test: Encrypt
#
Comment: Section A.2, ChaCha20 Encryption, Test 3
Key: 1c 92 40 a5 eb 55 d3 8a f3 33 88 86 04 f6 b5 f0 \
47 39 17 c1 40 2b 80 09 9d ca 5c bc 20 70 75 c0
IV: 00 00 00 00 00 00 00 00 00 00 00 02
Plaintext: 27 54 77 61 73 20 62 72 69 6c 6c 69 67 2c 20 61 \
6e 64 20 74 68 65 20 73 6c 69 74 68 79 20 74 6f \
76 65 73 0a 44 69 64 20 67 79 72 65 20 61 6e 64 \
20 67 69 6d 62 6c 65 20 69 6e 20 74 68 65 20 77 \
61 62 65 3a 0a 41 6c 6c 20 6d 69 6d 73 79 20 77 \
65 72 65 20 74 68 65 20 62 6f 72 6f 67 6f 76 65 \
73 2c 0a 41 6e 64 20 74 68 65 20 6d 6f 6d 65 20 \
72 61 74 68 73 20 6f 75 74 67 72 61 62 65 2e
Ciphertext: 62 e6 34 7f 95 ed 87 a4 5f fa e7 42 6f 27 a1 df \
5f b6 91 10 04 4c 0d 73 11 8e ff a9 5b 01 e5 cf \
16 6d 3d f2 d7 21 ca f9 b2 1e 5f b1 4c 61 68 71 \
fd 84 c5 4f 9d 65 b2 83 19 6c 7f e4 f6 05 53 eb \
f3 9c 64 02 c4 22 34 e3 2a 35 6b 3e 76 43 12 a6 \
1a 55 32 05 57 16 ea d6 96 25 68 f8 7d 3f 3f 77 \
04 c6 a8 d1 bc d1 bf 4d 50 d6 15 4b 6d a7 31 b1 \
87 b5 8d fd 72 8a fa 36 75 7a 79 7a c1 88 d1
InitialBlock: 42
Test: Encrypt
#
Source: Modified Bernstein ref impl using chacha-ref.c ver 20080118
Comment: All 0 key, all 0 iv, 0 counter block, 1024 bytes
Key: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
IV: 00 00 00 00 00 00 00 00 00 00 00 00
Plaintext: r1024 00
Ciphertext: \
76B8E0ADA0F13D90405D6AE55386BD28BDD219B8A08DED1AA836EFCC8B770DC7 \
DA41597C5157488D7724E03FB8D84A376A43B8F41518A11CC387B669B2EE6586 \
9F07E7BE5551387A98BA977C732D080DCB0F29A048E3656912C6533E32EE7AED \
29B721769CE64E43D57133B074D839D531ED1F28510AFB45ACE10A1F4B794D6F \
2D09A0E663266CE1AE7ED1081968A0758E718E997BD362C6B0C34634A9A0B35D \
012737681F7B5D0F281E3AFDE458BC1E73D2D313C9CF94C05FF3716240A248F2 \
1320A058D7B3566BD520DAAA3ED2BF0AC5B8B120FB852773C3639734B45C91A4 \
2DD4CB83F8840D2EEDB158131062AC3F1F2CF8FF6DCD1856E86A1E6C3167167E \
E5A688742B47C5ADFB59D4DF76FD1DB1E51EE03B1CA9F82ACA173EDB8B729347 \
4EBE980F904D10C916442B4783A0E984860CB6C957B39C38ED8F51CFFAA68A4D \
E01025A39C504546B9DC1406A7EB28151E5150D7B204BAA719D4F091021217DB \
5CF1B5C84C4FA71A879610A1A695AC527C5B56774A6B8A21AAE88685868E094C \
F29EF4090AF7A90CC07E8817AA528763797D3C332B67CA4BC110642C2151EC47 \
EE84CB8C42D85F10E2A8CB18C3B7335F26E8C39A12B1BCC1707177B76138732E \
EDAAB74DA1410FC055EA068C99E9260ACBE337CF5D3E00E5B3230FFEDB0B9907 \
87D0C70E0BFE4198EA6758DD5A61FB5FEC2DF981F31BEFE153F81D17161784DB \
1C8822D53CD1EE7DB532364828BDF404B040A8DCC522F3D3D99AEC4B8057EDB8 \
500931A2C42D2F0C570847100B5754DAFC5FBDB894BBEF1A2DE1A07F8BA0C4B9 \
19301066EDBC056B7B481E7A0C46297BBB589D9DA5B675A6723E152E5E63A4CE \
034E9E83E58A013AF0E7352FB7908514E3B3D1040D0BB963B3954B636B5FD4BF \
6D0AADBAF8157D062ACB2418C176A475511B35C3F6218A5668EA5BC6F54B8782 \
F8B340F00AC1BEBA5E62CD632A7CE7809C725608ACA5EFBF7C41F237643F06C0 \
997207171DE867F9D697BF5EA6011ABCCE6C8CDB211394D2C02DD0FB60DB5A2C \
17AC3DC85878A90BED3809DBB96EAA5426FC8EAE0D2D65C42A479F088648BE2D \
C801D82A366FDDC0EF234263C0B6417D5F9DA41817B88D68E5E67195C5C1EE30 \
95E821F22524B20BE41CEB590412E41DC648843FA9BFEC7A3DCF61AB05415733 \
16D3FA8151629303FE9741562ED065DB4EBC0050EF558364AE81124A28F5C013 \
13232FBC496DFD8A2568657B686D7214382A1A00903017DDA969878442BA5AFF \
F6613F553CBB233CE46D9AEE93A7876CF5E9E82912B18CADF0B34327B2E0427E \
CF66B7CEB7C0918DC47BDFF12A062ADF07133009CE7A5E5C917E0168306109B7 \
CB49653A6D2CAEF005DE783A9A9BFE05381ED1348D94EC65886F9C0B619C52C5 \
533800B16C836172B95182DBC5EEC042B89E22F11A085B739A3611CD8D836018
Test: Encrypt
#
Comment: Random key, random iv, 0 counter block, 1024 bytes
Key: 2923BE84E16CD6AE 529049F1F1BBE9EB B3A6DB3C870C3E99 245E0D1C06B747DE
IV: B3 12 4D C8 43 BB 8B A6 1F 03 5A 7D
Plaintext: r1024 00
Ciphertext: \
C60E2330687F93D615A03CA1AD4FB4A64F2E0380A65F1277ADE647360F531A6D \
7D39AC85F9064B49529B796F8220D44B2573449C0CAB7AD7704BA9E1F370A52B \
45561EC56EB1AC85FEDCB4EE72957AA3445E6449373EA3CF82E2F5D2EA63889B \
7349441FFF021C19458CB815AC334DB6159180CE3E743E67896F74F4DA12B3A6 \
2FB45A2069151A1C0DAE260302905EF520F1838CBE8859400F0B4723F47518D4 \
7EA9A557D00788B5796EFC9C4BC0F14484C64C27348BAC9621A18EF805F771A9 \
BDE4B0288B0F6B06562A3D5B7A9655DA8A89C391F28B5C4B0FBE498B92DD8B30 \
2F5B43B58C93C7C5161CAE0413D36E868E2C81D7204AEA96649A67B6439D04C2 \
93A97046DEF4D31F49D32BAFBF814808A2E83EF0B212D7287D6AC6714A4A74F1 \
A2BC057BFBC3023986FAE970A306E214B9400416B876A8F689BE3B9E36FD7AEB \
49BA3E8DC1F24900AB41605921CFBBEE005CF5D577849183CB7F6742A908A7AE \
1D2077353A42B86659A3676131A497B652BFAED4088BCE32E9B42D7A3BCAFD46 \
63E252539D4853D2C482FED427F49CC9683C48B0158A7CA47490D5EAD0447527 \
9AD0B47788F65A9E09A38681AC6B65E22A901155B9C66307C8E6854D6F041E5B \
348A0D6F20A3C2DCB53E8444C280455EBBF9F34D34B18ABEAAC748093A310289 \
0234453454C662718C67379D3D0D1C68EB42009EDC67CF6B3E6DEEAAAD969F53 \
B0906F8B63351081F02F7BA65370A6E6A71E0EF82E38A910F9B875523376E66D \
EC1107FA4CC4F66175A8A32F1D0D7FF5FC5241165BEA75B4F73ADB6F5FC0B49A \
E287B04D67D351E87BA176EAC1E9C1BC0B67FC6C13C35F14BA08466002CC8BB6 \
A064BBB5A6F1B193AEE1F7458C6954C24DBED0969193D61953AE2B4909A738F7 \
B0CD0A330EB89323C22AF554A794CFE24B590C079077812B4DFD14CEF87536B8 \
844C810DAEDC25CC71338935FB92E260BDB46138666B90536D6CDC500A02EA7A \
AE3DEF84933BBA3960C1DA76C70AED10CE65C2F4EB91D82CAE36E33B75AE2D88 \
0F73CAD4D4C2C2A76523D10FCC60B15CF0793928B43FF7DDD1B3E8F34C2174EF \
2666BC91107223CF44D2F61AF44BBE918CCBF5998C315510B14B643996793CE0 \
EF642967134BC88CC793F735A21F5A01345CE10ABA43DECD4E6AD41A105A3B0E \
E38E217950A1AA6BEE330075B18331DC5A6DA5D731336F0F2543E1F2396DF25C \
BF92399907A7325352AB7CEF98D0582EEE3E8130515D214FA0BF37B31AF5D74D \
889ADB8D9DA438D1D5ADD7F70A3EDB089501189EA4F61BFFF406E7C961113827 \
986B0483E7A8E6F3F81DC31CB2C7C48B92160D3452D717A759D5DDF71671529F \
B187A0CCE7F5B9EAE3A851B13CAFFD19502D22CBB1073A4E68CB2EB5319D0E02 \
F1B418A34AA18F15DE0B9667D7925B4651F8E73D4191B2C868915344BDBD18E5
Test: Encrypt
#
Comment: All 0 key, all 0 iv, 0xfffffffe counter block, 256 bytes
Key: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
IV: 00 00 00 00 00 00 00 00 00 00 00 00
Plaintext: r256 00
Ciphertext: \
032CC123482C31711F94C941AF5AB1F4155784332ED5348FE79AEC5EAD4C06C3 \
F13C280D8CC49925E4A6A5922EC80E13A4CDFA840C70A1427A3CB699166991A5 \
ACE4CD09E294D1912D4AD205D06F95D9C2F2BFCF453E8753F128765B62215F4D \
92C74F2F626C6A640C0B1284D839EC81F1696281DAFC3E684593937023B58B1D \
76B8E0ADA0F13D90405D6AE55386BD28BDD219B8A08DED1AA836EFCC8B770DC7 \
DA41597C5157488D7724E03FB8D84A376A43B8F41518A11CC387B669B2EE6586 \
9F07E7BE5551387A98BA977C732D080DCB0F29A048E3656912C6533E32EE7AED \
29B721769CE64E43D57133B074D839D531ED1F28510AFB45ACE10A1F4B794D6F
InitialBlock: 0xfffffffe
Test: Encrypt
#
Comment: Random key, random iv, 0xfffffffe counter block, 256 bytes
Key: 26C680F84915A586 E2C569044F083FE2 D26B93B242B8152F 001B547F2D838EB5
IV: 41 F5 01 94 29 2E C7 32 BF 61 90 F6
Plaintext: r256 00
Ciphertext: \
0DF0FE21D4FF132A29220F340103B6726820A36CC41D705B062F3F1A3896938A \
38478CFE0B19C58D590D5B63226A0A6474D43EBC4179BBD1549022C2A8B8ED01 \
01BC1028D34C84AC523D1CE9A831A5B9F07F182DB65F1034FD5C3E13652C75F8 \
E586719766250643E494CE5FD72AD2C9875812D79949B2719B6FD05C78068CE9 \
38203067821A13D2EEA66AC3972D3F86F10584B03F3EC51E9E1767AAFDE7AAA1 \
37762D8972070B6F74DDE1F91B3E8A334B6A12B21BBDA74FC6D69B645A3F0ADF \
3251856773A27556B06F9DEB8E6B99680258F8EE70C062880794FAAB992DD7E4 \
8655FC852FF891DF70788C9AF948A86D33837F1C847CB70121929076904C261E
InitialBlock: 0xfffffffe
Test: Encrypt
#
Comment: All 0 key, all 0 iv, 0xfffffffe counter block, 1024 bytes
Key: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
IV: 00 00 00 00 00 00 00 00 00 00 00 00
Plaintext: r1024 00
Ciphertext: \
032CC123482C31711F94C941AF5AB1F4155784332ED5348FE79AEC5EAD4C06C3 \
F13C280D8CC49925E4A6A5922EC80E13A4CDFA840C70A1427A3CB699166991A5 \
ACE4CD09E294D1912D4AD205D06F95D9C2F2BFCF453E8753F128765B62215F4D \
92C74F2F626C6A640C0B1284D839EC81F1696281DAFC3E684593937023B58B1D \
76B8E0ADA0F13D90405D6AE55386BD28BDD219B8A08DED1AA836EFCC8B770DC7 \
DA41597C5157488D7724E03FB8D84A376A43B8F41518A11CC387B669B2EE6586 \
9F07E7BE5551387A98BA977C732D080DCB0F29A048E3656912C6533E32EE7AED \
29B721769CE64E43D57133B074D839D531ED1F28510AFB45ACE10A1F4B794D6F \
2D09A0E663266CE1AE7ED1081968A0758E718E997BD362C6B0C34634A9A0B35D \
012737681F7B5D0F281E3AFDE458BC1E73D2D313C9CF94C05FF3716240A248F2 \
1320A058D7B3566BD520DAAA3ED2BF0AC5B8B120FB852773C3639734B45C91A4 \
2DD4CB83F8840D2EEDB158131062AC3F1F2CF8FF6DCD1856E86A1E6C3167167E \
E5A688742B47C5ADFB59D4DF76FD1DB1E51EE03B1CA9F82ACA173EDB8B729347 \
4EBE980F904D10C916442B4783A0E984860CB6C957B39C38ED8F51CFFAA68A4D \
E01025A39C504546B9DC1406A7EB28151E5150D7B204BAA719D4F091021217DB \
5CF1B5C84C4FA71A879610A1A695AC527C5B56774A6B8A21AAE88685868E094C \
F29EF4090AF7A90CC07E8817AA528763797D3C332B67CA4BC110642C2151EC47 \
EE84CB8C42D85F10E2A8CB18C3B7335F26E8C39A12B1BCC1707177B76138732E \
EDAAB74DA1410FC055EA068C99E9260ACBE337CF5D3E00E5B3230FFEDB0B9907 \
87D0C70E0BFE4198EA6758DD5A61FB5FEC2DF981F31BEFE153F81D17161784DB \
1C8822D53CD1EE7DB532364828BDF404B040A8DCC522F3D3D99AEC4B8057EDB8 \
500931A2C42D2F0C570847100B5754DAFC5FBDB894BBEF1A2DE1A07F8BA0C4B9 \
19301066EDBC056B7B481E7A0C46297BBB589D9DA5B675A6723E152E5E63A4CE \
034E9E83E58A013AF0E7352FB7908514E3B3D1040D0BB963B3954B636B5FD4BF \
6D0AADBAF8157D062ACB2418C176A475511B35C3F6218A5668EA5BC6F54B8782 \
F8B340F00AC1BEBA5E62CD632A7CE7809C725608ACA5EFBF7C41F237643F06C0 \
997207171DE867F9D697BF5EA6011ABCCE6C8CDB211394D2C02DD0FB60DB5A2C \
17AC3DC85878A90BED3809DBB96EAA5426FC8EAE0D2D65C42A479F088648BE2D \
C801D82A366FDDC0EF234263C0B6417D5F9DA41817B88D68E5E67195C5C1EE30 \
95E821F22524B20BE41CEB590412E41DC648843FA9BFEC7A3DCF61AB05415733 \
16D3FA8151629303FE9741562ED065DB4EBC0050EF558364AE81124A28F5C013 \
13232FBC496DFD8A2568657B686D7214382A1A00903017DDA969878442BA5AFF
InitialBlock: 0xfffffffe
Test: Encrypt
#
Comment: Random key, random iv, 0xfffffffe counter block, 1024 bytes
Key: CF3F6640B3830E2A 8D7013F3E974FE8E 4133B1E81E1EA81B 80477EE48073B357
IV: 7C 80 D7 1C 23 77 6E 20 F7 99 74 12
Plaintext: r1024 00
Ciphertext: \
F0F4771DA359A1CC0BCC92101E8830A88258ED4134A8B15282CAD3E3B727D8C5 \
34F1FE108F8626A5BC4F4F0559AF9AD996F281A77E3195A9B7606FF0DB6351A8 \
5E6E00281DFB032AED7478FA2AB65DFFE781680AD4243EC933C6E2040B6FE22D \
1EC0DD83F385BF2152BAA00B21F001E64860360D0C25E7B28BCA888C88391EB8 \
89D76D3E4E6CC4BC4BFACCB758DE288A7B523CBDD65662D55D464CE393C6A016 \
590D09A2C2117084619C6AEE14EF3D54092B2FBD40B86AFC6614237FB4B01AD1 \
590F4BB4715114B373A5E170F9FF18F87D5D033DEDB61B72946C755673D3CFDE \
A960F52F7DAE25C942ECE2CEB0C33B258A5CAEE89BB7FF6711B42FE12C8D9AB1 \
78826EECE976C58D05B6EB9F4B770A9715EBF96AE79515972375202782D343EE \
564B36037F49432197C1E977462BE17620B786E1DB2EF3CC759E3E3BD9B29373 \
367E66EEE529515BAAC37DC2B26BAA3A5587EA35F064CFEDBE5705779A72A53A \
2ED02D6F459768521BB1F0EB0D4A4EDCD9B0BB3E1148BDBF6A0918BFEF352FD2 \
149F95DE307CC388FF3ED0C72118D1AE27A112B58B2819A0976CF949DAA99AD0 \
1237B4BB5963E274F801FE25E62B7DC2D4B17BF85816DA5078EAE4FE676CBCAD \
C772811C93A4F94C5198F2C542CC71CAF3E3480678B37AF2FA42061F870A3AFA \
5146DFE5F4969F223D3909B20CB53344EF72B7C861ADA20D4EBC1AE3DB5431C1 \
300DC1CC32C5A2544E8707DC040CE2559293A54D070A48B18F18CB1E6F715D8C \
FE437BD03F55657CBB3DC95284C6830C7D7FB48249AB9EA08174FF8A04D89206 \
3EDDBE22D402C249718899A9E06169D49C6B723283F01EBF2707972CCA039F4A \
D1D92449E3CA011722E03119FEED32F63F22303C73C75B413FEC2EDA0C069236 \
880EAA26E5226233B216D059D664AF7D5737F0F12A1D34DA3CEB83826666F4B8 \
D7F60D917E033FBFEF756726DCA873E63ABD2A470F8CABBE21C6DDEEE668BCA0 \
C833AC0DEEE73155C1723BA2E5EC70985F2F239822FBE628EFCC68938630D9FB \
E88BF757A28BD8925DAD67666091BE7602D36DE65E248964469C44DBFBA76E13 \
3978E9DD5088BB4C314AEB56D9D553229110C7C939A129522C5F6B01F96D67ED \
97629A5E9DC4923745739A02151F53C8CE2CE48B33A7E359A574D9C8A48542E1 \
EA20DDFA7E9BA5B01DDC256786026160DA6A113E553F30A4F37A7ED2D3ACA6D4 \
3F90516417477C3778A80AB875E90F8D81977F51973184242A4BD2EC002216CA \
5631F1740F558E1CDC42A252A15CB954AB2DBB1CAC199313EF657FA2D5F8405A \
C60AC8BFCD0645CDCD0547D4433A6093C9A24F17902F5B37F2E60390C9EF30A9 \
853407FFF342D4787C56B665AFF0F94F1B6A0A213FB7E73F7EC1990C8C7CB1D7 \
7E0C233586EB00D9B10020986A31CCECFC26B435FC92E8707B7AC3CB8275FDA4
InitialBlock: 0xfffffffe
Test: Encrypt

471
TestVectors/cham.txt Normal file
View File

@ -0,0 +1,471 @@
AlgorithmType: SymmetricCipher
Name: CHAM-64/ECB
#
Source: CHAM paper, Appendix A, test vector 1
Comment: CHAM-64/ECB, 128-bit key
Key: 0100 0302 0504 0706 0908 0b0a 0d0c 0f0e
Plaintext: 1100 3322 5544 7766
Ciphertext: 453c 63bc dcfa bf4e
Test: Encrypt
#
Source: CHAM reference implementation
Comment: CHAM-64/ECB, 128-bit key
Key: 0277 0a9e a270 1fed 460c c269 9163 e519
Plaintext: 704a 4e91 eb9b 688d
Ciphertext: ceda d4dc 00e3 800d
Test: Encrypt
#
Source: CHAM reference implementation
Comment: CHAM-64/ECB, 128-bit key
Key: 24cd a3e2 c167 92f3 40b6 0017 cabc 07c4
Plaintext: 115a 31e5 ee65 87f7
Ciphertext: e1af b96f 3079 4233
Test: Encrypt
#
Source: CHAM reference implementation
Comment: CHAM-64/ECB, 128-bit key
Key: 0914 eef6 827c 21b9 c697 05ce b28b 7dd5
Plaintext: e722 2e2b 0f2c ee49
Ciphertext: 280d 763b 931b da81
Test: Encrypt
#
Source: CHAM reference implementation
Comment: CHAM-64/ECB, 128-bit key
Key: 2fa2 fb02 1cd5 9124 ee27 1ec9 7307 6a13
Plaintext: 9fc0 8c64 f9f9 8163
Ciphertext: 0277 8604 1b15 8cb9
Test: Encrypt
#
Source: CHAM reference implementation
Comment: CHAM-64/ECB, 128-bit key
Key: 6035 af8d 6d97 6a47 1bc9 cb88 1a4a f2aa
Plaintext: 657b 5980 aad8 468b
Ciphertext: 5684 2bf7 606d 67f8
Test: Encrypt
#
Source: CHAM reference implementation
Comment: CHAM-64/ECB, 128-bit key
Key: be3a cf23 eda6 9014 023e 098b 37c3 9b9e
Plaintext: ff83 911e 2f35 84a5
Ciphertext: 9263 2bf9 9819 783a
Test: Encrypt
#
Source: CHAM reference implementation
Comment: CHAM-64/ECB, 128-bit key
Key: ffde 8a15 21c5 fb5e b6b1 1ec9 05aa c629
Plaintext: 7802 c7a5 d52f 1868
Ciphertext: f810 fad0 80f0 19bd
Test: Encrypt
#
Source: CHAM reference implementation
Comment: CHAM-64/ECB, 128-bit key
Key: fc25 b83f 5058 9cb6 fe7a 5d6c 1635 5cfd
Plaintext: 1ab2 1791 a5d3 05aa
Ciphertext: e733 fd94 c357 d36c
Test: Encrypt
#
Source: CHAM reference implementation
Comment: CHAM-64/ECB, 128-bit key
Key: fae3 5e23 e357 3e33 4468 c725 80e5 4a6e
Plaintext: 5dc5 c55f 6b8d 31e2
Ciphertext: 5bc2 2475 f93f 6cc8
Test: Encrypt
AlgorithmType: SymmetricCipher
Name: CHAM-128/ECB
#
Source: CHAM paper, Appendix A, test vector 2
Comment: CHAM-128/ECB, 128-bit key
Key: 03020100 07060504 0b0a0908 0f0e0d0c
Plaintext: 33221100 77665544 bbaa9988 ffeeddcc
Ciphertext: c3746034 b55700c5 8d64ec32 489332f7
Test: Encrypt
#
Source: CHAM reference implementation
Comment: CHAM-128/ECB, 128-bit key
Key: a37beb01 15c49898 906f6f1c 73f68cf3
Plaintext: 463e4b34 efe3faa8 d8b74450 967f34d1
Ciphertext: 30269e99 4d70c5de 7b0bc631 a96a1458
Test: Encrypt
#
Source: CHAM reference implementation
Comment: CHAM-128/ECB, 128-bit key
Key: ad97ae34 49a65961 46872c23 08a85a00
Plaintext: 7c241f66 85111245 83d76a6f 8498946b
Ciphertext: 633b6cb9 00b390d8 d1bb84cb d84b9ccf
Test: Encrypt
#
Source: CHAM reference implementation
Comment: CHAM-128/ECB, 128-bit key
Key: 012ddb51 d216a550 3b1632f3 69930aac
Plaintext: 440a7ce0 23b8499f 991482fd e6069cbe
Ciphertext: b2b21944 81c5becf 091d3c08 ee6d1749
Test: Encrypt
#
Source: CHAM reference implementation
Comment: CHAM-128/ECB, 128-bit key
Key: dfd8192b cab7764c 12632c23 95c96b55
Plaintext: a72c2040 1e652249 6ceb83be d90a2816
Ciphertext: 0416aae7 302a5219 cd20a3b8 6d879c22
Test: Encrypt
#
Source: CHAM reference implementation
Comment: CHAM-128/ECB, 128-bit key
Key: c3fe465e dff5a38c 308bcf68 a6d45ba7
Plaintext: 91167a4b b9641eb2 15195841 f3301521
Ciphertext: 36d1dd06 e42c583d 9aea8e58 08ee2f3b
Test: Encrypt
#
Source: CHAM reference implementation
Comment: CHAM-128/ECB, 128-bit key
Key: e7365921 729a2e4b 5e9e2d42 6b53c079
Plaintext: 9fd5fb98 d2de3459 42cf3edb 2104e849
Ciphertext: 60f3dd59 406e579e e45a2191 526c5693
Test: Encrypt
#
Source: CHAM reference implementation
Comment: CHAM-128/ECB, 128-bit key
Key: b880a315 e410aa2d 9d8686e4 ac033a6e
Plaintext: 05251c25 354ded83 67d50c4c 4a73b66f
Ciphertext: e3f879f5 8b41baf8 8b458da7 04343a03
Test: Encrypt
#
Source: CHAM reference implementation
Comment: CHAM-128/ECB, 128-bit key
Key: f0cb7d27 58d7ac44 937b882d 526fb9f8
Plaintext: 088ede84 315ef415 2e2e22b1 8b45e765
Ciphertext: 4ff2532c 66a12b2e 869f476e aab2d53f
Test: Encrypt
#
Source: CHAM reference implementation
Comment: CHAM-128/ECB, 128-bit key
Key: 28b841b2 9a5e552c e02170c8 fee72a87
Plaintext: 0fc61c4c fa1db413 9d007659 39df2ba9
Ciphertext: 6fd504e7 091aca2e 32c88718 3e40b4a4
Test: Encrypt
#
#
#
Source: CHAM paper, Appendix A, test vector 3
Comment: CHAM-128/ECB, 256-bit key
Key: 03020100 07060504 0b0a0908 0f0e0d0c f3f2f1f0 f7f6f5f4 fbfaf9f8 fffefdfc
Plaintext: 33221100 77665544 bbaa9988 ffeeddcc
Ciphertext: a899c8a0 c929d55c ab670d38 0c4f7ac8
Test: Encrypt
#
Source: CHAM reference implementation
Comment: CHAM-128/ECB, 256-bit key
Key: 4031c291 53a38799 8e0a6bad 6098a6c4 e4a852f8 7daf676e 873c3524 e1527db8
Plaintext: aac76bc0 ec99e00e 9648a939 1a37c8db
Ciphertext: c993c682 1545b60c 456af36c b97628e7
Test: Encrypt
#
Source: CHAM reference implementation
Comment: CHAM-128/ECB, 256-bit key
Key: 0c7be271 0ee365ff 061b8e43 5dbc63e3 52a08866 634223c9 8f4bcc4f a1223aee
Plaintext: 49eec4dd eb938769 a359a6bf f69353a9
Ciphertext: 6252cf6f 6524f0ed 0b3a272a 33827bb4
Test: Encrypt
#
Source: CHAM reference implementation
Comment: CHAM-128/ECB, 256-bit key
Key: 90c69c18 8fcac90f 7c061078 036f3279 5676641c 40358d9f d74867ca 5debd8fa
Plaintext: c27e5d18 985bd57e 25b7164e 5acb6ceb
Ciphertext: c7c15e12 2287fd3d 45875c14 629a042c
Test: Encrypt
#
Source: CHAM reference implementation
Comment: CHAM-128/ECB, 256-bit key
Key: f7bae93e 170bbccd 42a1d993 a6247a9c ae609194 075045fc 95b22ad9 59e16c9c
Plaintext: 87cc88e7 9f159afe b2e8967b ff1ddd8b
Ciphertext: 0887e541 4b68e67f a46d19ff 948290b6
Test: Encrypt
#
Source: CHAM reference implementation
Comment: CHAM-128/ECB, 256-bit key
Key: 15747f3e 359c8462 151d0e6d f06abade 06f246e1 c817332b 1fa9102a 52263db4
Plaintext: 5c11eab6 3fa257df 7da90d0e 1bf46991
Ciphertext: 3cabb22e 79c7ad8e d502abf8 74e7d3bf
Test: Encrypt
#
Source: CHAM reference implementation
Comment: CHAM-128/ECB, 256-bit key
Key: 4c70d578 34042fbd 8f4b7c40 89ac864e 1dee8bac 4093f375 308aa073 655098f1
Plaintext: 68c7097e ab6c6043 87d2bc67 41dece87
Ciphertext: 362a9742 dd8238a8 d916409a 4a3c11a1
Test: Encrypt
#
Source: CHAM reference implementation
Comment: CHAM-128/ECB, 256-bit key
Key: 073359a0 5e54c5f8 882ef21f 01be08d5 7d5c5b87 533059a5 204e2bcd 5652dfc5
Plaintext: ef94e8fb 7bf2aa7c ac73ef0a 294ad1f8
Ciphertext: 5914594d db44ba25 ac0bfc05 1b92a9fe
Test: Encrypt
#
Source: CHAM reference implementation
Comment: CHAM-128/ECB, 256-bit key
Key: dc359e46 f5516d84 89885aee 191494fe 25350de0 69275496 1531e563 59f9e0ee
Plaintext: d1c5fbd0 7d1e85fc 7922d741 6a5a44dc
Ciphertext: bbe95a67 06b38ff2 898dfda8 41fe29c7
Test: Encrypt
#
Source: CHAM reference implementation
Comment: CHAM-128/ECB, 256-bit key
Key: faf3682d cf6e656c 53bd8c06 de0f7f71 678c5a2d 34624762 d88daf37 21d5ad6c
Plaintext: 55b32441 7a787fbc 41b91ab2 9a5bf734
Ciphertext: 2a7dab0b 6769e989 61578998 7e4be9a7
Test: Encrypt
AlgorithmType: SymmetricCipher
Name: CHAM-64/CTR
#
Source: Crypto++ 7.0 generated
Comment: CHAM-64/CTR, 128-bit key, 12x blocks
Key: e6b1 552b 7d53 c0d9 8c7b 18a1 b2ef 03bc
IV: cc03 c902 5780 5f72
Plaintext: 83d2 797e 69c6 ecd4 8fce 53fa c686 6389 d3dd e2b7 1f4d dee0 5cbe b3b2 2064 f8e8 226a 5f52 08ea b683 bfc9 ce0f d268 036f 94f3 60d4 8426 8d2e f8f6 c70c f4a1 95d8 5a4a e07f 1bc8 c339 4420 ee04 1460 9995 727f 284f cad1 ad41 9c48 9c8d 8bf4 9ef3
Ciphertext: 0fee 544d 6d11 f5c6 44b4 42b6 9513 1617 ca6d 4036 7ffc 5ee0 6312 5896 3012 6b3e 67c3 031a 0c57 1dce 4be8 7888 cbf5 b12e 4b9c 503e 1cfb 76c1 31ba 5b4e 3673 5e1a bd0f d733 4736 1668 f040 f74f a9c7 bdbc 1fda 5e1a bdec 952b 3f64 9750 c7e8 f11c
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: CHAM-64/CTR, 128-bit key, 12x blocks
Key: 780e 51d6 3741 ca88 8419 7f61 8062 2904
IV: a7e8 db3a 9264 ec0a
Plaintext: e7ef e7b0 66df b955 580f 6575 881a 06a2 98c2 9f13 40a7 0121 df40 567b d4ae ba67 0446 944e 1cf8 1efd ce4b a7fd 139e 35fd ffa3 ed21 52db 5bb1 0332 4843 6903 5c28 a1c4 70db f7f2 81b0 6d7e e754 448c a220 3a38 6f30 d6df b5dd 9db4 9426 1c15 7aa4
Ciphertext: 0b95 d934 ea2e 9a67 d37b 8f0f 2d91 7c3f e1bc f6d9 7ef8 a7fd 1ee8 34c3 2cec 7a6e 502a 840e d48e 1f9d 4795 c57c 4ec2 e762 50ce 8e25 e5c5 1b5a 00d7 a203 f453 63b5 d5a1 1c81 4a7a 21f9 0e1e 82ef e41e 4bb7 5b7a a273 164a d8bb 6a9c 76e7 0206 6131
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: CHAM-64/CTR, 128-bit key, 12x blocks
Key: def3 7285 6fb2 9ca8 37a2 15d2 4190 c3dd
IV: 2d70 2927 e2e5 6b90
Plaintext: fa0c 3a8c c423 cf46 d8ea 9fb2 2b06 bf16 76ce 84c1 96d9 0795 c09b ecd0 085b 584b 3885 1684 8346 d510 7ad8 d7a9 519c 3b3a d681 3ca3 4e98 61c4 8ff1 142e 2064 33d3 5e61 dd63 206b c4e6 9008 1db5 0abc 249e 4e96 77a4 2764 bce7 dc93 e291 a058 d54e
Ciphertext: dd2f 6c48 f2f0 3915 1be6 9c0e c0f9 510d 1640 de08 152a be0f 4a07 abf1 01ee 5bda ffa3 a59e e22e 1953 8c3e 6cc2 b9ea dfe3 d721 9a32 c4e6 49c0 cfb0 7f1e ad69 9c99 03be f145 c958 d917 d0ea 2503 ec08 ab39 4390 1afa 2e5c 3c13 557c 243b ca75 a703
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: CHAM-64/CTR, 128-bit key, 12x blocks
Key: 646f b394 917e 6f3e 03f3 f14a 4bea 460d
IV: f92d 20d9 bc67 75f6
Plaintext: 83db 8ccc cc49 6c58 55fc 79fb d0d0 52b5 5b7a 9378 9d40 e281 777c 0ecc 3c82 99ca f513 ed1a 7740 d0ea 535a 76b6 2f43 0dfe a5dc 937f 878d 95ef f07f 7900 fff7 7c00 e24f 9477 e173 486c 26ef a74b 228e 0f28 2dea feb0 069b e877 ea11 017d b47d 5a79
Ciphertext: a28b d8d4 e2b6 f076 716d 5769 46de 6fad d74a 3438 dd55 c72b 282a c910 0808 c0dc a421 9991 6f45 a3d0 8d85 864f dfc7 8b4c 69e0 ebbc af39 1a7b d620 5a85 ce9b dee6 4cc1 b88a 742e 5907 ad01 fac0 31f7 01bc 0213 3c40 b2cb ab50 00b5 6ae3 b7c1 3fce
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: CHAM-64/CTR, 128-bit key, 12x blocks
Key: 9698 a9eb 7003 b35e 47c6 0c0d cd55 fd4d
IV: 96c3 a41c 421c 955d
Plaintext: e7a4 ccd0 0c2d 1f30 e329 1182 dc55 7f92 5e1e 4df1 a77b 4626 09ba 7541 d1f7 6b64 48fd 4cc9 4539 736e 4066 a6db aa62 9617 d3b5 2d14 e414 3981 a911 85c6 93f7 cba4 2976 3ca8 d3be f5bb 6437 ece5 68b9 294f 2ea0 dd4c 3054 b6d0 947a 75d8 9d11 cc78
Ciphertext: 28c8 d228 36f6 0e5a d9cd 7a8a 8375 3bd6 66e8 beb0 5d64 7d9a d309 d89e eaee b4fb 41e5 d199 c70c 7e33 271e a1ba 8160 e4f5 b720 33ef 96b4 0467 e52d 791a 1983 c2c5 88c3 50ef 9b1f a465 75c8 92c5 9f1f 4715 8c7e d6c9 ee9e d073 8c00 cc9c ce0e 77f5
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: CHAM-64/CTR, 128-bit key, 12x blocks
Key: 86fa 2b6b d8fc 8486 0c11 f1c2 5b75 ed8a
IV: b318 e5c2 5583 338e
Plaintext: 7860 ba79 52cf e4a4 cc26 4aa5 71d9 7b2e 9273 9a86 38ba 2bec 3ced ddf8 01ed edd9 2786 6e13 e1a6 0a89 92ae 2a09 eb91 c0c4 0006 0a38 3b7a 3ab5 ec0c 9f1a 33f3 e10a 2b75 6f52 8393 31fd 89fb 9697 cd7d d6d3 c33b 988d 9889 dc01 53cd 2f20 be29 811b
Ciphertext: d7a1 f7aa 05cd ce1e 2fcb af67 20eb 1c10 0cb1 45ad 7873 5e7d 0798 4efe fa17 cf54 cc7d 7df1 ec9b 992a f396 50ca 444e 7c98 0608 53a3 6114 d3b0 ec1b c375 6eef 246f e1c4 905d fedd 4df8 c3b1 f177 b948 822d 2243 7311 0d4f 3e8d 95ae 32e3 4457 1edd
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: CHAM-64/CTR, 128-bit key, 12x blocks
Key: 5ea8 a98f 6f23 329d 6a36 d40e af1d 2d07
IV: ff5f 72e2 b9f0 5565
Plaintext: c4c3 1942 dcc1 40a7 00a4 41fc 4be9 d17a 1e6a 3a9f 7bb7 7d3b 7a94 a9c0 5dd7 4608 c98d da75 d556 8642 fc98 a0b7 9482 8849 7c0b 80f1 bea8 fdd4 fc73 aa52 3edb e09d 4414 4952 6831 fa9a 5b48 45ac 0e36 0ce3 a403 3089 b7f8 99c0 394e c429 c945 98b4
Ciphertext: f93b ed37 941f ece2 1a89 d7dd a11e 8c51 e239 e5fe 70f9 15c8 ac4f c647 60a4 144c 5bd7 4598 822b f4de 3c5c 089f 503d 06c5 bcdf 258a bfa6 c53b eb6b 373c e03b 7438 e626 138a fc4e 3962 352f 33be 7e05 8357 1268 d621 4bc8 5926 737a 056a 8417 5504
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: CHAM-64/CTR, 128-bit key, 12x blocks
Key: e764 1ae3 84bc ca20 88ab 0eb1 8cc5 cc7f
IV: e1ee 11cb b0de 4400
Plaintext: 0a44 7fdb 4dba 1167 c521 1521 5637 d376 3bae cab2 ac86 b087 1cf1 44df 4a43 e77f fd74 7687 ee78 d418 60c4 20ef 9ee9 0fda f972 a4c8 3012 56db e159 75cb fc8f 5d16 8f37 749e bed7 b321 5357 998c d35c c3d3 00f3 7038 2aae 386e bcf8 bc0d e2bc d331
Ciphertext: 9597 b5be 01f8 6981 098a 3f39 9b4f cfc3 27c4 4b89 778f f2f5 2327 c822 b0fd c49d 84ca 1bec ec16 03f8 5031 39ee 9276 41b0 f086 f2fd cbd8 0d09 a6d7 bec3 5112 6f2b 153b 0ab9 92da 8b4f ad6a 3555 7a59 9b65 311f 5277 b50d 4280 7c04 f663 eea5 9d17
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: CHAM-64/CTR, 128-bit key, 12x blocks
Key: ba7d 1f51 ccd2 1431 e906 310f 981b 66c5
IV: e41c 02a2 0889 1101
Plaintext: 28d4 c1d4 ccaf aab1 da91 785a 4b78 a976 6468 b2b9 7422 94c1 aed5 793a 85f3 559a 3720 9197 319b 6756 c8bf 782c c0e4 5297 421e b1d3 8837 6a44 32fb dadd 3a0c cccc 2007 d464 17ed 1743 32c4 771b 27c5 afa5 804b feb9 5e58 cb91 137b b931 bc5d ecc7
Ciphertext: f22c d112 f7f8 ef29 c47c 45ad 10a4 d781 1138 110a f9ef e229 10aa 1067 2bdd b937 c904 79df 776b 49c3 e52d 6e6a 1cdd 8e1e afb9 f3d5 7278 2083 777e 931e 028a 27c0 fa73 4bec 8114 0dad 4e8c 2490 223c e557 67bc 07d1 f135 9677 da11 05e7 e09c 4473
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: CHAM-64/CTR, 128-bit key, 12x blocks
Key: 9b58 14a8 d670 c7ce efbb 5e8b d970 9858
IV: f410 81e9 16d4 704d
Plaintext: 032a 730c 0ba7 1b1e 295e aa2b e229 1bcb ac2d 647b dde3 b1d6 e928 8416 68dd a420 0721 4f46 ab83 0841 68cf 27b8 170f 840b 999d b682 e602 9ce8 b325 caeb 5147 8864 cf38 8a04 56ae 5bf7 f9ce fc82 eb4d 0c03 623c 9870 c5c1 c633 e2ef 4c74 b38f fb67
Ciphertext: 9a4e e2d4 e282 8196 ef45 9e91 60c7 9c1c 2bc3 b165 090b 9fe4 b128 dff1 404f aaca ad6f af95 c545 b574 65d2 6170 9e49 315c 494e 1f62 7090 993a 84c2 be20 f269 450c 9c2f d490 97db 6b72 0bd6 2eb8 271a 8588 f59d 6b7b aa20 25b1 ad39 8997 a7b4 9639
Test: Encrypt
AlgorithmType: SymmetricCipher
Name: CHAM-128/CTR
#
Source: Crypto++ 7.0 generated
Comment: CHAM-128/CTR, 128-bit key, 12x blocks
Key: 23dec910 8674de3b 42d4febc ebac3ce1
IV: 434d3806 61578dab 9b8aaa69 2c242a3f
Plaintext: c0933ebb 71c2d940 5f791cda 6c89ff00 9a85507e d696c654 184c5df1 55836873 026b8e7b 5a2497ab 0f67805f 00700588 53840541 b59e0ea6 d16c5798 7458b715 6dc1c5f1 38d2f6d2 02652957 edd26b64 c711733c b772c1cb dfe376c0 4e37d724 4699ee4f f66152b3 76eb3fd3 8f094e03 fb47286b c775073a 9907361c 8c517c10 959a867c 20b11002 34485076 5bf8bb83 9fdd016e b7221cc4 32533042 612a39fa edebeecd 20b14ec1 6c0b9075 03496693 010c146d ea7c7f80 92b1d4bd 4d209707
Ciphertext: 75a7c6a7 6b72d94a b083627b 0d5cb98f fee0e34c adf15e52 6348f350 4e1ab4a2 a9de3226 2f4beb61 01f544ab 3ad609cf f65c1ffc 24d7f132 0d43aeb2 7ff715cf 26c78de4 6d6c3c9c dccab249 cec4858e b1e27ce1 2b4f455f 5c5bf433 c4010664 b0b9f2d0 b3d765c3 fc9b914d f463ddfa 8941880c c728841c e18cb64f ac9a5018 2ac7920a ddc0b973 98fa8428 8a4d19aa 7eebcb4a 0470c8a0 ef10edeb 68191a86 c39c48be 929c00ba fdb2d807 89d6beb7 9037bcd1 0eead8c4 5df80281 d4275481
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: CHAM-128/CTR, 128-bit key, 12x blocks
Key: fc461d9f b81c669a 2dcd9b60 dd0dc803
IV: 3a03a72a dd47db7e 371ffb90 1ecd7ef4
Plaintext: 1df4d2e8 e9b59fbd c710ea90 7ea88dfa 1a05307e 8d883c92 f5eff3cf d8eb3dac b4e1fffd be4bb41d 2ad2851a 21f80ea6 e52a3c36 68eb5ba2 6be06596 ef25d7a1 f6b422f1 ce996156 2623e690 f54b2163 ee5b49f1 cf5afebd 88bea2d2 619d8861 3ed4c062 bb1dadf4 28ca3301 735cecd9 ea77113b 31ac1736 8ac8dd46 b1d6d677 312e5318 e84f0036 83133f06 82114d09 448bedcc b134c209 2f5ec84b 6019563e 524f00ed 22a33d84 2976d662 9a46cdec 1911acec d029089e 0c552e22 6ce69283
Ciphertext: 34d5eb84 1a736580 030345f0 dbcb1347 05f02931 954c6fdc 0678019e 2dbad83d 4811b8ab 29595196 9e533b24 278ed0f1 df7d7578 efe356b1 e813abef 148c2560 38fcbee3 6cbcef7f fc0df407 867e7031 9e0b1dda f5501321 a67c22ed c43ecd72 6f6e6c2c 604c3516 bd1e726a 442eb1bf ffaa884b 2742b064 56f7b3b2 36cf6fbf 777b3ce3 f253c05c c882ce7d f4be285f de75d1f6 e0c336da 4bf90ce9 0f2ac558 fc0308c0 3c82176e 2a34b65b bea97726 05ad2e86 58e47259 e1e45834 6947fd40
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: CHAM-128/CTR, 128-bit key, 12x blocks
Key: 82e9a10d 1275c400 ef4b1b7a 09c9a74f
IV: c8af984c b4c6c76f 17a2bdce 755d304e
Plaintext: 0b68525d b1bca784 3ef3e525 53c26903 48ddd25b e57587d2 7eaa1ae3 961a006d f3a86cad 0efae3b1 06986845 820b3ee6 4a2bfd22 ab0785ad 923a5c17 551dcc0d 95ca064b d6735935 26a46210 3e3ae41e aeb4b483 d096b043 4d5a7641 5d1bad27 2d211a24 6b862534 aaab034e c4da88c7 5fca22f1 d535c1a5 73f58b5c 083b6720 a50bfa9d 900fdf55 43bb9e36 a0134bd2 42257406 11c4ec3d 88e75774 4a418cc4 1fca2198 814ed5fb cddcc438 0e9438d0 cd421f15 7295de50 72dfc2da e8f5ff6d
Ciphertext: 376d284c 6c3c8b99 67a2d66f 61a9f51c db6f06e2 a4cbda9f 6f48e1fa 695df3cb 7c0563da b6810ba0 291cc0fc 48d337da cbaf9363 9bce9399 7635dc4c 3ad49fd5 f2388208 da515f23 af4177b9 2be7106d d7cf8b5a bd5bbaef b2c8b5da 6610dbe4 65ef3e7b dda5425b c1fd36eb 98f9924e a1fddd39 c9390a3b c8886349 58a66f72 71162967 e9eac4d0 1f0212a2 32ff7b07 643839f2 dd87e6f8 410b4bbe 2afc5d5d 93f040e0 f4f74ad8 c498a1e1 6567520a 8ee926ed da431740 a4c7e2e6 e8f6408a
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: CHAM-128/CTR, 128-bit key, 12x blocks
Key: f6c062fc 108d2c2f d5a50b83 c7c7982f
IV: d0c429d8 fcd33338 6c702644 fcfe6f6d
Plaintext: 4bdd5fc1 c43f4c91 ea72162b f57a4ce1 58a599d6 c1dce0b8 6d2d853a 870e62d6 e173e45a a6f6b83b aeff7994 271b14ba 8e7b9d3c 792a3cf5 c86cafab d85e126d 7b5eb348 f6e56c92 f56c87bf 8daf9b83 2239af83 55693192 6f7571b1 e9788d2f e8ed3a51 3ec51868 4651cef3 406c460b 1c53a133 32a34441 4429fb6f 0955ae2c 59905104 5d5c32b8 381d0383 22065578 34e9e5d4 7450f0ba 30ae8b2c 8543699c 3e470912 dcd2c277 e1360e61 ba6b54e9 3d1a04e0 223f1e97 bcce2ca9 fd519ead
Ciphertext: f7d445cd 34467e43 64ca1cc6 d0f24671 91653b80 af0088cc eaaf9813 dc78fd96 6e66484f 02e2e364 ecca13a6 bda61d73 41ada198 97ac9657 fb928e06 95938089 2ce965e7 2c61620c 07b5753e dbd7fce6 81eee3fa f9b06db3 62a8b4f5 1ef865ac 8f7a7459 f74511a6 31a8e6b9 b8fb7628 5d1a1877 40a49e26 4fd3431c e9bbc8ed 2eee705a 8754b6ee 1ca2bec7 89956c0b ee263189 27edfa9e 4b833f84 156e849c 667516ec 079ec133 a95e6796 24f038b0 99b85ae9 c62790e9 9aef8174 ea4279bc
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: CHAM-128/CTR, 128-bit key, 12x blocks
Key: 14fb7484 293745d9 0f08dfdd 7d3f3859
IV: 3e75b2dd c7b6535b 7112f3a3 74ac168a
Plaintext: 89c9ab04 33889947 d884a83b aec53b6c 8edb3252 f22cc855 41568a29 85e74315 f74ff239 26ea2257 1a238f6b e9d1ec9b aed292bc 90461768 c0366887 37cf993e 6342586c f354649a 6788e975 d5101a3b 2bdd15bb 1979a4a5 f2feb25d c15e733c f2f1ba8a f7c588fb 8180b2b7 4e82e594 f24079af 95723dc0 e432b5ae 4aafca0e 681fa34d 5f528f82 65471ab1 c1a693cd 329e3e8f 44a7d6a7 3c79d8e1 a5fcc265 660094ad ce7dbc2e 90e3cd1b 31a81a0a 0a32863e 802ca77f 37eb3df4 504faeaa
Ciphertext: 2fac7901 5eed4454 9ed10dee 3bc54894 9d4142e9 368e7ef8 65150306 0ec2f565 d076825e 99812af3 faa153f1 a91153f8 6879b930 7bfd1694 f2836807 5ac59a32 ef1cbac9 138bfb52 1162d688 80184e88 8e40c68c c09e64d8 db1abe25 ca7f42cd 928f2b72 e8334753 86cc940c 54cfd1af be19b2db ee127925 96bc2620 03586adc 6f9d4ab7 662ae5cd 8c565b58 734baff1 6571b94d c92e450e 3bbbdfd1 d0a343a5 9e3ac0cf c2337f70 79ef31ad b7e73450 0aa7a275 765b7e88 130fea0e 0dc2f215
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: CHAM-128/CTR, 128-bit key, 12x blocks
Key: 31b86567 c7302957 b4160c07 bcb5aa6b
IV: da46754d 902b8ce0 3fd9bbd7 2ce9ece3
Plaintext: 4802c9c1 94442001 f92c4c3e 6ddcfdce d963854b 1d424dd0 f1ce0349 22d46530 df08dd73 203cc894 340195c9 d296b29c 40a3332f af9371f4 fd92e705 c595390c d97c492b 07ae6363 905fda00 27ef73de 473c1da4 02f22a7a dc97286b 31ba51b0 57eed375 31721843 b6fe0b51 e5e70e49 cd4f6c32 1744a0e8 839aad8d bbfce47d 6c989ed7 52a9f0f0 5572ba21 4c87c4f5 43cddb10 682bd7bc d751ce6d 460deb21 d8d95b84 ff0ebf8a 393f4637 87964588 f0425c77 fc695a60 d8109f72 0f3c619f
Ciphertext: 77e302cc 9b055d22 ebde92e4 edd8511a 8683b658 06bf04fb f15f12ba 12b21aae 2f22dfef 7fe19470 1e969e50 f9e90757 a9f111a3 a0861ae9 193210af 18f1db92 b4690808 2ec1dd37 cf301380 541a9688 659bbb3c d3a4e5b2 95531c1d 33a1501e 0a0ac3a8 36de3795 854dd9ed d0068afe 4887eda5 1779d286 8372b759 7b00eb1c 257ff5ff c44d3012 1bd0be21 849643a5 3273ab9c 51d537d8 ba776686 f16ea201 8dbfd9ed 781308c8 906899e6 bf611041 f1658671 b417b66c b77da2eb 5f10dfd6
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: CHAM-128/CTR, 128-bit key, 12x blocks
Key: 963980d9 d4bb79d7 94e66a4d 27659caa
IV: fac948a9 72c9affe dededa37 f2f69bef
Plaintext: ad764329 59837a88 cbf55791 337318d7 5f5cc7c3 0fb7af70 7b1df4b3 f9f38326 bdbd79ec 003ae0f7 65cd816a 619ae4c2 ffbb67bd 41a24d9b 1487944d 0a89e96b 521e3d79 b61c8d7d c8a93f06 a00f3609 904dddae 5272bf38 80049dde cea06df0 f613b773 89447b6e 5cfe6aae 7cbec61e 14ea4b06 b1e1b6ba a03f9daa 11aed9fa 7bb2c9a8 95848b7c 17bf51a8 90a2ce57 7e07028e 479b2b0d e1270007 e6f92685 91d41a7f e7eb0e3d eed1f982 ec79a60c 45da14ac d54bb210 86d608a3 20d220f3
Ciphertext: aa250d3e 670e123e 22ffea33 dfb2905d 1400f11c 2585cf16 4c7670c3 eb6cdf20 d2f93bf9 e4744080 6065ed66 64e0363a 9b822bae 31de646f c21a6a05 7141a997 bd224629 589cb2c4 808425f4 66a79039 81d74426 e58c2c31 a277130c 4fb7ee55 ec4530ff a2d34348 321f9047 c6206faf 5fea5d5e 4e78424a 344de9b4 783f774a 27f8114d 8ca54374 ed21066d 9dfdd20c 95adbd17 6924e06c 48b70fcd 91e4bc41 c2fa2c13 974db72e 5c0f6ed7 a07edfb3 c9e510ca d27327df 828306b8 950887df
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: CHAM-128/CTR, 128-bit key, 12x blocks
Key: fcfd68be 11b1b06d 39a46c27 44fe777c
IV: f5ed9c88 eafcef72 53fe7636 a04f31e1
Plaintext: 64ca825c fd30e627 2837c74b c9a9d02f f6de22c0 0681fca5 713be64c 476d3dd6 e30210ff c079fc02 f2610286 8ca6c5f6 f5ffc546 4efdc057 3190aa37 397cfa62 f5ca85d6 af3dbc58 506b22d4 983e4446 79df845d 63341937 48d6aa92 dc337df7 fea769f2 46f1e6b0 2cceee82 40665179 180f2dc8 b2acb95d 1fbbc53c d7aef559 a23d6a77 7344a813 95947e71 2b76b01d 762e917f b0123a4b 35974b7d c9480923 926328e1 dc907e48 7139fb74 ed7d3b01 1bf1027a 765fc81a 63ee2759 174c5011
Ciphertext: 71a98d2e 4a989593 a313eca3 3d057761 b8fc9d2d f304d929 290c1aba 10784032 ff4faee1 f72a66a4 bdfc6f31 6999a4ed 7bafcd1f ece025cd 170b8ea4 d3d78d46 f76ea5fd f2f75f11 c9caf788 776ef9f2 4a2467bf 49e09a47 81da4f6d db289359 50924cf5 f330421f 22f24e9a ec31a088 ddbf42df 6e88e77c 3fd6ce2b 808ebd5f 41627425 883351c4 62bb3e03 31efe098 b11c4a9a 66f1edd5 3f56aab0 3a12b342 442def57 c1a6981b c803cbb8 e743d1c2 bfc531a4 0e799205 dc00a1a3 c01eb932
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: CHAM-128/CTR, 128-bit key, 12x blocks
Key: 56ff616d 24483b2f 9a7b074c 704e5dce
IV: 397bdaf8 42c68f71 4f748876 bda823c4
Plaintext: bc6a122d cdc241ce 10262936 92903f3f d005e306 6ed3a8b1 be7aeaf4 786916e7 9f765b2f e070c7d2 232120df e062b6d9 976c6b12 4a3c7f32 5c7f5e27 82d17721 f33d639d a9888a1f a54d2965 2ddcd529 30a660b0 5e66ff66 2eae222e c9e00bb2 9a32715e cbf9ea31 8e05e645 54d41c5d 95525f3f 70810220 19e178b3 e58a0518 cb0ae62f bab3fc4c 74b80709 77d12bfe 33382286 d11222a5 235a8394 0dc4fc02 5225313d 198eb9e9 f88cdf47 95c1142e f5360baf 36d504a8 c6d703cd c1b7f9f6
Ciphertext: 6d17568a d59cb53f d7fb7df2 1e321883 a64639fa 47bccaac 40f1ed03 19b83c45 94b2b509 694c8cd0 738ae112 727731bf e12a820a d9b7fe3c a70178ce fda1aa95 39d415aa a5c13573 0371bc98 d2d79380 59ea46fa 7b18fc14 8eb64552 bda9e32d 086acb5e 1af710ec 2242cdad d46d5154 f540a599 5ff208a0 bf3f8050 dadc74fa b4895f26 936f0c49 16deaaeb 057cd67b 87f0e969 e8a49621 334556de 790ce837 6bd86975 2a61e34e 56bdcfd6 4e0ab34b 6c58ec41 8b0f171a a90fe529 26c65f66
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: CHAM-128/CTR, 128-bit key, 12x blocks
Key: a251ec29 0a9ff830 87dadded 8dfc0744
IV: bedeec77 f8cc7338 3bd8ac73 b0a18d36
Plaintext: c7281e86 9b410cd8 24a4fc6f 940a4ed1 c77c8bc2 e059f3fe 03b5a764 59344464 8d14fd94 13d98caf 750fbaaa 4f3929e8 d871ee00 4300d34f e8eb370e 6e9fef00 93d7d49e 8a713a6b ee8a73a3 556c5de8 1e1285d4 58b726ce 243cbbd5 9bee5f12 58aaa7ab 3edf1a89 05c85883 57ac2a9a 7efb5c55 df38f6d4 1401415c 3b94c741 c829a1c4 67d05b5d 9484ec12 484278a5 0219d02f 6a29f9c9 bcf1cf85 b1a81812 b358059c ec54e04d 775112ab 020d8679 fb6eb18a c12c8a0e 60a5cc72 994d528e
Ciphertext: ff5ee3bb 18191e20 874804bc 5ea7b114 b0f86e2c 0621de5a 0d230028 fe6bf86d 914a1502 27c1d905 db521d60 4f80ed6b 448c6b69 94e95227 b05e18fc 03c09c64 079259f6 e7bc579a ba6e6cfb cbdc007d 3200b369 98c50dfc 8294f8bb f8d374d5 fe975f2a 42296603 c81b5144 89dd15c2 e2402725 dc3e3f14 866dd2e0 a335b17d 68a97880 7af4a63c 996a6328 057ebfb2 3d0c21f2 7c31adbf 2ec6db04 77835d08 dd152e20 ad99957a d6cf8d32 61b391e6 a74955a9 4ee12d70 2540108c 8a13ed26
Test: Encrypt
#
#
#
Source: Crypto++ 7.0 generated
Comment: CHAM-128/CTR, 256-bit key, 12x blocks
Key: 5c2c26ac 7db54247 df0cbba7 996adacb 96832104 eaedf84f 149f410f f412301a
IV: 873daa9a f2d54617 f6061954 06bfbc72
Plaintext: 5657319b 388d8acb 0cde35fe f2d98570 d34eec3c 8c70be95 708d6688 9722887b 1167d228 d68d6fb8 4d0a488d 3724615e 93939b35 8788783f 6803176d 9f035b5e 4f9f8ac5 d17c15ce afd7c3f1 6b2427bb 4c9e3c98 d240d7a8 831335ba 2ecce959 0c2943b8 1c71a5a6 ed6a727b f28d15d8 cea83589 67f481af 0c531451 86f20c48 57a30027 7af11465 e95226cd d20ea7cf f7c59f0f 0c622d2b 75399583 5cfe785b 28964af8 fa257b51 19300a99 769efdfa 6a106d7c ce4ce6bc 562b85ed 59d05f70
Ciphertext: fc529b45 ad5ee616 ced8872b eb92d95c 938d270c dd462ce8 694f9141 e1671fc2 5629e135 678f286f 7a723b4e 91b396a6 cc2460d6 471ed63f b871209e 56ec6e6a 322b9467 0ed89b48 28b4354c 3b41aba9 172973be 53d0e77c 79ef2cc8 06a1caa2 747e5d93 74b6ec6b e65ce20a 68246733 9ea48eea 91d8ce14 c31341a7 d9dd3653 b85b8326 b8e59576 95824d1f 4ec9d42c 16f88fb4 31ea0b43 a4675c88 b47cff33 908adf9a 6a873418 c9da9a22 23287cdd 1afbab66 a733867d 859249af 1d9ff223
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: CHAM-128/CTR, 256-bit key, 12x blocks
Key: df4081ed 165eb7b4 5a8e3d60 af20220c 8f9c3ba3 2c0fa75a ecbfea08 79f95d9b
IV: 135b7449 136e9813 e115ce75 1eeaeaba
Plaintext: 67f8955a 57cdd284 0a461844 7989696a af9961d7 9be62de3 83d7c0b3 527e5980 a28786f4 90010d68 c601d536 7292d001 950c44ad 83276c16 0e181861 7e13a51f a1661fbf 9f7405e1 bbb76759 ab58bf90 21eefa49 8171e655 adbb5df1 6c795180 c211053a 5dbc1b3a f84c8863 a9d48e3c 96267c9b 2ccc02f5 d6d8895d dcbb547c facb1103 7f635792 63b702e1 a2eb3033 c2894258 7947b443 301c9db1 8d7e988f 315ae93e d1d6caa7 b676fde5 423c7955 80750cdc 1d51f35a f83e78bc d37aa4bf
Ciphertext: 16370609 1169208a 5143b810 3f21e266 3cc08245 5de5a2ef 1d41e2e3 4e602172 9653d1a6 c244f48d 67dcb98a 2a99c958 8697a067 1eff8ce5 4ac33551 5a1ce849 e846bba4 4009201c a1f4583a abde5cce 54f90060 47f3cb82 c6505650 126ead67 713cf104 27ac6fbd f652a6eb 41dea62d 3886b001 2a465bad 3e6d652c 61566cbb 53680ad5 04d32d06 90c5dff0 af9fc039 fbdafc1f 27b43141 0ea64e09 3d9788e5 185b2049 57c0453b c130693a fc6e4dc8 f8beabc2 85e6793e e8318eb1 8580cc49
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: CHAM-128/CTR, 256-bit key, 12x blocks
Key: d57edf2e 40360311 9d8bb2f0 4ae82012 e81ef354 4b655221 d6e80df6 174ed556
IV: 17ff5622 e16675a8 72cd4ab9 dd1c5a4b
Plaintext: 6e7e860b 8fa45f7b 8899f31e 8ec23040 73376aff bb6384e5 38eb4144 3118e104 31d21ed9 3763b55e 7da3f8b4 23f69cda 4cbfff7b c16c9d2d aea72bc5 36d2f01a 12de0007 231ff9a7 a9d13b86 85381436 5a06878f 0a88fb4c a0b14ea6 2609154e beeea9b5 c847e4e4 019d45b5 6fcb6d3f 73c9d3b0 d50943d1 a5f573d3 c268b5d3 e7de88a6 92b1d95d f35cce90 4052066c 3c526201 602fda97 1fafc915 b3ff6138 b25f1ae2 fb7fcf1b 38c806b2 76160dbd eeeb8f38 18901c4d efa884d3 d74115d0
Ciphertext: 278ec7a5 d4e70656 71427c67 8966a01d 5ca231b0 43a86f5e 8c9804a7 24a68037 a166eab5 b56c1ca3 22d2f43b e3d4474b aa96382b bfdd4256 25db6839 70999746 a6494781 7db0dcfc 5ce14662 63f6f80a 5300081a 8d59bbb3 73c826a8 839467d5 5ea95450 8b6c3c30 95e0efc6 ffa56c55 1db19303 527c76b6 3963e978 fa658cd2 0ac98768 190ce717 7079ee6a 1a838919 c67d5d0f f42e58fa ca44dc45 6eebede6 eb3c5e0a d11222c7 36cbbe00 bff26ed4 a0ec26c4 188e2d8e c59ddf50 4b9f8ccf
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: CHAM-128/CTR, 256-bit key, 12x blocks
Key: 5c647fbe 6c1b1844 e30f4d18 f80880ee 41e478ff 92cafd10 8b034ae4 1d1e3663
IV: 7569ae27 8065743d 2580fd55 50c1c762
Plaintext: 0166edf3 84a042cd 83eed0ec be8d934d f1d3e640 028a8d71 500826bc 70d54b68 5e56ca08 fa811879 1edb8624 9df223fc b4ce8ab8 b4d0f6a7 bc8f2204 7f7e98cd 73c5eb37 137fe5a2 9413ee5b baeda402 a314378c 64eae015 0b7b6a63 1248df6b 70251730 e72c5683 a59d9019 6f4892b6 6adb55a8 27a92ca2 4a1febdf 88b49a8a 38eee994 261daf07 fd832735 5dd4fc76 97de3346 41aa7f24 27ffdef4 ab37befb 2b5f8dd7 12053488 c8e6a7f6 396b4dd7 d8f9f627 5a33bb35 67ad4138 9fe18563
Ciphertext: 546f0fc1 ac7fe610 fb313716 8cf7d6b2 b43fdab8 2aa4383b 8d9cc4f0 2ea50d13 ab9da632 36ddb6f6 53b6b33d 779836f2 fce817a3 4d5cadce 67180b95 cd3cac1e 121b85a0 265a3df1 19991ba8 4a7f0b7f 65bdeba1 33729ea9 15d1b6da e5df511c b5d2df33 e0f1fa92 1f43d1c8 508c1a0d c974dc6e 6d75804a 04477345 0daad6d9 80fbed04 fa060698 0db5a2bf 14026b0b e40b2829 d0485c3a f5240794 5915196a ab20d328 bfac23d7 33aaaefe 7d7ca616 a8e0c76b 66206957 226f4d67 571e57c1
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: CHAM-128/CTR, 256-bit key, 12x blocks
Key: 3917caa2 5249c230 12023540 48f49e37 e945b2a9 f83de8df eb9a0780 555d57b6
IV: 8c767f28 e36cd83b 26c2475b 019ed7cd
Plaintext: 97ea851e 3c027751 4f88db02 4007eced f399405f 8c8fa6ca 539092f0 6d2058d3 e17c0929 19785628 f6b45849 3ad36cca 27159ca6 bf54f206 0c1a79f1 58ee3fb8 8c6b3d34 c377cd8d ae6f4bfa f10839c5 77e73123 a33ec7f3 31077bf5 5dc7e23d 37adfecb c53cb4e1 9846a560 31ed786b cff75a71 66239bba 5de00c7b fd67b01b 79d0d2a3 d1cb771e 7dd0e624 d40366c9 31d89060 30692eed 2901e318 ee6f0270 a078a103 d819ec34 6d21034c 7bf7208d e1aba0ac b39065ad d2a4d5f2 8aed7faf
Ciphertext: f8dc6354 1de8d139 d96e4eaf 6f90eeb5 a22a5c7e 305bd2ff acf98aee bfa04159 3c3a4b15 179f7cc5 d47361a2 7f946a56 f0e27f8c dfeefa20 68338010 cceb4c1a bcf6b096 0bd5b867 ce9695d2 dc5eb9cf c0a0749a f3babc37 de777986 9f32c8b1 06704188 d611b337 e12f120a 3ff9bb94 f7d68fbd e910e4db 9d12ef41 4f06d35e 02ac6968 ed6f6ad7 cb7b6041 ffc78563 da4ba3f6 b260a5ab 5e90f716 ca124a83 a266d7de ae77aede 2416e931 feee402a c81e80b8 f6c9853a 6764f37a dc67f93d
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: CHAM-128/CTR, 256-bit key, 12x blocks
Key: 2bfc50e6 04f53f8b 6f86edd6 ea1f9a2d 13b515ab 48756872 66769762 c8a971e9
IV: 0b4302b5 c5e7f81c ee8d0eb5 e6cf27e0
Plaintext: 2897b693 f5a9e0c0 5e1e65f4 b5b17ec5 09919463 1906b445 58097739 f91c7f47 551424b6 ac4d2427 84dbe409 c00eac8c c52f7fcd f3e07d44 29fdfcb7 d8790d1f 1b6ffc46 0e2941fe be2c17c7 53b71188 149d88dd 17c0e10c 08a75bd5 eadcc5fe 8087b574 518e8900 e3b11446 e85ef7f7 db909b92 97bf0e95 62f94808 62af252b 031271d1 57f62068 5d50d4ea a84704a9 427642df 1902e4f1 fe5afdad c979a385 dde11816 dc6f2a80 aba575a0 4324c92c 6a9a4509 423224ca 32948c23 56d085c8
Ciphertext: e1b89230 abcbee13 2c5e79f8 892a250f 31e400c2 7d4fc1c8 33a83f8a 4e117b06 15d90bf3 9034e303 930d2289 d1408351 f30a409b 9800ca6a f2a196db ecd845af 85519cff 879b529b 345ee957 8da5af95 be1560d9 79104f12 bebb39f2 82bfde4d 3fbe8ea1 2ec0a1d7 abb32d52 a4cbae5e c19e9796 e92a206e fb9a97e6 0c8d69fe 2290c4bd a09bca3c 8bc9576d 770d8b68 95c104da 688e7702 4b183042 343e0a70 047c0e93 1a93db77 9fe7af71 95f5139f b1cb961e f94db18d 7c53b059 da4b4ade
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: CHAM-128/CTR, 256-bit key, 12x blocks
Key: 919e0958 e4eca268 a70465b6 2dd627cd 08608737 fcb98480 c4908e56 7cffa4eb
IV: 2005f870 b27d437a 1fa6e0a3 d714baf5
Plaintext: cdb55ee2 86d6347e 484c3b03 a57deb15 34464cdb a8cfefbf 12242431 17c96cb2 0a3ef9d9 02a1766c 364c7e80 61c32b19 c7d91e73 5008e147 49c5ff1a c7d19ab1 013fa114 998d19ac e6d24f1d f0d7b733 4cb6de9c 44b369fb bc087b76 720855f7 706651ff 9e3e5ed6 2f4b0fe9 3823c836 bd828469 da93886f 7eb5c44c 63efdb46 a68f0a59 87528843 74b09104 bc1a1b42 8d9bccb1 1ed83f2c 02c2fd03 3c0f6fd3 bb021232 d4f8f2fc 674a2322 748d4aba d053c252 a4345c43 48b0f90f 3f92e3a7
Ciphertext: 4f7696c7 c3aa9d35 51a7b6d7 ae244626 b1a94e08 62ab3ec4 52aa1a32 6ca89cda 6458600f 8da97df7 2da943ac 99f60e19 1598a8b4 8e542460 3580d2d1 3a4cc59d e9627617 5368ee26 932ce289 4a8984a9 778f2833 ec43064c 412830d1 b996daec aa72694c 89fefe8a 8e26e279 08958e02 2e218c51 27e880f6 8a5d6f24 44e66236 de9e5606 b554d185 e08949c2 1996dda8 8cef3dcf 84b8afe9 24acc1cf 16afe884 9729f18b ad608f72 9d764e74 40830899 962ba5b6 e39ae5ff 93abf2f3 dba7ecfd
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: CHAM-128/CTR, 256-bit key, 12x blocks
Key: 9bfd812b 2bbf83cf 10b8c4ca bfe7b164 6904a8ac 486a44e2 b3e387f7 96ecc103
IV: 60183921 2a5380bf bef34ae8 d05b3b96
Plaintext: f605bbd3 4e870576 39dfb6cd 264ee372 1692ebe6 d3a19181 99809ae9 104b37bc 4f3686e3 ee81a09a a7dc4aef 9f7f537f 8125d120 3855c97c da73f13e 02ce1e6e b0d6548e 44980963 54eb80cd 44fbaee8 c99af4c7 d2b1b458 10e45ab4 0b1a0991 392b86a5 a8b5c844 6c91b02a 4d30d8e8 879932c1 8108daff 2489e886 a0451756 7aed996b 7a2fb5ff 9873e89f 1c02c9a6 a558c0f2 9160de7d 9ab1b2c5 ff7708c5 89302017 d14675e1 3a879c73 fd74e84c 4cbf5446 014082b7 1c0ab69d 93fc94a8
Ciphertext: 71aa7079 728664c1 673b8154 cd75ec1f 8de77adb 583ccf03 bdf7fd33 c4050619 c5bfbc1a 60a61836 386eff52 6d79ef96 c15404be e96b1109 7cec738a 7ebefcbc 73b4ea15 4227c1d5 7cb44094 f1622606 a5121b54 73201417 49b7ef19 0e6964ec 6177ac92 722587e6 8b7a798e 896dd1ef b1ebca39 01cd6a3d ed227d75 85a2a854 9d492f3b f562ae3c 37e45e63 4f05053e 3701064e 4ea56a27 cc6437bd af10b0b8 0d158016 68c1074e e4f7dd5b 7d47566e aa5bce70 0bb8ae45 b65703e2 8a480274
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: CHAM-128/CTR, 256-bit key, 12x blocks
Key: 6b64714a e8de07ba 7378f9c4 2f66aa3f 5d3e225b 586ed68b a8389fe8 d32f7d64
IV: 1736d879 39ab2d79 e9361049 2c05f78f
Plaintext: 48985b47 97bb2e88 fe3d056f 1896a028 e2519c2d 396d8d6f c1f7eb24 1ffbbdd0 d1f31a40 f9d38015 acb74d44 4c5ed2fc b6d743c6 93ebd262 fe65095c 512f7c47 a19d2cf6 8ea1bb16 305670ac 559c1db9 bc5d0311 624c6d54 5fc5dbc4 02ec794d 565f646f ee991350 648607e7 f10559ee 66f5cda8 57ff310e e1b0ca94 f7ae54c5 051ae163 f32b3e12 9db94c90 fefdd1a1 b8af57dc 801ddba1 ff167095 c873e642 3d55d7ba d76764b7 73bc3cea f4fb6e01 09a44256 894c9e07 cb98df92 707927d9
Ciphertext: 955f9253 40764fb4 a3d25bb6 f9d06a47 25a32f00 90e67e59 390c3ed3 6b943fbb 2bebdddb dbbfa05e 663d3371 88385851 1cbe4c04 44400ad0 a7dd52bb 0d50ba82 f1c49402 3cbbf7c7 240a8353 1139801e 5b0a9471 f085f388 1608f87e 85a8abdc ebb9861c 081984c3 0e234a02 7ac597ca 4fb0bca2 10ca121d e780219c eb5e7d3e bfee2db5 c7ac9a74 a04371ad 4c5aca82 b71ebe2d 5f94ae97 df7e159b 7a00355e d19d09fa 1b8072ed 31f4e388 46b77795 778c8d53 aa16d840 85b9929a 3f9197d7
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: CHAM-128/CTR, 256-bit key, 12x blocks
Key: 1815445c a3d10bee ec6d8662 a3cee6f9 30aea2b6 3030d1ca a9146b12 c0d345ab
IV: ebb1f304 56195ba3 20c5f1ab 0823e481
Plaintext: 61031ca2 c50d2e19 255b222d 317fa27f 003712fa c6dd0403 42e2e49e 32a7ad4f 5f2b0a09 309a7d3c 41b44285 d3ceaca1 2fdbab58 3b9c297b 9f5bd3fd 741fae58 d7d22101 2fb62bb6 d1f95de0 eb81d253 97b54dc6 0f2bdd06 f7760a3d b8dba50f 631fef58 f0ef81ed a4f57787 61b303fd b3161fba 33a307c4 a1a31f40 081fab1d 709e898a 14e6d630 e02445dc 6f48df92 44ca4146 2c29bed1 af735f76 a99cc71a 8d717d3a ff83b049 20df5319 006bd14f 8810cfd8 8a2addb3 2b834695 d8f717e6
Ciphertext: 218e2d8b 53f4b38f 864f2c7a 9f0b3e0a 8042b185 d7452861 aebc2662 cf4aeb92 5b703728 9097c455 63fe424f 8fbc7941 f16f42f5 2bb99888 7f0465a7 5f05760e 82dfabe3 4cc729f6 3704da1d 949032ad a8d4fddd 26aff516 161bc3e9 41eac4c0 12d43f48 36f1e058 94dd2b40 966c6503 b44ff734 7cdb928e ff9b7e06 479a9b42 19f665a6 521a975d 11636959 abb66d82 b8781340 b05f2d6d 5ec6bafa ae435f47 fe2f8a70 e01b914a 853cdeee dfc9bb9b 61ec78a4 84134c41 473cc9fb ce163f1e
Test: Encrypt

645
TestVectors/hc128.txt Normal file
View File

@ -0,0 +1,645 @@
# These test vectors were generated using the eSTREAM reference
# implementation for HC-128 using the file hc-128.c.
AlgorithmType: SymmetricCipher
Name: HC-128
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 1-byte msg
Key: 2923be84e16cd6ae 529049f1f1bbe9eb
IV: b3a6db3c870c3e99 245e0d1c06b747de
Plaintext: b3
Ciphertext: 1f
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 2-byte msg
Key: 124dc843bb8ba61f 035a7d0938251f5d
IV: d4cbfc96f5453b13 0d890a1cdbae3220
Plaintext: 9a50
Ciphertext: 3a27
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 3-byte msg
Key: ee407836fd124932 f69e7d49dcad4f14
IV: f2444066d06bc430 b7323ba122f62291
Plaintext: 9de18b
Ciphertext: cd261d
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 4-byte msg
Key: 1fdab0ca9902b972 9d492c807ec599d5
IV: e980b2eac9cc53bf 67d6bf14d67e2ddc
Plaintext: 8e6683ef
Ciphertext: 60f109d3
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 5-byte msg
Key: 574961ff698f61cd d11e9d9c167272e6
IV: 1df0844f4a7702d7 e8392c53cbc9121e
Plaintext: 33749e0cf4
Ciphertext: 7b9108bf48
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 6-byte msg
Key: d5d49fd4a4597e35 cf3222f4cccfd390
IV: 2d48d38f75e6d91d 2ae5c0f72b788187
Plaintext: 440e5f5000d4
Ciphertext: 8702c8d49067
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 7-byte msg
Key: 618dbe7b0515073b 33821f187092da64
IV: 54ceb1853e6915f8 466a0496730ed916
Plaintext: 2f6768d4f74a4a
Ciphertext: 21bec3a785c54d
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 8-byte msg
Key: d0576876fa16bb11 adae248879fe52db
IV: 2543e53cf445d3d8 28ce0bf5c560593d
Plaintext: 97278a59762dd0c2
Ciphertext: ab56d21fc9ba82d2
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 9-byte msg
Key: c9cd68d4496a7925 08614014b13b6aa5
IV: 1128c18cd6a90b87 978c2ff1151d9a95
Plaintext: c1 9be1c07ee9a89aa7
Ciphertext: 63 bf12a1533269e0ea
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 10-byte msg
Key: 86c2b554bf9ae7d9 23d155903828d1d9
IV: 6ca1665e4ee1309c fed9719fe2a5e20c
Plaintext: 9bb4 4765382a4689a982
Ciphertext: f67f 9f1b78ad1839c4c6
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 11-byte msg
Key: 797a7678c263b126 dfda296d3e62e096
IV: 1234bf39a63f895e f16d0ee36c28a11e
Plaintext: 201dcb c2033f4107840f14
Ciphertext: e0136b 3d43448daadfa8c0
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 12-byte msg
Key: 05651b2861c9c5e7 2c8e463608dcf3a8
IV: 8dfebef2eb71ffa0 d03b75068c7e8778
Plaintext: 734dd0be 82bedbc246412b8c
Ciphertext: cce4b159 5e271971a4656bdc
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 13-byte msg
Key: fa307f70f0a75486 3295aa5b68130be6
IV: fcf5cabe7d9f898a 411bfdb84f68f672
Plaintext: 7b1499cdd3 0df0443ab4a66653
Ciphertext: baeff9b617 946cbaa662e5403c
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 14-byte msg
Key: 330bcba1105e4cec 034c73e605b4310e
IV: aaadcfd5b0ca27ff d89d144df4792759
Plaintext: 427c9cc1f8cd 8c87202364b8a687
Ciphertext: d559e24c692d 7ae8507f9ca6c590
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 15-byte msg
Key: 954cb05a8d4e2d99 e73db160deb180ad
IV: 0841e96741a5d59f e4189f15420026fe
Plaintext: 4cd12104932fb3 8f735340438aaf7e
Ciphertext: 05f0d610ecd79f b76805e8309bc909
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 16-byte msg
Key: ca6fd5cfd3a195ce 5abe65272af607ad
IV: a1be65a6b4c9c069 3234092c4d018f17
Plaintext: 56c6db9dc8a6d80b 888138616b681262
Ciphertext: 9e450e2055249807 a66a569666c30c8d
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 17-byte msg
Key: f954d0e771174878 0d92291d86299972
IV: db741cfa4f37b8b5 b09557f5df806c6d
Plaintext: 8d 74d98b43651108a5 f679bdf7eb15b8e0
Ciphertext: 68 209f9b599f668c3e a5b0d25ce23c74c1
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 18-byte msg
Key: e1608f6e3c7bf45b 628a8a8f275cf7e5
IV: 874a3b329b614084 c6c3b1a7304a10ee
Plaintext: 756f 032f9e6aef10509b c8814329288af6e9
Ciphertext: fd43 8d47ebe7e226673b 19a3ae87f6d025b4
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 19-byte msg
Key: 9e47a18148316ccd a49ede81a38c9810
IV: ff9a43cdcf57c750 59bfbd1c2703287f
Plaintext: 5d895f b949344e603ce5de 029842b20d2bb614
Ciphertext: efbde1 ecb739af688af049 ee86a2f1fd625b46
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 20-byte msg
Key: ecbbb82f73e2517e 7d1dd884d31f01be
IV: 506b16d643218319 1518982b2c2e8bf9
Plaintext: 0edcbcf0 ca0e3d6d94319274 af8db5a490d55e6a
Ciphertext: c89eface 1d6774d310836c85 67796d789d4b7b9e
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 21-byte msg
Key: 40fc8076024b176b 36b121db7d5aea72
IV: 1e828d71a88cb85e d94eaffabfb09474
Plaintext: 1d75e5dc10 5846daf25b81a07f 5ccb1d36e9497402
Ciphertext: dbe8350457 21aaf867a97622d7 48a2c71835313e55
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 22-byte msg
Key: 55d2ac1a0bf7a926 23405ba333b93588
IV: 68ade12ad5b2325d 0ae55adce9775deb
Plaintext: b569c53a6c93 980d57eb879adf04 68b2a2d5e6a4c6bc
Ciphertext: 36b85abf397f d6915731982cf8e9 3102f4029f4d17b0
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 23-byte msg
Key: 775f8dc38fd62a21 14a9d4041101188d
IV: aebb731c60ca20cf 5dd62f455329d7a8
Plaintext: 59cc0dea26ed55 4e8084d92bf837b8 edd57aa05c4efa9f
Ciphertext: f257546c1380fb 5ba138ec36766597 1cb5688814092614
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 24-byte msg
Key: 21fc3c36858e81b0 7dbfeeb1e485e912
IV: 078bc6ec66e2a3f3 b9f4900632b9f404
Plaintext: 022d2ce01e0174f8 43900ba237169208 531cb5373e370e72
Ciphertext: 41e720935d60a608 18330bb264fed7fe 76b47d68828c82b0
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 25-byte msg
Key: fbf246cc26097ef6 7ad8ed559712ca57
IV: 02b66c086e3fb0e0 3a1c9bdf3a5f40dd
Plaintext: ba b9e41bc0a6611d92 e5c8bc782b4a77c3 18590a0e6a0a42c4
Ciphertext: a0 ce582b4f50fc2530 6164b7a190785e8b 446b495df81babfa
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 26-byte msg
Key: 71be0fe3c301dbff 30b21a89f8652251
IV: 3c053d4ab3befd8d 9e19d0a1fe69d4fa
Plaintext: 0467 edbfc91914d13ff8 f2086851adc0c5ec 029412ec946930f6
Ciphertext: 51dd 18b8c89eabfd3a9a 5c15ab62947a1004 2c2529ad0e1f5d87
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 27-byte msg
Key: 83af639541e3bddd a158da4f3138cefd
IV: cac55cef65e569c4 30deaf9ce25eb636
Plaintext: 4bbe00 562f87846a54365f 6cda3cc50acb493d 05f3ca0ed7f2b1f4
Ciphertext: 7ed3b5 3b0ba0f76eca6785 2d67b581ebee0e0f ec7e8c248e1e391f
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 28-byte msg
Key: 988f7418224f583f 7447ef42542edfbe
IV: 39b6e60c671c1b74 5cfe779d6b6e9348
Plaintext: a744b33e 02b80487b63022dd e456dd617b6e3d8c 5ce7c467bc2ff2ff
Ciphertext: d1fff5db 9438dd40263d0344 d15e55b5d21d767d 2c591d4b8ab9b30a
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 29-byte msg
Key: c9cc0f1390a92411 1ead4b41e592283f
IV: 62f5b8aefda9492b 3151ca80ec2e451a
Plaintext: 3935aabe1c 65ce77bd57b3d3c9 170a4e1632f60f86 1013d22d84b726b6
Ciphertext: f50c60e896 0d63fc1b7b4df87f eb66194a115f6147 62925c92cd8f766a
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 30-byte msg
Key: a278d802d1eeaf13 21ba5929dec6a62a
IV: 65cff4473621ebdd 4ba26a99a812c0e0
Plaintext: 3491206ec762 4f3d84eea0a8690c 22d0247f183f28c0 a9cb01ffd9bde464
Ciphertext: 5185f4acb30f 28fdb528bd1d9e62 9fc5e97ffafaec59 9cc64559b2787dd1
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 31-byte msg
Key: b8338b9ad9c3408e 066137743283200c
IV: af83fd23a244315c b318da3009e16134
Plaintext: 7577509aed4a63 fb3d49e154f9022c 4eb60a97c2799f79 7c708c803fe04d47
Ciphertext: b856d160d7b03a cb557a8b10a56bd3 93c323e9b93cccf8 a0f24b3e6605eaf5
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 32-byte msg
Key: 0a5f742a9a434b59 305abb2b94dc6cb5
IV: 5a9d2e9c64879827 a848ee98334848bd
Plaintext: 6edef1c2a1c30e49 b5c780bc3ec20be2 b9ceb7b111b37664 69a308cd15281ceb
Ciphertext: c6cc294c71d45ba4 8ae582467d3bea93 0106a4e81452ec93 e77f7536810f6b1a
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 33-byte msg
Key: e95ab8bfb755da5c 13ea603e599525dc
IV: f2af6d80d2e58357 45e9a0c4ec670ffa
Plaintext: 02 3b8fcae4e1f9b9d1 2d2256ee3c03cb8d aa17b1ae050529c6 827f28c0ef6a1242
Ciphertext: d2 9a5a508af59fd703 b59f4da6f6392210 7de9772ac202569b ecfaf8dbb6bd7efa
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 34-byte msg
Key: e93f8b314fb18a77 f790ae049fedd612
IV: 267fecaefc450174 d76d9f9aa7755a30
Plaintext: cd90 a9a5874bf48eaf70 eea3a62a250a8b6b d8d9b08b08d64e32 d1817777fb544d49
Ciphertext: 09b0 3af5818faf384564 19eb39c41b2dbf7c 87b376ea77bf104e 304ae8b7f57f1d08
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 35-byte msg
Key: cd49720e219dbf8b bed33904e1fd40a4
IV: 1d370a1f65745095 687d47ba1d36d234
Plaintext: 9e23f6 44392c8ea9c49d40 c13271aff264d0f2 4841d6465f0996ff 84e65fc517c53efc
Ciphertext: d97bc5 583c737f9078e5a8 6979ebc3654cbe96 23e9642c962ca8ef a3e6fda7f277dd18
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 36-byte msg
Key: 3363c38492ab08a3 aa3ff03f1c55ad51
IV: 4fc48596585ed588 1e81568cbbe99f6d
Plaintext: 25c8eb09 0d191d4a07310158 ec97d50d7c1508aa 480f41c8d014a391 e8b3502f60902b85
Ciphertext: 47ea5dd4 03590c336d6c2d4b be122bf90c195d03 e463a190e0a6e904 25119659f3a79beb
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 37-byte msg
Key: e3b7e31d202f2d62 28d35010175de7e8
IV: f7c4e2a8e1c8cf3a 65ca582c2de20c60
Plaintext: dc2c62053c 62fac599b0274068 c3abba2d24c1109b c461f1fcd8bf4ad3 e61502c020a2e8a5
Ciphertext: 5de3881f6e b719f089e7702010 b1ed0f6f4f563184 c285f2ad13a6a518 40258e14a3951ba5
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 38-byte msg
Key: f2f2ea07d76187b7 70db87b1d7e5e944
IV: 31e11d73828d739c c6ced4573dacb0a1
Plaintext: 069d373aef06 cc4b8cffb64c8657 192536d7259372cb 8ecea7bf3c692887 4379c68215f9a11f
Ciphertext: f199ed956da0 d082cc5763493475 e5f2dbc563db339f 702c4099c54fecff 64653948645ddca5
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 39-byte msg
Key: f76d3e9fb1c6d91d 8a86fccc73245081
IV: 83b2b471a3bd8c3b 8b755b29ed0d95b2
Plaintext: ef65ae44dfe777 4122afaa486eeec3 b53a90126b721c0f d16edced1a253f72 ca9e7b0575a87609
Ciphertext: eb23c2dc0d4ff5 962a652227be862c 9630396eb03cbe81 45e629c417892f4d 43b9b9ef09eb49fc
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 40-byte msg
Key: cacbe769d17eb874 719ab0ec350f4e59
IV: 50d6f8a3de2755e0 6cebf76bbb743d36
Plaintext: c16c7761f10b4c0b bc8d596858e41b13 c0aa0fa6fc591789 a2be20079dab02a7 2deda7b92f7d702f
Ciphertext: 73c35063376c3b44 6af3a249ffb42c0b b947a5db9626518c cacb9bffdc1904c5 076342c5bf283b69
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 41-byte msg
Key: 9ffbd4ae5b574be5 29d26a1efc254f12
IV: 73ff3f02a3b58e03 1635bf9a133ded88
Plaintext: 20 ca6ae7c6d2a57694 35513267f2c326e8 969c8355fba9f385 2e072b26b18bbf4a e3603b22bcf26f08
Ciphertext: be dd969b8adeceab48 0c929588d211188d afed1154b94b4234 a2ea422c392b9506 98979230ef426bb1
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 42-byte msg
Key: bd0b0ac3273c6b07 6c7fb33ce31a1f80
IV: bfc795ef42117c22 2e01d1f57dfa778e
Plaintext: 51e2 cf9b2e8289da6730 badfd6ab2e12d046 fff7584966b29394 d2ca7d85372dd91c a9746e5d296970f6
Ciphertext: cc15 22261b465379c39c 808fc77a818c35ff 4218ad5fd24770dc 64f1f486a4508b6f d6390765773d1fdf
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 43-byte msg
Key: bfc63d22c9404acd 92c45cf92601fb60
IV: 6526235b57ed3e02 bfd84f95f3ba701b
Plaintext: ea7a7e 48971413a475e0b4 ea64174caeb393d9 437ed666dc3a4e39 f18ed84de5648203 e541951413d1d3ca
Ciphertext: e8d35d 3a9126ef55077e22 97ce1086b6e99611 1cb891bdf7d4c3e0 c8205a91f0d406b6 485577a6fc4b8a49
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 44-byte msg
Key: e4c7fd70c6e49807 0754f13af2415f94
IV: 3ba3c8f19d556632 c16ecb3562ce2305
Plaintext: aff7ba4d f01fbe136d8345a2 8bfd91c839d99342 8ae5af75a3c7bf5f d8935acc129d56cd 748c8b663eb0da87
Ciphertext: e3850ee3 02e426ea014b7449 fc3acdda8df56a92 a1f875cdad056158 e0fec7057b01044b 92670fe59756885b
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 45-byte msg
Key: f1966f3db4d9422a f63ae43355f37878
IV: be49ff89d661dad7 995489684185b9cf
Plaintext: 6a337e5c73 4add90277f8dd39d 9bfe695c179ba3c3 ea4d52a99f408140 aae9643ffc488b40 d56a5b66da33bf44
Ciphertext: 8898d30d20 da4602af61e54edc e71fd08f8847aee0 18d11186dc531d00 77cad53293d2cd1f e081483abb1e889d
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 46-byte msg
Key: 675a1bfa26b582a1 e1b728ea94371a01
IV: c7722cb81a5433e1 22f375fb735d5e12
Plaintext: fe9375e09ed5 8e38ed2040a55cf6 994e835d111cb52a bd1fd87fc52e7393 18ce09b15e56a684 2f50b79182211e05
Ciphertext: f25a43b550ac 23640ba97bd8b417 fcd1b086bc09b587 8bacb13ee5cf4f0c cc7378da6bc3725a c38a9ac995fabb92
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 47-byte msg
Key: 68ed86b1fab5f453 8fc29f173347025d
IV: 55422fbdc0a36648 cdb0e611d6a803ed
Plaintext: eda67976cec900 56139221c2a78d47 447d3419be821007 acd02123a9248033 35924304b577a101 bbb057038809496b
Ciphertext: 346697b39b85a8 120b9ee5d5526a6f 88dd026c7a03479a 0eb329bf88a8e976 62d02b9a74bd02b8 ddabe7f77068de85
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 48-byte msg
Key: cff86d6fbc8ce5b1 35a06b166054f2d5
IV: 65be8ace75dc851e 0bcdd8f07141c495
Plaintext: 872fb5d8c0c66a8b 6da556663e4e4612 05d84580bee5bc7f cdd4de8e863843ee f288d3fcd018e6be db47aabc4bfac411
Ciphertext: a2380d5b6f8c4954 1059ef1a037ecc43 1d8a6ad404cf37dd 9c4e818d6504ab99 39c4fb0cf1aa4fe0 6dcbe5b403fb1c1b
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 49-byte msg
Key: 9e4a3ac1987a904d 892c3185ced4119e
IV: 9a6c9184f76aa371 07ef2ebf9041b4fb
Plaintext: b7 7b323a0c8347b0c7 3d997e51fe75cc07 44b5183aa4e7cd7a 03ab1814095df7d9 d3f49321e82acf10 6fde21189fb6a1bf
Ciphertext: d1 6209941df3b38ac2 0d5ee6f9ad56b2fe 27b69fc4f23c5c0c f47b94e5a1f51818 9029034452bf9387 5749b0188070f12e
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 50-byte msg
Key: 76085fa3aefbfabb ede96edf3c082e8b
IV: ba4a73e09181d3eb 2ac7152a9d1d444c
Plaintext: 6c52 023970271f5213b0 6afac0fdc75598fa 824f6794e3e1d61d 0390e2f2dd368c5b a804d2b265c8dfc8 b46c7f84ebbfd5cd
Ciphertext: 5902 a5f41050309e0e51 71d0028ef3fc3cfd 83d34425c61de8fc 64fd5e16d6209d19 fe9820a56d7958b7 7a13f4075bcea4d9
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 51-byte msg
Key: 697950aa2879dba8 9250547d960340ea
IV: fa0dbde6f3a4b7f8 f33d5fe5c252d98b
Plaintext: d06335 0dca3ba1306b74dd 05953defc9a05b17 09f26e0509cf764a 6773950dfc5e17ff 03f0af917d350364 d4026b00be41f6ca
Ciphertext: 8f2d75 204b5d033310f56e 4e31e3970097fa58 0121beb727c562e2 adff066e28e4279d 358378a805110edf ea58ab545fa94437
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 52-byte msg
Key: 6489af30c4f21e27 532711d7e7bc9c94
IV: d5c25e11569906d0 300616dd9285e7bc
Plaintext: 3fe1eda0 ee013ddef1054ca0 1692fadecb69cf8a 853f840b62c9c5ed 0d1635d7e221b3bd 52a7dc568936d0d1 4f8739c42c0d8a65
Ciphertext: e7559d26 10fcca7f254deca1 39ae06323de3632d e5b1d28f7ba512b1 9edb023754783029 aee725a2dcc1f6ab 14024b20da4a0de0
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 53-byte msg
Key: d0ce85fcb1720098 f699e801947286ef
IV: b78a017963e125d0 5b43622d42d51808
Plaintext: 00ef128b67 29504617b909249e fcf09ee452b72ec7 2fd107026f7d0353 ea00dddd4931a0cb 183b5f361c9f2748 e67832a2a8035dfc
Ciphertext: 944818774e 9ad427376a900781 390507e57684ea9c 26013997d6b39c34 b502514b79c71ce2 f76e44fc2aa73978 fa18a2fe6d5a5780
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 54-byte msg
Key: 485edc0bb3902da8 74ca4a2e85ed2324
IV: 644b4b1c6ab2f2da 59a713b934efee4b
Plaintext: 5354b940b6a5 93899affb9bd4a4b fcbb380873914c4b 6d9c7c03a9f19d82 cafc7839056721c3 1d3d842691504155 14d8baf93d5c6970
Ciphertext: 4394d5f1bf96 348e53b011e12c1a b24f502a7c1c9cfb 625eb57581a26004 00645d04bdda58f8 ccd60c9168e75ea3 f567d36b65b151cb
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 55-byte msg
Key: 80d678165d128bc4 d757e19728499bf3
IV: b30e5bc73ab01112 51c212a612476b2c
Plaintext: 13cf746895e3a8 befea3b3f58aaecd 3c3d42476a1ca563 8a9cc369975b18f7 840ed0997fba2d99 77282a19dc935e5e a6a3226f989ff6df
Ciphertext: 467cfa39230b3d 5eb7a9b5a707d545 eb56f79b1beb9f52 18176a85d25458cc 5300c4a74250e95b 70b764c7423aff9f 17a42a198de23b5f
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 56-byte msg
Key: c6de21e7557e98b8 8259210ee535b809
IV: f73b3239d3ab20f7 39cdf6fcd82b6d2c
Plaintext: cdfd25b367e58f53 2ddc0afc226c4c9e 4721043b623abd40 fea30615b328d0f3 a7e317f655f6c573 8d80d38bbcc9b100 6ec0e84811a8fee0
Ciphertext: 70172c2c768e0845 f9674683244326b1 810e93c982863768 ae8ae20c6f70135c de78935c8d3f7ab7 0b475b19f4ad5460 54c17a00d2b15192
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 57-byte msg
Key: fc0e99e3b0fee8db 5d763fd7a81b01be
IV: ab2bc3e23db3aed8 74022588695da880
Plaintext: 3b f4f98e57157d8df6 a0e47fe7bb0ddc8e c6232a2d920dce62 cd0522f1c186c7c4 3f6c3d30d557b07a 4750159a3daf763e 3a3b8a12cd94893f
Ciphertext: c0 eb5dcfec09484f10 6616a822347a8be9 a042dff58efa407e 5d18d7974518b42d 6fd54e75fe2644e4 0c7971717ed927ef 377ead21bf36e652
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 58-byte msg
Key: 0bce3e313c5f5e9e d53b18c4a73dedf2
IV: 55c9c2490bb034c4 6d532b76ce0cb213
Plaintext: a3c9 06b237faecd1a0ae 489af1f8ec65b198 ae7d8cd7bd2749b3 35e0fc3cf0e77d3e a0fb18201a66860c f53a1c5154db4305 00bd28eeba6fb5a3
Ciphertext: 1eb0 775770c7dbbe36f3 20a543b5e52c2c5d 11b593d25acbb922 2ba480829759d788 04dbdddb9d532bb2 0158ca161c0a5516 36afc416b527d7b9
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 59-byte msg
Key: cfd9bfeeecc28175 349549999064719f
IV: 462d910dce5cf357 e19247bbd2a5986a
Plaintext: 21e87f e84eac97b5eb0630 2df5d348ad64fab7 f701f1a9d8788351 08aed0dc515495a4 f3bdada748ecd837 a4f2bcf37f7729f5 d696a14dceee18ae
Ciphertext: 3dbbfb 7da64d579e22b833 b4d65379d5e2391a fbb81f50666d60d5 b5cc7b396d3b0ccf 9a3bfd8e4daf0de4 c882fbf83af44cdb b9ad9ec85c4f302f
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 60-byte msg
Key: 9bf5f868a0906896 d7e1ce99746092c5
IV: c52e26595da643b5 713475c7826ad9c7
Plaintext: 3c502524 9ffceabe5c631655 826fbd4159521964 8e19cf5e918473ff 3c154f02b56760f8 95c1a2824aeb8ec3 ba40e01528059dfb 5cf95558fe2da5de
Ciphertext: a476b404 32eb8bfc632649be ca2e3f61512d7b63 f7c5dc297c07a1a5 b8c6d11a17a972ed dfe59c4e2a260d2c 0e0f7cdd808f66b0 2e27a956b31e569e
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 61-byte msg
Key: 441601c8cde1b0cc cc06184b68203ccc
IV: 63fc83a8faf0bb06 0d6e5d0a80d8134a
Plaintext: e19677824b 671e888af4d5827f ab2a56c6ca2f6297 ba7a6eea9f70dedf 2dc42c5cbd3a96f8 a0b11418b3608d57 33604a2cd36aabc7 0ce3193bb5153be2
Ciphertext: 601a232e76 1236c291d6ec8e36 093352b5cb728188 67d417a0201c203e 717ea340c38de0e1 563a7380a82204bd adea1c275aceca3e b920bb2a508a653e
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 62-byte msg
Key: d3c06dfdb2d16e9c 357158be6a41d6b8
IV: 61e491db3fbfeb51 8efcf048d7d58953
Plaintext: 730ff30c9ec4 70ffcd663dc34201 c36addc0111c35b3 8afee7cfdb582e37 31f8b4baa8d1a89c 06e81199a9716227 be344efcb436ddd0 f096c064c3b5e2c3
Ciphertext: 59c2afded2ee 41fda6e5133e3a6e ca4695dd1355f1b6 f9a7287d6528b01f 40af3ea2c43b864c 277fa7f197807bb9 ec54ff36b9ee3035 8da9957c99551e35
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 63-byte msg
Key: 99993fc77394f9e0 9720a811850ef23b
IV: 2ee05d9e6173609d 86e1c0c18ea51a01
Plaintext: 2a00bb413b9cb8 188a703cd6bae31c c67b34b1b00019e6 a2b2a690f02671fe 7a4cf4d12dea320e cd499e72f12f3806 4f0cf9f339787196 68ddafd7f97161b7
Ciphertext: 8b96f5e3964d5a 7ede97c65316ff59 0bbc3350f08d3ce6 94b604acc4f802a3 d5bcecd7b96a056f d2f443bcaa41ef0f 4a75237ebdfe785d a9802b7d475094dc
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 64-byte msg
Key: b5683c2995679e23 853b72f469cb55d8
IV: 5e4bf6ca42b3c399 7670c23ee259bc6d
Plaintext: 3ae4a16a809a281e cbc8b66a467881bb 7b9ff5dfd2985717 54d1a86db5c5cc47 922aeb3df76b1828 2458307b911d05d7 2f70bcd9f10f7437 8b6a290b7a9cd76e
Ciphertext: d113b9739f49c0d4 e4f2ebcdfa50fc8c 120915d3a8d281bf 8db2d84cde0e135d b519ec5731714db2 677569ffa0ea23d1 b1c067662dc1beb5 fecef91cbe94752b
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 65-byte msg
Key: 44a0e24901c2b568 1a53a9d051a12953
IV: 01271561a7006321 a2a20cc037c8260a
Plaintext: d8 b04d37a687480734 22ea118eee35577a 2ac61ffd536dfe21 e01b36f6300142d7 c1f6aeeea2192cfb 2bb8e550eb710d20 e297bafaf0d8f691 8e1c12bebcaf3ec8
Ciphertext: 00 a66964d05879645d 1f6e05a201bc1fd6 d9dc2ad519cd1705 0474f3786d856fef 2492792d700d7b1f 3a3dff30c5c9878a a2e8040aac1d4677 3a95c22c67cb0968
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 67-byte msg
Key: a357e2fb7000f5d7 def4a080259b7eb7
IV: 52dba7c0ec307913 d8ff98547a273385
Plaintext: 1dda89 7b95abac8e22e785 9598291912bd290a a9f3d561d717a38a e0a825a0092cdeec 08cf54a8b94e6608 1213e07b59a24d2e 94330cd142a0a69f 48825f982e970b11
Ciphertext: ccdf22 5e093f83a33e2b57 47f5cda6bdea9522 a81c32868ce51b46 cd43ac1104a0a487 c0298bdae5175e15 b4d5e681931e9687 30388defb5f76245 8d324cc1605abc19
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 70-byte msg
Key: 68236fbe281830df dee72bf6c7ee186a
IV: f5fe52bc3db1dc74 50fea25c280a02ed
Plaintext: a6418b0779a6 05e54167b14ff4b5 d21181d26badb46c 4b4d5a2947fba583 c714d2d684fa08b7 8f0a848896cef349 63731fb1a57dce7e f3b9e7090e73d71d 66ea3309e0019ff4
Ciphertext: 124aa4be95be 83022a7f9661f984 25f83f611f104a44 d97ac6a4d02c0283 05388b60339a665f 786587c16c5240a6 db005090f8d9caec 7a7b93535ed8ad2f c4223ec08cd42773
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 77-byte msg
Key: 37ee7161d98b54d3 7717c387945390dc
IV: a141c67f2d8681e9 56130329830405e4
Plaintext: 55c84b9ada 837b2a04b02f995a 0b490feeae87228f 7a57573fb8ece6e8 0091be4a5a3dc938 a4687104341e6338 be52938677748002 7a46b98f6beba097 5b406e00ec70775b b6c3b05ee9b76e94
Ciphertext: 7ef1651d1e 8eeb54a8c425df73 a6f28ec68a870c5a 0d8e0ceb914df641 3d941152b4774a6d 594b23ba47ff419a 6727766515085dd5 54479dcea4d9613f 8c2f79d5dca36134 83acf7f8fcb44fc2
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 80-byte msg
Key: 527053e4b620ef50 f6162d7428defadd
IV: bcfb5dc60c2bab81 33edfa182341d733
Plaintext: f2af3c3c758abcc2 1076011bcc28784e aa6d4b30386e90cc 6132c00889646a86 da5728c9d847d399 3ce2f3a8ff067975 b5cdb1711cc77261 f58698031260b3f4 b17001d108de9a9c 2160eb62e801651b
Ciphertext: f6d60dd789ba58ad 61980248c3fe228a 822ed656059b5021 9c57768160766031 cdf1f40577f08351 e4dc830ddf88b7b0 6269172788b7a947 a24d3496541b03f0 678453dd25a72dfa 68b463705e2c5632
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 83-byte msg
Key: 2276d2e1beb90696 f26a4fe6bc1c451f
IV: 03ae9d2dd77b9568 fbd193b0a0a508bc
Plaintext: 74849b afdbcd84ec7c1e35 2c000c40ce161775 6ebbdc4ab8b88d81 7e6c9f0409cbc214 ada716a2a02f9cfd 0db5ebae63b424a0 f3112785baa10774 7becbcd712301884 04a9fd2a5a10ccef b062205789e2bd68
Ciphertext: dc3e0d ea41fe9e930ecc42 d4f87f9938412934 b109139dc3a2ce44 ed8f6f2a0338d686 632b44b90bb96a9a c289bd8ba49d38e1 2aa8c98fdaf3c502 b5a03c0cc4e30806 58d656f2a6323f02 1f78bb5fd67294bf
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 88-byte msg
Key: 61c30c16bd28b6cf a864487eaa6e35db
IV: 69e8e2c12996533e 8f1503e6aaca136c
Plaintext: 3418a77314d68ea1 280021f542ac6d5b 7040947e81e370de c4317a221333eaaf 108e2079affa4319 f5f62821ffbb75ac 456e063920998fb9 8adc83e625e035d7 808d3ed1957d1e61 96b026a7e98195f5 71d801990fa2f8f6
Ciphertext: f3344b1d6e28e2c8 fe3945e92b8c5b56 be73fc0e89007b49 b0c657c7bd5648e3 b2cbe0ce529ae947 99113f4f837fa2d5 c7b3be07e8788041 d2fa769c434ff0f4 5a36995531cbc95a 7f79c507bdbe527f 7e2551f0f9f1b32b
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 94-byte msg
Key: e8dae9b93c0b097d c823ce45679e9394
IV: e23208e7145f7ae8 4c4655e4f3bee77f
Plaintext: 6fa566a74674 35c68716633c66fb 750c266865d53c11 ea05b1e9fa49c839 8d48e1efa5909d39 8bd043535b49629e c27fb8f107345333 4896f62a07b8be8e e53f0562ac5e8784 9304c382be53a5af 05556176f6eaa2ef 1d05e4b083181ee6
Ciphertext: 2e8d0162f582 d2e003be7ec75cd2 f8784708e5d0e710 55bebbf4d2460fbd bcb35b0d85d11e1b 47b3a853cc51aae2 9dd84e17d0d69bb7 6b45db9af9fb6e78 047fd8ed1fd810cd 259c559a25a06b1a db68976f23f3d012 f4ecbdbb3af48dc2
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 98-byte msg
Key: cda5a485f74d7ad6 c8d14a95447557c3
IV: f5e99f3be1716bf0 b9432476533068c4
Plaintext: 5a87 5d38453745db8533 53e7031bbd86c918 13ddff08cf491adb 2de8503c3d5c4f74 36cb2e8c0d2aa4b2 46bc78df0bd538b6 7be42eae44b09073 74e2f78a8cc41234 d6489c96f94c8b16 cb1c8b086639aa8a 7e5955acf2ae83d5 a06b30627e850d8f
Ciphertext: 3067 05cbcf7382aa0014 ec33923d24694a5b 1511a5afdccad134 a0c7533298229a53 568e4c57100093a0 82a99b4d2eec36d7 00fe2391cc354bc4 ff29d1cfec587b9f 4cb48b3c2a825bbf 310b9fe3f37bae17 50060b4682149f96 9e42f9120143a289
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 105-byte msg
Key: b6769b32c8a42789 1024e0f839875dc5
IV: 435c4a00ca5bc75a 8ce30b3b26a74d0e
Plaintext: 1e a4e4e02656ad299f 2bade95d38f7f7aa 2ad0968d80124a4c f8ceea2f4735f587 0db929ef086f52d2 88b8612d2320bd96 a986de7e5b7e17b3 57f3b328571144f9 9b6138aa2436adb0 23498732b1a0bf10 c0b4fd2552d26ac9 e9c2bf9a3ea7a37d 352633df11cae241
Ciphertext: f0 eba22b797cf2cdea f1cea9b6de373607 8ff9bfa9c544061f 3dc7b2d645908c3e b078b0c66a777fe9 63df1a9962660516 781c1b5f378cc941 ff9827d829aff0ca c8921fece7dce996 12f2c3ef61d4fd7e c50ec028e9b84f91 7e192aeb58912774 f715719f0884f070
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 109-byte msg
Key: a783f34a3ea41f57 a11e0aced8ea9794
IV: 82360d64bfb819c3 4e431737f3988db4
Plaintext: 1c7ef857c3 15cc579667b63856 4024417d40073123 2ed72e228fd8fe79 779d79eea0ca3ef8 b91ea6db00b0f615 1378d9f903120d9a abbf5cea40adce23 29781d6610f069a2 391d2db8128072dd 0c9c423faab560eb d7d836ee7d1b0fba 532686ccf7f23e8c 3cd1d475c5af1275
Ciphertext: c547268321 5370e09ace2e69d6 f3512d7a12d88d8d 16de1e4360ff3201 b8b886ee6f1a182b a9920a8f0a38b5b9 d495121b600833b3 212ba68f48720fb8 3cf75bf50448dc1c 868c7471eb048b77 291a0c2d5c4ca5aa 840eeed108b0162f 72063f94ff3b693f 89a2c3e27529ffb0
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 112-byte msg
Key: 9766975b7992df5c 2aa4756fac2907a0
IV: b09e687c59277d6b 43845940c440a70f
Plaintext: 712b483ee40b3edf bd8fc93de784cfb5 1d4b81c8ac8b3c6e 7a23adac47633968 337b9c7d8033d00b 9add30105488dd3d 7577610273d292ec 7e9ab930c0e2f488 e43dd93dd5735c85 c878f3107c9ef8de c0094e533763478d 58d2c5f5b827a014 8c5948a96931acf8 4f465a64e62ce740
Ciphertext: d1069b3c7420e0c6 2248219beac74cdf e984605e2904e2a9 0c4f2ad5b204738f 0383c5b4afdfd11a 51d99f2d8e74871d 19d46891931b16e1 0f031185df52cc42 c7eec87dcb6cc43e ee5b7d99e9c49f5e 76fb99888955a7d6 2ee63de8f12dd283 036f4e98359a5388 79abc5c01e5696e6
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 119-byte msg
Key: e991e37ea823fa0f b21923b79905b733
IV: b631e6c7d6860a38 31ac351a9c730c52
Plaintext: ff72d9d308eedb ab21fde143a0ea17 e23edc1f74cbb363 8a2033aaa15464ea a733385dbbeb6fd7 3509b857e6a419dc a1d8907af977fbac 4dfa35ec02be8281 106d2d99c0b96f97 b45193ae270d58af 766c971fdf41258d 89a9fb22c540947a 949597b269dbb6c3 30e1d60e8e447038 6be33737ae93fbad
Ciphertext: bb906cbd47ab23 921dcd447a0993a7 4b54f78ce5b143c1 3ecedf17f012b68d 4823b6aaf15d1315 da749399ff95b6c6 ff54bbc74590686d 0e00e834b8c85d4c 47179e5793bab2aa f0da289249d419cc 27f4527781e50102 b1ba66aa5fc77da8 fd5b85e90c4eae05 fc9d095db85f6ea6 03a499cb7573dd2b
Test: Encrypt
#
Source: hc-128.c reference implementation
Comment: HC-128, 128-bit key, 128-bit iv, 133-byte msg
Key: 6f392a1fd910aacd 7f4f9a32ef5aa1e9
IV: acc0e01b891079f3 56ee5251be6516c3
Plaintext: 707f7db17d 13ced701dfa2f806 d6ead1a5bb334d6e ef29f70b885ab41f a23db274fa739c56 b94c103a8d8d52a4 fe71424700ed8b6d c4381e99d48bdf6b 5f269dc5d193482c a72e5e7182e5a790 7a3d22d8b4953f4c 37af4e4afb6c386a 43d76da92d651dc7 887cabede5315f93 f1565ba102b4d0d4 ef957164258628e4 f75a0869367284ee
Ciphertext: 033c9cd9b5 04efda94627f0344 a27e496419efd42e 40b5aa7c6e1602b3 1d222676a1219183 69e0807d77368e49 b4e802e1b0879f76 ccbba06e7403e005 c0c8557c3efa64eb 8fe093f2b01cfcc8 30e0cbeb60b82d79 b7d29752924b6d6d bd206ba3a23e9b22 8440fa4cb8eea924 e9cb192a33c9e2b8 2fd090aa5504c663 3210751efe8136e1
Test: Encrypt
#
Source: HC-128 verified test vectors
Comment: HC-128, 128-bit key, 128-bit iv, 512-byte msg
Key: 0000000000000000 0000000000000000
IV: 0000000000000000 0000000000000000
Plaintext: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000
Ciphertext: 82001573a003fd3b 7fd72ffb0eaf63aa c62f12deb629dca7 2785a66268ec758b 1edb369005608981 78e0ad009abf1f49 1330dc1c246e3d6c b264f6900271d59c fb1c12c1efcb64c5 603ca15ac896d1ab c1082b17b096c917 6547992eaa0eb646 f9e1b4bd35cff88f 047043aebedfbd31 0bb6ca762040ac51 c28203fb1873e539 7afea3aa16bf4a9c 6471aeaa6fc3e042 7d311503a31fe37f 0245e30addf14e93 e8df7d746043aa71 d45397b001787347 bcbf5f23b6fae5a9 b83203cfaefc46be 76f5e28163a6f72f 4ab72fcd90c69eed ef6d5c73539f14e7 ca0bf6a9f229f12d 1492efcfdad11ee2 6de44f0e843178d2 c989d4f21fe9b53c 03c12874e83a7026 3cdc1d88eda83676 7090fb77dae5ecc0 0f5bf5ca8879733f ac19e8de5c725636 7e39e8c9c4efcdd7 5dfa9660bbbeb584 b5593dff4566eac3 7e857d9b9e21ff06 395253c287ab3de3 48e133d87509e1f1 678beb1dfa278ade 7d766ae5863307de 2bb04f975864ebab 903123d6ba517ddd 4b145efb28f72896 8e0d7437fc750977 48e1937162416e5c 98dac486bafef1cc 017df9ce8db87b17 eadcdcfc5e6812a2 7f2fb2d97ced2c9e 0b729527b9b93817 facc1adb7c205063 2575c0a3bd7955ce 713b389bd7e1651a 450c051b77f83a96 da277a370fcebc43 03a18ab1c5ff5342 b319f0593a67f2be 6de7d256cec89f65 61ff60b8ab8621b6 720206975269023f
Test: Encrypt
#
Source: HC-128 verified test vectors
Comment: HC-128, 128-bit key, 128-bit iv, 512-byte msg
Key: 8000000000000000 0000000000000000
IV: 0000000000000000 0000000000000000
Plaintext: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000
Ciphertext: 378602b98f32a748 47515654ae0de7ed 8f72bc34776a0651 03e51595521ffe47 f9af0a4cb47999cf a26d33bf80954598 9d53debfe7a9efd8 b9109ca6efaddf83 2fe82100ecd66118 d73686bdf879cfcb f35bba32db097fea 1015ff9767b8ec40 a0f85f68bfe6cf5e 2da802d7c08ee9e9 c47510dc03d8fa2d 019a26eaeab7d658 38bac93ff6ac2b28 8c53142696c984f1 cdb28811c1587671 5524f5dd1c3a66b8 47565521adcc6caf aa6ee49fe8e03f13 276a1e8b6c4bed16 4812323da40b37bd e7f8dcc6a1d42ecf 6a49651f7c610657 b1df6e58fbef6a24 6d6d4caa83858839 86325be2b4185b4d 63d4bf766c5f4b73 0b89c3cd66018155 dfe9d37b6f5c1251 6d21763b2febadb2 12ac71388ff93586 48aa1a0e874d3b69 32d7f80a5657f88d a44bdc16aa21e531 e3e473cfe6fca9ee 20739339ce4f2dac 793210c8cc20897f bc468056d084995b 46d396dec7e1b8e0 f90a03be7b6804e6 7abd01162e7d9a1a b9df064ff3b775de be9212c7a5b86658 97be1dc3d112ca8f 5b17b8e803a57d30 530469fde4882f2c 8abadeb718ef4c48 303cf20e6453d735 8dd52e67c721381d 8bdc1dadf206f10c 7900453dfb59e3ed ab05d8816b74a79e 05a77945dd27a2f9 5bb39df39c64bfa1 3f2aae924d3df4fa 22899838adb60980 6c022c36180a3e46 a547cff7f4de1151 a81aed3646b2d86e 1f0f3c22c92d3459 593ed599d1a535df
Test: Encrypt

2330
TestVectors/hc256.txt Normal file

File diff suppressed because it is too large Load Diff

107
TestVectors/hight.txt Normal file
View File

@ -0,0 +1,107 @@
AlgorithmType: SymmetricCipher
Name: HIGHT/ECB
#
Source: HIGHT reference zip file, file KISA_HIGHT_ECB.c
Comment: HIGHT/ECB, 128-bit key
Key: 88 E3 4F 8F 08 17 79 F1 E9 F3 94 37 0A D4 05 89
Plaintext: D7 6D 0D 18 32 7E C5 62
Ciphertext: E4 BC 2E 31 22 77 E4 DD
Test: Encrypt
#
Source: HIGHT reference implementation
Comment: HIGHT/ECB, 128-bit key
Key: 29 23 BE 84 E1 6C D6 AE 52 90 49 F1 F1 BB E9 EB
Plaintext: B3 A6 DB 3C 87 0C 3E 99
Ciphertext: 23 CA D1 A3 CD DF 7E AB
Test: Encrypt
#
Source: HIGHT reference implementation
Comment: HIGHT/ECB, 128-bit key
Key: 24 5E 0D 1C 06 B7 47 DE B3 12 4D C8 43 BB 8B A6
Plaintext: 1F 03 5A 7D 09 38 25 1F
Ciphertext: 52 BD 91 BB 26 F8 ED 99
Test: Encrypt
#
Source: HIGHT reference implementation
Comment: HIGHT/ECB, 128-bit key
Key: 5D D4 CB FC 96 F5 45 3B 13 0D 89 0A 1C DB AE 32
Plaintext: 20 9A 50 EE 40 78 36 FD
Ciphertext: 95 02 B4 6D 87 B4 41 67
Test: Encrypt
#
Source: HIGHT reference implementation
Comment: HIGHT/ECB, 128-bit key
Key: 12 49 32 F6 9E 7D 49 DC AD 4F 14 F2 44 40 66 D0
Plaintext: 6B C4 30 B7 32 3B A1 22
Ciphertext: 20 CB CF 41 65 24 E5 A6
Test: Encrypt
#
Source: HIGHT reference implementation
Comment: HIGHT/ECB, 128-bit key
Key: F6 22 91 9D E1 8B 1F DA B0 CA 99 02 B9 72 9D 49
Plaintext: 2C 80 7E C5 99 D5 E9 80
Ciphertext: F3 1C 89 E6 6C 4F 5A 6F
Test: Encrypt
#
Source: HIGHT reference implementation
Comment: HIGHT/ECB, 128-bit key
Key: B2 EA C9 CC 53 BF 67 D6 BF 14 D6 7E 2D DC 8E 66
Plaintext: 83 EF 57 49 61 FF 69 8F
Ciphertext: 39 21 C8 3B FE 5E 59 6E
Test: Encrypt
#
Source: HIGHT reference implementation
Comment: HIGHT/ECB, 128-bit key
Key: 61 CD D1 1E 9D 9C 16 72 72 E6 1D F0 84 4F 4A 77
Plaintext: 02 D7 E8 39 2C 53 CB C9
Ciphertext: 98 2F D7 56 17 44 97 BF
Test: Encrypt
#
Source: HIGHT reference implementation
Comment: HIGHT/ECB, 128-bit key
Key: 12 1E 33 74 9E 0C F4 D5 D4 9F D4 A4 59 7E 35 CF
Plaintext: 32 22 F4 CC CF D3 90 2D
Ciphertext: BB 80 F5 0B 35 11 5B A8
Test: Encrypt
#
Source: HIGHT reference implementation
Comment: HIGHT/ECB, 128-bit key
Key: 5D D4 CB FC 96 F5 45 3B 13 0D 89 0A 1C DB AE 32
Plaintext : 20 9A 50 EE 40 78 36 FD
Ciphertext : 95 02 B4 6D 87 B4 41 67
Test: Encrypt
#
Source: HIGHT reference implementation
Comment: HIGHT/ECB, 128-bit key
Key: 12 49 32 F6 9E 7D 49 DC AD 4F 14 F2 44 40 66 D0
Plaintext : 6B C4 30 B7 32 3B A1 22
Ciphertext : 20 CB CF 41 65 24 E5 A6
Test: Encrypt
#
Source: HIGHT reference implementation
Comment: HIGHT/ECB, 128-bit key
Key: F6 22 91 9D E1 8B 1F DA B0 CA 99 02 B9 72 9D 49
Plaintext : 2C 80 7E C5 99 D5 E9 80
Ciphertext : F3 1C 89 E6 6C 4F 5A 6F
Test: Encrypt
#
Source: HIGHT reference implementation
Comment: HIGHT/ECB, 128-bit key
Key: B2 EA C9 CC 53 BF 67 D6 BF 14 D6 7E 2D DC 8E 66
Plaintext : 83 EF 57 49 61 FF 69 8F
Ciphertext : 39 21 C8 3B FE 5E 59 6E
Test: Encrypt
#
Source: HIGHT reference implementation
Comment: HIGHT/ECB, 128-bit key
Key: 61 CD D1 1E 9D 9C 16 72 72 E6 1D F0 84 4F 4A 77
Plaintext : 02 D7 E8 39 2C 53 CB C9
Ciphertext : 98 2F D7 56 17 44 97 BF
Test: Encrypt
#
Source: HIGHT reference implementation
Comment: HIGHT/ECB, 128-bit key
Key: 12 1E 33 74 9E 0C F4 D5 D4 9F D4 A4 59 7E 35 CF
Plaintext : 32 22 F4 CC CF D3 90 2D
Ciphertext : BB 80 F5 0B 35 11 5B A8
Test: Encrypt

713
TestVectors/lea.txt Normal file
View File

@ -0,0 +1,713 @@
AlgorithmType: SymmetricCipher
Name: LEA-128/ECB
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/ECB, 128-bit key
Key: 07AB6305B025D83F79ADDAA63AC8AD00
Plaintext: F28AE3256AAD23B415E028063B610C60
Ciphertext: 64D908FCB7EBFEF90FD670106DE7C7C5
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/ECB, 128-bit key
Key: 56CEC76DBD39F3EB7F7AD2A492C991A0
Plaintext: 2D8CCE99726D59AF50B0375DA8C3EDACAE17FBA6932FA60E61F7FA4E265610B1
Ciphertext: 381D0BDBC808C408D1BD0C791FB08469F19F6319329F9ECD5CD6CFD0C3892BEC
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/ECB, 128-bit key
Key: 54068DD268A46B55CA03FCD4F4C62B1C
Plaintext: D72E069A7A307910E5CB5C8C3D98B19B30A326BA9479E20D4A827D546991501A98BAF02FBC64F559D49E004720B7FCC6
Ciphertext: 6C83D52A769B4146F77EFB6F64193D9AB4763140CB560574792788D8D051A6F842A3C6A731A9D88AD0AAF959F82309C3
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/ECB, 128-bit key
Key: 8908A3383D1544419AD5C4C34D4DE40D
Plaintext: BB64C14FA0F2A151F51AEC6518DA799B27E00B33AC9F1C5880A3D90BE9216D5D06D382E16D02056112E52AD06B29B180D1D167952A40EFBAC594C21285367571
Ciphertext: 1BB3EB3EEFB15CB8B846714332DEE0579AD3E047D1EFA108A996D3F2F0E6532C6E7449E1286B714356525BA48B8A061476B0517FD563499B4145FA62DEAFCDD4
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/ECB, 128-bit key
Key: 42AF3BCD6CBEAAEFF1A7C26E61CD2BDE
Plaintext: 5183BE45FD2047CE315189C269B483B337A2F2FBE54C17655B09BA2944EE6F1E6DA0182B6D66ABFE8B823601DCC2208AAC52B1531FD4D42918B21CE85AB306A6EECD7E2FC43BA4B29DCFCFB92788D25E
Ciphertext: F3B6BF4AFBA7103E32B2AC2E7B46FF91E872BCBB93CF52E294ED5539871C4893D14C54088646E2FD0B7C62D583F3AF6718B0BA83C7A29E2F962DF06062121C521BB9E76D7035070719EDFB409C5B83C2
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/ECB, 128-bit key
Key: 6A677FBC647F6AA5F04CF093ED4577E0
Plaintext: 9BB4F63948C6B9502DDE5ED1932F24983A8A6521FA74603FAB7C3C1143CC4A323EFD8B3143307241045AEA3166DF9B9EE26369672ADC3E6110EC0A4CA46F08069D5042FFFBA057EDEAE97CC1E8BFC1D92A9996773CDF8D72E944612B5A5638C3
Ciphertext: 5C1F5BE78BE59B992EBBC2C049FDEF3E46EAA59934589643468FC5B8BF96377CEC45441D00A380BB71D544D759867D7906EAC58B455292D33590D915F8722253AA2AA3D1CD26D6E5DFC4D2BFC4297BB2E74EF0592886162A17C6BC409999FE85
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/ECB, 128-bit key
Key: 8253258BB93FF1BCA6331B6963F81DB1
Plaintext: DCD5F13978A4D4DAFC2B4A96ACAA62D1B3B13BBDC434C71702E1CF111DB1378FBEBE849526549B00124ACB75E1930E98F8108C7E66A86164C49BA0A15F1398D99AFD56748D166B4EF249EFB04238C5801B1921B4E5C3480CB50897017146C7F936396FBCF613CA2B66CFBB3017C20EF1
Ciphertext: C59436538731DFF170276D0C2B4CB36820D738B8560AAC289DBB3FA55309DAB2783A51395F1CCCB7BDA561DEE95A0389B0FE78FAA1D4202B193F3773816EF020C0011163563ECBE2A8B020BA4603DD60A6C43C5A9EAB7A540AD1DAC2C1C3646C899936D33984E7A8E8C979ED67C6FE47
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/ECB, 128-bit key
Key: E27301498AAC03789DD1BB199B714C55
Plaintext: 5A1BD857A97343FF348439DBA858725317C634239D8C1A0F449E15D125BDB057D04A982BEE5D5B332512709A3C23780E80BCC32C668A16387116AB1256517A655F6FB7220DF99C2D011E68561C4BA88AE6FBB54A2CCF7E5DEEE187C2785632E9CE323E234D708D5690532AF591F78A2F102B12673983DAE581A8B1CBD1F3614A
Ciphertext: 131F71B1FF2593741530236C37ECC1771C9F5B51DC1F975105C9EB9D50349EBA432DEB097D5E6239423F774CC62FCFFA364D7F82037BB0B5EB3E985705482B89948C1C1EBFC7634B80EEBA8BDE49C33931CCBEF5BD64AB808C0579D66620771A72971820D52862CEC61C2A05493EA89B8A0A3429041DCE4583E78CCD14AEEA5A
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/ECB, 128-bit key
Key: E63A3415F8EAB6169956BD61E14FA766
Plaintext: C8F5E36AD3CCB338F3132F13AA518EF06F30A1E2548EA0D6E6D22980547C8695D4012F3B43D58FBE0BC90B844A97414331BB8D71AA85D2FC3D6D773C34A6AF26FDF6FEC2D1C4F9DF93734D05FBEE02ABF38401AA41F7D4F267CFAE7BC7F4AB7F0B7C58E7C4C2760351B8FB7D037E5A907F330475630B2F1E2CA1D627578F010AC63D469266F690920F411FD6AB6ED05A
Ciphertext: F4E15BCF683501B1D3432CD57D246D89CCFCE6714295A16170067981F4BBEBDA8C6B144FA12E3A58FF7113B8C9453379F104F394DBC416BB35ACB036479A260958B20A97A17BC353CFC92E62139114DCE81DD50FB89A178C2F020D3A6AFDC2037AEA91CE323802E1A1EC5C70EF177EB6AB5921EE94151F37A48976992E09B9FD7544F34642B05B7E580F1A9AC6A3D9C1
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/ECB, 128-bit key
Key: 9B6F9FBA56E96AEA538BF8272A9F392D
Plaintext: F6DECFABFD89CEF493B5C0F73BE7ED7110E0D96163BA0DBDA6341A63884BDC52620AFC1AD2A2B891A5BDE7C8FB10373DA52FBA52D2A6A1FEEB4547C3BBBB71E0D367D4C72D6AD7D10F019B313212382724044A76EBD4AD17EB65842F0A18803F119D5F9A5509B21D9828E41A2A147895530692B3F66DB96F6E3DDB8FBC8A91D6E455A57C94A6D2DB07DBCA6B293F7EF0FCDE99F23A984D6E3C7553CB1A382D0F
Ciphertext: 98D85D7D0D136A80CE74864469D77A03EF56EC9B24A7119DE09508A04D6F437E670B54B36E2CBDE51CDBD01E2CEA53332C2A14879FF77E02000A00F159FB1865E7DBED543357917D783F18B06FD8EFA6686D2E362BCEDE94BB7687ECFD7501B79F912740840683722466440D240EF0355604BFCFBC30F16F03D00543582A52718526079355164E6B8CEC36E346B9092D9706C48946C497629C9C9055D9D89777
Test: Encrypt
#
#
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/ECB, 192-bit key
Key: 1437AF533069BD7525C1560C78BAD2A1E534671C007EF27C
Plaintext: 1CB4F4CB6C4BDB5168EA8409727BFD51
Ciphertext: 69725C6DF912F8B70EB511E6663C5870
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/ECB, 192-bit key
Key: BA838FE55FAEFC0ED7AF051790462F01D7A2C778FAEA2405
Plaintext: A9172C84A2041AD98EC87EDF254384A199F77ACD32198D6535E8D3B80B3E8F91
Ciphertext: C6C5F98E4C633E7463518815BF9087C0289DEB0A1B16A9AF31FEE64455A1D025
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/ECB, 192-bit key
Key: 9F65B0AE082B9A73683929E014A0F3C1F5B5CE242E1F9310
Plaintext: FE2E2174E86FA45E127D176DEC190789117D9AD172EED1D5B1910A06CB7FC96BFA1BB795DAA4EBD4CA0669AB95F6E882
Ciphertext: B465597F4DD76E342F8FCA5D0D095CA9479F6AB6EC86AC51F9F372448AB3CAB73F051704FBD350B2D2EB2B270B416A4D
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/ECB, 192-bit key
Key: 523DD99B8854A4479632355A5262B7DCF1589F012705ED5B
Plaintext: 8EA9AE4F4CE9C6C6F121EC249EFBF67E6C4157080BEFE6CCAA8DE1A217BB315C280EEF41591A28BDB6D0DD56FC0B4EE2FB6579F73E4FDDA4EE61835EF4EE3F3D
Ciphertext: 104D15C2618A9DA9AF8C563A4CB1E14ED869C864CC1EB190731042183F46C9A4FB09472B8485345F94AF5A55257DC1D7A4FA3A8CD46161C74387360061770C5E
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/ECB, 192-bit key
Key: 5EDC346904B296CF6BF3B418E9AB35DB0A47A11133A924CA
Plaintext: 857C8F1F04C5A068F9BB83AF95D99864D6317751AF0332D1638EDA3D322644A837870CCC9169DB43C155E6FB53B6B7E4C13330EB943CCD2CCCE3296382EEC4A4CC2A034DE10278387D4F643587727AB7
Ciphertext: 72223A93942F7359FE5E516A05C8E841C59BB74714809B13A9757B8293F9B0B420D1C5A4F440F365D08F9425E347B5DD23A9ED05F2CE1618CCB09E712C59B97B7674517FC875AE9F6F188BFA5A42BAC9
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/ECB, 192-bit key
Key: F2A1E6CDE17E8E540EEE986C6C282C280B0C7B8A3CB700AE
Plaintext: F754054579346A453122A2DFDDF0FEB2F1562E3E38FD059BBDD67C6AECB0FA0DF50AD21371250DF6485E6B09D2BBA4AC3CC4F3C22E94D565AA2F0FD83816EEBC4019D287B76DEE33FDFE4933060608ABB9DFF0E0951627EE9AC03AB967116425
Ciphertext: 3ED82167994A687B8B4F5FF8DBCB0F15CD3FFB743C126522577491B04FD9308EDC92ED3CD4F103A3ECC8503DD2128DCE772AEB821A518A023EAA9853D01E473EE45F979048ACFD7F832DD3A69A7B77996BB16B1D1CEBDB33AD4EBE4D24489D02
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/ECB, 192-bit key
Key: A02A0E8A923392621AAA4445C2FAB3182E502C81B7AA809D
Plaintext: 553107F6C2C8E5AFDCE58C024C9F83ED650965274EBF2C5964BEAF8BDA796ADCA2297E779164F8C2BEF156D92BDB483AA7C4B3C2F27CFBD823D282E847AA6C134B50A6241C0C26C60CF774F5780C69B3A78236FCF65AA9FB3234AC7E46660FA8164F87E5AAE9F6238F9EEC407A5D6EBE
Ciphertext: 5277CF7E992F5BDC4EAEBA7DC00BFE36DB3292A73DA86B230ADC91E94C021679A68C6B65FCDC370C0CF443EE945F4748FCEFB8DD1241EF6A2D2036967E9EBCAAFE636DFEBF0BB23792A0F22C9873B54726C7157666B4A331C79C709D29B2D598B86D1CED7725175E882F92AF04DDBCC8
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/ECB, 192-bit key
Key: 2FECF7BEA180BD2C5B8B35371ED5D904CCCE29A38423F042
Plaintext: 0F8FC8A07BF4E0C505AAFDF13D16BFD2647F26F9191E548F35749544F3E19C89547110FFC1F9472FF263517B1046385416BA86AE7D6A08B118EAD2B23D4B836125EDCA4495952964BEBFF9466336AF1C39E15D3D93E07CD33ED8E8D3AA8A2C334BAB00573FEF10CC3168FF387D0EAC91959FB48EA3A9385B70E4E09184C61F65
Ciphertext: 1EAB3C4E6B81F928D93389D808EAAB91A8B90862E63E2018E9CB50082DD172A094B6ABE3031D6DD282AD79B1AC45A9C7B9368C719EB75665D53342737C924221DB2C709723BFA91CF2070A3FE2A19262608937A23D84EF2E8089C6BD8254BF71C9263E8221609EDE733E33857C37E6A79079654715340D48FF335C133FFB03EA
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/ECB, 192-bit key
Key: 8F52B920073183CF13036A3BA8F7B71BF1999289F5ECC4B3
Plaintext: 74B9C1D31126E561B78AFE8635800BD52B3B43362A195922177AFF16D0D2A94112FD93809BD3058D8BFDD67410072F4642B591104C9B190ECDE8031D7E836E6F14595E8268F50753D55149CFE1EB778A201C5CB356A58048DC8BA78645269BA440742BC0C0B3741A5B2E5F80F0576B098D16AD06906115360C0DF2396EE3B84760F70122ED35D349E63D216F8571942B
Ciphertext: A466C6A0E7D3E3A3756B591C8F5302E235B0EE64F5188B4DCB51A9204B54094D4A1CC3FC34E22401C618AB8ADB28D41531762A576EBCADC956BF19E5B29701B2A77030EE100B65BCF8397853EB2074402089FF697046D538C560D10172EA8DE81299011E3FF0A0FBD87499FF50A0B3E7E59FA06753FC1BC4171046380323875C24350A9E98DDF69F6D7E37E363DDE1BA
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/ECB, 192-bit key
Key: 514B8BF141F560412413ED1E40E34EC23A89E99036A4AC4A
Plaintext: 3E259684E86179593365FE5CB389E9D1EE489E1E054EE47C97D3EAF2E22888842B8FC6A86050A2F9FD090E2F2C46394F30510F1F034C03DD3E7C0C303AE8ED5F7523BAC13766987575E1C452F553D721B3D9480A8403324DF92D5733860D6643E38879B8B3CAE233649527AE56D94BB13F864FC8CE9EF9348E8ED4E10EBE78983F670B761DA5089D91CD3F2996001E669C002E402943E0FAC6468A231924ADC6
Ciphertext: 6239867F34D57B91729410F93797C69E45526F13405EC222EDFAE682B6C2D75B332430D30BC2479735ECCD3BD985657EC965EB93394BD88CDCE7A76BE81255AB3418D57082770129C3482A2B1E51F14E2C69A24E6405944487B08554D75A35043D713BAD5643F6C4FC1C5CF22B3C72479DD060AB92B4DA51B76DCA855769143608A92AE8DED684A8A6D093765F4149CF1A3753B849368E99D066D2F711C27F75
Test: Encrypt
#
#
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/ECB, 256-bit key
Key: 4F6779E2BD1E9319C63015ACFFEFD7A791F0ED59DF1B700769FE82E2F0668C35
Plaintext: DC31CAE3DA5E0A11C966B020D7CFFEDE
Ciphertext: EDA2042098F667E857A02DB8CAA7DFF2
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/ECB, 256-bit key
Key: E7FE92FD374D30C43F5DC204DCAE9D4EAD6C0663BD8CF5EC6318196B67C71B72
Plaintext: 66D127137801A9970F0C5472232169778CC13649AFD1DD125CEE5677F700B7CB
Ciphertext: 16BFF149DFA234BF7FBE2C59AE88A1E99A1BF8D91910A7F67D088432E1C6D790
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/ECB, 256-bit key
Key: D612B382EB6161E9A3B23F150DE977193FD8617DF65548EB7C8F712ACFA25951
Plaintext: FF683F34D892E223C1F88CD4E42E4F9D8F588FE6DA3FC1DF8BA4716E36D48A6CA97CD21087BFB4AB32864296EE177A69
Ciphertext: 7BC5E4E4D9C4B5C4694F5580896671B5F58324B62005C8F8A52A65AA8E1A9B01DC90BAC0817013AD6C9DD0F216403D6B
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/ECB, 256-bit key
Key: 44EAC86EA5B7CD5650D45F2A76BED1849BF674FE3F0E5DEBBE03694575CD7FE7
Plaintext: 263515FC9DE7F6B894C84246D589B6019E7D2DE649A767492C180AC8BF78E67EFCE27D790CF5C36D1F2722A99C5DC14B7AB906B0EDB35A2F466C2C07143E3895
Ciphertext: AB395086E9238A16012DB04844028340C21C557AAD92C0ACA2D261EF3A0F89F9F060462F79879B10C6A9A1C168DCBFE8731E5176604EEB14CA1442D15173C5CF
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/ECB, 256-bit key
Key: 909809CB3809BCDDB99A083D12617BCAF7530645735ABC04D2A8D7EABE4AFC96
Plaintext: A800C0DB6A4C6A702AC9FAE981BE6BE6DCF3368B23C317309973135904C2BAE80DC1AA91E9E5548F395B03952F9B1A08F3409C6B4517F21B6376E93C2DCFFBF38784CFD5FFFD03A0B0F9282965210E96
Ciphertext: 2A50FA90ED00EBFA1188CC9113DD4337B380D5F8C1582C8077EC6728EC318AB45DE5EFD1D0A62E4E870352832BEC223D8D5DCD397209C824E4A957F65D785BA5D7F9A4CC5D0B353528DBCCA63548668A
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/ECB, 256-bit key
Key: 02E342CD207DD62DF858607B8298451FDEF13890F2BCFD0D554A738E6B78D1FA
Plaintext: D283309AFD1E4ACE1FC281FE4B4623D4D9AFECA80B49CC3CF1F7EBAA89C7EB9A2BC96DB82422D666A25C53ADD0001A7A4167F30792CDF7974BA798660736E2E0D55D0111DDB0025D47CDDE7158EFB479DEC05693CF6F07842D0383AB2CEF4033
Ciphertext: 247F64E04D91ECA484BE9D60F678EFE6975CAE82D72EAD270F6DD2EA6D63361EB88F6FA6F58FAEBC1A16ABE6E5D92939B669E0C55EB667E9AE0052D747C0B1D5A5F71AD659C297B0D0A45EA2A5088852198FC88DBBAB1A9AB83C67F737769B60
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/ECB, 256-bit key
Key: 97E6F48C70F0571BD7BE2A302C3A783978631C360958836D5DB2B35F42178CFA
Plaintext: 3A0D4E10240B5C0819D640D4950BEE23D7F74DD78AAFF3B9A45D306B8FD94F9F8779188743299A8CD7BE2743D9879F9DC225F25E989DE0D0CAAC03B85C5B108943D25AD813719710D71DE76740D81210039511B27C4AD11A9746332DF0C5572039C21AEBDD0CDDFAE29C89261426CFE5
Ciphertext: BEABF62347C9DDC68D33015757F5309CC11E9CADBAE3E0BCCD25CF01FC31F68987C5055A41347C4E0D054603D3FF329CC9065923D01A11E7D95DFD5208FEF65122102F9D50B4459839F3720CE24310FDB2124C4E7CEB6D7548C6841852B7A64019D2CAC995F6B84A00BED386FCDCD96A
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/ECB, 256-bit key
Key: 60EEB5BD7EDD4EFFD3D4C8B19540ADCC30EF62A8E822F4B4C0E3136A9B985F82
Plaintext: A2D9E366E57FDFE745FDCB2E91F498F5EF0139F77EDA62A43999901A1F57495191FDA595FB570D3AB66A438B2D08A2033FA1A8C0E55CB1341566051EE68A15B8F4030232068E5F60EEC338B0B1A4535EE877B5EB66D168CB1BF47C5E385A4C21949203264F4B5EC1B5AFB38565F2326EB22A6B60496110D014E8FCC15FEF75F3
Ciphertext: B97E56C7BED6B27CAD1F79EEFB1B4C04559B8632BC5767734E66C402B406B6682C4DC198F0D640982789B87DBC6EDA1914A9E21AAFFDFC360CA77EA34CE73DCB1E42A61E5A3D01A9D5CB1A8D8CAEC8ADAA2317287E48F450C933EF3BF938A060929307E082D06E6061D3EEFEBBA69FCC43FEC4BA75E77F1F6331B993BB5E58D6
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/ECB, 256-bit key
Key: 3A53AE571EB790C5D3D6BAF19017C79C6563CF07D63330ADC9ED8E31A2701896
Plaintext: ACED0DAEBBFA7FD50FE158DF7C3E9A4EC8C9EBC8557050C9FFA939964806BE72B30928136D3BB357327892346F8D34EDA405C68C0D3FF98C81C405D69AD8EEEF164F056F7DA2B3B5044272D9B22C1CE2C1BE683947C9B15E16E7FADAE00F30759F66AEA8335807554DE8FFB68D44DA94E79DDAB94B3503A785BA218A62D20C6C14F72BA8D78537A1D51141B347FDF76A
Ciphertext: D0F21340B914957E0E5C180376F4A2B3EB50EA171514246209FF259A32EDDF71EF819AEEED2936B1E8FB5B90FB399468A498B501DEDA9280770D903CD81898ECFFD15C3F27AC0FC2C8586B7E0059E5E4FAFF0E2FEE1DA1CCB145CDFDF3CA9E12BFC5F642DFCF73F0D7146969F8C4E050F83C9FBD71CDD39EF74540BBE9FDF94EB2BA543E556202EDE13C7108A9FD50B1
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/ECB, 256-bit key
Key: DE4923F261AC74CF97E481CE674A0B3C3EA98255B150CBFF646641B92A7EFACE
Plaintext: 6D6B4BCED1568E3E140E228F399EB44DE525BD9909E24CD9C18F06AE7CF06B275EAB5B34E25AD85DC4DF0DB31EF78F07D113E45B26634296B533987C867AD3DC77B05A0BDDE1DA926E0049245F7D25D3C919FD8351FA339E08FA00099045B8578123503D0A121D46DC18DEC84357FD1796E212F8D2CFA959828E453FE279A5FF43AB45B1B11628E2D4D0D58914AEA03C00142AA4F10B2B2FEA946F04C33D1F3C
Ciphertext: B73A0064A429EBE6A7CF35D7ADB94F24A2A0FF7A1D835522453A67EB8FB4FED63DA51D9634FF4C70A764DF3F6F3763E0D3845630774219A819C26EADFD3B93199935A95BD4A951D4467723E12FBA1CA4E8B135FA1FB9ED9FAA7FDC79D2857F78AC8D8C39C11D33D0AE58B6E5E0EF78195C0C8214AB7D3A82B91F9A7BBE89D6A0796E9DEBC69AEE8811011B9D48EECD8DB7BF71566EA6D8A0858E596432E1803D
Test: Encrypt
AlgorithmType: SymmetricCipher
Name: LEA-128/CTR
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CTR, 128-bit key
Key: 0x7A, 0xD3, 0x6A, 0x75, 0xD5, 0x5F, 0x30, 0x22, 0x09, 0x4E, 0x06, 0xF7, 0xC8, 0x97, 0xD8, 0xBB
IV: 0x0C, 0x5F, 0x04, 0xE8, 0xB5, 0x12, 0x19, 0x5E, 0x74, 0xB3, 0xDE, 0x57, 0xE9, 0x70, 0x97, 0x9E
Plaintext: 0x08, 0x7A, 0x83, 0xFC, 0xC1, 0x13, 0xA9, 0xF3, 0xE0, 0xE9, 0xD5, 0xAF, 0x32, 0xA2, 0xDD, 0x3A
Ciphertext: 0x2B, 0x73, 0x49, 0x7C, 0x4F, 0xC9, 0xEF, 0x38, 0xBE, 0x7A, 0x0B, 0xCB, 0x1A, 0xAB, 0x87, 0xA4
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CTR, 128-bit key
Key: 0xE9, 0xB8, 0x28, 0xEF, 0x41, 0x87, 0x71, 0x31, 0x64, 0xA4, 0xC9, 0x5D, 0x8B, 0x71, 0xDB, 0xFC
IV: 0x67, 0xEE, 0x74, 0x3E, 0xBF, 0xD2, 0x43, 0xA4, 0x5A, 0xDB, 0xDD, 0xFC, 0x1F, 0x62, 0x03, 0x92
Plaintext: 0x7B, 0x32, 0x28, 0xA5, 0x03, 0x9A, 0x2E, 0x18, 0x5B, 0xC1, 0x71, 0x6A, 0x56, 0x3A, 0x06, 0xE8, 0x5E, 0xD8, 0x45, 0x21, 0x17, 0xC4, 0x84, 0x9B, 0x3F, 0xCC, 0x26, 0xC4, 0xD9, 0xFE, 0xD5, 0x2B
Ciphertext: 0xFF, 0x94, 0xA7, 0x09, 0xF1, 0xD6, 0xC6, 0x83, 0x32, 0xC6, 0x61, 0xCC, 0x8B, 0x6E, 0xE7, 0x5A, 0xF1, 0x8F, 0x0F, 0x87, 0x88, 0x90, 0xD1, 0xBE, 0x5E, 0xD7, 0x93, 0xCC, 0xE5, 0x07, 0x1E, 0xCC
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CTR, 128-bit key
Key: 0x8A, 0x76, 0x0B, 0xF0, 0x43, 0x74, 0xD7, 0x7A, 0x20, 0xB2, 0xDE, 0x67, 0x90, 0xF4, 0xA0, 0xC9
IV: 0xB7, 0xE0, 0xFC, 0x8F, 0x10, 0x10, 0xF6, 0x41, 0x57, 0x66, 0xB9, 0xF1, 0xA6, 0x9F, 0xD8, 0x6E
Plaintext: 0xDE, 0x2B, 0xD9, 0xBA, 0x48, 0x3C, 0xF4, 0xBE, 0x7C, 0x1E, 0x18, 0x3D, 0x82, 0xC6, 0x2F, 0x07, 0x38, 0xAD, 0xA3, 0x6F, 0xF3, 0xDF, 0x21, 0xFE, 0x69, 0x4E, 0x9D, 0x69, 0xCF, 0x6D, 0x96, 0xC1, 0x3E, 0xFA, 0x9B, 0xEA, 0x5B, 0x1B, 0x0E, 0x4E, 0x37, 0xAD, 0x28, 0xD2, 0x74, 0xD9, 0x3D, 0x0A
Ciphertext: 0xFD, 0x38, 0xDB, 0xF9, 0x13, 0xFD, 0x39, 0xD2, 0x6E, 0x13, 0x87, 0x01, 0x89, 0x35, 0x4A, 0x6D, 0xDC, 0x90, 0xFA, 0x49, 0x44, 0xBD, 0x20, 0x40, 0xC2, 0x24, 0xEF, 0x2D, 0x4F, 0x52, 0x65, 0xB9, 0xD7, 0xEA, 0x18, 0x8A, 0x08, 0xAA, 0x90, 0xC8, 0x36, 0xCD, 0x21, 0x77, 0xB5, 0x69, 0x04, 0x7B
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CTR, 128-bit key
Key: 0xAA, 0xE8, 0x41, 0xA8, 0x08, 0x58, 0x8C, 0x3B, 0x3F, 0x2F, 0xDA, 0x16, 0x9B, 0x8F, 0x96, 0x8D
IV: 0x73, 0x8B, 0x58, 0x68, 0xC4, 0x39, 0xAC, 0x91, 0x19, 0x08, 0x15, 0x10, 0xAE, 0x54, 0x51, 0x39
Plaintext: 0xD4, 0x38, 0xDF, 0x24, 0x97, 0xA4, 0xBF, 0x5E, 0x9F, 0xAF, 0x79, 0xDE, 0x54, 0x2E, 0x60, 0x3B, 0x46, 0x85, 0x18, 0x1C, 0xCB, 0xBD, 0x56, 0xEF, 0xEA, 0xD7, 0xE7, 0xDE, 0x77, 0x60, 0xF4, 0xFE, 0x80, 0x46, 0x84, 0xCA, 0xE8, 0xEA, 0x42, 0xD1, 0x52, 0x76, 0x81, 0xAB, 0x40, 0x71, 0x7D, 0x31, 0x7C, 0x91, 0xE3, 0xEE, 0xB8, 0xD0, 0x94, 0xD0, 0x71, 0xC1, 0xA6, 0x23, 0x19, 0x25, 0xAC, 0xC0
Ciphertext: 0x65, 0xAC, 0x04, 0x22, 0x41, 0x45, 0xF8, 0xD5, 0x26, 0xB9, 0xAA, 0x88, 0xA7, 0xBF, 0x4A, 0xCF, 0x3B, 0x47, 0x33, 0x5B, 0x5E, 0x12, 0xCE, 0x11, 0x1F, 0x1B, 0xC1, 0xF8, 0x07, 0xF4, 0x15, 0x5A, 0x97, 0xCE, 0x73, 0xEB, 0x2F, 0x5F, 0x75, 0x10, 0x4B, 0x74, 0xC2, 0xF8, 0xDF, 0xDF, 0x9A, 0xF8, 0xD6, 0x5C, 0xAF, 0x69, 0x39, 0xD9, 0xFC, 0x75, 0x33, 0xF7, 0x0F, 0xE3, 0x6F, 0xE7, 0x44, 0x78
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CTR, 128-bit key
Key: 0x74, 0xBA, 0x38, 0x82, 0x43, 0x53, 0x9E, 0xFA, 0x20, 0x2D, 0xFA, 0x64, 0xA9, 0x81, 0x74, 0xD9
IV: 0xE0, 0x56, 0xC2, 0xC6, 0xD2, 0x99, 0xEF, 0x9C, 0x77, 0x6F, 0x5B, 0xC9, 0xDA, 0xCA, 0x04, 0xE8
Plaintext: 0x79, 0x3B, 0x03, 0x34, 0xEF, 0x07, 0x5A, 0x43, 0xD0, 0x7C, 0xEC, 0xF1, 0xD5, 0x85, 0xCD, 0x9A, 0x39, 0x7D, 0xBC, 0x8C, 0x62, 0x41, 0xEE, 0xBB, 0xC4, 0x89, 0x0E, 0xB7, 0x03, 0x78, 0x81, 0xDC, 0x57, 0x71, 0xEE, 0xC8, 0x35, 0x2D, 0xFE, 0x13, 0x2C, 0x0A, 0x60, 0x3A, 0x0D, 0xA6, 0x11, 0xDB, 0x4E, 0xAD, 0xDA, 0x28, 0xB0, 0xEF, 0x1A, 0x96, 0x20, 0xB6, 0xC5, 0xD5, 0xDB, 0x56, 0xAD, 0x05, 0xD6, 0x05, 0x00, 0x27, 0x5D, 0xED, 0x12, 0xD1, 0xFA, 0x80, 0x5D, 0x26, 0x98, 0x0C, 0xC7, 0x06
Ciphertext: 0xAF, 0x18, 0x50, 0x91, 0xA0, 0xA4, 0xF1, 0xE2, 0x5B, 0xC2, 0xFC, 0xB0, 0x5C, 0xB6, 0xDD, 0x1B, 0x46, 0xCB, 0x01, 0xD5, 0x8F, 0x90, 0x55, 0xC6, 0x1B, 0x9A, 0xB5, 0x49, 0xD4, 0x6D, 0x1C, 0x55, 0x9A, 0xDC, 0x51, 0x36, 0xE0, 0x6E, 0xB6, 0xCC, 0xD9, 0xF7, 0xC8, 0x5A, 0x2D, 0x6D, 0x3B, 0x5B, 0x22, 0x18, 0x08, 0x1C, 0xFA, 0x76, 0x75, 0x98, 0x60, 0x36, 0x8B, 0x52, 0x3A, 0xD9, 0xF2, 0x26, 0xA3, 0xA7, 0x72, 0x55, 0x3B, 0x67, 0x35, 0xAC, 0xA4, 0x75, 0x6E, 0x9D, 0xA2, 0x0F, 0x91, 0xA5
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CTR, 128-bit key
Key: 0xE8, 0x8F, 0x23, 0x82, 0x04, 0xCC, 0xF9, 0x93, 0x53, 0x9E, 0x8A, 0x0B, 0xAC, 0x8D, 0x0F, 0xCB
IV: 0xBE, 0x9F, 0x42, 0x37, 0xAF, 0x70, 0x1F, 0xE7, 0x03, 0x85, 0xEC, 0x9F, 0xC0, 0xDE, 0x77, 0x82
Plaintext: 0xCF, 0xCA, 0x9F, 0x82, 0xA6, 0x00, 0x15, 0x1B, 0x24, 0xEA, 0x64, 0x41, 0xBC, 0x44, 0x2F, 0x97, 0xD6, 0xE6, 0xBA, 0xE1, 0x72, 0xDE, 0xAD, 0xBC, 0x0F, 0xC2, 0x14, 0x8D, 0xCB, 0x45, 0xA9, 0xB7, 0xCB, 0x07, 0x56, 0x11, 0xDD, 0xB2, 0xF6, 0x97, 0x5C, 0x42, 0x5C, 0x5F, 0x55, 0xA4, 0x96, 0xCF, 0xE7, 0x83, 0x72, 0x0E, 0xF0, 0x5F, 0x42, 0xB8, 0xE6, 0xDF, 0xDD, 0xD6, 0x02, 0x68, 0xE6, 0x0D, 0xA4, 0xEE, 0x51, 0x15, 0xF3, 0x0A, 0x22, 0x6D, 0xC3, 0x4D, 0x78, 0x4D, 0xBD, 0xD5, 0xCB, 0xDD, 0xB9, 0x1D, 0x72, 0xA4, 0x6F, 0x19, 0x68, 0x43, 0x4F, 0x83, 0x4F, 0x63, 0xAD, 0x70, 0xB5, 0xEC
Ciphertext: 0xAE, 0x4E, 0xAF, 0x6D, 0x12, 0xBB, 0xE2, 0x0A, 0x5F, 0x81, 0xF1, 0x0E, 0x21, 0x28, 0xCE, 0x02, 0xAE, 0x1F, 0xC6, 0x32, 0x58, 0xD4, 0x59, 0x90, 0x64, 0xEE, 0xDD, 0x81, 0x20, 0xD5, 0x4E, 0x36, 0x1E, 0x35, 0x45, 0xC0, 0x8E, 0x76, 0xC9, 0xCD, 0xCB, 0x54, 0xE5, 0x94, 0x76, 0xB3, 0xF1, 0x7D, 0x33, 0xF1, 0xEE, 0x45, 0x1A, 0x0B, 0x0F, 0x42, 0x98, 0xE6, 0xDF, 0x14, 0xF9, 0x58, 0xCA, 0xCB, 0x13, 0x3A, 0xA6, 0x5B, 0x42, 0x81, 0xBA, 0x63, 0x0B, 0xDB, 0x29, 0x96, 0x5C, 0x0A, 0xB8, 0x36, 0x3D, 0x10, 0x8A, 0x5F, 0x4A, 0x57, 0x4E, 0xB9, 0xC7, 0xAE, 0x0D, 0x8E, 0x52, 0x39, 0x32, 0x5B
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CTR, 128-bit key
Key: 0x21, 0x26, 0x97, 0x77, 0x2E, 0x31, 0x23, 0x07, 0x21, 0xB4, 0xC2, 0xF3, 0x3C, 0xFE, 0x56, 0x27
IV: 0x14, 0x5D, 0xC0, 0x8D, 0x38, 0x37, 0xA6, 0xC5, 0x13, 0x56, 0x73, 0x1C, 0x14, 0x84, 0x9F, 0xBC
Plaintext: 0x0C, 0x58, 0x30, 0x20, 0xD7, 0x4F, 0x81, 0xCB, 0x3E, 0x1E, 0x42, 0x3A, 0x1C, 0x47, 0xC0, 0x17, 0xC0, 0xEB, 0x66, 0xAF, 0x93, 0xDF, 0x84, 0xA6, 0xFA, 0x02, 0x50, 0xE9, 0x7E, 0xCD, 0x2B, 0xE5, 0x2B, 0x2B, 0x25, 0xF7, 0x35, 0x8B, 0xC2, 0x23, 0xE2, 0x34, 0xFF, 0x08, 0xA3, 0xD9, 0x90, 0x13, 0x84, 0x6E, 0x6C, 0xF4, 0xC7, 0x3A, 0x8B, 0x4E, 0xCC, 0x2C, 0xEE, 0xB3, 0x35, 0x72, 0xE1, 0xCF, 0x47, 0x48, 0x7D, 0xE3, 0x92, 0x0E, 0x70, 0x76, 0xD4, 0x9E, 0x01, 0x47, 0x1B, 0xDC, 0x4E, 0x85, 0x2A, 0x8F, 0xD8, 0x42, 0x1E, 0x6F, 0x42, 0x26, 0x51, 0x7E, 0x56, 0x60, 0x7F, 0x9C, 0x49, 0xE2, 0x27, 0x56, 0x40, 0xCE, 0x34, 0x00, 0x12, 0x2B, 0xDD, 0x03, 0x50, 0xDD, 0xCA, 0x77, 0x83, 0xD4
Ciphertext: 0xC1, 0xCF, 0xF6, 0xC9, 0xF2, 0xBE, 0x60, 0x94, 0xA2, 0x62, 0x54, 0x65, 0xF8, 0x9C, 0x88, 0x92, 0x16, 0x52, 0xF3, 0x67, 0x04, 0xD1, 0x7C, 0x50, 0x11, 0x88, 0x06, 0x6F, 0x4D, 0xE1, 0x73, 0xF3, 0x37, 0x16, 0x7D, 0x6C, 0xE3, 0x0F, 0xD3, 0xF5, 0x74, 0x0B, 0x1E, 0xE7, 0x32, 0xB1, 0x07, 0xAF, 0x0C, 0xFB, 0xD5, 0xA0, 0x23, 0xFA, 0x44, 0x9F, 0x61, 0x25, 0xDB, 0xBD, 0x7E, 0xCA, 0x65, 0x1E, 0xE5, 0x11, 0x59, 0x48, 0xAE, 0x98, 0x64, 0x96, 0xFC, 0xF3, 0xF7, 0xF7, 0xBB, 0x4A, 0x61, 0xF1, 0x42, 0xEF, 0x9A, 0xFA, 0x92, 0xE0, 0xC4, 0x3A, 0x8D, 0x92, 0x07, 0xBB, 0xB3, 0xCD, 0xB7, 0xB4, 0x49, 0x10, 0xB4, 0x4A, 0x41, 0xE4, 0xDD, 0x6D, 0xF3, 0xF4, 0x6B, 0x70, 0x0E, 0x05, 0x65, 0xEB
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CTR, 128-bit key
Key: 0x78, 0xF5, 0xB4, 0x83, 0xDE, 0xA6, 0x32, 0x94, 0x51, 0xA0, 0x8F, 0xDA, 0xA5, 0x73, 0xEC, 0x87
IV: 0x95, 0xFE, 0x76, 0x9F, 0x64, 0x88, 0x31, 0xAC, 0xC5, 0x0C, 0xF5, 0xB4, 0xF9, 0xD3, 0xB6, 0x68
Plaintext: 0x37, 0x48, 0x08, 0x9E, 0x50, 0x09, 0xE1, 0x01, 0x93, 0x3A, 0xA1, 0x07, 0xEE, 0x1E, 0x51, 0x24, 0x57, 0xE8, 0x28, 0x3E, 0x6A, 0xCE, 0x54, 0x60, 0x54, 0x60, 0xF7, 0xB2, 0xEF, 0x18, 0x6F, 0xA9, 0x2E, 0x32, 0xDA, 0x7B, 0xBC, 0xBD, 0xD9, 0xD6, 0xE0, 0xF3, 0x95, 0xD1, 0xA4, 0xC6, 0x00, 0x23, 0x36, 0xBB, 0x5E, 0x92, 0x8E, 0xFB, 0x03, 0xAF, 0x51, 0xA8, 0x5E, 0xC1, 0xF6, 0x6D, 0x36, 0xFF, 0x27, 0x59, 0x34, 0x02, 0x6A, 0xED, 0xA2, 0x79, 0x00, 0x73, 0x72, 0x1F, 0x0D, 0x92, 0x82, 0xEA, 0xFA, 0x20, 0x1E, 0x85, 0x18, 0x37, 0xC7, 0x01, 0x86, 0x8B, 0x32, 0xC8, 0x54, 0xFA, 0x94, 0xD2, 0xE8, 0x65, 0x1D, 0x1B, 0xA1, 0xBF, 0xC2, 0x54, 0xBB, 0x63, 0x40, 0xD8, 0x73, 0xAB, 0x5E, 0xE3, 0x6B, 0xBE, 0x72, 0xFE, 0x4F, 0xA9, 0x26, 0xBE, 0xB9, 0xB2, 0x7C, 0xAE, 0x52, 0xE8, 0x10, 0x8A
Ciphertext: 0xBB, 0x74, 0x55, 0x66, 0xA7, 0xA2, 0xBB, 0x23, 0x59, 0xE5, 0xEC, 0x70, 0xD8, 0x0C, 0xD5, 0xFD, 0x79, 0xCF, 0xC8, 0xDA, 0x27, 0x98, 0xF3, 0x8B, 0x02, 0x88, 0xB2, 0x86, 0x32, 0xCE, 0x9F, 0x72, 0xC6, 0x18, 0x30, 0xDE, 0x6B, 0x31, 0xB7, 0xEE, 0xF0, 0x07, 0x77, 0x78, 0x4D, 0x5E, 0xF7, 0xD5, 0x79, 0x71, 0x19, 0xBD, 0x28, 0x1D, 0xFA, 0x61, 0x3A, 0x36, 0xA8, 0x8D, 0x5D, 0xCD, 0x17, 0x1B, 0xCB, 0x9F, 0xBF, 0xBE, 0x67, 0x10, 0x06, 0xD8, 0x84, 0xB2, 0xD3, 0x30, 0x50, 0x44, 0x4B, 0xAF, 0x34, 0xD4, 0x0D, 0x06, 0xB2, 0x90, 0xC6, 0x6D, 0xB0, 0x90, 0x25, 0x9E, 0x02, 0x45, 0x7B, 0xF3, 0xCE, 0x94, 0x32, 0xC8, 0x53, 0xBD, 0x16, 0xD5, 0x63, 0xA3, 0xA7, 0xFC, 0x7F, 0x07, 0xD9, 0x1A, 0x30, 0xE4, 0xD5, 0x92, 0x78, 0x11, 0x70, 0x4B, 0x21, 0xDF, 0x16, 0x79, 0x42, 0x13, 0xBC, 0x9C
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CTR, 128-bit key
Key: 0x3B, 0xFF, 0x9E, 0xAE, 0xAB, 0x5B, 0xC3, 0xCD, 0xD9, 0x6B, 0x08, 0xE6, 0x1C, 0x38, 0x1C, 0x74
IV: 0x50, 0x3E, 0x61, 0xE6, 0x7D, 0x7A, 0xAA, 0x4E, 0xB3, 0xC4, 0x44, 0x5D, 0x38, 0x5F, 0x33, 0x8F
Plaintext: 0xE6, 0xCF, 0xBD, 0xA3, 0xCE, 0xEA, 0x2D, 0x4E, 0x21, 0x32, 0xD1, 0x30, 0x51, 0x62, 0x45, 0x07, 0x73, 0x47, 0xF3, 0x23, 0xE8, 0xD1, 0xDB, 0x1A, 0x3C, 0x6A, 0x90, 0xBC, 0x4E, 0x86, 0x83, 0x49, 0xB1, 0x7C, 0x84, 0xE2, 0x53, 0x94, 0x86, 0x3E, 0x5C, 0x61, 0xA3, 0x9E, 0x59, 0x51, 0x60, 0x03, 0x9A, 0x82, 0x31, 0x9E, 0xD8, 0xD7, 0x40, 0x88, 0x1C, 0x4C, 0x6A, 0xB3, 0xDB, 0x86, 0x8A, 0x21, 0x66, 0xAF, 0xFB, 0x53, 0x82, 0x80, 0x58, 0x05, 0x52, 0x9F, 0x86, 0x18, 0x7E, 0x2C, 0xF5, 0xD0, 0x8E, 0x96, 0x22, 0x3F, 0x97, 0xB4, 0x61, 0x01, 0x1A, 0x11, 0xD9, 0x2A, 0x29, 0x87, 0xD0, 0x7D, 0xCB, 0x0F, 0x29, 0xDF, 0xA2, 0xD7, 0x2A, 0x0B, 0xCB, 0x95, 0x83, 0x86, 0x06, 0x1C, 0x8C, 0xD6, 0x17, 0x2C, 0xCF, 0xEF, 0x6C, 0x8F, 0xC6, 0xEE, 0xFF, 0x61, 0xE6, 0x09, 0x7E, 0xB0, 0xDC, 0xC6, 0xAA, 0x45, 0x16, 0x6C, 0xFD, 0xC0, 0x85, 0xB7, 0x8F, 0xEB, 0xA1, 0xD0, 0x3A, 0x48, 0xAE, 0x7C
Ciphertext: 0xA4, 0xA9, 0x76, 0xF9, 0xB9, 0xAA, 0x1D, 0x1F, 0x16, 0x23, 0xDF, 0xFF, 0xFC, 0xD1, 0xAA, 0xD9, 0x8F, 0x5E, 0xEE, 0xA0, 0x1E, 0xFB, 0xDE, 0x91, 0xAD, 0x62, 0xD2, 0x2A, 0x8F, 0x99, 0x40, 0xE5, 0xD4, 0x9F, 0xD3, 0x18, 0x41, 0x1D, 0x0F, 0xB5, 0x05, 0xC7, 0xF8, 0x83, 0xE2, 0x5E, 0x2C, 0xB8, 0x06, 0x3D, 0xDA, 0xAB, 0x8D, 0x86, 0x46, 0x0D, 0x3E, 0x9F, 0xFB, 0x86, 0x23, 0x69, 0xBE, 0xAD, 0xBE, 0xB6, 0x2B, 0x3A, 0xD3, 0x9C, 0x72, 0x81, 0xD1, 0xD2, 0x59, 0x46, 0xA0, 0x5F, 0x2B, 0xA4, 0xDD, 0xB8, 0x71, 0xDB, 0xB4, 0xAB, 0x7F, 0x3F, 0xD2, 0xEC, 0x87, 0x0B, 0x7D, 0x43, 0xDA, 0x39, 0x57, 0x70, 0x74, 0xCE, 0xCF, 0x19, 0x2B, 0x3F, 0x78, 0x5A, 0xBA, 0xD5, 0x1B, 0xA1, 0x43, 0xF9, 0xB6, 0x65, 0x09, 0x4E, 0x02, 0xB1, 0xEF, 0x41, 0x86, 0xAA, 0x16, 0xD3, 0xB1, 0x8D, 0xFC, 0xDC, 0x37, 0x5B, 0xC0, 0xC4, 0x28, 0x05, 0xB6, 0x57, 0x43, 0x02, 0xE4, 0x14, 0x5B, 0x24, 0xCE, 0xEB
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CTR, 128-bit key
Key: 0xFC, 0xEC, 0x3E, 0x94, 0x9E, 0x90, 0xF8, 0xB5, 0x93, 0xE6, 0x97, 0x38, 0x23, 0x29, 0x36, 0x65
IV: 0xC9, 0xF8, 0xCA, 0xE3, 0xD9, 0x64, 0xF0, 0x73, 0x65, 0x48, 0xE9, 0xDF, 0x62, 0xD9, 0xE2, 0x2C
Plaintext: 0x07, 0x7D, 0x79, 0x17, 0x76, 0xE1, 0x7E, 0xC0, 0x9E, 0x45, 0xF6, 0xA0, 0x60, 0x1B, 0x66, 0xC0, 0xF0, 0xD1, 0x4E, 0x2D, 0x7F, 0xEB, 0xF3, 0xA7, 0x17, 0x54, 0x61, 0x99, 0xC6, 0xF6, 0xB1, 0x4E, 0xFE, 0x88, 0x88, 0x61, 0x3C, 0xA7, 0xE0, 0x75, 0xE8, 0x29, 0x0B, 0x27, 0x7C, 0xAE, 0xF4, 0x41, 0xE9, 0x77, 0xA9, 0x30, 0x37, 0x7C, 0x16, 0xB9, 0x6B, 0xB8, 0x13, 0xE7, 0xAD, 0xC8, 0xA2, 0x48, 0xAA, 0xB4, 0x71, 0x59, 0x38, 0x0D, 0xA7, 0x3E, 0x38, 0x38, 0xDD, 0xB6, 0xC1, 0x09, 0x69, 0x4F, 0x7B, 0x94, 0xE3, 0xD6, 0x48, 0x3F, 0xE2, 0x12, 0x2A, 0x1C, 0x07, 0xB2, 0x61, 0x76, 0x3D, 0x83, 0xD3, 0xAA, 0x3E, 0xE6, 0xB1, 0x38, 0x5A, 0x82, 0x58, 0x1A, 0x74, 0x36, 0x75, 0x55, 0x4D, 0x51, 0x6D, 0xCD, 0x05, 0x06, 0xFC, 0x5D, 0xDE, 0x1A, 0x1C, 0x27, 0x44, 0xE0, 0x28, 0x29, 0x0A, 0x67, 0x41, 0x12, 0xF7, 0xF2, 0xF1, 0x53, 0x81, 0xA8, 0x0E, 0x78, 0xD8, 0x8D, 0xE1, 0xB9, 0x26, 0xB1, 0x88, 0xCC, 0x15, 0xA8, 0x99, 0xFE, 0x93, 0x39, 0x08, 0x82, 0xD2, 0x5A, 0x4B, 0x09, 0x92, 0x5D
Ciphertext: 0xF8, 0x67, 0x10, 0x0F, 0x73, 0x13, 0x15, 0x94, 0xF5, 0x7F, 0x40, 0x3F, 0x5D, 0x60, 0x1A, 0x2F, 0x79, 0xCE, 0xC0, 0x86, 0x27, 0x96, 0x0D, 0xFD, 0x83, 0x01, 0x05, 0xF8, 0x13, 0x47, 0xE9, 0x9E, 0x9D, 0xE2, 0x14, 0x90, 0x75, 0xED, 0xD0, 0x92, 0x6C, 0xC8, 0x74, 0x6E, 0x2B, 0xBD, 0xAF, 0xB8, 0x7F, 0x60, 0x52, 0x75, 0x39, 0xCC, 0x24, 0xA7, 0x15, 0xEC, 0x79, 0x2F, 0x67, 0x5A, 0xCE, 0xC4, 0x13, 0x0A, 0x3F, 0x38, 0x4A, 0xE3, 0x99, 0x14, 0xC8, 0x4E, 0x14, 0xBE, 0xD7, 0x16, 0x17, 0xC1, 0xC9, 0xF4, 0xA8, 0x4A, 0x19, 0x04, 0x90, 0x48, 0x81, 0x6D, 0x3C, 0x84, 0xCE, 0x17, 0xDD, 0x27, 0xE5, 0x1C, 0x0E, 0xD0, 0x51, 0x95, 0xEA, 0x6F, 0xB5, 0xC6, 0x28, 0x18, 0x0B, 0xE9, 0xE2, 0x5D, 0xA8, 0x35, 0xDE, 0x16, 0x7A, 0x4B, 0x26, 0x59, 0x57, 0x38, 0xC8, 0xDE, 0xA6, 0x9A, 0x0A, 0x63, 0xCF, 0x92, 0x2F, 0x49, 0xB3, 0x68, 0xB3, 0x25, 0xA4, 0x16, 0x61, 0xAF, 0xB4, 0xFD, 0x9E, 0xB3, 0xF0, 0xB6, 0x7B, 0x53, 0xD1, 0x86, 0xCA, 0x6A, 0x1E, 0xF5, 0x92, 0x5D, 0x22, 0x0D, 0x0F, 0x70
Test: Encrypt
#
#
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CTR, 192-bit key
Key: 0xBB, 0x93, 0xA2, 0x64, 0x3E, 0x84, 0xA4, 0x1A, 0x23, 0xFA, 0x12, 0xA5, 0x4D, 0x5E, 0x7E, 0xD6, 0x94, 0x39, 0x1E, 0xA3, 0x68, 0x49, 0x87, 0xD8
IV: 0xB7, 0xD5, 0xB9, 0x09, 0x11, 0x3D, 0x5C, 0xCB, 0x0B, 0xD5, 0x49, 0x24, 0xE1, 0xF3, 0x4C, 0x3F
Plaintext: 0x5F, 0x47, 0x28, 0x64, 0x01, 0x6B, 0xDC, 0x28, 0x59, 0xBB, 0x25, 0xE1, 0xB1, 0x67, 0x44, 0x5D
Ciphertext: 0xC6, 0x35, 0x7A, 0xBD, 0x1D, 0x38, 0x24, 0xF2, 0xC7, 0x2E, 0xD6, 0xEF, 0x4B, 0x76, 0xD8, 0x97
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CTR, 192-bit key
Key: 0xF2, 0xC7, 0x01, 0xD4, 0xC4, 0xEE, 0xF0, 0x1A, 0xF7, 0x81, 0xF3, 0x19, 0x22, 0xCA, 0x00, 0x7F, 0x89, 0x08, 0x25, 0xB4, 0x44, 0x09, 0xC9, 0x0F
IV: 0x9E, 0xFB, 0x34, 0x49, 0xBC, 0x80, 0x52, 0x32, 0x7F, 0x00, 0xB3, 0xA2, 0xAA, 0x43, 0xD7, 0xB3
Plaintext: 0x48, 0x3F, 0xA9, 0x2D, 0x48, 0x2E, 0x49, 0x42, 0x6B, 0xE4, 0x0E, 0x7C, 0x60, 0x60, 0xCC, 0xF3, 0x2D, 0xA1, 0x52, 0xC3, 0xD0, 0xBB, 0x37, 0xBD, 0x26, 0x29, 0xD7, 0x5D, 0x0D, 0x65, 0x98, 0xFC
Ciphertext: 0xE7, 0x0C, 0xF1, 0x56, 0xA4, 0x6A, 0x88, 0x6A, 0xF2, 0xF6, 0x40, 0xEF, 0x0A, 0x78, 0x42, 0xA0, 0x90, 0x60, 0xD3, 0x3E, 0x6F, 0x10, 0xCE, 0xD1, 0xA7, 0x9F, 0x3D, 0xD3, 0x3C, 0xE6, 0xDB, 0x99
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CTR, 192-bit key
Key: 0xC5, 0xB6, 0x72, 0x47, 0x9D, 0x49, 0xAE, 0xF0, 0xCB, 0x84, 0xED, 0xA4, 0x9B, 0x97, 0x6D, 0x3C, 0xCC, 0x54, 0x88, 0x37, 0x36, 0x40, 0x7D, 0x68
IV: 0xB1, 0xEA, 0x73, 0xEC, 0x33, 0x7B, 0xBB, 0x5F, 0x38, 0x8F, 0x56, 0x4F, 0x67, 0x43, 0xB7, 0xF1
Plaintext: 0x72, 0x8F, 0xC9, 0x13, 0x3E, 0xD7, 0x34, 0x52, 0x44, 0xBC, 0xDD, 0x8D, 0x37, 0x38, 0xAB, 0x9A, 0xE6, 0xEA, 0x91, 0x37, 0x65, 0xAE, 0xC9, 0x43, 0x67, 0x71, 0x5D, 0x2E, 0xEF, 0x44, 0xEC, 0xAE, 0x28, 0xAE, 0xAB, 0xB3, 0x90, 0x47, 0xAA, 0x9E, 0x5C, 0x82, 0x59, 0xAD, 0x19, 0xCB, 0x4A, 0xBA
Ciphertext: 0x58, 0x77, 0x4D, 0x0A, 0x11, 0x36, 0x57, 0xDB, 0xDC, 0x24, 0xCB, 0x92, 0x8D, 0x20, 0x17, 0x17, 0xB3, 0x0C, 0x5B, 0xDC, 0x5F, 0xCB, 0x04, 0x1B, 0xD6, 0xC8, 0x35, 0x1D, 0x2E, 0x84, 0xE3, 0xDB, 0x2D, 0x17, 0x46, 0x0C, 0x9E, 0xE7, 0x5B, 0x78, 0xC9, 0x75, 0xB4, 0x07, 0x94, 0xDB, 0xDC, 0x50
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CTR, 192-bit key
Key: 0x8F, 0xD2, 0x38, 0x26, 0xEA, 0x26, 0x49, 0x10, 0x1C, 0x05, 0x90, 0xCA, 0x7D, 0x73, 0xD6, 0x8D, 0xB4, 0x89, 0x9A, 0x6B, 0xDB, 0x10, 0x56, 0x86
IV: 0xDE, 0x4E, 0x04, 0x80, 0x24, 0x20, 0xE1, 0x32, 0x72, 0x49, 0x71, 0xA1, 0x0C, 0x0A, 0xC3, 0x2D
Plaintext: 0x1D, 0xF3, 0xF6, 0x0C, 0x58, 0xF8, 0xFC, 0xF7, 0xE0, 0xC7, 0x9E, 0x23, 0x65, 0x59, 0xC0, 0x73, 0x90, 0xC7, 0xE7, 0xEC, 0xA2, 0x60, 0xF8, 0x69, 0x58, 0xF8, 0x43, 0x90, 0x11, 0x82, 0xBF, 0x04, 0x32, 0xE2, 0x97, 0xDC, 0xCA, 0xFC, 0xE6, 0x55, 0x72, 0x11, 0xBF, 0xC3, 0x78, 0x4B, 0x71, 0xCE, 0x3C, 0x96, 0x09, 0xDA, 0xD9, 0xB2, 0x18, 0xC7, 0x08, 0x86, 0xB6, 0xDB, 0x42, 0xB8, 0xC6, 0xFC
Ciphertext: 0x43, 0xA1, 0x5C, 0x83, 0x7A, 0x18, 0x06, 0x35, 0xCE, 0xA9, 0x49, 0x45, 0xC5, 0xA5, 0x9D, 0x44, 0xA0, 0xFC, 0x0D, 0x3B, 0xB7, 0xC1, 0x4E, 0xF0, 0x07, 0xCC, 0x40, 0x42, 0xC5, 0x76, 0x4A, 0x90, 0xA5, 0x68, 0xBD, 0xAC, 0x6D, 0xD8, 0x60, 0x1E, 0xD4, 0x37, 0xFA, 0x1A, 0x45, 0x7E, 0x85, 0x86, 0xF9, 0x3C, 0x5E, 0x4E, 0x03, 0x54, 0xC7, 0x8C, 0x2E, 0x98, 0xDA, 0x31, 0x17, 0xF4, 0x8F, 0x0A
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CTR, 192-bit key
Key: 0x25, 0x7A, 0x7C, 0x23, 0x19, 0xA7, 0x1D, 0x0D, 0x33, 0x0E, 0x06, 0x34, 0x5A, 0x0E, 0xF0, 0xFD, 0xA8, 0x63, 0x72, 0x33, 0x12, 0x3F, 0xC7, 0xB4
IV: 0x4C, 0x9C, 0xD2, 0x6A, 0xE7, 0xD1, 0x5F, 0x7D, 0xBD, 0x64, 0xAC, 0xC7, 0x8E, 0x20, 0x28, 0x89
Plaintext: 0xEB, 0x67, 0x7A, 0x5C, 0x53, 0xC9, 0xC5, 0x6A, 0x9D, 0xD5, 0x2B, 0xDD, 0x95, 0x2E, 0x90, 0x98, 0xEA, 0xE2, 0xA0, 0x25, 0x48, 0xF8, 0x13, 0xEF, 0xC1, 0x48, 0x2F, 0xB2, 0x71, 0x90, 0x8F, 0x2F, 0x62, 0xC3, 0x24, 0x24, 0xAD, 0xA4, 0x79, 0x7B, 0xE2, 0x94, 0x3B, 0xC2, 0xAA, 0xA8, 0xF8, 0xDB, 0xAB, 0xFF, 0x27, 0xF5, 0xAC, 0x53, 0x69, 0xBB, 0xFA, 0xCD, 0x0E, 0xCA, 0x0A, 0x1E, 0xDB, 0x69, 0x5F, 0xCB, 0x0A, 0x74, 0xAE, 0xC8, 0x93, 0x9A, 0x41, 0x49, 0xAA, 0xC9, 0x99, 0xD5, 0x89, 0xE5
Ciphertext: 0xF7, 0xC2, 0xDE, 0x82, 0xDB, 0x28, 0xF7, 0xB7, 0xE6, 0x25, 0x8B, 0xB5, 0x31, 0xB9, 0x22, 0x15, 0x69, 0xE6, 0xDB, 0x58, 0x97, 0x29, 0x02, 0x50, 0xC2, 0xF4, 0x73, 0x80, 0x9D, 0x43, 0x49, 0xCD, 0x48, 0xBE, 0x5C, 0x54, 0x7F, 0x5F, 0x60, 0xFF, 0xFD, 0x42, 0xBE, 0x92, 0xB0, 0x91, 0xBC, 0x96, 0x3F, 0x0D, 0x57, 0x58, 0x39, 0x7D, 0x3C, 0x33, 0xCA, 0x5D, 0x32, 0x83, 0x4E, 0xC1, 0x7F, 0x47, 0x35, 0x12, 0x5C, 0x32, 0xAC, 0xFC, 0xE6, 0x45, 0xB6, 0xDC, 0xB7, 0x16, 0x87, 0x4F, 0x19, 0x00
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CTR, 192-bit key
Key: 0x57, 0x9C, 0x6F, 0xC0, 0x5D, 0x0A, 0xE9, 0x47, 0x30, 0x9C, 0x50, 0xF9, 0xA0, 0xF3, 0x93, 0x9E, 0xAC, 0x27, 0x36, 0x35, 0xA0, 0x5D, 0x9B, 0x2E
IV: 0x80, 0x9C, 0x81, 0xD9, 0xA9, 0xDC, 0xCA, 0x1F, 0xB6, 0x60, 0x81, 0x70, 0xA1, 0x46, 0x1B, 0xFC
Plaintext: 0x2A, 0x5D, 0xFD, 0x26, 0x7D, 0x36, 0x3F, 0x35, 0x0F, 0x7E, 0xB0, 0x4D, 0xC9, 0x8A, 0x1A, 0x9F, 0x68, 0x34, 0xC7, 0xDC, 0x24, 0xE6, 0x43, 0xEF, 0x8F, 0xF4, 0x64, 0xEB, 0xC1, 0x2F, 0x88, 0x42, 0xB2, 0xB7, 0x1E, 0x39, 0xE7, 0x10, 0x68, 0x98, 0x51, 0x78, 0x7E, 0xA6, 0x72, 0x78, 0x97, 0x54, 0xC1, 0xBA, 0x84, 0xB9, 0x50, 0x1A, 0x7D, 0xBE, 0xAC, 0xFF, 0x20, 0x1B, 0x04, 0xEC, 0xB7, 0x82, 0x8E, 0x52, 0xBA, 0x19, 0x27, 0xA9, 0x95, 0x2E, 0x3A, 0xBE, 0xAA, 0x27, 0xE2, 0x4F, 0x9A, 0xB7, 0x53, 0xD5, 0xC0, 0x58, 0x76, 0xA1, 0xFF, 0xF5, 0xD3, 0x2A, 0xBE, 0xE6, 0xB4, 0xA6, 0x30, 0x22
Ciphertext: 0xF7, 0x67, 0x2A, 0x36, 0x32, 0x99, 0xCA, 0xAB, 0xE0, 0x42, 0x51, 0xFC, 0x42, 0x70, 0x07, 0x74, 0xF1, 0x6A, 0x96, 0x3D, 0xC6, 0x8C, 0x14, 0xE9, 0xAF, 0x10, 0x76, 0x19, 0xC3, 0x4A, 0x46, 0x68, 0x57, 0x94, 0x4C, 0x55, 0xCF, 0x8C, 0xFC, 0xD7, 0x48, 0xFF, 0xEB, 0xA6, 0xB0, 0x88, 0x2B, 0x2F, 0x67, 0xBC, 0xF3, 0x09, 0x4F, 0x0A, 0x92, 0x74, 0x55, 0x83, 0xDC, 0x50, 0x00, 0xD9, 0xA0, 0x7B, 0x62, 0xE3, 0x21, 0xB6, 0xC1, 0xBB, 0xC5, 0xE0, 0xAC, 0x41, 0x43, 0x20, 0x41, 0x52, 0x69, 0x7F, 0xD2, 0x76, 0x9E, 0x15, 0x66, 0x76, 0xC2, 0x3E, 0x9C, 0x78, 0x9D, 0xD8, 0x0A, 0x3B, 0xED, 0x11
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CTR, 192-bit key
Key: 0x87, 0xD7, 0xD9, 0xB0, 0x85, 0x28, 0x4E, 0x5F, 0x91, 0xF8, 0x3C, 0xB7, 0x63, 0x36, 0xAB, 0x2F, 0xE5, 0x2E, 0x84, 0xA1, 0xDD, 0xA2, 0x51, 0xFA
IV: 0xCD, 0x1D, 0x45, 0x36, 0x17, 0x84, 0x7C, 0x8C, 0x65, 0xEE, 0x83, 0xE5, 0x48, 0xB5, 0x1B, 0x93
Plaintext: 0x20, 0xCE, 0x3A, 0x40, 0x3B, 0x55, 0x53, 0x24, 0x41, 0x6C, 0xD7, 0x7C, 0xCF, 0x46, 0xFC, 0x37, 0x62, 0x7F, 0xBD, 0xF2, 0x77, 0xAF, 0x22, 0x26, 0xF0, 0x3E, 0xC1, 0xA0, 0xBA, 0x7A, 0x85, 0x32, 0xAD, 0xE6, 0xAE, 0xA9, 0xB3, 0xD5, 0x19, 0xFE, 0x2D, 0x38, 0xC2, 0xD1, 0x92, 0xB5, 0x87, 0x12, 0x59, 0xF9, 0x2F, 0x02, 0x1A, 0x4E, 0xAA, 0x5A, 0xF0, 0x70, 0x9A, 0xC9, 0x21, 0x9C, 0x13, 0xA4, 0x01, 0xEB, 0x9F, 0xDA, 0x13, 0xDE, 0x86, 0x26, 0x72, 0x3A, 0x4C, 0x88, 0x6F, 0x16, 0x7A, 0xF5, 0x7C, 0x32, 0xA2, 0x4E, 0x49, 0x8A, 0x9D, 0x8F, 0x2C, 0x2B, 0x17, 0x49, 0xC6, 0x46, 0x4E, 0x52, 0xE4, 0x83, 0x16, 0xBA, 0xA3, 0x97, 0x21, 0x02, 0xD8, 0x19, 0x7D, 0x89, 0xAE, 0x91, 0x5E, 0x47
Ciphertext: 0xBE, 0x76, 0x4F, 0xEB, 0x48, 0x8B, 0x16, 0x28, 0xF4, 0xC5, 0xFE, 0xFA, 0x71, 0x98, 0x23, 0xFA, 0x64, 0xD7, 0xA7, 0xC6, 0x00, 0x52, 0x18, 0xCC, 0xE0, 0x70, 0xB5, 0x15, 0x31, 0x4E, 0x2C, 0x66, 0xDA, 0x1B, 0xB1, 0xA7, 0x6B, 0x87, 0x87, 0x90, 0x7B, 0x10, 0xB7, 0xB6, 0xAA, 0x00, 0xA5, 0x54, 0x85, 0x54, 0xC9, 0xA1, 0x47, 0x1C, 0x78, 0x2D, 0x92, 0x69, 0xC8, 0x86, 0x78, 0x4E, 0xF4, 0x1F, 0xB6, 0x50, 0x3B, 0x90, 0x08, 0x7A, 0xC5, 0x23, 0xD8, 0x14, 0xB9, 0xDA, 0x4E, 0xDD, 0x47, 0x30, 0x55, 0xF4, 0x90, 0x48, 0x5F, 0x60, 0xD0, 0x66, 0x6B, 0xB2, 0xC5, 0x64, 0xB0, 0x90, 0x98, 0x66, 0xBB, 0x36, 0x9B, 0xB5, 0x25, 0xE8, 0x1F, 0x46, 0x67, 0xBE, 0xB5, 0x55, 0x4A, 0x11, 0x77, 0xE0
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CTR, 192-bit key
Key: 0x91, 0xD3, 0x1E, 0xBD, 0x4B, 0x8B, 0x82, 0x2C, 0x6D, 0x18, 0x3F, 0x06, 0xF1, 0x9E, 0xBC, 0xA2, 0x1D, 0x56, 0x1A, 0x33, 0xAB, 0x29, 0x72, 0xFB
IV: 0x26, 0x7E, 0x5D, 0xBC, 0x97, 0x50, 0xBA, 0x70, 0x61, 0x83, 0xAB, 0x39, 0x6A, 0x78, 0xE1, 0x9B
Plaintext: 0x7B, 0xDF, 0x1A, 0xE9, 0xEA, 0xCC, 0xE7, 0xFD, 0x76, 0x0D, 0xB3, 0x2C, 0x72, 0xBC, 0x01, 0x7A, 0x26, 0x10, 0xF5, 0x09, 0x72, 0x78, 0x16, 0xD8, 0xB4, 0xEB, 0x52, 0xAA, 0xEC, 0x79, 0x43, 0x43, 0x1E, 0x27, 0xB0, 0xDA, 0xF8, 0xF9, 0x57, 0xCC, 0xB5, 0x50, 0xE9, 0x8E, 0x41, 0x76, 0x57, 0xE5, 0x9E, 0x78, 0x4C, 0x59, 0x86, 0x34, 0xFA, 0xE7, 0x52, 0xB2, 0x1A, 0xF6, 0x1A, 0xB8, 0x2E, 0x8C, 0x1E, 0x98, 0x0A, 0xC2, 0x64, 0x4D, 0x92, 0x75, 0xA3, 0xC6, 0xC5, 0x3F, 0x60, 0x82, 0xFB, 0xA5, 0x57, 0x5D, 0x6A, 0x92, 0x1C, 0xAA, 0xEF, 0x05, 0x02, 0x81, 0x0C, 0x06, 0x3C, 0x5A, 0x2D, 0xDE, 0x42, 0xDB, 0x2F, 0x87, 0x77, 0xEF, 0x22, 0x62, 0x08, 0x18, 0x4E, 0x28, 0x17, 0x06, 0x75, 0x23, 0x19, 0x68, 0x58, 0x9E, 0x7C, 0x02, 0x7C, 0x9A, 0x8D, 0x00, 0x2E, 0xC2, 0x9A, 0x8A, 0xC5, 0xA1
Ciphertext: 0x2E, 0x75, 0x27, 0x7C, 0x65, 0xEA, 0xA2, 0xB9, 0x64, 0xE5, 0x60, 0xB1, 0xCC, 0xE3, 0x79, 0xE6, 0x2C, 0xC4, 0x10, 0x1B, 0x28, 0xC0, 0x84, 0x32, 0x73, 0x2B, 0xBE, 0xB3, 0x10, 0x12, 0x30, 0x4E, 0xAB, 0xEC, 0x6F, 0x86, 0x92, 0x12, 0xE6, 0x3C, 0x10, 0x53, 0x41, 0xB2, 0x08, 0x0D, 0x80, 0x85, 0x62, 0x84, 0x47, 0xCB, 0x44, 0x52, 0xD4, 0x9C, 0xF6, 0x22, 0xA3, 0x00, 0x6D, 0x32, 0x79, 0x44, 0xA2, 0x5A, 0x24, 0x91, 0x1B, 0xEA, 0x9F, 0x8B, 0x46, 0x5D, 0xAC, 0xB9, 0x11, 0x40, 0xAD, 0x55, 0x50, 0x0F, 0xA4, 0xA8, 0xD5, 0xC6, 0xFB, 0xD4, 0x00, 0xD2, 0x2A, 0x9C, 0x44, 0x8E, 0xF6, 0x2E, 0x97, 0xD0, 0xDF, 0x94, 0xF5, 0x78, 0xBF, 0x6E, 0xFB, 0x0B, 0x5A, 0xA4, 0x29, 0xA8, 0xD9, 0xB5, 0xAE, 0x07, 0xF4, 0x55, 0x74, 0x03, 0x0D, 0x65, 0x2D, 0xC4, 0x29, 0x76, 0xDA, 0x3A, 0xED, 0x4F
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CTR, 192-bit key
Key: 0x53, 0x98, 0x27, 0x13, 0x76, 0x08, 0x8F, 0xF9, 0xAC, 0xEE, 0x8D, 0x31, 0xAE, 0x2B, 0x4E, 0xC6, 0xAB, 0x41, 0x1D, 0x63, 0xEE, 0x65, 0x2A, 0x0E
IV: 0xBC, 0xD6, 0x8A, 0x12, 0x7B, 0x6E, 0x80, 0x3D, 0x1A, 0x76, 0xFB, 0x4C, 0xAC, 0xBF, 0x5F, 0xA4
Plaintext: 0x56, 0xEE, 0x88, 0x43, 0x6C, 0x18, 0x0D, 0xF5, 0xD7, 0x8F, 0xC1, 0xCB, 0xBA, 0xFB, 0x80, 0xC9, 0x55, 0xAC, 0x28, 0xDF, 0x29, 0x2E, 0xE5, 0x1B, 0x5C, 0x1E, 0xB2, 0x1C, 0x60, 0x3D, 0x1C, 0xCA, 0xD0, 0xC3, 0x49, 0x44, 0x9A, 0xF6, 0x3A, 0x1A, 0x63, 0xFA, 0x4D, 0xBD, 0x27, 0xEB, 0x06, 0x33, 0x20, 0x29, 0x0E, 0x0F, 0xEA, 0xF3, 0x7C, 0xA1, 0xE4, 0x38, 0x54, 0x6A, 0xD9, 0xA9, 0x4D, 0xD2, 0xE0, 0x13, 0xD8, 0x1E, 0x80, 0xEC, 0x5D, 0x9C, 0x18, 0x2C, 0xC8, 0x20, 0x7E, 0x5E, 0x44, 0xB4, 0xE7, 0xF6, 0x46, 0x8C, 0x07, 0xE5, 0xCE, 0x38, 0x79, 0x6B, 0xEA, 0x1D, 0x60, 0x2C, 0x7B, 0x26, 0x4F, 0x87, 0x3B, 0xB7, 0x66, 0x23, 0xFF, 0xE3, 0xBE, 0xCA, 0x3A, 0xDE, 0x08, 0x7B, 0xC3, 0xB5, 0x70, 0xBA, 0xD8, 0x3C, 0xC8, 0x2B, 0x62, 0x48, 0xE2, 0x5F, 0x7A, 0x1F, 0x3D, 0xEE, 0x2D, 0x2D, 0xE4, 0xC6, 0x7C, 0xF9, 0x94, 0xC2, 0xA7, 0x57, 0x1D, 0x7F, 0xAC, 0xDE, 0x0A, 0x6B, 0x0A, 0x9C
Ciphertext: 0x0C, 0xC6, 0x7F, 0xA3, 0x77, 0x1B, 0x23, 0x28, 0x9F, 0xAF, 0xFF, 0xFC, 0xF8, 0x30, 0x90, 0xE9, 0xFB, 0xB2, 0x64, 0xA3, 0xF3, 0xBC, 0x40, 0xB7, 0x1E, 0x53, 0xE4, 0xE7, 0x0A, 0xFE, 0x99, 0x6F, 0xD8, 0xEA, 0x7A, 0x10, 0x38, 0x80, 0x5D, 0x89, 0x89, 0x10, 0x31, 0x41, 0x2C, 0xAD, 0x7F, 0x6F, 0x08, 0x67, 0xB8, 0x31, 0x0B, 0x28, 0xE3, 0x7F, 0x8A, 0x42, 0x25, 0xC4, 0x11, 0x6D, 0x48, 0x89, 0xEE, 0x47, 0x20, 0x1E, 0x5E, 0x97, 0x44, 0x0A, 0x45, 0xAB, 0x24, 0x79, 0xDA, 0xE3, 0xB0, 0x05, 0xF7, 0x6E, 0xDC, 0x28, 0x89, 0xAB, 0xD0, 0x62, 0xEC, 0x65, 0x5E, 0x81, 0xB2, 0x5E, 0xFD, 0x32, 0x81, 0x5F, 0xB0, 0xAF, 0xF6, 0x4C, 0x51, 0x4B, 0xC1, 0x2D, 0x26, 0xC5, 0x2E, 0xB2, 0xF7, 0x27, 0x3E, 0x1E, 0xE5, 0x47, 0x98, 0xF6, 0xEA, 0xD2, 0x03, 0xFF, 0xCB, 0xDC, 0xAA, 0xF6, 0x14, 0x51, 0xF8, 0xB9, 0x20, 0xF2, 0x2C, 0x64, 0x5F, 0x3A, 0x7E, 0x23, 0x5C, 0x12, 0xD7, 0x6D, 0xFF, 0xFA
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CTR, 192-bit key
Key: 0x84, 0x1E, 0xCA, 0x09, 0x74, 0xEE, 0xC0, 0x3A, 0xE8, 0xBD, 0x0F, 0x57, 0xB8, 0x16, 0xEB, 0x4F, 0x69, 0x79, 0xA3, 0xCA, 0x51, 0xF2, 0xDE, 0x60
IV: 0xFC, 0xF0, 0x24, 0x08, 0xCF, 0x55, 0xA1, 0xD3, 0xEB, 0xCA, 0x26, 0xDA, 0x55, 0x55, 0x71, 0x74
Plaintext: 0x53, 0x2D, 0xAE, 0xAD, 0x19, 0xCD, 0x3E, 0xF4, 0xA4, 0x47, 0xB6, 0x14, 0xE7, 0xDB, 0x2B, 0x66, 0x25, 0xC8, 0xAD, 0x44, 0x9E, 0x62, 0x11, 0xC0, 0x6D, 0x65, 0xF4, 0x96, 0xB1, 0x89, 0xFC, 0x60, 0xEB, 0x56, 0x61, 0x09, 0xA7, 0x3A, 0xAC, 0x84, 0x5F, 0xD9, 0xBF, 0xBE, 0x9C, 0xA4, 0x16, 0xD1, 0x5E, 0xAD, 0x4C, 0x7A, 0xBE, 0xB9, 0xE1, 0xCD, 0xD2, 0x97, 0x3A, 0x27, 0xD1, 0xB1, 0xE9, 0x65, 0x77, 0xE1, 0x2F, 0x53, 0xAB, 0x86, 0xBF, 0x67, 0x60, 0xD6, 0xC5, 0xB0, 0xB9, 0x76, 0x27, 0x09, 0x70, 0x48, 0x0B, 0x92, 0x78, 0x84, 0x99, 0x61, 0xE1, 0x0A, 0x02, 0x74, 0xFD, 0xF6, 0xC1, 0xEA, 0xC1, 0x75, 0x21, 0x73, 0x6D, 0xD8, 0xFF, 0x06, 0x70, 0xE7, 0xD1, 0xD2, 0x85, 0x78, 0xE7, 0x76, 0x23, 0x40, 0xF1, 0x74, 0x14, 0xE8, 0xC2, 0xE3, 0x63, 0x63, 0x53, 0x65, 0x7C, 0x80, 0x0B, 0x59, 0x8F, 0xBB, 0x3D, 0x52, 0x35, 0x59, 0xF3, 0xC7, 0x56, 0xB4, 0xEA, 0x0C, 0x4A, 0xD3, 0xDD, 0x80, 0x3E, 0x3D, 0x06, 0x09, 0xDA, 0x0F, 0xE3, 0xBD, 0x21, 0x4D, 0x36, 0xE2, 0x98, 0x76, 0x4F, 0x19
Ciphertext: 0x3E, 0x23, 0xF2, 0x14, 0x9F, 0x53, 0xE8, 0x64, 0xD3, 0x4E, 0x6A, 0xBD, 0xA7, 0xAD, 0xF9, 0xA3, 0x80, 0x5F, 0x27, 0x75, 0x2E, 0xEE, 0xCC, 0xDA, 0x72, 0x07, 0x41, 0x99, 0x1D, 0x37, 0x34, 0x3B, 0x00, 0xFD, 0x35, 0x03, 0x06, 0xF3, 0xBA, 0xD8, 0xA8, 0xC0, 0x31, 0x0C, 0x7F, 0x96, 0x1F, 0xCF, 0x46, 0x96, 0x4E, 0x38, 0x93, 0x90, 0xD0, 0xFC, 0xCA, 0x59, 0x1F, 0xE0, 0x5D, 0xC4, 0x9B, 0x48, 0x8D, 0xD2, 0xB4, 0x29, 0x18, 0xFD, 0xAD, 0x89, 0x3A, 0xCF, 0x2F, 0xA2, 0x29, 0x59, 0xC6, 0xC5, 0x91, 0x0C, 0xB7, 0xE5, 0x7A, 0x1E, 0xC7, 0xC1, 0x07, 0x88, 0x90, 0xA1, 0xB3, 0xA3, 0x94, 0x41, 0x56, 0x7E, 0x03, 0x6D, 0x3B, 0x90, 0x0A, 0x83, 0xED, 0x40, 0xB4, 0xD7, 0x83, 0x61, 0xCD, 0xB5, 0xF2, 0xB7, 0x83, 0xBC, 0x1A, 0x0A, 0x41, 0x6D, 0xAB, 0xCA, 0xDB, 0xD8, 0xDE, 0xD4, 0x4A, 0x76, 0xF7, 0x3A, 0xE2, 0x35, 0x76, 0x3B, 0x6E, 0x8C, 0xED, 0xC2, 0x37, 0xB4, 0x32, 0x9F, 0x71, 0x62, 0x4E, 0x55, 0xDC, 0x42, 0xAE, 0xC5, 0xB3, 0x80, 0xD8, 0x04, 0x20, 0xF2, 0x85, 0x94, 0xE6, 0xB3
Test: Encrypt
#
#
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CTR, 256-bit key
Key: 0xAA, 0x5B, 0x8D, 0xD6, 0x4B, 0x30, 0x23, 0x13, 0xDC, 0xE4, 0x18, 0x46, 0x4E, 0xAE, 0x92, 0x90, 0x8B, 0xE9, 0x53, 0x37, 0x11, 0x21, 0x84, 0x56, 0xE0, 0x6E, 0xB1, 0xD3, 0x97, 0x00, 0x16, 0x92
IV: 0xDA, 0xFC, 0x19, 0xE8, 0xF6, 0x87, 0x17, 0x53, 0xC8, 0x1F, 0x63, 0x68, 0xDB, 0x32, 0x8C, 0x0C
Plaintext: 0xD0, 0xE9, 0xDF, 0xE7, 0x03, 0x45, 0x2D, 0x16, 0x6B, 0x6E, 0xCF, 0x20, 0xC2, 0x48, 0xE6, 0x2C
Ciphertext: 0xFC, 0x9A, 0x78, 0xBA, 0x8F, 0x08, 0xAE, 0xA8, 0x2F, 0x9A, 0x37, 0xE5, 0xBD, 0x2C, 0x04, 0xD8
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CTR, 256-bit key
Key: 0xE6, 0x46, 0xE7, 0x71, 0x80, 0x83, 0x58, 0xED, 0xE3, 0x0F, 0xD4, 0x5A, 0x37, 0x86, 0x55, 0x5E, 0xD6, 0xE8, 0xB3, 0x02, 0xF6, 0xA4, 0x67, 0x65, 0x89, 0xF6, 0x95, 0xB2, 0x61, 0x73, 0x4A, 0x4F
IV: 0x98, 0xE3, 0x02, 0x57, 0x2F, 0x4E, 0x6D, 0x4B, 0xF5, 0x5A, 0x72, 0x04, 0xAA, 0xD4, 0x75, 0xEC
Plaintext: 0x65, 0x8C, 0xD5, 0x6E, 0x33, 0x66, 0xB9, 0xAB, 0x01, 0xAE, 0x0D, 0x6F, 0xBC, 0xAC, 0xC7, 0x63, 0xB6, 0x78, 0x6F, 0x84, 0x4C, 0x10, 0xDE, 0xD3, 0xC6, 0xA8, 0x46, 0x4E, 0x7E, 0x41, 0x72, 0x20
Ciphertext: 0x14, 0x93, 0x4B, 0xE0, 0x0D, 0x58, 0x76, 0x42, 0x70, 0x5F, 0x1C, 0x34, 0xAA, 0x10, 0xD1, 0x8E, 0x34, 0x53, 0x44, 0x4F, 0x73, 0x13, 0xF5, 0x6B, 0x42, 0xCD, 0x7C, 0xBE, 0x22, 0x9E, 0xBB, 0x9E
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CTR, 256-bit key
Key: 0x45, 0x7D, 0x4F, 0x15, 0x02, 0xB2, 0xAC, 0x50, 0x9C, 0x3D, 0x3E, 0x40, 0x1A, 0x19, 0xE7, 0xD0, 0x09, 0xB0, 0x37, 0xDE, 0x1E, 0xF0, 0x34, 0xEF, 0x1D, 0xA2, 0x56, 0x21, 0xF9, 0xF7, 0xD6, 0x61
IV: 0x3D, 0x64, 0x29, 0xDD, 0xAA, 0xB0, 0xC7, 0xBC, 0x22, 0x4C, 0x30, 0x0D, 0xC5, 0xE2, 0x31, 0xFE
Plaintext: 0x59, 0x30, 0x63, 0x4F, 0xEF, 0x17, 0xF6, 0x06, 0xC3, 0xEF, 0xAC, 0x63, 0x65, 0x1E, 0x28, 0x16, 0x16, 0xE9, 0x69, 0xB0, 0x75, 0x8A, 0x92, 0x58, 0x5B, 0x82, 0xEC, 0xBF, 0x03, 0x30, 0x2D, 0x56, 0x6E, 0xA3, 0xFB, 0xBE, 0x05, 0xAD, 0xAC, 0x7F, 0x81, 0x38, 0x50, 0xFE, 0x08, 0xDD, 0xF1, 0xA9
Ciphertext: 0x41, 0x89, 0xCE, 0x26, 0xE8, 0xC1, 0xDD, 0x4E, 0xE0, 0xED, 0xE9, 0xE9, 0x5A, 0x21, 0xC2, 0x42, 0x50, 0xE9, 0x16, 0x15, 0x32, 0x54, 0xB5, 0xC8, 0xEC, 0x62, 0x45, 0x32, 0x2D, 0x52, 0x93, 0xEA, 0xC5, 0xFE, 0xE4, 0x44, 0x58, 0xC6, 0x04, 0x65, 0x9E, 0x01, 0xD3, 0x03, 0x9D, 0x8C, 0xF3, 0x78
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CTR, 256-bit key
Key: 0x98, 0xB3, 0x19, 0x75, 0xA9, 0x65, 0x95, 0x8A, 0x0E, 0x88, 0x79, 0x3C, 0x1D, 0x2B, 0x64, 0x3E, 0x0F, 0xAF, 0x05, 0x12, 0xAA, 0xD9, 0xDE, 0xC4, 0x1D, 0x25, 0x48, 0xD8, 0x2B, 0x5D, 0xB8, 0x81
IV: 0x8B, 0x6B, 0x40, 0x14, 0x8F, 0x6C, 0x59, 0xBB, 0x05, 0x05, 0xDF, 0x6E, 0x5B, 0xFA, 0x5D, 0x1F
Plaintext: 0x06, 0xFC, 0x8B, 0x35, 0x23, 0xC3, 0x15, 0x3C, 0x5F, 0x5D, 0x9E, 0xDB, 0x15, 0xC6, 0x05, 0x06, 0xB7, 0xB8, 0xE7, 0x74, 0x6F, 0xC4, 0x65, 0x54, 0x06, 0xA2, 0x27, 0x3C, 0x04, 0xC6, 0xA0, 0x62, 0x19, 0x33, 0x94, 0x0E, 0xBB, 0x94, 0xD8, 0x4F, 0x11, 0x89, 0x5A, 0xEE, 0x10, 0x3F, 0x61, 0xA0, 0xE4, 0x43, 0x15, 0x7F, 0x91, 0x98, 0x41, 0xBB, 0xDA, 0x07, 0x58, 0x8D, 0x62, 0xB6, 0xB6, 0x6D
Ciphertext: 0x8F, 0x7F, 0x09, 0x50, 0x8A, 0xA0, 0xC2, 0x64, 0x0E, 0xEB, 0xC8, 0x1A, 0x87, 0x53, 0xBC, 0xBB, 0xDA, 0xAB, 0x75, 0x1E, 0xD7, 0x04, 0x0B, 0x20, 0x7A, 0x64, 0x0F, 0xC9, 0x6C, 0xDE, 0xB9, 0xB4, 0x15, 0xBC, 0x1E, 0x60, 0x3B, 0xFC, 0x40, 0x50, 0xDE, 0x8A, 0xAD, 0x14, 0xDE, 0x8F, 0x82, 0x4F, 0x3C, 0xBB, 0xC6, 0x5A, 0x51, 0x69, 0x2F, 0x13, 0xAA, 0x4B, 0xBA, 0x5D, 0xB5, 0x57, 0xBD, 0xF0
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CTR, 256-bit key
Key: 0x11, 0xFC, 0x29, 0x85, 0xB9, 0x74, 0xB0, 0x65, 0xF9, 0x50, 0x82, 0xF8, 0x62, 0xF0, 0x52, 0xB7, 0xD9, 0xB4, 0xD2, 0x1C, 0x3C, 0x0E, 0x76, 0x5A, 0x49, 0xDB, 0x7A, 0x4B, 0xBB, 0xF3, 0x26, 0xAA
IV: 0xB5, 0xFE, 0x51, 0x82, 0x64, 0x8A, 0x24, 0xE6, 0xE1, 0x5B, 0x20, 0xE3, 0x54, 0x02, 0x62, 0xB3
Plaintext: 0x5F, 0xB2, 0x26, 0x33, 0xBA, 0x4E, 0x8B, 0x98, 0x1A, 0xC6, 0x96, 0x5D, 0x58, 0xA4, 0x78, 0x7F, 0xCF, 0xE2, 0x14, 0xED, 0x06, 0xFF, 0xBC, 0x3A, 0x8F, 0x52, 0x3B, 0x96, 0x2E, 0x9D, 0x19, 0xFC, 0x3E, 0xE5, 0x1A, 0xAD, 0x51, 0x81, 0x08, 0xDC, 0x17, 0x72, 0xB2, 0xAB, 0x81, 0xF2, 0x35, 0x56, 0x25, 0x4F, 0x7A, 0xAE, 0xE5, 0xFA, 0x00, 0xCA, 0xCB, 0xDB, 0xDC, 0xF9, 0x38, 0xE8, 0xFE, 0xFA, 0x3E, 0xF6, 0xB5, 0x70, 0x4A, 0xCF, 0x76, 0x90, 0x06, 0x84, 0xD9, 0x1D, 0x7D, 0x05, 0xE4, 0x96
Ciphertext: 0xA0, 0x03, 0x29, 0xCC, 0xFD, 0x82, 0xBD, 0x62, 0x39, 0x1C, 0xC9, 0xE0, 0xC8, 0x69, 0x46, 0x45, 0x31, 0xC8, 0x1E, 0x6B, 0x5F, 0x37, 0x97, 0xA2, 0xCB, 0x93, 0x19, 0x4A, 0x02, 0x42, 0x09, 0x2A, 0x85, 0x5C, 0x78, 0x43, 0xB5, 0xE1, 0x1B, 0x69, 0x67, 0x08, 0x79, 0xA3, 0xD5, 0x2D, 0xCB, 0xD5, 0x30, 0x3E, 0x9B, 0xF2, 0x1B, 0xA7, 0x0B, 0x72, 0x5F, 0xE5, 0xF8, 0xD8, 0x40, 0x45, 0xAB, 0x8E, 0x8E, 0x14, 0xF6, 0x0A, 0x85, 0xC1, 0x41, 0x3C, 0x88, 0x56, 0xF0, 0x7D, 0x4D, 0xFD, 0x7E, 0x0E
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CTR, 256-bit key
Key: 0x81, 0xEE, 0x8C, 0xAE, 0x49, 0xA4, 0x79, 0xFC, 0x5F, 0xA1, 0x0A, 0xF4, 0xBA, 0x0C, 0x99, 0x16, 0x26, 0x8D, 0x00, 0x65, 0xED, 0x5F, 0x5B, 0x1B, 0xB0, 0xA7, 0x10, 0x9B, 0x96, 0x04, 0x0D, 0xA7
IV: 0xA9, 0x67, 0x51, 0xD3, 0x7C, 0x25, 0xAE, 0x39, 0x11, 0x4A, 0xCD, 0x6F, 0xFB, 0x31, 0x72, 0xB6
Plaintext: 0xC0, 0x51, 0x01, 0x74, 0x81, 0x5A, 0x42, 0xE5, 0xDD, 0x81, 0x61, 0x0D, 0x12, 0x17, 0x39, 0xF1, 0x65, 0x61, 0xD1, 0x06, 0xC5, 0xA4, 0x27, 0xEA, 0xAB, 0x7F, 0x2D, 0x52, 0x44, 0x7D, 0x12, 0x44, 0xD2, 0xEB, 0xC2, 0x86, 0x50, 0xE7, 0xB0, 0x56, 0x54, 0xBA, 0xD3, 0x5B, 0x3A, 0x68, 0xEE, 0xDC, 0x7F, 0x85, 0x15, 0x30, 0x6B, 0x49, 0x6D, 0x75, 0xF3, 0xE7, 0x33, 0x85, 0xDD, 0x1B, 0x00, 0x26, 0x25, 0x02, 0x4B, 0x81, 0xA0, 0x2F, 0x2F, 0xD6, 0xDF, 0xFB, 0x6E, 0x6D, 0x56, 0x1C, 0xB7, 0xD0, 0xBD, 0x7A, 0x24, 0x37, 0xB7, 0x3E, 0x07, 0x44, 0xB2, 0x2B, 0xE6, 0xF0, 0x0E, 0x31, 0xC4, 0xC6
Ciphertext: 0x8B, 0xF4, 0xA9, 0x42, 0x36, 0x2B, 0x70, 0xF4, 0xCC, 0x06, 0x6C, 0x6E, 0x3D, 0x87, 0xA5, 0xF1, 0x85, 0xAA, 0x16, 0x96, 0x3B, 0x1C, 0x24, 0x31, 0x3C, 0x33, 0x0B, 0x2F, 0x86, 0xD3, 0x70, 0x69, 0xC5, 0x6C, 0x15, 0x69, 0xA0, 0x9B, 0x7F, 0x02, 0x94, 0x68, 0x9D, 0x1D, 0x3F, 0x16, 0x27, 0xE6, 0xFF, 0x9E, 0xCB, 0x37, 0x18, 0xE8, 0xAD, 0x34, 0x95, 0x58, 0xB5, 0x8C, 0x22, 0xBB, 0xA6, 0x9B, 0x1D, 0x7A, 0x28, 0x6F, 0xEB, 0x0C, 0xD8, 0x0E, 0xB6, 0x4E, 0xDC, 0x08, 0x4D, 0x90, 0x9C, 0xEF, 0x69, 0x42, 0x4E, 0xAC, 0x5D, 0xFB, 0xD4, 0xEF, 0x8B, 0x26, 0x47, 0x20, 0xF4, 0xEF, 0x48, 0x65
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CTR, 256-bit key
Key: 0x81, 0x3F, 0xA2, 0x4F, 0xBA, 0x5A, 0x46, 0xCD, 0x44, 0xEC, 0x3B, 0x2B, 0xAE, 0x5E, 0x19, 0x35, 0xE9, 0xE8, 0x07, 0x05, 0xF1, 0xA8, 0x7D, 0xBD, 0xAF, 0xF2, 0x4F, 0x7C, 0x1F, 0xE8, 0xE7, 0x8A
IV: 0xAE, 0x4A, 0xD1, 0xD6, 0xE6, 0x8F, 0x7E, 0xA3, 0x4C, 0x34, 0x41, 0x7E, 0x89, 0x54, 0x9E, 0x73
Plaintext: 0xC9, 0x79, 0xC4, 0x80, 0x61, 0xB2, 0x58, 0x4A, 0xB4, 0xE5, 0x74, 0x0F, 0x57, 0x67, 0xF0, 0xDC, 0x73, 0xCA, 0xE0, 0x00, 0x6B, 0xF6, 0x5D, 0xC0, 0xBF, 0x7B, 0x89, 0x4C, 0x31, 0x26, 0xCD, 0xF2, 0x26, 0xD3, 0x65, 0x92, 0x4E, 0x81, 0x1F, 0x52, 0x87, 0xAC, 0x5F, 0x92, 0xFF, 0xD7, 0x67, 0x23, 0x99, 0x68, 0xD5, 0xB3, 0x93, 0xB8, 0x6D, 0x8C, 0x65, 0x6B, 0x19, 0x7F, 0xEC, 0xFD, 0x2E, 0x1A, 0xC7, 0x9E, 0xF1, 0x22, 0x02, 0x40, 0x5A, 0x3D, 0xF1, 0xEE, 0x18, 0xEE, 0x5F, 0x5F, 0xD4, 0xC6, 0xE9, 0xCB, 0xBA, 0xD9, 0xA4, 0xFD, 0x36, 0x70, 0x06, 0xAA, 0xFB, 0xFD, 0x03, 0x01, 0x4A, 0x54, 0x76, 0x83, 0x71, 0x17, 0xC3, 0x15, 0x92, 0x72, 0xBA, 0x53, 0xA5, 0x09, 0xBF, 0x28, 0xC0, 0x2F
Ciphertext: 0xC9, 0xF7, 0xBA, 0x69, 0xDA, 0xAA, 0xF8, 0xBA, 0x4C, 0x4A, 0xAF, 0xA9, 0x17, 0x87, 0xE1, 0x5F, 0xA0, 0x3F, 0x17, 0x64, 0x07, 0xA2, 0x64, 0x04, 0x5D, 0xD6, 0x55, 0xF2, 0x72, 0x3B, 0x26, 0x0D, 0x42, 0xBD, 0xAC, 0xE6, 0xD2, 0x26, 0xC3, 0x78, 0x34, 0xF2, 0xA3, 0xAE, 0x2A, 0x1D, 0x3B, 0xF5, 0x07, 0x1F, 0x72, 0xDD, 0x67, 0x70, 0xA4, 0x4C, 0x40, 0x92, 0x73, 0x5D, 0x35, 0x05, 0xED, 0x44, 0x05, 0xDE, 0xB9, 0xD4, 0x51, 0x92, 0xC6, 0xF8, 0x3D, 0x83, 0xE3, 0xE2, 0x46, 0x3C, 0x1C, 0x63, 0xD8, 0xB8, 0x35, 0xBE, 0x81, 0x0A, 0x6D, 0x8E, 0xA9, 0x2F, 0x5C, 0xAC, 0x71, 0x99, 0x01, 0x68, 0xF3, 0x94, 0x8D, 0x1C, 0x95, 0x6C, 0x86, 0x51, 0xCD, 0xA0, 0xD9, 0x2E, 0x46, 0x3C, 0x81, 0xFF
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CTR, 256-bit key
Key: 0x28, 0x9B, 0x96, 0x59, 0xE7, 0xEC, 0x3F, 0xD2, 0x69, 0xE0, 0x37, 0xB0, 0xBE, 0x59, 0xA8, 0x06, 0xF9, 0x29, 0xEC, 0x5B, 0xDA, 0x28, 0x4D, 0x5B, 0xAA, 0x85, 0x10, 0xCD, 0x67, 0x59, 0xB3, 0xC5
IV: 0x21, 0x82, 0x72, 0x1B, 0xA4, 0xAE, 0x10, 0x1B, 0x57, 0xB6, 0xD3, 0x7E, 0x64, 0x2E, 0xD1, 0x9A
Plaintext: 0x19, 0x3A, 0x6A, 0xD5, 0x8F, 0xA2, 0x16, 0x5F, 0x89, 0x29, 0x61, 0x21, 0x9E, 0x1B, 0x33, 0xF0, 0x9B, 0x26, 0x55, 0x07, 0x23, 0x6A, 0x31, 0xB4, 0x98, 0xD3, 0xD9, 0x51, 0x3F, 0xA7, 0x4B, 0x76, 0x9E, 0x5B, 0xF4, 0x6D, 0x29, 0xAB, 0x72, 0xE6, 0x1E, 0xEA, 0x9E, 0xEC, 0xAE, 0x96, 0xCA, 0x18, 0x5D, 0x2F, 0x47, 0x05, 0xAB, 0x49, 0x2B, 0x03, 0xF4, 0xE1, 0x50, 0x10, 0x95, 0xED, 0xA0, 0x04, 0x50, 0x36, 0x90, 0x0B, 0xF2, 0x6A, 0xEB, 0x58, 0x32, 0x6D, 0xD1, 0x18, 0xDD, 0xF1, 0xFF, 0xA5, 0x30, 0x46, 0x51, 0xFD, 0x85, 0x73, 0x84, 0x72, 0x33, 0x85, 0x41, 0xA3, 0xAF, 0x27, 0x57, 0xAA, 0xF7, 0x73, 0x49, 0x97, 0x30, 0x08, 0x08, 0x1E, 0x8D, 0x5D, 0x01, 0x8C, 0x74, 0x55, 0x5A, 0xFF, 0xDC, 0x13, 0x79, 0xD7, 0xFA, 0x0F, 0xC7, 0x68, 0x1C, 0x69, 0xB3, 0xF1, 0xD5, 0x7E, 0xF9, 0xD2
Ciphertext: 0x0A, 0x4C, 0x7D, 0xAF, 0xCB, 0x8A, 0x92, 0x8B, 0x0C, 0xEC, 0x6B, 0x08, 0x45, 0x0C, 0x1B, 0xCF, 0x01, 0xA5, 0x6C, 0x3E, 0x71, 0xB6, 0x37, 0x58, 0xE9, 0x10, 0xD3, 0x4F, 0x53, 0x0B, 0x79, 0x05, 0x1D, 0x29, 0xFE, 0xD5, 0xB1, 0x46, 0x04, 0x67, 0x21, 0xA4, 0x09, 0x1B, 0x6D, 0x2C, 0x55, 0x8B, 0x59, 0x6C, 0x7E, 0x06, 0x50, 0x00, 0x78, 0x2C, 0xE0, 0x75, 0x73, 0x6F, 0x39, 0xA2, 0x68, 0xD6, 0x02, 0x4F, 0xD1, 0xF7, 0xAD, 0x7F, 0x8B, 0x17, 0xF3, 0x4B, 0x8D, 0x0F, 0xE1, 0x58, 0x3E, 0x4E, 0x69, 0x62, 0x1B, 0x29, 0x89, 0x59, 0xFD, 0xBC, 0x23, 0xD0, 0xCF, 0xE4, 0x04, 0xD8, 0x3F, 0x7C, 0x22, 0xAF, 0x3F, 0x88, 0x1E, 0x6F, 0xC5, 0x4B, 0x3B, 0x76, 0x13, 0x97, 0x4E, 0x62, 0xA2, 0xFA, 0xB0, 0x6B, 0x01, 0x8B, 0x28, 0xFB, 0x62, 0x13, 0xD5, 0x46, 0x0C, 0xB1, 0x91, 0xF0, 0x33, 0x53
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CTR, 256-bit key
Key: 0x5A, 0xBA, 0x24, 0xF9, 0x2C, 0xAD, 0x51, 0x9E, 0xF7, 0x60, 0x37, 0x30, 0xBA, 0xE9, 0x64, 0x8F, 0x29, 0x3D, 0xC9, 0x7B, 0x50, 0x46, 0x79, 0x4D, 0x78, 0x35, 0xAE, 0xE4, 0x4E, 0x1A, 0x0D, 0xE3
IV: 0x42, 0xB1, 0x2B, 0x1A, 0x2E, 0x7F, 0x4F, 0x41, 0x38, 0x1E, 0x7A, 0xEC, 0xF9, 0xD6, 0xA4, 0xBB
Plaintext: 0xDF, 0x6D, 0x49, 0xD1, 0xCF, 0x3F, 0x24, 0x88, 0x0F, 0x91, 0x3B, 0x63, 0x64, 0x22, 0x1B, 0x45, 0x77, 0x03, 0x65, 0xE0, 0x7D, 0xA9, 0x89, 0x6F, 0x17, 0x41, 0xD2, 0xA8, 0x77, 0x43, 0xA3, 0xEC, 0xC5, 0x4A, 0x00, 0xC2, 0xC1, 0x23, 0x4F, 0x83, 0xA9, 0x23, 0x60, 0x57, 0x5D, 0xBE, 0xAC, 0x5F, 0xC1, 0x56, 0xDA, 0x34, 0x63, 0x51, 0x88, 0x91, 0x5E, 0x6E, 0x47, 0x4C, 0x7E, 0x59, 0xE7, 0x8B, 0xA4, 0x7D, 0xF6, 0x34, 0x6C, 0x19, 0x83, 0xA5, 0x0E, 0x96, 0x27, 0xA6, 0x82, 0x18, 0x47, 0x9B, 0xE8, 0x53, 0x93, 0xFF, 0x26, 0xA0, 0xD2, 0x0D, 0xD3, 0x4F, 0xE2, 0xC0, 0x54, 0x3F, 0xFA, 0xFE, 0x44, 0xAD, 0x33, 0x10, 0x1A, 0x4A, 0x47, 0x56, 0x05, 0x90, 0x98, 0x39, 0x1B, 0x55, 0x74, 0x60, 0xB3, 0xA1, 0x97, 0x27, 0x0F, 0xBD, 0xF1, 0x4D, 0x3F, 0x8C, 0xAA, 0xEC, 0x41, 0x1E, 0x64, 0xAF, 0x6D, 0x83, 0xC0, 0x3F, 0x11, 0xDD, 0x23, 0xFE, 0x58, 0xB9, 0xBA, 0xF8, 0x70, 0xA0, 0xBB, 0x17
Ciphertext: 0x0E, 0xBF, 0x3B, 0x20, 0x1C, 0x7D, 0x30, 0xA8, 0x76, 0xA2, 0xA7, 0xF4, 0x2F, 0x95, 0x0A, 0x43, 0xF7, 0x88, 0x70, 0xFC, 0x8C, 0x1F, 0xC6, 0xAA, 0x6F, 0x7A, 0xF7, 0x32, 0x25, 0x10, 0x73, 0x5D, 0xFE, 0x2F, 0xE6, 0xDD, 0x9C, 0x4E, 0x25, 0xF2, 0xE3, 0x8B, 0xED, 0x55, 0x74, 0xF4, 0x1C, 0x49, 0xCB, 0xC1, 0x88, 0x74, 0xDA, 0x51, 0xEE, 0x17, 0xD7, 0x5F, 0xC7, 0x1C, 0x9E, 0xB9, 0xB6, 0xCC, 0x3B, 0xA1, 0x04, 0xE4, 0x29, 0x85, 0x1F, 0x86, 0x04, 0x7B, 0x34, 0x85, 0xCB, 0xF3, 0xE7, 0x50, 0xD1, 0xE6, 0x1A, 0xE6, 0xF4, 0xBB, 0x7C, 0x48, 0x53, 0x2B, 0x7F, 0xAF, 0x27, 0x20, 0x5E, 0xF1, 0xA5, 0xE1, 0xBA, 0xFB, 0x33, 0x8A, 0xAD, 0xD7, 0x22, 0xB5, 0x38, 0xF3, 0x18, 0x8F, 0xBB, 0xE9, 0x17, 0xF7, 0x81, 0x2B, 0x1E, 0xED, 0xD7, 0x15, 0x1D, 0xA3, 0x76, 0xD5, 0x26, 0x7B, 0xD9, 0xD3, 0x3B, 0xDC, 0xCB, 0x34, 0x69, 0xD0, 0x6B, 0x77, 0xAC, 0xFA, 0x62, 0x90, 0xC5, 0x54, 0xB2, 0xEF
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CTR, 256-bit key
Key: 0xEB, 0xE8, 0xEE, 0x96, 0x66, 0xD0, 0x6D, 0xB7, 0x69, 0xCD, 0xA8, 0xB9, 0x8F, 0x1E, 0xAB, 0x04, 0xE7, 0xA6, 0xA4, 0xA8, 0x99, 0xFB, 0x9F, 0x05, 0xCD, 0xBB, 0x95, 0xCB, 0xC8, 0x1F, 0xA5, 0x26
IV: 0x58, 0xD2, 0xA1, 0x32, 0x73, 0x03, 0xCC, 0xB5, 0x1B, 0xB9, 0xE2, 0x0D, 0x84, 0x66, 0x59, 0x67
Plaintext: 0x79, 0xC0, 0xE7, 0x32, 0xFC, 0xCC, 0x44, 0xD4, 0x2D, 0x3B, 0x31, 0x9B, 0x6D, 0xFA, 0xB9, 0xF6, 0xC2, 0x05, 0xB7, 0xE5, 0x7D, 0x7C, 0x98, 0xAE, 0x1B, 0xF8, 0x62, 0xD2, 0x6A, 0x1F, 0xF5, 0x3F, 0xED, 0x76, 0x92, 0xC7, 0x80, 0x77, 0x99, 0xD1, 0x3F, 0xE4, 0x97, 0x4E, 0xA5, 0x5A, 0x7F, 0xEF, 0xF1, 0x29, 0x38, 0x95, 0xCE, 0x63, 0x58, 0x0A, 0x32, 0x33, 0x30, 0xEE, 0x87, 0x70, 0x08, 0xF4, 0x09, 0x72, 0xAB, 0x4E, 0x6F, 0x25, 0x27, 0x65, 0xCD, 0x5B, 0xCE, 0xCE, 0xB9, 0x67, 0x80, 0x79, 0xAD, 0xE7, 0x2D, 0x2C, 0xAC, 0xE1, 0x95, 0x30, 0x28, 0x12, 0x52, 0x4B, 0x24, 0x82, 0x19, 0xEE, 0x96, 0x5C, 0x3D, 0xAE, 0x0F, 0xFD, 0x74, 0xF8, 0x9D, 0x4B, 0xDE, 0x01, 0xF1, 0x48, 0x43, 0xFD, 0xBD, 0xE7, 0x9D, 0x91, 0x60, 0x1E, 0xD6, 0x8A, 0xC5, 0x3C, 0xD2, 0xCF, 0x88, 0x7D, 0xB0, 0x94, 0x5B, 0xDB, 0x4D, 0xD1, 0xA9, 0x28, 0x0A, 0xF3, 0x79, 0x5A, 0xD0, 0xD1, 0x94, 0x26, 0x51, 0xE1, 0xEA, 0xD0, 0x90, 0xAC, 0x32, 0x41, 0xA3, 0x7F, 0xD1, 0x5A, 0xB7, 0x64, 0xFD, 0x88, 0x56, 0x50
Ciphertext: 0xCA, 0xDD, 0x51, 0xE5, 0xBF, 0x4A, 0x97, 0x8F, 0x79, 0x7A, 0x1C, 0x0A, 0x63, 0x0B, 0x2F, 0xC4, 0x67, 0x40, 0x0D, 0x77, 0x44, 0x30, 0x3C, 0x87, 0x3D, 0xBE, 0x2B, 0x52, 0xB1, 0xE3, 0x13, 0x7C, 0xD3, 0x6B, 0xA5, 0x23, 0x2A, 0x5E, 0xD3, 0x32, 0xB0, 0x2F, 0x20, 0xAD, 0x25, 0x76, 0xBA, 0x76, 0x2E, 0xC1, 0x66, 0x18, 0xEC, 0x4E, 0xC8, 0x1A, 0x33, 0x4B, 0x20, 0x1A, 0x0A, 0x24, 0x41, 0x38, 0x5C, 0xB9, 0xA9, 0x33, 0x5E, 0x91, 0x4F, 0xCD, 0x1E, 0x00, 0x0B, 0x8C, 0x61, 0x04, 0x07, 0x7F, 0x57, 0x4C, 0x21, 0xC0, 0x61, 0x82, 0x57, 0x1D, 0x69, 0x34, 0xA4, 0x7B, 0x93, 0xF2, 0x7A, 0x86, 0xD2, 0x0B, 0x0B, 0x7B, 0xA6, 0xAC, 0xBB, 0x7B, 0x0D, 0x56, 0x24, 0x31, 0x0A, 0x82, 0x81, 0x58, 0xC1, 0xF3, 0x36, 0xCA, 0x04, 0xA0, 0xFA, 0x01, 0xA6, 0x45, 0x1F, 0x0E, 0x87, 0x69, 0x33, 0xE5, 0x4C, 0xDC, 0x32, 0x89, 0x4A, 0xB2, 0xD3, 0x9B, 0x23, 0x2C, 0x30, 0x16, 0x38, 0xAB, 0xE0, 0xBF, 0x50, 0xCE, 0x33, 0x34, 0x45, 0x88, 0xD0, 0xA7, 0x31, 0xBF, 0x31, 0xDB, 0x42, 0x7F, 0xE2, 0x76
Test: Encrypt
AlgorithmType: SymmetricCipher
Name: LEA-128/CBC
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CBC, 128-bit key
Key: 0x87, 0xF1, 0x42, 0x4F, 0x1A, 0x14, 0x83, 0xCC, 0x1F, 0xD0, 0x35, 0x4E, 0x18, 0xA9, 0x94, 0xAB
IV: 0xCF, 0x58, 0x4E, 0x6E, 0xF6, 0xD6, 0x42, 0x88, 0x0A, 0xB7, 0x87, 0x42, 0x7D, 0xB9, 0xB0, 0x76
Plaintext: 0x13, 0x9D, 0x4E, 0xFF, 0x8D, 0x35, 0xB7, 0x6E, 0x85, 0xBF, 0x06, 0xFE, 0x99, 0x71, 0x63, 0xCB
Ciphertext: 0x49, 0xB9, 0xF3, 0x22, 0x6D, 0xA5, 0x4B, 0x4A, 0x0D, 0x38, 0x5A, 0x9C, 0x48, 0x70, 0x52, 0x4B
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CBC, 128-bit key
Key: 0xCB, 0x55, 0x85, 0x3E, 0x28, 0x57, 0x74, 0xCC, 0xA8, 0x9D, 0x94, 0xE0, 0x56, 0x16, 0xDF, 0x15
IV: 0xB0, 0x56, 0x72, 0xA9, 0x51, 0xA1, 0x4B, 0x2F, 0xCD, 0x45, 0x51, 0x83, 0xDD, 0x2D, 0x94, 0x03
Plaintext: 0xBC, 0xB4, 0xD7, 0xFC, 0xD0, 0xB7, 0x4C, 0x63, 0x8D, 0xEE, 0x9E, 0xC6, 0x97, 0x7C, 0x34, 0x81, 0x26, 0xC4, 0xB5, 0x35, 0xAF, 0x7F, 0xC7, 0x76, 0xC1, 0x0B, 0x1D, 0xC4, 0x2D, 0x06, 0xB0, 0xBD
Ciphertext: 0x49, 0x01, 0xFA, 0x73, 0xAC, 0xE6, 0x0A, 0x89, 0xE3, 0xFE, 0x12, 0x81, 0x01, 0xA1, 0x9B, 0x8D, 0x67, 0x08, 0x23, 0x52, 0x01, 0xC0, 0x7B, 0xD9, 0x48, 0x15, 0x76, 0xAA, 0x61, 0xAE, 0x59, 0x90
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CBC, 128-bit key
Key: 0x69, 0x1C, 0x4C, 0x90, 0x36, 0x1D, 0x4F, 0xB5, 0x81, 0x53, 0xAE, 0xDC, 0x87, 0x12, 0x38, 0x23
IV: 0x3D, 0x90, 0x1F, 0x8B, 0xEF, 0xF7, 0xB4, 0xAD, 0x27, 0xB9, 0x72, 0xA9, 0xD0, 0x24, 0x3E, 0x60
Plaintext: 0x9B, 0x36, 0xED, 0xE3, 0xA2, 0xB2, 0x07, 0x2A, 0x4C, 0x73, 0xCA, 0x0A, 0x70, 0x01, 0x72, 0x61, 0xBD, 0x62, 0xB8, 0x94, 0x59, 0x33, 0x99, 0x3B, 0xC8, 0xF7, 0x58, 0x1A, 0x10, 0xAE, 0xC6, 0x54, 0x1A, 0xAA, 0xC1, 0xDB, 0x5C, 0x9E, 0xFB, 0x2B, 0xB5, 0xF8, 0xFD, 0x38, 0x98, 0x70, 0x6B, 0xA4
Ciphertext: 0xA7, 0xF2, 0xAE, 0x1E, 0x83, 0x0A, 0x33, 0x02, 0xC0, 0x62, 0xCF, 0x51, 0x64, 0x6C, 0xE7, 0x60, 0x56, 0xE6, 0xB0, 0x56, 0x15, 0xEB, 0xA8, 0xDE, 0x9E, 0x53, 0x31, 0xAC, 0x65, 0x37, 0x18, 0xB3, 0x1C, 0x6F, 0x65, 0xA6, 0x26, 0xC0, 0x99, 0x25, 0x28, 0x35, 0x4F, 0x65, 0x1A, 0x98, 0x75, 0x1C
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CBC, 128-bit key
Key: 0x6D, 0xE1, 0x89, 0x36, 0x34, 0x58, 0xFE, 0x88, 0x6C, 0x6B, 0xD8, 0xFF, 0x33, 0xCD, 0xD1, 0x00
IV: 0xAE, 0x1F, 0xD0, 0x61, 0xAB, 0x08, 0xB3, 0x1E, 0x85, 0x87, 0x4C, 0x4E, 0x48, 0x88, 0xA9, 0x55
Plaintext: 0x16, 0xB6, 0x99, 0x5A, 0xCA, 0x91, 0x6B, 0xFC, 0xDA, 0xC0, 0xF9, 0x40, 0x82, 0xA8, 0xE6, 0xCE, 0x1F, 0x3D, 0x23, 0x5E, 0xD9, 0x18, 0xB8, 0x6D, 0x84, 0xCB, 0xC1, 0x34, 0xC8, 0x71, 0xB6, 0xDA, 0x80, 0x89, 0xF0, 0xE9, 0x61, 0x04, 0x69, 0xFF, 0xDC, 0x9C, 0xC4, 0xC6, 0x45, 0x68, 0x8D, 0x25, 0x34, 0xAD, 0xC1, 0xB8, 0x2C, 0xF8, 0x91, 0x7E, 0x7A, 0x69, 0x63, 0xD2, 0x60, 0x52, 0x1A, 0x9D
Ciphertext: 0x5C, 0xEE, 0xB0, 0x3D, 0xEF, 0x2A, 0x0E, 0x10, 0xF5, 0xBF, 0xFF, 0x50, 0x5E, 0xA9, 0xC1, 0x10, 0xB0, 0x2E, 0x4A, 0x55, 0x67, 0xA5, 0x72, 0xFB, 0x74, 0xB3, 0x63, 0x4A, 0x3D, 0xC7, 0xD3, 0xD2, 0xA7, 0x00, 0xD2, 0x54, 0x41, 0x3A, 0x9C, 0xCD, 0x41, 0x0B, 0x70, 0x73, 0xB2, 0x26, 0x19, 0xF4, 0x52, 0x0E, 0x45, 0xEB, 0x25, 0x96, 0x75, 0x82, 0xB8, 0xD5, 0x12, 0xC0, 0x3E, 0x36, 0x81, 0x4D
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CBC, 128-bit key
Key: 0x73, 0x01, 0x97, 0xC9, 0x42, 0xD9, 0x7F, 0xF9, 0x38, 0xA8, 0x3F, 0x77, 0xC4, 0x34, 0x4E, 0x6D
IV: 0xB6, 0x17, 0xB2, 0x59, 0xED, 0xCD, 0xC6, 0xBB, 0x2F, 0x0C, 0x3A, 0x10, 0x58, 0x53, 0x5B, 0x04
Plaintext: 0xB7, 0xC6, 0x95, 0xE4, 0xB5, 0x39, 0x36, 0x52, 0xB7, 0x8B, 0x74, 0x3C, 0x46, 0x35, 0xB2, 0x0F, 0x6E, 0x22, 0xFF, 0x27, 0x63, 0xC2, 0xE0, 0x8B, 0x6B, 0x5A, 0x4F, 0xD7, 0xF7, 0x9E, 0x03, 0x79, 0x13, 0x81, 0xF2, 0x20, 0x01, 0x4C, 0x15, 0x72, 0x21, 0xED, 0x6B, 0xFE, 0x15, 0x92, 0x40, 0x71, 0x21, 0x77, 0xAF, 0x0C, 0xD8, 0xFC, 0x66, 0x55, 0xF5, 0xFB, 0xA9, 0x0D, 0x87, 0x58, 0x9A, 0x63, 0x51, 0xDA, 0xB7, 0x67, 0x70, 0x39, 0xA4, 0xC1, 0x3E, 0x78, 0x2B, 0xA3, 0x77, 0x74, 0x81, 0xFC
Ciphertext: 0x7C, 0x96, 0xF9, 0x67, 0x5B, 0xE0, 0x38, 0x54, 0x70, 0x0D, 0xEA, 0xE5, 0x10, 0x06, 0xF4, 0xFC, 0xFC, 0x3A, 0xDA, 0x33, 0xBA, 0xE2, 0x0D, 0x4F, 0xF6, 0x13, 0xFA, 0x6B, 0xA8, 0x74, 0xB1, 0x75, 0xB7, 0xDE, 0x71, 0xDC, 0xF8, 0x7A, 0x18, 0x26, 0x7B, 0x57, 0x74, 0x10, 0xF0, 0xE8, 0xB9, 0xDF, 0x1E, 0x05, 0x37, 0xA5, 0x60, 0xE5, 0xD1, 0xEF, 0xFE, 0xC1, 0x10, 0x22, 0xCE, 0x60, 0x23, 0xB4, 0x98, 0x5C, 0x9D, 0x8D, 0xA2, 0x07, 0x33, 0x70, 0x7C, 0xE7, 0x6A, 0x42, 0x35, 0x82, 0xAF, 0x23
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CBC, 128-bit key
Key: 0x9A, 0xBE, 0xCA, 0xEF, 0x92, 0xA6, 0xE0, 0x83, 0x96, 0x98, 0x50, 0x9C, 0x4E, 0xAC, 0xA6, 0x2A
IV: 0x37, 0x78, 0xEB, 0xA0, 0x48, 0x29, 0x6B, 0xA8, 0xD6, 0xD2, 0xBC, 0x14, 0xB5, 0x03, 0xFB, 0x18
Plaintext: 0xA0, 0x9E, 0x59, 0xB7, 0xDA, 0xE6, 0xD6, 0x7C, 0x16, 0xD9, 0x4D, 0x6A, 0x95, 0xC0, 0xB1, 0x35, 0x8E, 0x04, 0x96, 0xB3, 0xD2, 0x43, 0xF3, 0x8D, 0xB0, 0xA3, 0x26, 0x3A, 0x16, 0x66, 0x38, 0x2E, 0xFA, 0xBF, 0x63, 0x4E, 0xF8, 0xE4, 0xD1, 0xA8, 0x3D, 0x65, 0xA7, 0x61, 0xA3, 0xBC, 0x42, 0xEE, 0x1D, 0x25, 0xC0, 0x87, 0x56, 0xB0, 0xC3, 0xD9, 0x95, 0x94, 0x71, 0xFC, 0xE4, 0xC6, 0xC0, 0xA4, 0x71, 0xCA, 0xF0, 0x9B, 0x34, 0xCA, 0x59, 0x6F, 0xD2, 0xE5, 0x66, 0x68, 0xC2, 0xC9, 0xE2, 0xBC, 0xAE, 0x84, 0x72, 0x06, 0x1C, 0x97, 0x63, 0xF5, 0x4D, 0x4C, 0xA6, 0x41, 0x65, 0x4A, 0x19, 0xE4
Ciphertext: 0xB4, 0x9F, 0xF2, 0xE4, 0xFD, 0x72, 0x45, 0xF8, 0xF1, 0x5A, 0xA3, 0x3C, 0xBB, 0x49, 0xA6, 0x2A, 0x26, 0x02, 0xB8, 0x44, 0xB8, 0xED, 0x56, 0x8D, 0x82, 0x1B, 0x30, 0xA1, 0xD4, 0xA0, 0x10, 0x63, 0x66, 0xA2, 0x72, 0xB7, 0xCF, 0x19, 0xD6, 0x35, 0x13, 0x39, 0x66, 0x35, 0x77, 0x61, 0x29, 0x86, 0x06, 0x5F, 0x13, 0xB1, 0x4A, 0x30, 0x97, 0x3E, 0x9B, 0xA1, 0xAD, 0xB9, 0x57, 0x8D, 0x18, 0x1D, 0xC8, 0x4E, 0x59, 0xBC, 0x45, 0xC9, 0xD9, 0x15, 0x81, 0x1B, 0xDF, 0x9E, 0x08, 0x5C, 0xF8, 0x16, 0x1C, 0xA7, 0x6F, 0x1D, 0x66, 0x19, 0x51, 0x2C, 0xD8, 0x99, 0xD3, 0x9B, 0xC3, 0x7E, 0x43, 0xF4
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CBC, 128-bit key
Key: 0xCD, 0x67, 0x09, 0x86, 0xD6, 0xBD, 0xF4, 0x39, 0x9F, 0x00, 0x93, 0x66, 0x38, 0x0F, 0x17, 0x07
IV: 0x07, 0xC8, 0xB4, 0x17, 0x6B, 0x21, 0x5C, 0x47, 0xA0, 0x74, 0xCD, 0xF3, 0xE3, 0x1B, 0xCD, 0x54
Plaintext: 0xD6, 0x3D, 0xB4, 0xF7, 0x25, 0xE7, 0x2C, 0x6E, 0x6A, 0x5F, 0x35, 0x45, 0x4E, 0xB5, 0x6C, 0x38, 0xF1, 0x9A, 0x8C, 0xA2, 0x8D, 0x75, 0x35, 0x39, 0x56, 0xB4, 0xEC, 0xF9, 0xA4, 0x60, 0x64, 0x5E, 0x53, 0xF5, 0xFB, 0xD6, 0x6A, 0x70, 0x88, 0x76, 0xFC, 0xA9, 0x54, 0xEC, 0x4C, 0xE3, 0x66, 0xB5, 0x34, 0xA2, 0x04, 0x90, 0xC8, 0xBD, 0x76, 0x32, 0x36, 0xB3, 0x0D, 0x3B, 0xF1, 0x42, 0x64, 0x69, 0x0E, 0x36, 0xE6, 0x0B, 0xEE, 0x80, 0x90, 0xB9, 0x1D, 0x87, 0xF8, 0x43, 0x7A, 0xC3, 0x8F, 0xE7, 0x98, 0x87, 0x23, 0xC7, 0x65, 0x1E, 0xA8, 0x9A, 0x09, 0x1A, 0x37, 0xA1, 0x11, 0xE9, 0x57, 0xDC, 0xCD, 0xA9, 0x7C, 0x7F, 0xF6, 0x3D, 0xCD, 0xA0, 0x94, 0xA1, 0x2A, 0x32, 0x1F, 0x7A, 0x6E, 0x36
Ciphertext: 0x27, 0xEF, 0xDD, 0xE7, 0xCD, 0xE3, 0xCA, 0xAD, 0xFB, 0xFF, 0xC7, 0x47, 0x3F, 0x7A, 0x47, 0x3C, 0x84, 0x4C, 0xAA, 0xF6, 0x8B, 0x66, 0x71, 0xBF, 0x91, 0xB8, 0x40, 0xB7, 0x31, 0x6D, 0x4C, 0xBF, 0x80, 0x88, 0xBB, 0x83, 0x4C, 0xE0, 0xCF, 0x9B, 0x02, 0xF5, 0x9E, 0xFC, 0x78, 0xD2, 0xCD, 0xE5, 0xEE, 0xEA, 0x45, 0x52, 0x39, 0x8E, 0x0B, 0xF0, 0xA8, 0x63, 0x0B, 0xF5, 0xC6, 0xEB, 0x0A, 0xCC, 0xF8, 0x61, 0x72, 0xBA, 0x0C, 0x40, 0xBF, 0x59, 0xD5, 0x3E, 0x9D, 0xA3, 0xEA, 0xD5, 0x6D, 0xE2, 0xC0, 0x6C, 0x4D, 0xC8, 0x3F, 0xC4, 0xE1, 0x99, 0x28, 0x3A, 0xC0, 0x83, 0x57, 0xFB, 0xD9, 0xB1, 0x3A, 0x5B, 0x1F, 0x96, 0x16, 0x4D, 0xA1, 0x3A, 0x18, 0x47, 0x90, 0x9D, 0xED, 0x86, 0x19, 0xB5
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CBC, 128-bit key
Key: 0xE5, 0xF2, 0xF1, 0x30, 0xAB, 0xC2, 0x52, 0xD8, 0x97, 0x90, 0x73, 0x13, 0x4E, 0x7C, 0xC4, 0x21
IV: 0x59, 0xF6, 0xC5, 0x18, 0xCD, 0xD2, 0xC6, 0x91, 0x2B, 0x9E, 0xF1, 0xA1, 0x85, 0x33, 0x8B, 0x0B
Plaintext: 0xE2, 0x8A, 0x77, 0xB3, 0xE4, 0xD1, 0xFC, 0x56, 0xA8, 0xBE, 0xC8, 0x79, 0xEE, 0x24, 0x34, 0x9F, 0x7A, 0xC4, 0xC9, 0xBF, 0xBA, 0x65, 0x03, 0xF5, 0xA8, 0x27, 0x56, 0x78, 0xF2, 0x14, 0x6F, 0xCC, 0x58, 0xF8, 0xBC, 0x39, 0x56, 0x72, 0x2E, 0x7B, 0x04, 0x4C, 0x3E, 0xBB, 0x3A, 0x08, 0x2E, 0xBE, 0xF7, 0xBB, 0x91, 0x5D, 0x04, 0x1F, 0x0D, 0x35, 0xD4, 0xE3, 0x60, 0x9F, 0xAF, 0x45, 0xA1, 0xE3, 0x10, 0xE3, 0xC8, 0xA8, 0x4B, 0xCE, 0x71, 0xAF, 0x72, 0xE1, 0xDD, 0xC1, 0x7A, 0x51, 0x3A, 0xE6, 0x9A, 0x84, 0x24, 0xD8, 0xF4, 0x27, 0x6B, 0xB7, 0x77, 0x7B, 0x17, 0xFE, 0x04, 0xEF, 0xA9, 0xB6, 0xCF, 0xF4, 0xA4, 0xEA, 0x09, 0x0D, 0x4C, 0x5A, 0xBC, 0x25, 0xAE, 0x73, 0xF6, 0x26, 0xE0, 0x7F, 0x29, 0xC7, 0x8A, 0x1A, 0xD2, 0xA6, 0xA5, 0xE5, 0x59, 0x96, 0x83, 0x7E, 0x38, 0x3A, 0x10, 0xAF
Ciphertext: 0x4D, 0x60, 0x9C, 0xA3, 0x53, 0xB7, 0xD3, 0x4F, 0x19, 0xAF, 0xB6, 0x80, 0xD6, 0x58, 0xFF, 0x89, 0x49, 0x04, 0xCD, 0x88, 0x17, 0x3B, 0x96, 0xB3, 0xFA, 0x29, 0xA8, 0x99, 0x76, 0x6B, 0x80, 0x47, 0x19, 0x01, 0xCD, 0x80, 0x3E, 0xF3, 0xF2, 0xAB, 0x92, 0x4B, 0x97, 0x2E, 0xFC, 0xB3, 0x4D, 0xBF, 0x82, 0x7C, 0xD7, 0x3D, 0xF5, 0x8F, 0x10, 0x2F, 0x91, 0x6A, 0x13, 0xE0, 0xD4, 0xBE, 0x0D, 0x76, 0x48, 0x50, 0xE2, 0x5C, 0xDF, 0x3A, 0xC7, 0xFF, 0x7D, 0xBF, 0xED, 0x0B, 0xFA, 0xA9, 0xF7, 0x1D, 0x99, 0x45, 0xFA, 0x66, 0xA1, 0x4F, 0x99, 0x76, 0x71, 0x7E, 0x45, 0xB5, 0x24, 0x8D, 0xF3, 0x77, 0xC0, 0xD9, 0x8B, 0xFD, 0xC6, 0x3A, 0xBE, 0x28, 0x59, 0xBA, 0x40, 0xFA, 0x91, 0x9C, 0x59, 0xCD, 0xD5, 0x12, 0x73, 0xF8, 0x85, 0x78, 0xA3, 0xD9, 0x76, 0x4D, 0xE2, 0x18, 0xED, 0xE3, 0x3E, 0xD8
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CBC, 128-bit key
Key: 0x60, 0xD3, 0x57, 0xE5, 0xD8, 0x56, 0x48, 0xE4, 0xA8, 0xC2, 0xB8, 0xBA, 0xF5, 0xB0, 0xA9, 0xF1
IV: 0x6D, 0x2B, 0xCC, 0x09, 0xE6, 0xC3, 0x44, 0x26, 0x41, 0xDD, 0xAD, 0x05, 0x95, 0x4D, 0x5D, 0x34
Plaintext: 0x8A, 0x27, 0xE9, 0x83, 0x02, 0xD1, 0xEB, 0xB6, 0xFF, 0x5D, 0x03, 0x7C, 0xC1, 0x16, 0x1C, 0xA5, 0x2E, 0x59, 0xF1, 0x8F, 0x77, 0xA7, 0xCF, 0xE1, 0xF9, 0xF7, 0x9C, 0x7C, 0x61, 0x51, 0x18, 0xAF, 0x14, 0x98, 0x63, 0xAA, 0xCE, 0xA8, 0xC0, 0x36, 0x88, 0xA1, 0x98, 0xA3, 0xA0, 0x81, 0xC2, 0x01, 0x34, 0xF9, 0x01, 0x93, 0xCE, 0x79, 0xCE, 0x80, 0x47, 0x8E, 0x58, 0xCC, 0xE5, 0x6D, 0xCA, 0x87, 0xC7, 0xD0, 0xCC, 0x44, 0x83, 0x00, 0x4C, 0xCD, 0x0D, 0x33, 0x7E, 0x15, 0xDB, 0x19, 0x21, 0x6E, 0x46, 0xB2, 0x05, 0xFC, 0x34, 0x62, 0xCA, 0x6A, 0xF4, 0x47, 0xEA, 0xDB, 0x69, 0xCA, 0xFA, 0x24, 0x6B, 0x74, 0x2C, 0x38, 0x6A, 0x04, 0x19, 0xE3, 0x54, 0xBE, 0xBD, 0xBC, 0xB9, 0x05, 0xC3, 0x55, 0x2E, 0x2C, 0x03, 0xB4, 0xEF, 0x8A, 0x4A, 0x07, 0xC8, 0xCC, 0x59, 0x93, 0x35, 0x8F, 0x30, 0xEE, 0xC8, 0x2F, 0x8C, 0x6E, 0xCB, 0xD9, 0xAE, 0xE1, 0x27, 0xE8, 0x5E, 0x7E, 0x84, 0x6E, 0x30, 0x1C
Ciphertext: 0xCB, 0x12, 0xCF, 0x19, 0xB5, 0xD4, 0x34, 0xDA, 0x62, 0xFB, 0x58, 0x6B, 0xF8, 0x92, 0x52, 0x2B, 0xE8, 0xEB, 0xBA, 0x69, 0xAE, 0xA2, 0x20, 0x9B, 0xBC, 0xA8, 0x72, 0x09, 0xA8, 0x48, 0x73, 0x67, 0xAC, 0x52, 0x6B, 0xEC, 0x97, 0xA8, 0x37, 0x7A, 0xBB, 0x0E, 0x5F, 0x35, 0x0A, 0x57, 0x8D, 0x29, 0x2B, 0xF5, 0xCD, 0x3A, 0x17, 0x28, 0x16, 0xF5, 0x57, 0x8B, 0x71, 0xB0, 0xCE, 0x1E, 0xCD, 0xEB, 0x19, 0xDA, 0x2E, 0x13, 0xCD, 0xC4, 0xBC, 0x79, 0x05, 0xF5, 0x37, 0xD2, 0xEB, 0x04, 0x6A, 0x1B, 0xCC, 0x76, 0x31, 0x44, 0xF2, 0xD9, 0xFC, 0xAA, 0xF5, 0x9F, 0x4A, 0x74, 0xE7, 0xA1, 0x35, 0x81, 0x0D, 0x32, 0xB5, 0xD7, 0x21, 0x9B, 0xC8, 0x01, 0xB1, 0x9F, 0xBD, 0x90, 0xC0, 0xEC, 0x55, 0xA1, 0x84, 0x4A, 0x5A, 0x7C, 0xB3, 0xDD, 0xE2, 0xCF, 0x9A, 0x25, 0x96, 0x9A, 0xBC, 0x4A, 0xCC, 0x63, 0x06, 0x78, 0x9D, 0xAE, 0x2A, 0xD2, 0x6E, 0x9C, 0x93, 0x46, 0xB1, 0x1E, 0x85, 0x9F, 0x6C, 0x44
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CBC, 128-bit key
Key: 0xB2, 0x10, 0x06, 0xA2, 0x47, 0x18, 0xD6, 0xBF, 0x8A, 0xC5, 0xAD, 0xDB, 0x90, 0xE5, 0xF4, 0x4D
IV: 0xA5, 0xA6, 0xF3, 0xCE, 0xEE, 0xAA, 0x93, 0x2D, 0x4C, 0x59, 0x68, 0x45, 0x82, 0x7B, 0xEE, 0x2D
Plaintext: 0x9B, 0x06, 0x13, 0xAE, 0x86, 0x34, 0xF6, 0xFA, 0x04, 0xD9, 0xEF, 0x9A, 0xC4, 0xF4, 0xCF, 0xA9, 0xCB, 0x84, 0x69, 0x40, 0x1A, 0x9D, 0x51, 0x31, 0x8B, 0xBA, 0xE3, 0xF8, 0xFD, 0x55, 0x87, 0xEE, 0xB0, 0xB5, 0x34, 0xC0, 0xF2, 0x08, 0x33, 0x20, 0xFC, 0xB1, 0x26, 0xBA, 0x17, 0xE3, 0x48, 0x6A, 0x03, 0x6F, 0xF6, 0xAC, 0x98, 0xDA, 0x6F, 0x54, 0xAE, 0xB3, 0xD8, 0x7F, 0x3B, 0x23, 0x83, 0xC9, 0xBB, 0xC6, 0x70, 0xC0, 0xD5, 0xB9, 0x14, 0x99, 0x3B, 0xF5, 0x5A, 0x22, 0xD2, 0xDB, 0xE8, 0xF8, 0x13, 0x0F, 0xA3, 0xFA, 0xB1, 0x8A, 0x75, 0xFD, 0x7B, 0xEB, 0x4E, 0xC2, 0x85, 0x0E, 0x68, 0x25, 0x82, 0xE0, 0xD0, 0x96, 0x75, 0x72, 0x22, 0xCD, 0x89, 0x4C, 0x93, 0xBA, 0x3C, 0x03, 0x35, 0xBB, 0xC3, 0x0E, 0x77, 0x12, 0xAA, 0xD5, 0xEB, 0x96, 0xBC, 0x0B, 0x4D, 0xA8, 0x22, 0x3E, 0xC0, 0x69, 0xCF, 0xAC, 0x5A, 0x2B, 0x1B, 0x59, 0xE3, 0x25, 0xAD, 0x5E, 0xDA, 0x6A, 0x9F, 0x84, 0xB9, 0x1C, 0xDD, 0x11, 0x7B, 0xDC, 0xCE, 0xE2, 0x5A, 0x86, 0x37, 0xBA, 0xDD, 0x1B, 0x5C, 0xDA, 0x12, 0xFF
Ciphertext: 0xB2, 0x25, 0x29, 0xEC, 0xC4, 0x7D, 0x73, 0xCA, 0x8C, 0xF2, 0x05, 0xBE, 0x8E, 0x88, 0x94, 0x77, 0xD0, 0x2F, 0xB6, 0x5C, 0x99, 0x23, 0x64, 0x2F, 0x67, 0x4F, 0xAF, 0x76, 0x69, 0x82, 0x6C, 0x97, 0x8F, 0xB4, 0x8A, 0xC7, 0xDD, 0x1B, 0xBE, 0x01, 0x35, 0x07, 0xDF, 0xB9, 0x0F, 0x0D, 0x6B, 0xAB, 0x59, 0x8F, 0xDD, 0x34, 0xC6, 0x93, 0xB1, 0x66, 0x13, 0xF2, 0xB4, 0x78, 0xC0, 0x1D, 0xFF, 0xC4, 0xB7, 0x0B, 0x44, 0x85, 0xBB, 0x93, 0x43, 0x0E, 0x40, 0xE6, 0xBC, 0x0E, 0xBB, 0xF3, 0x53, 0xCE, 0xE5, 0x1B, 0x92, 0xD6, 0xB4, 0xA0, 0x10, 0xF0, 0x4B, 0x1F, 0xBE, 0x7C, 0x2F, 0x4F, 0x6F, 0x24, 0x69, 0xA2, 0xE4, 0x4B, 0xAD, 0x79, 0x68, 0xF7, 0xF9, 0x23, 0xB8, 0x31, 0x6C, 0x21, 0xFD, 0xF8, 0x47, 0xE5, 0x34, 0x0E, 0x10, 0x95, 0x20, 0x9B, 0xFA, 0xA9, 0x1E, 0xA7, 0x0A, 0x5A, 0xC6, 0x3A, 0x39, 0x39, 0xF9, 0x92, 0xED, 0xE2, 0x4E, 0x8D, 0xBA, 0x21, 0x24, 0x50, 0x88, 0x80, 0x89, 0x8A, 0xD3, 0x20, 0x87, 0x0F, 0x74, 0x7D, 0x5C, 0xE6, 0xC7, 0x75, 0xE5, 0xCF, 0xF7, 0xC4, 0x2D, 0xCA}}
Test: Encrypt
#
#
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CBC, 192-bit key
Key: 0x68, 0xD2, 0x18, 0x65, 0x0E, 0x96, 0xE1, 0x07, 0x71, 0xD4, 0x36, 0x1A, 0x41, 0x85, 0xFC, 0x81, 0x27, 0xC3, 0xB5, 0x41, 0x64, 0xDA, 0x4A, 0x35
IV: 0xB5, 0xA1, 0x07, 0x03, 0x79, 0x0B, 0xE7, 0x4E, 0x15, 0xF9, 0x12, 0x2D, 0x98, 0x52, 0xA4, 0xDC
Plaintext: 0x9B, 0x56, 0xB0, 0xB2, 0x6C, 0x2F, 0x85, 0x53, 0x6B, 0xC9, 0x2F, 0x27, 0xB3, 0xE4, 0x41, 0x0B
Ciphertext: 0x72, 0x86, 0x6A, 0xA8, 0xE3, 0xF1, 0xA4, 0x44, 0x96, 0x18, 0xC8, 0xCF, 0x62, 0x3D, 0x9B, 0xBE
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CBC, 192-bit key
Key: 0xFD, 0x68, 0xD2, 0x46, 0xC2, 0xF8, 0xC6, 0xBE, 0xA0, 0xC9, 0x4F, 0x6C, 0xFF, 0xB5, 0xB2, 0x0D, 0xF4, 0x8B, 0x4F, 0x1A, 0x66, 0xAA, 0xDC, 0xFB
IV: 0x6F, 0xCE, 0xF1, 0x78, 0x04, 0x29, 0xC9, 0x70, 0xD9, 0xB6, 0x47, 0xCD, 0x7F, 0xCA, 0x37, 0xB7
Plaintext: 0xCF, 0xEC, 0xD7, 0x08, 0x8C, 0xE6, 0x95, 0x00, 0x44, 0x1C, 0x1B, 0x3B, 0x77, 0x1D, 0x89, 0xDF, 0xFC, 0x78, 0x01, 0x1A, 0x9F, 0xD1, 0x69, 0xCC, 0x0F, 0x33, 0x6C, 0x80, 0xF8, 0xA8, 0xC2, 0xA1
Ciphertext: 0x35, 0x8F, 0xF4, 0x28, 0x33, 0x52, 0x60, 0x81, 0xBB, 0xAC, 0x7C, 0x5A, 0x84, 0xD1, 0xE2, 0x07, 0x2F, 0xEE, 0x96, 0xD5, 0x4A, 0xEE, 0x31, 0x1F, 0xC5, 0xB2, 0x51, 0xA8, 0xC8, 0xE6, 0x4C, 0xED
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CBC, 192-bit key
Key: 0x6C, 0x07, 0xB2, 0xEB, 0x87, 0x0E, 0xD5, 0x1F, 0x53, 0xB0, 0x1C, 0xFB, 0xE9, 0xB0, 0x14, 0x69, 0xD9, 0x6F, 0x69, 0xF7, 0xCC, 0x03, 0xAA, 0x87
IV: 0x68, 0x88, 0x4B, 0x47, 0x74, 0xBB, 0xF0, 0xE4, 0x3D, 0xC5, 0xE9, 0xFB, 0x38, 0x54, 0xF8, 0xD1
Plaintext: 0xE8, 0xF0, 0x5B, 0x43, 0x02, 0x8D, 0x06, 0x00, 0xD0, 0x5C, 0x31, 0xF5, 0xD3, 0xE7, 0x12, 0x09, 0xAC, 0x5D, 0xEC, 0x0B, 0x3D, 0x2A, 0x48, 0xE8, 0x0B, 0xCB, 0x82, 0x22, 0xE6, 0xE1, 0x88, 0x7D, 0xCD, 0x84, 0xDF, 0xFC, 0x0C, 0xD9, 0xE7, 0x0B, 0xA7, 0xE7, 0x5F, 0xFE, 0xFB, 0xA6, 0x2B, 0xBA
Ciphertext: 0x3E, 0x7B, 0x2C, 0x78, 0x61, 0x84, 0x84, 0xA7, 0x25, 0x82, 0x70, 0x87, 0xBE, 0x67, 0x79, 0x46, 0x99, 0x17, 0x9E, 0xD0, 0xA9, 0xB1, 0xDC, 0x80, 0xA9, 0xCB, 0x42, 0x5C, 0x15, 0xD5, 0x94, 0xBA, 0xC3, 0xB3, 0xF4, 0x1F, 0xEC, 0x94, 0x73, 0x60, 0x63, 0x6E, 0x4A, 0xA9, 0xEC, 0xFB, 0xA1, 0x7B
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CBC, 192-bit key
Key: 0xA3, 0x59, 0x55, 0xB2, 0x99, 0x1E, 0x53, 0x16, 0x9D, 0xC4, 0x88, 0x46, 0xDB, 0xDC, 0x0D, 0x8D, 0xC8, 0x13, 0xB0, 0x0C, 0x4D, 0xBF, 0x3D, 0xF4
IV: 0x27, 0xB7, 0xFD, 0xF9, 0x8E, 0x68, 0x7D, 0x03, 0x14, 0x25, 0x90, 0x26, 0xD1, 0xBF, 0x97, 0xD4
Plaintext: 0xBD, 0x56, 0x00, 0x51, 0x5D, 0x6E, 0x0D, 0x68, 0xA2, 0x45, 0xD7, 0x5D, 0x0E, 0x65, 0x92, 0x22, 0x18, 0x75, 0x12, 0xCD, 0xD2, 0x54, 0x8E, 0x4A, 0xC9, 0x69, 0xA5, 0x4D, 0x2C, 0x34, 0x9E, 0x8B, 0x31, 0x29, 0xF4, 0x2A, 0xB5, 0xBF, 0x12, 0x76, 0x23, 0xC4, 0x5B, 0xD5, 0x96, 0xF3, 0x6D, 0xFD, 0x42, 0xC8, 0xA7, 0x64, 0x10, 0x93, 0xE9, 0xF8, 0x88, 0xCC, 0x9A, 0x11, 0xF4, 0xA6, 0xF0, 0xA4
Ciphertext: 0xC5, 0x7D, 0x22, 0x65, 0xAB, 0x4E, 0xE3, 0xE2, 0x31, 0x71, 0x63, 0x1D, 0x19, 0x39, 0x62, 0xDB, 0x25, 0x62, 0x8A, 0xA9, 0x77, 0xD4, 0x86, 0x92, 0xA5, 0xCA, 0x54, 0x8F, 0x47, 0x84, 0x39, 0x04, 0x43, 0x44, 0xE8, 0xAC, 0x01, 0xD2, 0x36, 0x08, 0x0F, 0x22, 0x10, 0x0F, 0x2E, 0xAC, 0x41, 0x9C, 0x84, 0xEE, 0xA1, 0x0F, 0xAA, 0x42, 0x08, 0xEA, 0x2B, 0xD0, 0x21, 0x22, 0x6B, 0xBA, 0xEC, 0xDF
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CBC, 192-bit key
Key: 0xC2, 0xE6, 0x6B, 0xB9, 0x2B, 0xF6, 0xA3, 0x1F, 0x12, 0x35, 0x44, 0x5E, 0x2F, 0x92, 0x57, 0xED, 0x6C, 0x59, 0xC3, 0xA5, 0x8F, 0x4C, 0x13, 0x76
IV: 0x1A, 0xF6, 0x79, 0x59, 0x6F, 0x3C, 0x13, 0x85, 0x38, 0x35, 0x6E, 0xE6, 0x06, 0x3C, 0x49, 0xCB
Plaintext: 0x38, 0x43, 0x9B, 0xDF, 0x1F, 0x6A, 0xD7, 0x5A, 0x60, 0xD0, 0x6E, 0x78, 0x99, 0xA8, 0x95, 0x2B, 0x47, 0x90, 0x4A, 0x0C, 0xE7, 0x1F, 0x91, 0x98, 0x5B, 0xBD, 0x04, 0x99, 0x90, 0xB8, 0x8A, 0xE2, 0x5E, 0x94, 0x67, 0x3F, 0xAF, 0xA2, 0x75, 0xAC, 0xE4, 0xD4, 0xB0, 0xC5, 0x74, 0xCF, 0xF8, 0x7E, 0xD6, 0x42, 0x13, 0x14, 0xA2, 0x76, 0xF2, 0x44, 0xF3, 0x27, 0x35, 0xBA, 0x0F, 0x93, 0xF1, 0xCC, 0x4A, 0xD0, 0xB0, 0x68, 0x27, 0x62, 0xB9, 0x4B, 0xC1, 0x0D, 0x92, 0x74, 0x69, 0xE8, 0xC4, 0xD9
Ciphertext: 0x96, 0xBE, 0x15, 0xC3, 0xB8, 0xD1, 0x47, 0x3B, 0x4A, 0x3C, 0xB8, 0xF5, 0x25, 0x83, 0xB1, 0xAD, 0x80, 0x4F, 0xE4, 0x6D, 0xC1, 0x43, 0xFD, 0x26, 0xC3, 0x8C, 0x4B, 0x01, 0x9C, 0x10, 0xD6, 0x0F, 0x68, 0x15, 0x82, 0x50, 0x95, 0x32, 0xE5, 0x86, 0xCC, 0x23, 0x71, 0x8B, 0x7B, 0xD7, 0x50, 0x45, 0xD5, 0x77, 0xF8, 0xE7, 0x78, 0xCA, 0x4B, 0xF0, 0x27, 0x8E, 0xB2, 0x5A, 0xB7, 0xCD, 0x67, 0x08, 0x00, 0xC5, 0xEC, 0x88, 0x32, 0xFE, 0x91, 0xB8, 0x4E, 0x56, 0xAB, 0x58, 0xDE, 0xE8, 0x49, 0xA8
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CBC, 192-bit key
Key: 0x91, 0xB3, 0xDE, 0x58, 0xE9, 0x6A, 0xBC, 0xF0, 0xC7, 0x1A, 0x09, 0x31, 0xCC, 0xF4, 0x03, 0xF1, 0xC5, 0xA0, 0x7E, 0x41, 0xCF, 0xD4, 0x2C, 0xA0
IV: 0xBF, 0x24, 0x1B, 0x6E, 0xC0, 0x1C, 0x7F, 0xA3, 0x3E, 0x8C, 0xB2, 0xC0, 0x03, 0x23, 0x79, 0x06
Plaintext: 0xA0, 0x3F, 0x89, 0xE6, 0x0F, 0x04, 0x4A, 0xBA, 0x96, 0xAC, 0xDA, 0xB2, 0xEE, 0x1D, 0x55, 0x11, 0xA5, 0xC1, 0x54, 0x99, 0xC1, 0x92, 0xB3, 0x43, 0xA6, 0x74, 0x98, 0x34, 0x3A, 0xC8, 0xB0, 0xED, 0x46, 0x3E, 0xBC, 0xC2, 0x20, 0xEA, 0x4D, 0x8D, 0x87, 0x9B, 0xCB, 0xA3, 0xCE, 0x68, 0xBC, 0x07, 0x3D, 0x8B, 0x43, 0xDE, 0xB4, 0x73, 0xE7, 0x23, 0x91, 0x14, 0x96, 0x9C, 0xD4, 0x82, 0xEA, 0x0D, 0x81, 0xBE, 0xAB, 0xAB, 0x46, 0xCF, 0x94, 0xD3, 0x5E, 0x15, 0x5A, 0xFC, 0xB5, 0xDB, 0xEA, 0xEB, 0x4D, 0x2B, 0xF2, 0x26, 0xE0, 0xE6, 0xA4, 0xAA, 0xC7, 0x14, 0xB7, 0xE0, 0x1A, 0x78, 0xAE, 0xCE
Ciphertext: 0xD1, 0x38, 0x58, 0xA3, 0xE9, 0x6A, 0xF4, 0xB8, 0x40, 0xB7, 0x46, 0x41, 0x87, 0x30, 0x5F, 0x6B, 0x41, 0x32, 0xE1, 0xCE, 0x76, 0x22, 0x39, 0xC0, 0x04, 0xA8, 0x9D, 0xBE, 0xA6, 0xD4, 0xB0, 0x72, 0x0D, 0x8F, 0x4B, 0xF4, 0x52, 0xFF, 0x3C, 0x87, 0xFC, 0xD2, 0xCA, 0x93, 0x2A, 0xC5, 0x75, 0xD7, 0x66, 0x3B, 0xF9, 0x2D, 0x73, 0x54, 0x14, 0x43, 0xE7, 0x7B, 0x08, 0xDC, 0x05, 0x77, 0xFC, 0x8C, 0x2A, 0xE6, 0x23, 0x61, 0x38, 0x96, 0x9F, 0x6F, 0xF0, 0xC2, 0x5A, 0x90, 0xC5, 0x35, 0xF6, 0x01, 0x3E, 0x94, 0xD9, 0x7A, 0xC3, 0xD5, 0x53, 0x75, 0x95, 0x7C, 0x9F, 0xB9, 0x86, 0x94, 0x7F, 0x45
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CBC, 192-bit key
Key: 0x19, 0x67, 0x5C, 0x8A, 0xCA, 0xDB, 0xA8, 0xF5, 0xE4, 0xC4, 0x8E, 0xA5, 0xEC, 0x9E, 0x66, 0x23, 0x9E, 0x48, 0x69, 0x57, 0x8E, 0x14, 0x71, 0x40
IV: 0x0F, 0x1B, 0x00, 0xE9, 0x54, 0xD3, 0x84, 0x98, 0xD5, 0xE3, 0xD9, 0x48, 0xF4, 0x35, 0x10, 0x59
Plaintext: 0xE1, 0x4D, 0x6F, 0x87, 0xBB, 0xDA, 0xB8, 0x19, 0xF8, 0x8B, 0xAF, 0x5A, 0x06, 0x24, 0xD6, 0x4D, 0x32, 0xD1, 0x7B, 0x9D, 0xCA, 0xBA, 0xF4, 0xD3, 0x7E, 0xD7, 0x2A, 0xCB, 0x0C, 0x06, 0x54, 0x69, 0x1D, 0x5B, 0x05, 0x88, 0x69, 0xB7, 0x69, 0x33, 0x22, 0x9C, 0xCB, 0x18, 0x90, 0x3F, 0x5B, 0x39, 0xF9, 0xDF, 0x2F, 0xE5, 0xC3, 0x56, 0x87, 0xE7, 0xDC, 0xEE, 0x55, 0xFD, 0x5A, 0x75, 0xFD, 0x8C, 0x5F, 0x94, 0x59, 0x91, 0x40, 0x5C, 0x00, 0xDB, 0xE6, 0x22, 0xC8, 0x78, 0x74, 0x8D, 0x89, 0x6D, 0x29, 0xED, 0x24, 0xAA, 0x89, 0xCE, 0xC4, 0x3C, 0xB7, 0xCE, 0x64, 0xC5, 0x26, 0xAB, 0x92, 0x29, 0x70, 0xA0, 0x72, 0x8B, 0x86, 0xF2, 0x05, 0x78, 0x0A, 0xC6, 0xAB, 0x61, 0xF9, 0x35, 0xE7, 0x4F
Ciphertext: 0xB3, 0xC1, 0xD0, 0xD9, 0xAB, 0x14, 0xDA, 0xF5, 0xC4, 0x80, 0x52, 0xD1, 0x1A, 0x44, 0xEF, 0xB2, 0x52, 0x63, 0xE8, 0xA9, 0xEE, 0xCB, 0x9D, 0x40, 0x63, 0xBE, 0x44, 0x9D, 0x24, 0xDF, 0x26, 0x62, 0x78, 0x4E, 0x07, 0x34, 0x6D, 0x2D, 0xD7, 0x7D, 0x58, 0x15, 0xB2, 0xE1, 0x50, 0xEA, 0x90, 0xD5, 0xBB, 0x08, 0x10, 0x1F, 0x77, 0x31, 0xCC, 0xE1, 0xEC, 0xB1, 0xBE, 0x39, 0x92, 0x8D, 0x4B, 0xB6, 0x52, 0x11, 0x3D, 0x91, 0x07, 0x7A, 0x64, 0xC2, 0xE5, 0x8F, 0x58, 0x3B, 0x98, 0xBB, 0x7B, 0xF4, 0x3F, 0x38, 0xE2, 0xAA, 0x1B, 0x88, 0x69, 0x34, 0xCC, 0x61, 0x80, 0xB9, 0xF5, 0xB1, 0xBE, 0x8F, 0x20, 0x26, 0x62, 0x4F, 0x1F, 0xEE, 0x2D, 0x6E, 0x57, 0x6E, 0x33, 0xCB, 0x9F, 0xE3, 0xF9, 0x43
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CBC, 192-bit key
Key: 0x8D, 0xA2, 0x63, 0xD2, 0x62, 0x4B, 0x34, 0x3A, 0xD7, 0x1F, 0x5E, 0x0A, 0xB7, 0xD0, 0x9B, 0xAA, 0x19, 0x28, 0x58, 0x5C, 0x84, 0xA0, 0x01, 0x71
IV: 0x57, 0x2F, 0x7E, 0xBD, 0x68, 0x60, 0xFE, 0x48, 0xEC, 0xA7, 0xF3, 0x46, 0x97, 0xF5, 0x5D, 0x4A
Plaintext: 0x04, 0x8A, 0x4C, 0xB6, 0x56, 0x0B, 0xA0, 0x76, 0x20, 0xD4, 0x14, 0xEE, 0x82, 0x8F, 0x7B, 0x30, 0x95, 0x05, 0x49, 0x73, 0x09, 0x35, 0x54, 0xC1, 0x0D, 0xA3, 0xDC, 0xEF, 0x6F, 0xF3, 0xC9, 0xD2, 0x05, 0xB6, 0x35, 0xB0, 0x4B, 0x84, 0x2A, 0xF5, 0x4D, 0x4B, 0xAD, 0x27, 0xC8, 0xE6, 0xFB, 0x1C, 0x8C, 0xF2, 0x12, 0x6B, 0x24, 0xDD, 0x73, 0x20, 0xB9, 0x3F, 0x27, 0xB4, 0x34, 0x6E, 0x00, 0x3C, 0xA3, 0x4D, 0x21, 0xE0, 0xDE, 0x64, 0xC0, 0x8F, 0x6A, 0x36, 0x2B, 0xF1, 0x9D, 0xCE, 0x09, 0x9D, 0x03, 0x9C, 0xE3, 0x8D, 0x01, 0x7F, 0xE3, 0xCE, 0xB8, 0x23, 0xDB, 0x7C, 0x2C, 0x8D, 0x88, 0xEE, 0xA6, 0xF4, 0x19, 0x2E, 0x57, 0xD3, 0xEB, 0xAC, 0x3D, 0x3C, 0x97, 0x33, 0x4B, 0x6F, 0x2E, 0x1B, 0xC4, 0xAB, 0xC3, 0xC1, 0xE8, 0x44, 0x2A, 0x34, 0xD2, 0xF6, 0x00, 0x31, 0xA1, 0x79, 0xEB, 0x52
Ciphertext: 0x69, 0x29, 0xF6, 0x37, 0xDA, 0xC4, 0x24, 0x68, 0x11, 0x49, 0xEC, 0xDD, 0x87, 0x8F, 0xF8, 0x29, 0xF1, 0xEC, 0xEC, 0x64, 0xC1, 0x91, 0x80, 0x2A, 0x29, 0xF0, 0x5C, 0x8B, 0xA1, 0x90, 0xA5, 0x1F, 0x64, 0x30, 0xF2, 0xC8, 0xEE, 0xB7, 0x07, 0x39, 0xE7, 0x59, 0x05, 0x3F, 0x65, 0x15, 0x63, 0x93, 0xD9, 0x64, 0xAB, 0xAF, 0xAF, 0x55, 0x90, 0xA9, 0x40, 0x64, 0x6D, 0x5F, 0xF4, 0xEF, 0x9D, 0x9E, 0x60, 0x5F, 0x36, 0x82, 0xDF, 0x2E, 0xCF, 0x80, 0xA9, 0xF1, 0xC3, 0x7D, 0x7F, 0xC0, 0x30, 0xBF, 0x0D, 0xF2, 0xA0, 0x2E, 0x17, 0xE5, 0x05, 0x51, 0xE4, 0xA8, 0x81, 0x33, 0xCA, 0x63, 0x04, 0x44, 0xDA, 0xBD, 0x7D, 0x50, 0x05, 0xC0, 0x9F, 0xDA, 0x0D, 0x35, 0x20, 0x19, 0x57, 0x29, 0x0A, 0x78, 0x4A, 0x95, 0x80, 0x31, 0xBC, 0x83, 0xA7, 0x1D, 0x3F, 0xCB, 0x4F, 0xD8, 0x51, 0x20, 0xE0, 0xA7
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CBC, 192-bit key
Key: 0xD6, 0x55, 0x23, 0x82, 0xFD, 0xF8, 0x32, 0xB4, 0x90, 0x06, 0xF8, 0xD5, 0x18, 0xF0, 0xF1, 0xFE, 0x95, 0xC8, 0xBB, 0xEF, 0x20, 0x54, 0xD2, 0xB9
IV: 0xCF, 0x61, 0x9F, 0xBA, 0xD9, 0x59, 0xB1, 0xCE, 0xFA, 0x18, 0x4A, 0xC4, 0x19, 0xFC, 0x1D, 0x0F
Plaintext: 0x29, 0x3B, 0x56, 0xBE, 0x4D, 0x7A, 0xDB, 0xAF, 0x3F, 0x9B, 0xD1, 0xFF, 0xF2, 0xD6, 0x63, 0xC4, 0x76, 0x0B, 0xBE, 0xFF, 0x1D, 0x56, 0x60, 0xCC, 0xDC, 0xE5, 0x93, 0xDC, 0xF3, 0x06, 0x34, 0x25, 0xD0, 0x84, 0xB9, 0xD8, 0x31, 0x34, 0x73, 0x94, 0x8A, 0xCB, 0x0F, 0xD9, 0xA6, 0xF2, 0x63, 0xBF, 0x90, 0x9D, 0x68, 0xE8, 0xB4, 0x98, 0x82, 0xB3, 0x42, 0x62, 0x08, 0xB2, 0xD3, 0x3F, 0x00, 0x5F, 0x4F, 0x89, 0x2A, 0x0A, 0x0E, 0x47, 0x41, 0x16, 0x3D, 0x01, 0x7D, 0x65, 0x84, 0xD2, 0x5C, 0x11, 0xE5, 0xBE, 0xA2, 0x5D, 0xE8, 0x46, 0x9E, 0xEB, 0xF5, 0x3A, 0xB0, 0x2F, 0x01, 0xCF, 0x08, 0x23, 0x6D, 0xF1, 0xB0, 0x3C, 0x2A, 0xDA, 0xCD, 0x9D, 0x22, 0xE4, 0x22, 0x8C, 0xD3, 0x9B, 0xD5, 0x22, 0x3D, 0x17, 0x76, 0x46, 0xFF, 0x89, 0x3D, 0xDC, 0xBD, 0x13, 0x93, 0x39, 0xC4, 0xDD, 0xD4, 0xDA, 0xF1, 0x65, 0x54, 0x56, 0xCF, 0x16, 0xA0, 0x92, 0xFF, 0x1D, 0x06, 0x34, 0xDD, 0x78, 0x57, 0x5A
Ciphertext: 0xC8, 0x30, 0x92, 0x15, 0x8B, 0xDE, 0x25, 0x1F, 0x59, 0xC8, 0x20, 0x7B, 0x8D, 0xC3, 0xFC, 0xDE, 0x34, 0xB1, 0x54, 0x6E, 0x20, 0xFE, 0x3E, 0x94, 0x2F, 0x9F, 0x0B, 0xAE, 0x74, 0x5F, 0x54, 0xB1, 0x42, 0x6F, 0x0F, 0xEE, 0xD7, 0x60, 0x5A, 0x78, 0xA2, 0xF1, 0x19, 0xF4, 0x59, 0xAD, 0x0A, 0x79, 0x4F, 0x5F, 0x58, 0x59, 0x23, 0xFE, 0xB8, 0xE6, 0xAF, 0xA5, 0xB5, 0x6D, 0xC2, 0xA7, 0x96, 0x20, 0x13, 0xA5, 0xEA, 0x7D, 0x98, 0xBD, 0x97, 0x6C, 0x68, 0x65, 0x6D, 0x38, 0x0C, 0x1E, 0x3A, 0x30, 0xD0, 0xCB, 0x9C, 0xFA, 0x97, 0x94, 0x0B, 0x65, 0x1B, 0xD8, 0x34, 0x5C, 0x33, 0x60, 0x4B, 0xDD, 0xCC, 0xFC, 0x20, 0x72, 0x8E, 0x5A, 0x28, 0x5D, 0x2C, 0x5C, 0x8F, 0xE0, 0x87, 0xF4, 0x57, 0xC8, 0x94, 0x9F, 0xDC, 0x24, 0x8B, 0xC8, 0xF9, 0xFA, 0xEA, 0xB6, 0x39, 0x9B, 0x9D, 0x25, 0x07, 0xC5, 0x18, 0xB4, 0xD0, 0x6F, 0xFD, 0x9F, 0xC5, 0x96, 0xBD, 0x1C, 0x3C, 0x60, 0x34, 0x74, 0xE5, 0x0E
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CBC, 192-bit key
Key: 0x60, 0x4F, 0xEB, 0x8B, 0x42, 0x88, 0xE6, 0xEE, 0x61, 0x96, 0xBA, 0xB9, 0x66, 0x91, 0xED, 0xED, 0xA4, 0x8C, 0x1D, 0x41, 0x43, 0x23, 0x41, 0x5B
IV: 0x9D, 0x53, 0x31, 0x46, 0xE8, 0x8F, 0x69, 0x21, 0x16, 0x0F, 0x09, 0x14, 0xF9, 0x6C, 0x21, 0x89
Plaintext: 0xAB, 0x6A, 0x2C, 0x98, 0x2D, 0x14, 0xDA, 0xC2, 0x4E, 0x0F, 0x13, 0xE3, 0xCE, 0x28, 0x38, 0x62, 0xC4, 0x2F, 0xAC, 0xAB, 0x3D, 0x08, 0x93, 0xDF, 0x26, 0xFF, 0xD9, 0xC9, 0x6C, 0x5C, 0x76, 0x15, 0x61, 0x37, 0xF1, 0xBC, 0x62, 0x8E, 0x23, 0xC3, 0xB7, 0x95, 0x3E, 0x25, 0xBA, 0x4D, 0x0E, 0x0E, 0x3B, 0x58, 0x7E, 0x49, 0x24, 0x0C, 0x5D, 0xFC, 0x59, 0xC6, 0x62, 0x93, 0xE2, 0x81, 0x6E, 0xFA, 0x4C, 0xA7, 0x12, 0x0F, 0x4C, 0x26, 0x51, 0x57, 0xA6, 0xC7, 0xA7, 0xEF, 0x4D, 0xBC, 0x4A, 0xC6, 0xCC, 0x77, 0xAF, 0x0A, 0xE4, 0xC3, 0x50, 0xE0, 0x77, 0x0D, 0xAD, 0x58, 0xA5, 0x02, 0x90, 0xA0, 0x34, 0x60, 0x96, 0x78, 0x35, 0x05, 0xEB, 0xE5, 0xE4, 0x4D, 0x55, 0x2A, 0xD1, 0x9A, 0x74, 0xF4, 0x3D, 0x34, 0x48, 0xD5, 0xC7, 0x54, 0xF3, 0xF3, 0x48, 0x7B, 0xC0, 0x02, 0xFB, 0x08, 0x65, 0x6F, 0xE1, 0x0A, 0x85, 0xDE, 0x63, 0x53, 0x79, 0xD7, 0x3A, 0xCE, 0x50, 0xBC, 0x8C, 0x12, 0x14, 0xFF, 0x57, 0x36, 0x4F, 0x91, 0x13, 0xE7, 0xCE, 0x9E, 0x93, 0xB9, 0xA5, 0x77, 0x2D, 0xBB, 0x74, 0xD0
Ciphertext: 0x55, 0x6B, 0xDA, 0xDC, 0x75, 0x31, 0xEE, 0xE8, 0x88, 0xF6, 0xDE, 0x47, 0x8F, 0xB3, 0x74, 0x0F, 0xA2, 0xBD, 0x15, 0x22, 0x08, 0x76, 0x74, 0xF2, 0xC6, 0xE1, 0x64, 0xDC, 0x6F, 0xB6, 0x08, 0x7C, 0x41, 0x6B, 0xCC, 0x7C, 0x25, 0x29, 0x54, 0x78, 0x25, 0x9D, 0x4E, 0xBB, 0xEC, 0xFD, 0x42, 0xD3, 0x2B, 0x97, 0x23, 0x9E, 0x45, 0x91, 0x02, 0x68, 0x0A, 0x19, 0x79, 0x82, 0xAB, 0x3E, 0xD6, 0xD7, 0x32, 0xD2, 0xBC, 0x8A, 0x2E, 0x37, 0x35, 0x58, 0xB4, 0xC5, 0xE1, 0xC9, 0x12, 0x30, 0xB7, 0x76, 0xCB, 0x1F, 0x02, 0x60, 0x78, 0xBC, 0xA9, 0x10, 0x4C, 0xF2, 0x19, 0xBC, 0x96, 0x06, 0x5E, 0xEF, 0x44, 0xDA, 0x86, 0xA4, 0xA3, 0xAA, 0x99, 0xF2, 0xEC, 0xB9, 0xA6, 0x09, 0xD8, 0x5C, 0x6F, 0x4F, 0x19, 0x07, 0xB7, 0x1D, 0x49, 0xDF, 0x55, 0x2B, 0xD1, 0x43, 0x43, 0xB2, 0xC6, 0x79, 0x75, 0x19, 0x6A, 0x25, 0xD8, 0xA2, 0xAF, 0xDC, 0x96, 0xD3, 0x78, 0x9E, 0xEB, 0x38, 0x3F, 0x4D, 0x5C, 0xCE, 0x42, 0x02, 0x7A, 0xDB, 0xCD, 0xC3, 0x42, 0xA3, 0x41, 0xC0, 0x19, 0x45, 0xC0, 0xB3, 0x89, 0x95}}
Test: Encrypt
#
#
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CBC, 256-bit key
Key: 0x1A, 0x4E, 0xE8, 0x2B, 0x1F, 0x37, 0x84, 0x94, 0x6D, 0xF2, 0xA1, 0x8F, 0xC7, 0x49, 0xB3, 0x4F, 0xE2, 0x26, 0xCF, 0x28, 0x11, 0xA6, 0x6A, 0x47, 0x22, 0x6E, 0x64, 0xA1, 0x82, 0x42, 0x45, 0x29
IV: 0xA8, 0xD4, 0xC6, 0x46, 0xB1, 0xD9, 0x93, 0x84, 0x48, 0x62, 0x4F, 0x8A, 0xC9, 0x6A, 0xD8, 0x4C
Plaintext: 0xA6, 0xAB, 0xCD, 0x81, 0x09, 0xB7, 0x4E, 0x58, 0xBB, 0x43, 0x03, 0x66, 0x44, 0xC6, 0x60, 0xE3
Ciphertext: 0x91, 0xEE, 0x72, 0xE8, 0xE2, 0x6F, 0xA4, 0x23, 0x49, 0x77, 0xE4, 0x64, 0xCA, 0x48, 0x72, 0xCA
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CBC, 256-bit key
Key: 0x54, 0x43, 0x27, 0x17, 0x61, 0x62, 0x2E, 0x0F, 0x92, 0xC6, 0x62, 0x94, 0xDC, 0x9B, 0x0C, 0x5E, 0x6B, 0x6E, 0x53, 0x84, 0x43, 0x42, 0x02, 0x37, 0x27, 0xE0, 0x8C, 0xB0, 0xB9, 0x6E, 0x4E, 0x67
IV: 0xE4, 0x43, 0x13, 0x86, 0x77, 0xFA, 0xDD, 0x9D, 0x12, 0xC5, 0xE3, 0x97, 0x46, 0x04, 0xD6, 0xED
Plaintext: 0xF8, 0x17, 0x68, 0x19, 0x06, 0x70, 0x0F, 0x4E, 0x2E, 0xEC, 0x06, 0x66, 0x2B, 0x63, 0x96, 0x1C, 0x20, 0x7E, 0x93, 0x7B, 0x3A, 0xC8, 0x29, 0x96, 0x91, 0x08, 0xD9, 0x7A, 0x50, 0xCF, 0xBE, 0x61
Ciphertext: 0xE9, 0xD5, 0x2E, 0xE1, 0x8C, 0xFC, 0x74, 0xD8, 0x24, 0xB4, 0x02, 0x57, 0x66, 0x49, 0x92, 0x66, 0xF3, 0x2D, 0x9F, 0xCA, 0xFA, 0x46, 0x98, 0x9F, 0x51, 0x51, 0xC5, 0xE9, 0x70, 0x83, 0x86, 0x90
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CBC, 256-bit key
Key: 0x16, 0x4D, 0x15, 0x28, 0x9C, 0x68, 0xFC, 0x03, 0x97, 0x10, 0x7A, 0x70, 0xE0, 0xCC, 0xC0, 0x69, 0xD2, 0x99, 0xAE, 0xDE, 0xF3, 0xF5, 0x99, 0x62, 0xD7, 0x37, 0x4C, 0x25, 0x42, 0x21, 0x4C, 0x22
IV: 0x8D, 0xB8, 0x61, 0x99, 0x4B, 0x53, 0x51, 0xC0, 0x2C, 0xF3, 0xEF, 0xB6, 0x21, 0xD2, 0x54, 0xB8
Plaintext: 0xC0, 0x3F, 0x6D, 0x97, 0xEB, 0xA8, 0xB6, 0x69, 0xAC, 0xF9, 0x44, 0x7F, 0x64, 0x25, 0x09, 0x98, 0x25, 0x01, 0x54, 0x54, 0x5C, 0x59, 0x97, 0xEC, 0xB3, 0x3E, 0x6D, 0x1F, 0x35, 0x9D, 0xDB, 0x70, 0xB3, 0x16, 0xD6, 0x8E, 0x67, 0x0A, 0x06, 0x14, 0xD8, 0xF6, 0xCA, 0x72, 0xFD, 0x00, 0x7C, 0x2B
Ciphertext: 0xE5, 0xCF, 0xFB, 0x9A, 0xF3, 0x5F, 0x2E, 0xF4, 0x09, 0x9A, 0x05, 0x87, 0xA3, 0x88, 0x51, 0xC3, 0x7E, 0xBE, 0xB3, 0xDD, 0x3F, 0x24, 0xA5, 0x8C, 0xF5, 0x52, 0x24, 0x65, 0xDE, 0x01, 0xC5, 0x98, 0x08, 0xC4, 0xE9, 0xEB, 0x40, 0xC1, 0x32, 0x19, 0xD6, 0x18, 0xC8, 0x4B, 0x33, 0x48, 0xDF, 0xA9
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CBC, 256-bit key
Key: 0xA5, 0xD0, 0xF6, 0x42, 0x17, 0xA1, 0x55, 0xEE, 0xF5, 0x98, 0xFD, 0x95, 0x66, 0x54, 0xDD, 0xF8, 0x73, 0xC6, 0xF4, 0xAC, 0xB2, 0x43, 0x13, 0xC9, 0x22, 0xD7, 0xE5, 0xE6, 0x57, 0xDD, 0x2E, 0x44
IV: 0xD7, 0xCC, 0x50, 0x49, 0xC3, 0x54, 0x13, 0x30, 0xBA, 0xAA, 0xA5, 0x00, 0xFA, 0x20, 0xE0, 0xBA
Plaintext: 0xC8, 0xF8, 0xCC, 0xD7, 0x13, 0x7A, 0x65, 0xF1, 0x54, 0x44, 0x9E, 0xC1, 0xB8, 0xE2, 0xA5, 0x49, 0x81, 0x9E, 0x69, 0x52, 0xA9, 0x99, 0x5A, 0x19, 0xC9, 0x1B, 0x6F, 0x46, 0x3A, 0x28, 0x6E, 0x1D, 0x7A, 0x54, 0x68, 0xF8, 0xD1, 0xD8, 0x82, 0xF5, 0x34, 0xE4, 0xFC, 0xEC, 0x69, 0x37, 0x6B, 0xA4, 0x6C, 0xEE, 0x49, 0x46, 0x12, 0x99, 0xB0, 0x11, 0xEC, 0x94, 0x63, 0x50, 0x6E, 0x95, 0x0E, 0x89
Ciphertext: 0x32, 0xFC, 0x06, 0x46, 0xF1, 0x71, 0x1F, 0xD6, 0x83, 0x59, 0x7D, 0x18, 0xE9, 0xDE, 0x0D, 0x60, 0x9C, 0x42, 0xED, 0x3C, 0x71, 0xA5, 0x35, 0x43, 0x5E, 0x84, 0xE3, 0x43, 0x85, 0x78, 0x72, 0x5A, 0xB5, 0xED, 0x86, 0x5D, 0x4A, 0x87, 0xE1, 0xFC, 0xE8, 0xE1, 0x3B, 0x4C, 0x73, 0xB0, 0xE2, 0xE7, 0x2B, 0x83, 0xC6, 0x08, 0xED, 0xC0, 0x36, 0xB5, 0x64, 0x86, 0x78, 0x82, 0x8A, 0xA4, 0x56, 0x5D
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CBC, 256-bit key
Key: 0x50, 0x81, 0xCF, 0xF8, 0x35, 0x84, 0xF4, 0x3B, 0x8B, 0x60, 0x07, 0x4F, 0xB2, 0x05, 0x08, 0xBB, 0x60, 0x63, 0xF9, 0x0B, 0x44, 0x7C, 0xA0, 0x80, 0xE9, 0xBD, 0x88, 0x06, 0xDE, 0x8E, 0x49, 0x66
IV: 0x14, 0x28, 0x09, 0xBD, 0x87, 0xA6, 0x43, 0x2D, 0x20, 0x5F, 0xC7, 0xD2, 0xDA, 0x74, 0x02, 0xF8
Plaintext: 0x25, 0xA5, 0x80, 0x8B, 0x88, 0x69, 0xAF, 0xCE, 0x89, 0x3D, 0xE6, 0x50, 0xD1, 0x3C, 0xA5, 0x1D, 0x8C, 0xF0, 0x1F, 0x31, 0x0F, 0x68, 0xF5, 0x32, 0xBD, 0x8A, 0x45, 0x5E, 0x2B, 0xAB, 0xE3, 0xC2, 0x82, 0x5D, 0xE6, 0xAC, 0x25, 0x88, 0x67, 0x64, 0x94, 0xBD, 0x85, 0x17, 0x91, 0xC6, 0xAC, 0x14, 0x81, 0x82, 0x18, 0x3B, 0x14, 0xF0, 0x94, 0xB1, 0x28, 0x89, 0x88, 0xD9, 0xEB, 0xD3, 0x32, 0x80, 0x40, 0x33, 0x34, 0x58, 0x65, 0x02, 0x4F, 0xA8, 0xD2, 0xE4, 0x6E, 0x41, 0x64, 0x55, 0xE6, 0xB4
Ciphertext: 0xEE, 0x57, 0xD3, 0x98, 0x7E, 0x62, 0xCF, 0x04, 0xBB, 0x11, 0x21, 0x91, 0x20, 0xB4, 0xA3, 0x92, 0x16, 0x86, 0xAF, 0xA1, 0x86, 0x9B, 0x8A, 0x4C, 0x43, 0x7F, 0xAF, 0xCC, 0x87, 0x99, 0x6A, 0x04, 0xC0, 0x06, 0xB0, 0xC0, 0x4D, 0xE4, 0x98, 0xB2, 0x4B, 0x24, 0x34, 0x87, 0x3D, 0x70, 0xDB, 0x57, 0xE3, 0x71, 0x8C, 0x09, 0x16, 0x9E, 0x56, 0xD0, 0x9A, 0xC4, 0xB7, 0x25, 0x40, 0xCC, 0xC3, 0xED, 0x6D, 0x23, 0x11, 0x29, 0x39, 0x8A, 0x71, 0x75, 0x0C, 0x8F, 0x0C, 0xE4, 0xE4, 0x2B, 0x93, 0x59
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CBC, 256-bit key
Key: 0xBA, 0x85, 0xFC, 0xC2, 0xE0, 0x66, 0xA8, 0x14, 0x2A, 0x03, 0x98, 0x2D, 0x63, 0x13, 0x78, 0x9C, 0x27, 0xCE, 0x71, 0x76, 0x8E, 0xFF, 0xEF, 0x03, 0x0B, 0x5B, 0xA8, 0xB8, 0x93, 0x11, 0xDA, 0x65
IV: 0x01, 0xA2, 0xD3, 0xB0, 0xB9, 0xF3, 0xB7, 0xC2, 0x8B, 0xA1, 0x7E, 0x40, 0xDB, 0x94, 0x3C, 0x7D
Plaintext: 0xFF, 0xD7, 0xA5, 0xEE, 0xE9, 0xA6, 0xD0, 0xDE, 0x06, 0xC9, 0x3B, 0x62, 0x65, 0x21, 0x10, 0x90, 0x1C, 0x81, 0xA6, 0xEC, 0xE8, 0xBF, 0x4B, 0x23, 0x13, 0x0A, 0x41, 0xFC, 0x9B, 0x7D, 0x06, 0x8B, 0x90, 0xF5, 0xD8, 0xA8, 0xBE, 0x20, 0x79, 0x9F, 0x8C, 0xD7, 0x30, 0x29, 0x24, 0xAE, 0x10, 0x9B, 0xD4, 0xC9, 0x7C, 0x5E, 0xB4, 0xF1, 0xEB, 0x9F, 0x8A, 0xE6, 0xE9, 0x47, 0xEA, 0xF7, 0x5F, 0x2E, 0xA2, 0xD1, 0x13, 0x8B, 0x55, 0x95, 0x72, 0xB0, 0x65, 0x2D, 0x8E, 0xF4, 0x16, 0xDF, 0x63, 0xF0, 0xF1, 0x22, 0x5E, 0xEE, 0x67, 0xB1, 0x20, 0x9E, 0xB7, 0xDF, 0x7F, 0x0B, 0x12, 0x2A, 0xCD, 0xCE
Ciphertext: 0xCF, 0x3A, 0x57, 0xE7, 0xC3, 0xFB, 0x96, 0x0D, 0x47, 0x39, 0x0E, 0xDF, 0x47, 0x35, 0xF6, 0x06, 0xCF, 0x21, 0x1A, 0x3A, 0x67, 0x14, 0xE5, 0x0F, 0x2D, 0x5E, 0xA8, 0xFC, 0xC8, 0x7F, 0x89, 0x04, 0x3E, 0x93, 0x51, 0x14, 0xFF, 0x93, 0xAC, 0xD1, 0x97, 0x80, 0x03, 0x13, 0xA9, 0x1F, 0x3E, 0xDF, 0x28, 0x92, 0x43, 0x94, 0xDC, 0x59, 0x6D, 0x0D, 0x64, 0xA8, 0x63, 0x32, 0x38, 0xB6, 0xB3, 0x07, 0x7E, 0x36, 0x73, 0x50, 0xD8, 0xAB, 0x65, 0x79, 0x09, 0xEA, 0x6A, 0x90, 0x6F, 0x57, 0x55, 0x6B, 0x3C, 0x99, 0xC1, 0xF7, 0x96, 0x48, 0x85, 0x60, 0x1C, 0xF4, 0xAF, 0x4F, 0x5F, 0xEB, 0x64, 0x79
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CBC, 256-bit key
Key: 0xFC, 0x12, 0x5D, 0x81, 0xF5, 0x2C, 0x44, 0x77, 0x59, 0x72, 0x5D, 0xAA, 0x85, 0xDD, 0x90, 0xF5, 0x3B, 0x36, 0x53, 0x84, 0x48, 0x29, 0x70, 0x88, 0x63, 0x9B, 0x09, 0x2F, 0x59, 0x3D, 0xDA, 0xD3
IV: 0x67, 0x61, 0xBF, 0x72, 0xE7, 0x0D, 0x76, 0x5E, 0x30, 0x4E, 0xA5, 0x35, 0xB7, 0xCF, 0x1F, 0x14
Plaintext: 0x7A, 0xAA, 0x63, 0x08, 0x9E, 0x7E, 0x66, 0xC5, 0x56, 0xC2, 0x92, 0x9B, 0x08, 0x59, 0x0E, 0xA5, 0xAB, 0x66, 0x40, 0x44, 0x74, 0x61, 0x90, 0xCB, 0xB1, 0x6B, 0x6F, 0x7C, 0xF5, 0xDE, 0x98, 0xB4, 0x75, 0x29, 0x96, 0x62, 0xB2, 0xDB, 0x87, 0xBD, 0x58, 0xFD, 0x1F, 0x37, 0x66, 0xA5, 0xF0, 0xAC, 0x90, 0xC8, 0xE8, 0xE0, 0xE2, 0x50, 0x1B, 0x28, 0xA5, 0x6E, 0xC2, 0x67, 0x86, 0x32, 0x84, 0x3C, 0xF5, 0x59, 0xF5, 0x7A, 0xCC, 0x66, 0x5D, 0xD9, 0x31, 0xF4, 0xBA, 0xEB, 0xBD, 0x4A, 0x08, 0x51, 0xDE, 0x30, 0xBF, 0x2E, 0x79, 0x01, 0x9E, 0xDC, 0xD4, 0x02, 0xA7, 0xDE, 0xB4, 0xF2, 0x6B, 0x16, 0xC2, 0xE2, 0x87, 0x38, 0x33, 0x47, 0x6F, 0x7F, 0xA8, 0x4E, 0x6A, 0x9F, 0x53, 0x6F, 0xDE, 0xFA
Ciphertext: 0xFA, 0x65, 0xC8, 0x62, 0x66, 0xA2, 0xAC, 0x16, 0x99, 0x95, 0x43, 0x3D, 0x7E, 0xA3, 0xAF, 0x9A, 0x9D, 0x24, 0x7E, 0x5E, 0x0D, 0x3B, 0xB9, 0x81, 0x64, 0x9E, 0x15, 0x3C, 0xBE, 0xB8, 0x04, 0x4F, 0xE6, 0x51, 0xD5, 0xE2, 0x48, 0x7F, 0x01, 0x7E, 0x52, 0x32, 0xB7, 0x1B, 0xD1, 0x45, 0x70, 0x12, 0xEE, 0xA1, 0x40, 0x87, 0x8C, 0x0A, 0x0C, 0xEE, 0x68, 0xF6, 0xD0, 0x2A, 0x87, 0x00, 0xDC, 0x61, 0x3E, 0x2F, 0x1C, 0x04, 0x97, 0x94, 0x9A, 0xBF, 0xE7, 0x8B, 0x30, 0xB4, 0x48, 0x55, 0x52, 0xE2, 0x89, 0xBA, 0x21, 0x67, 0x3F, 0x5A, 0xCB, 0x87, 0x93, 0xCC, 0xE6, 0x5A, 0xE3, 0xC6, 0xCC, 0x46, 0x8D, 0xDE, 0x4E, 0xA5, 0x2E, 0x00, 0xE6, 0x0A, 0x06, 0xCF, 0x95, 0xE5, 0x4D, 0xD1, 0x09, 0x66
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CBC, 256-bit key
Key: 0x5C, 0x45, 0xCE, 0x16, 0x83, 0x9D, 0xA1, 0x4F, 0x06, 0xCD, 0x25, 0xC9, 0xC5, 0x47, 0xD3, 0xA9, 0xA4, 0x6D, 0x55, 0x85, 0x31, 0xA7, 0x45, 0x18, 0x87, 0xB3, 0x38, 0x3B, 0x72, 0x3D, 0xFB, 0x11
IV: 0xD3, 0xB0, 0x1C, 0x81, 0x46, 0x4B, 0xAC, 0xE9, 0x03, 0x77, 0x44, 0x10, 0x02, 0x58, 0x46, 0x5D
Plaintext: 0x63, 0xA2, 0x65, 0x47, 0x0C, 0xAE, 0x68, 0x0D, 0x94, 0xCD, 0x2A, 0xA7, 0x60, 0xDC, 0xE6, 0xFC, 0x0B, 0x18, 0xB1, 0x55, 0x0B, 0x34, 0x48, 0x12, 0x92, 0xA9, 0x0C, 0x9C, 0xB3, 0x4E, 0x4B, 0x9A, 0xC6, 0x28, 0xC1, 0x68, 0x0D, 0x83, 0x5F, 0xC4, 0x98, 0x41, 0x4B, 0xCB, 0x65, 0x73, 0x27, 0x25, 0xCC, 0x26, 0x96, 0x7C, 0x1A, 0x7F, 0xFC, 0x32, 0x7D, 0x0B, 0x86, 0x53, 0x20, 0x50, 0x6B, 0xC8, 0x96, 0xA8, 0x71, 0xCE, 0x7C, 0x4F, 0xB2, 0xA7, 0x5A, 0xBA, 0xA0, 0x8F, 0xCB, 0x2A, 0x47, 0xF2, 0xDE, 0x82, 0xD2, 0xDC, 0xBB, 0x55, 0x51, 0xB1, 0x8A, 0x44, 0xB9, 0x1E, 0x90, 0x87, 0x2C, 0x4F, 0x9B, 0xC9, 0x7B, 0x63, 0xA1, 0x39, 0xEA, 0x1D, 0xA4, 0xDE, 0x33, 0xDC, 0xD8, 0x2A, 0xCD, 0xCD, 0x08, 0xD3, 0x6D, 0x5F, 0x36, 0xDE, 0xCE, 0xF7, 0x82, 0xFD, 0xAE, 0xE6, 0x4D, 0x1A, 0x19, 0x98
Ciphertext: 0x33, 0xAA, 0x7E, 0x19, 0xFE, 0x25, 0xAD, 0xA5, 0x67, 0xB5, 0xC9, 0xE2, 0x9E, 0x81, 0x5E, 0xC9, 0x80, 0xF0, 0xFF, 0x9A, 0x7D, 0xE2, 0x97, 0xDF, 0x6E, 0x93, 0x84, 0x36, 0x72, 0x54, 0x64, 0x20, 0x5C, 0x4F, 0x62, 0x60, 0x13, 0xF0, 0x9E, 0x14, 0xAC, 0x3A, 0x6E, 0x08, 0x20, 0x27, 0x71, 0xFF, 0xAB, 0x05, 0x15, 0x74, 0xF6, 0x2E, 0x9B, 0x4C, 0xAF, 0x10, 0x8C, 0xC6, 0x18, 0x88, 0x82, 0x08, 0x60, 0xC6, 0x34, 0x33, 0xA2, 0xD8, 0xB4, 0xEF, 0x0E, 0xD7, 0xA4, 0xFF, 0x5E, 0x81, 0x09, 0x82, 0x02, 0x87, 0x67, 0x3A, 0x3F, 0x43, 0x37, 0x1D, 0x4C, 0x3A, 0xD7, 0x4C, 0x98, 0xD4, 0x94, 0xDE, 0xEC, 0xBB, 0x9F, 0xBB, 0x99, 0x5A, 0x41, 0x14, 0x1E, 0x3A, 0x96, 0xD6, 0x12, 0x9E, 0x0E, 0x04, 0xDC, 0xB9, 0x0C, 0x4F, 0x63, 0xEA, 0x0F, 0xFF, 0xE3, 0xD8, 0xE3, 0x77, 0xD9, 0xF3, 0xC7, 0x63
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CBC, 256-bit key
Key: 0x9D, 0x34, 0xE9, 0x0D, 0xC3, 0x6A, 0x8E, 0x8D, 0x3C, 0x55, 0x0B, 0x98, 0xD6, 0x9B, 0x41, 0x1D, 0x13, 0xC1, 0x70, 0xEC, 0xD2, 0x41, 0xFB, 0x6C, 0x2C, 0xDD, 0x6B, 0x91, 0x9D, 0x32, 0xB7, 0x09
IV: 0x64, 0x90, 0xC3, 0xB6, 0x2C, 0x09, 0x26, 0x61, 0xEB, 0xC8, 0x30, 0xAD, 0x0B, 0xA5, 0x2C, 0x49
Plaintext: 0xC8, 0xF6, 0xE2, 0x6A, 0xD9, 0xA7, 0x60, 0x79, 0x52, 0x8D, 0xFA, 0x08, 0xC9, 0xF7, 0x90, 0x0B, 0xB7, 0x86, 0x0F, 0x45, 0x22, 0x3F, 0x3A, 0x00, 0x79, 0xDF, 0xAB, 0x01, 0xC0, 0x6E, 0x14, 0xBB, 0xEC, 0x17, 0xCB, 0xC3, 0x91, 0x37, 0x86, 0x84, 0xBA, 0xB4, 0x63, 0x34, 0x18, 0x90, 0x2B, 0x07, 0x60, 0xBE, 0xD7, 0xA2, 0xEE, 0x34, 0x53, 0xD2, 0xAE, 0x41, 0x83, 0x7E, 0x3C, 0x21, 0x84, 0xDA, 0x4A, 0xCF, 0x34, 0xDE, 0x43, 0x1A, 0xF4, 0xF7, 0x2D, 0xFB, 0xAC, 0xFC, 0xD4, 0x26, 0x10, 0x63, 0x25, 0xDF, 0x22, 0xB5, 0xD8, 0x0F, 0xF8, 0x3F, 0x52, 0x97, 0xC0, 0x0B, 0xC9, 0xE4, 0x01, 0x0E, 0xA9, 0xC3, 0x24, 0xA3, 0x36, 0x77, 0x32, 0x38, 0x73, 0x0A, 0xDF, 0x47, 0x43, 0xE0, 0xC8, 0x89, 0xCF, 0x92, 0xF9, 0x66, 0x27, 0xF9, 0xB2, 0xAF, 0x2C, 0x88, 0x6B, 0x8F, 0xAD, 0xDF, 0x15, 0xBF, 0xD0, 0x9E, 0xA3, 0xFA, 0xB4, 0x77, 0xC9, 0xB1, 0x54, 0x88, 0x03, 0xFF, 0xAF, 0xE7, 0xDA, 0xDF
Ciphertext: 0x2F, 0xD9, 0xBE, 0x44, 0xEB, 0x6D, 0x21, 0xEA, 0x50, 0xB9, 0x15, 0x33, 0xF4, 0xFD, 0xD3, 0x40, 0x43, 0xB2, 0xA7, 0x55, 0xD8, 0x82, 0x4F, 0x3E, 0xC4, 0xB0, 0x88, 0x23, 0xBC, 0xBD, 0x20, 0xE3, 0x22, 0x4F, 0xC0, 0xD9, 0x90, 0xBA, 0xE3, 0x09, 0xF7, 0xB8, 0x87, 0xF5, 0xAE, 0x60, 0x6A, 0xF5, 0x97, 0x54, 0x79, 0x39, 0x0D, 0xFE, 0xAD, 0x5F, 0xA8, 0x64, 0xE8, 0xC8, 0x5C, 0x41, 0x2F, 0x85, 0x41, 0x2D, 0xFB, 0xEC, 0xA2, 0x9E, 0x4D, 0x3F, 0xD9, 0x1D, 0xF2, 0x69, 0x33, 0x48, 0xCB, 0x0F, 0xD2, 0x81, 0x19, 0x4D, 0x3A, 0xF5, 0x1F, 0x07, 0xD5, 0xB1, 0x58, 0x34, 0x91, 0x1D, 0x5B, 0xCA, 0x01, 0x1C, 0x0B, 0xE1, 0x77, 0x5F, 0xD7, 0xD1, 0xF7, 0x84, 0xF6, 0xF7, 0xE7, 0xE4, 0xEF, 0x3C, 0x55, 0x68, 0xF0, 0x9F, 0xB2, 0x94, 0x2B, 0x8E, 0xB9, 0x73, 0x80, 0xA2, 0x50, 0xA4, 0x5A, 0xF7, 0x68, 0x22, 0x4F, 0xF5, 0x0D, 0x80, 0x05, 0xFB, 0x92, 0xAC, 0xC7, 0x25, 0x62, 0xB9, 0x3C, 0x10
Test: Encrypt
#
Source: LEA reference test vectors, file lea_vs.c
Comment: LEA-128/CBC, 256-bit key
Key: 0x26, 0x7E, 0x63, 0x9D, 0x25, 0x19, 0x08, 0x8A, 0x05, 0xBD, 0x8A, 0xF4, 0x31, 0x3C, 0x47, 0x55, 0x88, 0x06, 0xB9, 0xCB, 0x03, 0x42, 0x40, 0xC8, 0x98, 0x1D, 0x21, 0x0B, 0x5E, 0x62, 0xCE, 0xCF
IV: 0xF1, 0x4C, 0x68, 0x42, 0x18, 0x98, 0x82, 0x38, 0xA5, 0xDD, 0x28, 0x21, 0x9D, 0x20, 0x1F, 0x38
Plaintext: 0x99, 0xA3, 0x6F, 0xFE, 0x6C, 0xFF, 0x1F, 0xE7, 0x06, 0x72, 0x40, 0x53, 0x99, 0x7A, 0x2D, 0xBF, 0xFA, 0xA3, 0x10, 0x3D, 0x49, 0x9D, 0xA8, 0x21, 0xD4, 0x91, 0x4A, 0xFE, 0x39, 0xB5, 0x26, 0xD1, 0xCB, 0x1F, 0xCC, 0x7B, 0x37, 0xD7, 0xEF, 0x75, 0x68, 0x2F, 0x68, 0xBF, 0xA7, 0x57, 0x7D, 0x19, 0x07, 0x2C, 0x64, 0x76, 0x00, 0x51, 0x03, 0xAE, 0x5A, 0x81, 0xFA, 0x73, 0x4C, 0x23, 0xE3, 0x86, 0xE6, 0x1F, 0xD8, 0x2A, 0xAC, 0xF1, 0x36, 0xDA, 0x84, 0xFC, 0xA1, 0x37, 0xD2, 0x20, 0x49, 0x44, 0xE1, 0x8E, 0x6B, 0xD5, 0x85, 0xDB, 0x1A, 0x45, 0xFE, 0x54, 0x3F, 0x68, 0x20, 0x92, 0xDF, 0xC0, 0xB1, 0x4E, 0x9C, 0xF4, 0x13, 0x76, 0x7F, 0x7D, 0x22, 0x7F, 0xF4, 0xA3, 0x60, 0xFE, 0x16, 0xA8, 0x50, 0x72, 0x2D, 0x43, 0x1F, 0x64, 0x75, 0x50, 0x89, 0xB3, 0x22, 0xC5, 0xFB, 0x29, 0xA0, 0xE8, 0xF5, 0x51, 0x1F, 0xBF, 0xB3, 0x8D, 0x4F, 0xC8, 0x0C, 0x63, 0x68, 0xEB, 0x9A, 0x18, 0x6E, 0xAD, 0x1B, 0x80, 0xB3, 0xA6, 0x17, 0x14, 0x9D, 0x35, 0xC4, 0x45, 0xA9, 0x72, 0x26, 0x10, 0xB0, 0x64
Ciphertext: 0xB5, 0x35, 0x2D, 0x1B, 0x32, 0x1D, 0x11, 0x00, 0x7A, 0x50, 0xAA, 0x50, 0x0B, 0x7D, 0x7D, 0xD4, 0x3C, 0x59, 0x89, 0xBF, 0x12, 0xE7, 0x20, 0x9D, 0x96, 0xE4, 0xE3, 0x04, 0xC7, 0x2A, 0x53, 0x44, 0xE4, 0x39, 0x1E, 0xD4, 0x25, 0x89, 0x2C, 0x6A, 0xD4, 0x05, 0xDA, 0x1D, 0x0A, 0xCE, 0xCC, 0x67, 0x7B, 0x80, 0x76, 0xF3, 0x28, 0x0C, 0xB7, 0x85, 0xB1, 0x18, 0x07, 0x7B, 0x78, 0xBE, 0x2D, 0xEC, 0xBE, 0xF6, 0x77, 0x22, 0x74, 0x22, 0xC1, 0x88, 0x00, 0xEF, 0x25, 0xAF, 0x03, 0xCD, 0x69, 0x3C, 0xC1, 0x31, 0x17, 0xAB, 0x92, 0x5C, 0xF7, 0xC3, 0x90, 0x0B, 0xFA, 0xDF, 0xF7, 0xDF, 0x0A, 0x6E, 0x1E, 0x82, 0x39, 0x16, 0x35, 0x3B, 0xA6, 0x2B, 0x96, 0x8D, 0x9D, 0xD3, 0xAA, 0x56, 0xAE, 0x7A, 0xBA, 0x4B, 0xCB, 0x46, 0x8E, 0xAF, 0x37, 0x04, 0xCC, 0x06, 0x21, 0x72, 0x52, 0x0E, 0x94, 0x6F, 0x9B, 0x6C, 0x0C, 0x18, 0x01, 0x97, 0x6D, 0x31, 0x85, 0xB6, 0xBD, 0xFD, 0x50, 0x4D, 0x99, 0x2B, 0x74, 0x23, 0x57, 0x80, 0x15, 0x3F, 0x69, 0xA5, 0xF3, 0x2C, 0xCF, 0xF1, 0x1E, 0xC7, 0xE0, 0x04
Test: Encrypt

1687
TestVectors/poly1305_tls.txt Normal file

File diff suppressed because it is too large Load Diff

2229
TestVectors/poly1305aes.txt Normal file

File diff suppressed because it is too large Load Diff

1980
TestVectors/rabbit.txt Normal file

File diff suppressed because it is too large Load Diff

View File

@ -65,6 +65,139 @@ Seek: 192
Ciphertext: BB5B6BB2CC8B8A0222DCCC1753ED4AEB23377ACCBD5D4C0B69A8A03BB115EF71871BC10559080ACA7C68F0DEF32A80DDBAF497259BB76A3853A7183B51CC4B9F
Test: Encrypt
#############################################################################
# These test vectors were created using ECRYPT Salsa20.c
# We modified the ref impl to seek to just before crossing the 32-bit block
# counter boundary, and then we generated 16 blocks (1024 bytes). The large
# number of blocks is due to parallel processing of data in SIMD units.
AlgorithmType: SymmetricCipher
Name: Salsa20
Source: http://www.ecrypt.eu.org/stream/svn/viewcvs.cgi/ecrypt/trunk/submissions/salsa20/full/ref/
#
Comment: Counter crosses 32-bit boundary (0xffffffff*64)
Key: r32 00
IV: r8 00
Rounds: 20
Seek64: 0x3fffffffc0
Plaintext: r1024 00
Ciphertext: \
59FC4DD73F4B7B28CE1B0EF562BAB604824076898A800797B59902A99F312254 \
5231E85B887FFA19F71F24AAF352DC6AFE47281D8F546C9D419194479A369392 \
B65FC777C4F950EC0274FF0FFBB0A6E3EDEDF78477E94945E87F26E3162BF6A1 \
050933421833F249DA1162DB6E92A7678505190C80DC46350B81E831F974B28C \
13A4A90B48300DEB77CDFC5378E32B30E9DD3DDA3B8B090AB4D87EF9C7C2D197 \
6B21DB54289C482083B82083E45E874A54308CE43EC450FAD96A5AEE5D383736 \
542EF270B565257B286F3206D1B52A9A869D0F468DB5527630F2A6CE97625A2C \
A2981C12026168A88B88A7D6461F1896E459A9BA831CECE0B0DCE57BE99E9C84 \
DB5ABE2B64A1581BC10F769E329179DA30F4B4FC919E0766D089D04785EF0435 \
B408E1226F6CFED789CA5C3B9C74E930E07D1153163F4C62062D446602BD3FE7 \
208E7EBB8EF4D00139FF2D12F683B6857D59ECD88511A53A85742D4775C17606 \
D762B03B75BC6C7E479E47851AF596BC2E245B8B5627318F8BAF8C3BD6BDD1D4 \
03AA566FFBF79A28B28620D5A4BB4119D2AD0348098246099BD3301891770B56 \
4F284CF7A7D845BC3339002F02DCFE5C8FA625C28EFA509DA1421E4A35D784E4 \
59BA140F78E5A775B4EE23DF036CF10EB4672081E11EC5ACAC57338A38F5F5D6 \
1858736BC11898E0AE6CB1F6240FE6C2D9695F99A66EFC08BAB06F1BEE38C218 \
62DDE7156E9D384F3C4A2E095BF41D22B189EDF545482A9810069D647217B5CF \
E7743ABCAD72B8CF93B28164D01CAB144C40E79723D942F692392FDDAA367AFF \
B75A171AD4E81DD0320434B93B3AD34333B7670146B60E73C5012CF7DE82F2B6 \
5684D7BCE0C0DE9349AF87864B2328B1ACC053D8BC2E3476B052B14126C5ED4C \
ABFF00F449DCFCD5659ACD10B74C15A7C85B1445D0965CBD1A383FD0C5B44289 \
3E8B30D1B450B12C3FE05132E906BDFBB2A096313949B6A0B944E909FBB17D3F \
45F072F1D1E361F5AC8A785335DBC8E322595F2E0B5457E4BC780780BD18560F \
2C6C60802D2C1D3625508461FB67143C38C981A27F91F73999091F27E24A0371 \
06872E84B33605572552F46B381D56E07AB785F689905AF33DD3BCC6CEB0FD41 \
754552FA59C555B16500DB4D9C81DD933201A2B0E60F3E477D08ECBAD7DBD44D \
BA7F2A3299D6DF3AE4AE198E5F2AFC78DDDF3E87180ED1CE031D91595DDCF411 \
36FA9031ACDDDB3E219C500770E6D98E6B2FC5FFDF85B798368A9211FCEC807D \
9CECD894A4A47D55E5ECBE994809DBB6C8F8A3B797F811B32AFB611EAFFCD153 \
AD240BCE0FA95B2756CC14056870AAD283F6D15408DB26F1FC9A961356D38335 \
DDCEE60FEE213A6872BE4C897F5F276B0C13410CD3FEAA72CD32DD55BED76D7B \
26E821965EBC3A93AF8984490721B08EA797F0FCCCBA9144BB77A6910CAD0450
Test: Encrypt
#
Comment: Counter crosses 32-bit boundary (0xfffffffe*64)
Key: r32 00
IV: r8 00
Rounds: 20
Seek64: 0x3fffffff80
Plaintext: r1024 00
Ciphertext: \
4EA79D03BB6DAB09FB849BDDF6534E8465015F966CB46DD891ECA04B997570E4 \
4E2A9A72DC128CB98865CA9C64319484070D4F85E5B13524B5480B453877869B \
59FC4DD73F4B7B28CE1B0EF562BAB604824076898A800797B59902A99F312254 \
5231E85B887FFA19F71F24AAF352DC6AFE47281D8F546C9D419194479A369392 \
B65FC777C4F950EC0274FF0FFBB0A6E3EDEDF78477E94945E87F26E3162BF6A1 \
050933421833F249DA1162DB6E92A7678505190C80DC46350B81E831F974B28C \
13A4A90B48300DEB77CDFC5378E32B30E9DD3DDA3B8B090AB4D87EF9C7C2D197 \
6B21DB54289C482083B82083E45E874A54308CE43EC450FAD96A5AEE5D383736 \
542EF270B565257B286F3206D1B52A9A869D0F468DB5527630F2A6CE97625A2C \
A2981C12026168A88B88A7D6461F1896E459A9BA831CECE0B0DCE57BE99E9C84 \
DB5ABE2B64A1581BC10F769E329179DA30F4B4FC919E0766D089D04785EF0435 \
B408E1226F6CFED789CA5C3B9C74E930E07D1153163F4C62062D446602BD3FE7 \
208E7EBB8EF4D00139FF2D12F683B6857D59ECD88511A53A85742D4775C17606 \
D762B03B75BC6C7E479E47851AF596BC2E245B8B5627318F8BAF8C3BD6BDD1D4 \
03AA566FFBF79A28B28620D5A4BB4119D2AD0348098246099BD3301891770B56 \
4F284CF7A7D845BC3339002F02DCFE5C8FA625C28EFA509DA1421E4A35D784E4 \
59BA140F78E5A775B4EE23DF036CF10EB4672081E11EC5ACAC57338A38F5F5D6 \
1858736BC11898E0AE6CB1F6240FE6C2D9695F99A66EFC08BAB06F1BEE38C218 \
62DDE7156E9D384F3C4A2E095BF41D22B189EDF545482A9810069D647217B5CF \
E7743ABCAD72B8CF93B28164D01CAB144C40E79723D942F692392FDDAA367AFF \
B75A171AD4E81DD0320434B93B3AD34333B7670146B60E73C5012CF7DE82F2B6 \
5684D7BCE0C0DE9349AF87864B2328B1ACC053D8BC2E3476B052B14126C5ED4C \
ABFF00F449DCFCD5659ACD10B74C15A7C85B1445D0965CBD1A383FD0C5B44289 \
3E8B30D1B450B12C3FE05132E906BDFBB2A096313949B6A0B944E909FBB17D3F \
45F072F1D1E361F5AC8A785335DBC8E322595F2E0B5457E4BC780780BD18560F \
2C6C60802D2C1D3625508461FB67143C38C981A27F91F73999091F27E24A0371 \
06872E84B33605572552F46B381D56E07AB785F689905AF33DD3BCC6CEB0FD41 \
754552FA59C555B16500DB4D9C81DD933201A2B0E60F3E477D08ECBAD7DBD44D \
BA7F2A3299D6DF3AE4AE198E5F2AFC78DDDF3E87180ED1CE031D91595DDCF411 \
36FA9031ACDDDB3E219C500770E6D98E6B2FC5FFDF85B798368A9211FCEC807D \
9CECD894A4A47D55E5ECBE994809DBB6C8F8A3B797F811B32AFB611EAFFCD153 \
AD240BCE0FA95B2756CC14056870AAD283F6D15408DB26F1FC9A961356D38335
Test: Encrypt
#
Comment: Counter crosses 32-bit boundary (0xfffffff2*64)
Key: r32 00
IV: r8 00
Rounds: 20
Seek64: 0x3ffffffc80
Plaintext: r1024 00
Ciphertext: \
DA196754A8E7E3816F1125E5869FB10D138C07A07B9C0C10B1EF6D8408B59DB1 \
8D25812F19AF0E1C1BA020AE4B1C19022776CE998E6B9ECDA6E2D8B946ECF987 \
A448A793D6AF0FA41ED1B31F574A0CD55FC2352D53F6CC5F04C2765DD94A858F \
49E649770E5BDF470CFC879C05B0C2BA3BDFE040EA258DEDF8C047A6564723ED \
60245A40CD404492B2F23717852DB15CCCCC4DFA01E20F6C2D22A4A0BCAD6429 \
4ABBD2F829F023EC8A9110DEFCBD6252B3D81D2BFAA18D222DBDCE519CC6ED49 \
9DF23E480EA415B5B1DF880697B7A7BB76E95BA1C71F36C8489B89D791EF9DC7 \
AF25F0DD23179CC473462FF4B7166A3267F7E538FDA9BEC0E894EF420ACEB25C \
2BCCB1BB4E3E72FF7575EC76D2F9EEFE2B4A22ABFEA5E27F9BC958467D151544 \
C485888676ED238BCD536F579F5451BECE583181DB529488A8F44916842178B6 \
E8D83460F152D9F6D995B4DC5D8FF48DBD66DD46863D1C9EE068E6903C737AAA \
D33A82F3B349897AC9B97F705F7B431A6438B0D2336CCBAE9A00C03A9086A5E8 \
F559134C4337D27A600445FBA2FEAB937483680E0327FAFEFF8F1CD02EF7A7AC \
2E76748F04203A7AD1F3263CA1B17E244CF0BBDAC799BC4E822658427150242A \
FFC1F8BE91475CC5F02CA6E2488CE0913FC191A8F1E49403C783CA06B1DE7DBF \
B25C4E6CB6932DD0CC6F9BC748BDD85EC80EFF37B50432EFFDEDCF7ED4D43673 \
0BCB581D4C0A9CD46F10D05C254902CC1896006FC3B65D1EEB2E333CB808B45F \
F0F51FD264937F74FBA7EC21C1FD347F78220CFC50AA03BEA9A0EEC62D3D833D \
3048618A5983B6191948921EEC72F0C52DC1621F2B7E82AB9940948374014B33 \
8EF906C38A13A5ED3B392777EA1CBDFE50605F995CABE83C2157B48AA273710C \
908F37E7C4A76DDF87DE31A0209323487A1A122582C24CC2D283B32AE96AD0DB \
0C12D2332B36FB54DDB6A9FA776F6A2F38BB0456CD29D208EE19BFD1D0F787B5 \
FBFC3CD1EC25BBE32258C0373E3738F613B4867AB4CE042BFF8D0FC44857E664 \
54E29790B9D72780D0089C06B5C0F12868797F9918F7C0C347AFFED02DAD9AA5 \
4EA79D03BB6DAB09FB849BDDF6534E8465015F966CB46DD891ECA04B997570E4 \
4E2A9A72DC128CB98865CA9C64319484070D4F85E5B13524B5480B453877869B \
59FC4DD73F4B7B28CE1B0EF562BAB604824076898A800797B59902A99F312254 \
5231E85B887FFA19F71F24AAF352DC6AFE47281D8F546C9D419194479A369392 \
B65FC777C4F950EC0274FF0FFBB0A6E3EDEDF78477E94945E87F26E3162BF6A1 \
050933421833F249DA1162DB6E92A7678505190C80DC46350B81E831F974B28C \
13A4A90B48300DEB77CDFC5378E32B30E9DD3DDA3B8B090AB4D87EF9C7C2D197 \
6B21DB54289C482083B82083E45E874A54308CE43EC450FAD96A5AEE5D383736
Test: Encrypt
AlgorithmType: SymmetricCipher
Name: XSalsa20
Source: created by Wei Dai using naclcrypto-20090308

1206
TestVectors/shake.txt Normal file

File diff suppressed because one or more lines are too long

317
TestVectors/simeck.txt Normal file
View File

@ -0,0 +1,317 @@
AlgorithmType: SymmetricCipher
Name: SIMECK-32/ECB
#
Source: SIMECK test vector
Comment: SIMECK-32/ECB, 64-bit key
Key: 1918 1110 0908 0100
Plaintext: 6565 6877
Ciphertext: 770d 2c76
Test: Encrypt
#
Source: SIMECK reference implementation
Comment: SIMECK-32/ECB, 64-bit key
Key: 3d6c 4ae1 6784 18be
Plaintext: 4823 0029
Ciphertext: 6535 9de9
Test: Encrypt
#
Source: SIMECK reference implementation
Comment: SIMECK-32/ECB, 64-bit key
Key: 6df1 1649 5f90 6952
Plaintext: 72ae 2cd6
Ciphertext: 0ab0 73ca
Test: Encrypt
#
Source: SIMECK reference implementation
Comment: SIMECK-32/ECB, 64-bit key
Key: 2ea6 0bb3 01eb 26e9
Plaintext: 41bb 5af1
Ciphertext: 6ed0 bc2e
Test: Encrypt
#
Source: SIMECK reference implementation
Comment: SIMECK-32/ECB, 64-bit key
Key: 0099 0f3e 390c 7e87
Plaintext: 153c 12db
Ciphertext: 7637 4119
Test: Encrypt
#
Source: SIMECK reference implementation
Comment: SIMECK-32/ECB, 64-bit key
Key: 4db7 4d06 491c 440d
Plaintext: 305e 0124
Ciphertext: 8252 aa91
Test: Encrypt
#
Source: SIMECK reference implementation
Comment: SIMECK-32/ECB, 64-bit key
Key: 4dc8 074d 2d12 39b3
Plaintext: 54de 1547
Ciphertext: e288 e7ea
Test: Encrypt
#
Source: SIMECK reference implementation
Comment: SIMECK-32/ECB, 64-bit key
Key: 5d03 701f 26a6 428b
Plaintext: 66bb 6443
Ciphertext: b730 99ae
Test: Encrypt
#
Source: SIMECK reference implementation
Comment: SIMECK-32/ECB, 64-bit key
Key: 1e1f 3b25 1238 4509
Plaintext: 767d 7a5a
Ciphertext: 058a 62df
Test: Encrypt
#
Source: SIMECK reference implementation
Comment: SIMECK-32/ECB, 64-bit key
Key: 7ff5 7f96 6bfc 63cb
Plaintext: 1ad4 6e5d
Ciphertext: 60c4 43f2
Test: Encrypt
AlgorithmType: SymmetricCipher
Name: SIMECK-32/CTR
#
Source: Crypto++ 7.0 generated
Comment: SIMECK-32/CTR, 64-bit key, 12x blocks
Key: 454D6DFB E3006317
IV: 94B0A755
Plaintext: 3D249C64 7F8BBFFC 875E70E0 A9859626 6E3B7C01 0BE82C43 6A7A3624 55487CD9 66858665 EFA6C05C 96CFACBD B0D37578
Ciphertext: F4533FF5 74659BB0 2ECADB3F 8FF6BB87 3C193D5F 63AC840C 3A844701 7D50D51B 6818F59D 3D87CAE4 A63B8CE2 DAE80C56
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: SIMECK-32/CTR, 64-bit key, 12x blocks
Key: ACC7C073 CD410D18
IV: B66742BE
Plaintext: 7B5BAAF2 D13A41AE E146BFEA A00F3032 086F56FB F85C3917 571B41D9 1F2C3B9E 0E9BEB3F 631DCBAB A0ECE6B7 751C2884
Ciphertext: BA3429C8 BA44FDC5 123A1191 4EE3E44A A644DB17 4390B079 97342989 CEDE461F DC5E2885 00A55A45 DB875F37 537DF372
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: SIMECK-32/CTR, 64-bit key, 12x blocks
Key: 25AD7CCF D13FC20B
IV: 7BFCFF1D
Plaintext: B14E2879 95CFC795 50230736 956FBD15 A5AF5134 3496E3B7 ED82F016 158FD754 679B7BF9 D43379BF 9613783B 695341DA
Ciphertext: 2D63B5A2 8A371B1E 8A10D1DC A1C0B15B 16401077 1871358A A97624A9 3C6121EE 13AF4F0C 8B09E6B4 B2CB0B09 B84BD827
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: SIMECK-32/CTR, 64-bit key, 12x blocks
Key: 176F8071 C245E3A5
IV: 3201EDC5
Plaintext: 9CA6EE4C 23732374 4BE61C83 10804C20 8DCDED53 85B7AA86 B5881F73 D80A8FCE 77E02A3C 028711F8 F4C902A8 B7CC3804
Ciphertext: 5A98E287 3479F1EC 96F68777 25FC0804 D8FB53BE 4BCDE9C7 AE17DE00 31106C20 18C75DB3 CEBF10A5 FCB5C50A C911B844
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: SIMECK-32/CTR, 64-bit key, 12x blocks
Key: A3DC9A6E B905B998
IV: DC8785AA
Plaintext: D5E32BAE 12E97583 BFCB8813 B780AC4D E82E1823 0EBB7391 EE78D254 4EDFAE3B A46B2666 57BA4A0A 7CE1BF19 03AD2420
Ciphertext: 8F2F68DE 17F43639 22A49A09 6DF3EAFF 6D536F06 B5C5FC45 F3605347 B5E62E03 8BEBCF43 507EF8D0 8A0CCF11 7E97A2EB
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: SIMECK-32/CTR, 64-bit key, 12x blocks
Key: 9F6CD0D0 394CA176
IV: C2D22BC1
Plaintext: CAC79890 B6A7C6C1 A5CF6ED6 A04205FC CE2B9AB9 55F2ADC5 D3212FFE 80D57778 74F934E2 6BD2BD15 053BC32D E56B297D
Ciphertext: D34796DD 4F21DA51 0EC90D0E AB3D7166 AD6CC217 FF7E1D52 3D165331 B742C3C2 6303E6B7 D5335015 F2A65CD1 A2069533
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: SIMECK-32/CTR, 64-bit key, 12x blocks
Key: 72529FE3 6D38A7A2
IV: 08BE1944
Plaintext: 28EEE9F6 534077DE E86E4B09 D438D7AB 903CD574 1F139D08 7D7C5638 79C0A1EA 3A7D8F9B 37B207D2 62B62F7B F71BDE68
Ciphertext: 97647E73 D5EDEAB9 C3B45EDF 35B9C03B 4815C5EE 9E941FF3 EF2BDAA9 7CF984F1 DF3442D0 8E8F9F57 EC4CF4FC 8CA76D99
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: SIMECK-32/CTR, 64-bit key, 12x blocks
Key: F2E2DB05 59DA448A
IV: 8BCD257F
Plaintext: 9245E0A7 09C2F1FC 0401B9EE 877F6B05 F87D8C82 A5FEA18F 425B8D6D B4AC4E8C 0EFC4FF1 FDFA95E6 24EE87BC C154F0D1
Ciphertext: 33DA4B15 F7778355 5CF86EAF 23618EAC 4C8F95CD 3EE992A6 86AFBB76 104ECA85 1C83FA51 C0A2FD3A 00120437 9E50300B
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: SIMECK-32/CTR, 64-bit key, 12x blocks
Key: 431F2171 797815BB
IV: 7EFDF0EC
Plaintext: 556149DD 54E5CE05 7113CC87 2645922D 54F21A91 A887A351 25A99554 D29CA58E AC85A62A 498284A9 0FD2710B 47CE9397
Ciphertext: 035EA886 B516D83A A37A72B4 1FB140B4 36630971 E4668E29 531BE247 EF8B6359 22207189 ABFC7D58 A33B3EE3 A77ACF88
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: SIMECK-32/CTR, 64-bit key, 12x blocks
Key: BAB568AE DFE7A74D
IV: F11B48C1
Plaintext: E6198EF2 6A5C7C96 5D689C44 64F71E41 C9D103BC 26B15962 36E4CF0E 5D2957FC AC3C444A 1B2D83A2 854F8A9F BC127E1A
Ciphertext: 19F7BBFF BC29C7E9 49D167E5 EC544B77 0BB973C9 90CAA422 5BD42DF4 0B5DE4C1 F4E61E45 0173760F 49CC325C A139E71F
Test: Encrypt
AlgorithmType: SymmetricCipher
Name: SIMECK-64/ECB
#
Source: SIMECK test vector
Comment: SIMECK-64/ECB, 128-bit key
Key: 1b1a1918 13121110 0b0a0908 03020100
Plaintext: 656b696c 20646e75
Ciphertext: 45ce6902 5f7ab7ed
Test: Encrypt
#
Source: SIMECK reference implementation
Comment: SIMECK-64/ECB, 128-bit key
Key: 0938251f 43bb8ba6 06b747de 870c3e99
Plaintext: f1bbe9eb e16cd6ae
Ciphertext: 4d11c6b9 da2f7e28
Test: Encrypt
#
Source: SIMECK reference implementation
Comment: SIMECK-64/ECB, 128-bit key
Key: 323ba122 444066d0 9e7d49dc 407836fd
Plaintext: 1cdbae32 96f5453b
Ciphertext: 1e6a0792 f5a717c5
Test: Encrypt
#
Source: SIMECK reference implementation
Comment: SIMECK-64/ECB, 128-bit key
Key: 61ff698f 2ddc8e66 53bf67d6 99d5e980
Plaintext: b9729d49 e18b1fda
Ciphertext: fca0fa81 94bda9c7
Test: Encrypt
#
Source: SIMECK reference implementation
Comment: SIMECK-64/ECB, 128-bit key
Key: cfd3902d 597e35cf 9e0cf4d5 2c53cbc9
Plaintext: 844f4a77 9d9c1672
Ciphertext: 562b1caa 75266241
Test: Encrypt
#
Source: SIMECK reference implementation
Comment: SIMECK-64/ECB, 128-bit key
Key: f8466a04 6454ceb1 3b33821f d4618dbe
Plaintext: 78818744 e6d91d2a
Ciphertext: d946fa49 41516d8e
Test: Encrypt
#
Source: SIMECK reference implementation
Comment: SIMECK-64/ECB, 128-bit key
Key: 97278a59 28ce0bf5 2543e53c adae2488
Plaintext: d0576876 162f6768
Ciphertext: ca3e5050 126fa61b
Test: Encrypt
#
Source: SIMECK reference implementation
Comment: SIMECK-64/ECB, 128-bit key
Key: a786c2b5 c19be1c0 978c2ff1 1128c18c
Plaintext: 08614014 c9cd68d4
Ciphertext: a307ab5a a10f5c29
Test: Encrypt
#
Source: SIMECK reference implementation
Comment: SIMECK-64/ECB, 128-bit key
Key: 63b126df 89a98279 0c9bb447 9cfed971
Plaintext: d96ca166 d923d155
Ciphertext: 5e47b40d 9854418a
Test: Encrypt
#
Source: SIMECK reference implementation
Comment: SIMECK-64/ECB, 128-bit key
Key: 463608dc 1b2861c9 3f410784 28a11e20
Plaintext: 3f895ef1 62e09612
Ciphertext: c5fd5a6c 32056800
Test: Encrypt
AlgorithmType: SymmetricCipher
Name: SIMECK-64/CTR
#
Source: Crypto++ 7.0 generated
Comment: SIMECK-64/CTR, 128-bit key, 12x blocks
Key: FE3B1C0B2B47784A 3CA99857BC6C65B6
IV: BA8359D201AF6F9B
Plaintext: A3E44524EF89F6CC 3D93BEA482CE919E B35E02217B98F33F 46B271932F1DC1C4 71EB2C4AD5ED8B0D 4CE50A418EA8EBA1 A5981963C0866A09 C485E20643B68604 744577746075BF96 A17E5A14C348D67A 69E7D4AC4B89E625 300D8F744B54BCF2
Ciphertext: DEA57DA44B3C39D5 B948B580F62A1F9C 0E697278C767AAF4 F95CFDE865B035F3 661CD2E287EF22D4 C00901D8DABA4540 DE473A0F3D6A50DA 852F4AE41DBDD96A E19BA5490C60D3EA BEE6C61BFF06F62A 05D49E323AF4A7FC B4AFED218C8BF69D
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: SIMECK-64/CTR, 128-bit key, 12x blocks
Key: 0D39ADD4C84F9F43 24D5A9BAA86F0208
IV: 297F67F1CE145ED5
Plaintext: D923EBF8B58A8F02 BE0D704DDF1BCF5F B826BF172E810701 905453A966FC0BBD 8176CCEFB905377A AAB66249660192B2 33054EEC37FFCE6E 441AD8A7C4686E7A 04F859C0F1BCD900 D37648DD09CF0A38 BFFCFBE0E1154F39 BCB8B67B29CB355B
Ciphertext: AF113C3645186BB2 97A16F83E2C3517D 9781CE170F6A18D4 B0D15010F5936EF7 B40E474952250568 8309BC50F89D91BE 8D45F337B2E0CDB5 1B04AED774E98443 D0C3A135703D5FAC B8456DB76A25BB29 F90E0D29A6A9DC4B 7327D0E5464BAE72
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: SIMECK-64/CTR, 128-bit key, 12x blocks
Key: AE0E79D509DFDD03 269AC29D54AF8E90
IV: 07410095B82AB1A7
Plaintext: 8BFBAEC9CFB0BA59 F87C94D2FB3DA211 99AEAD16D8FCEA16 F531A47863BF23C3 ACE36F0E1844A818 C9178830279A4E49 431B7C0DAB7FEE44 55C5DA81DC83ED2C 23EF2788092A50D4 E2F479ED762BA545 CF313AE7EF255EBA 9D1E8A82337ACCEC
Ciphertext: B3004EED0560BD39 ACED314341F6951B D0F7E330E6B3710F 9D89CA1406F0A9B3 7FAE750DDDDB80F7 FA9778BF813729EA E485F07DECBADA48 DFF85CFA38EB04D3 75BF6654BAB44ED4 89A403DB7D336D9A 738E4B46E58AA7DA BC340ED1F0280C72
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: SIMECK-64/CTR, 128-bit key, 12x blocks
Key: 907999AA2CD157DA 5333ECED531E2AAE
IV: 4565D6B399D67290
Plaintext: 8FE5147A42741524 EF5EDE3B8B9E31C6 5EA131C8693926BD C1B1DBC5F2A8F27D 8683E948037FC06D C1F09AF877A18973 FC58131487A3F18A 34CB23BFA3D4DDF2 7A7BF04313491C50 7CAA9DED424C1ACE F8AE0C79321A9657 FB01CF1FC55ED0E2
Ciphertext: 2E05D7D2D097D40E B2C91486938CA714 0693B7E8441385F5 3DFB681D4F077029 632FD9119020B98E 31CF01712DBC6F5F AAE4DDDD92098012 9F88CAE7E8D87321 27383D3EDC65B72A D1F4D0222B2892C7 E6456323CDB3D5A9 06C64D1C9DAEF874
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: SIMECK-64/CTR, 128-bit key, 12x blocks
Key: B8500E1606DB42AD 590328F22ACAEE8E
IV: 5E35D1BAE6E79A13
Plaintext: 2FC764B2FA42B248 0C89BCD0C6E6EA4B 6C84F5F5F4FDA446 EFC724C4B8512356 0DCD36B655CB0727 0C1E0D47967F9204 464E1EF85CF331C2 29066907B47B2671 8F92F714171A7D03 374FA8B9893D4896 394904399A8316A8 2108C94C4034C3EF
Ciphertext: 5CADD8F76250E68E 1B4EA84EE2E8294B FB3FB4A57664FE6A 2B1FF710A16292AF A3282479D26C3310 EB53DBE28FB5187D 4768D6D17B9A0AFC 608EC92F9D6964E9 A00E1A5B65E2249C 5CFB54EED9FE5F72 98EA1FD0F0286CE5 881957C91941CE63
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: SIMECK-64/CTR, 128-bit key, 12x blocks
Key: 3519FD95A81BA076 25A114B9365A029E
IV: EC8B3B7776DCE2D4
Plaintext: 8E16B47439476091 5D80CCC01CC4BB37 9996688C090966C0 8F63021D04DB15AD 7ABF16AD21483FF5 5B329FD33AD3B5D1 29F5AD6DF9CDF286 05E9898433AC08A5 25428F80BA47B4E9 570EE88EFED20D44 F47692BC98726F87 2DC0AA075E835645
Ciphertext: A5452F97199991A9 2B3E35695E9711D2 B8C06700FB56D062 102A0682FACD93E8 796B738DF5A1BBB4 1AD2033621A8687E B3E49EE829F8F146 6D125E8019FD4212 5FE69045F5F702D3 75D50FF1ED313880 FCD9EC200CD07FD9 2BEC661D6D3C3A9E
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: SIMECK-64/CTR, 128-bit key, 12x blocks
Key: 8B7F582B831BD6E6 A6977D0EEE93BA4A
IV: 989EC701CD85E583
Plaintext: F66303684B09816B 32BA846BF5941339 7E15EB2F58527B17 6297A028A76E1E94 73E154B586B345CB FF10908BE0CC42BD 36D8EB7D5E944AC7 8B0871B1C35721D9 3BF6DF1E54F76358 5F51534A74B27F76 6D8282DED5552054 70005375C17FD71E
Ciphertext: 2D62B730D0EB04D6 EED9FABB2910A247 F149D8577CBA6A95 6D7EA8CE26C56E61 566BDA2EA4D238BD F82D84655D7251A3 ABF23B50729FF8A6 2651BC01A5B412D6 D7E4ECAFB36621AB C041C15A73AE4379 50ADB118875BA47C ECB6D0DD38357A24
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: SIMECK-64/CTR, 128-bit key, 12x blocks
Key: 9F5C4B54620D1241 7E731CE58D6D5605
IV: 1492E297870E057C
Plaintext: 7BFF26CDE3A245E7 9DBE4A06DD016036 DE886A58DC8A578A 011645E4F300B014 35D1BBD0BBEEAD79 FAD68AC25E8EA44C 494CD8ABD8E11BDC B3E1E470D5161104 DAD371A5F9AEB35C 59A14D74DE252ED9 96A3514482703891 336AF0BA06EA7307
Ciphertext: E78FE71E34BCB41E D5F085B8DCCA6202 E592CF744AF61833 38621EFFD44ADC5E 3279366AC7401292 4A388D671905B402 FD594EEEE328F2D4 92FAD61580FD41AE 28117CE88787F9A8 0AC59316A91D1887 07F1E2FD7EE92AE9 6B905FBF32DA71EC
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: SIMECK-64/CTR, 128-bit key, 12x blocks
Key: 452B87D54115ECA3 93B3A28899B45774
IV: 933EB7BD1C3A053E
Plaintext: 3CBB780F1A508745 B9541A930060A28A BA82F5B225EC4D5A 92F57FC12E69BDC6 104DCFCA6A94B690 87B5152A1B70CF97 072E0441639C1D97 52F385E8F48B5C8D 714D0EBC1D3F6C6A 2B0BF18687966E1C A168B004376E23DB 33B3287D9C4A343A
Ciphertext: F6F7045A4E6E629B E43B643B49C2199A 5B1000CDA2405AAC 3BA4430B909C907A D8DB91A9DC5D8B37 CAE211881B9DC187 488550C922006519 D57155DDD40778F4 5EBCF51C0186FA04 229CF0F39A0149F8 0C32B52758087545 88303C3C81D6A352
Test: Encrypt
#
Source: Crypto++ 7.0 generated
Comment: SIMECK-64/CTR, 128-bit key, 12x blocks
Key: E8DA7CF058E34A07 3CF875CC87323068
IV: 0DAE4378246B98F0
Plaintext: 37BB881051D17A02 6EE1A19975C7CDDD 8C6D6BAA6E56B3E5 211C8E46E37609D6 2E8EF4F05E083AD4 C7353C4D29B58FDF 8015F9D51E9FE508 1A6A55BBAC6609B5 0AA9E7A076CAC9FC 057F87B1C8E6CE3A 5D40088E1607535D 16319FA8F59CEA6B
Ciphertext: F9A0CA6ED5F24463 39EC8410CE66844E 818956DCF5D4A996 D25F4E2A3588B730 3A26D0FD05AE674C C5DA5071ED3FDA60 CEA4422C2673C088 C0CE6B1EA956FEBF AEACC1FB6BF9CA0F 6B302E73A5562935 19520DF956307C45 828CA8E68EB1B3E9
Test: Encrypt

1046
TestVectors/skipjack.txt Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,37 +0,0 @@
AlgorithmType: SymmetricCipher
Name: ChaCha20
Source: http://tools.ietf.org/html/draft-agl-tls-chacha20poly1305
Comment: Section 7, Test 1
Key: 0000000000000000000000000000000000000000000000000000000000000000
IV: 0000000000000000
Plaintext:
Ciphertext: 76b8e0ada0f13d90405d6ae55386bd28bdd219b8a08ded1aa836efcc8b770dc7da41597c5157488d7724e03fb8d84a376a43b8f41518a11cc387b669
Test: Encrypt
Comment: Section 7, Test 2
Key: 0000000000000000000000000000000000000000000000000000000000000001
IV: 0000000000000000
Plaintext:
Ciphertext: 4540f05a9f1fb296d7736e7b208e3c96eb4fe1834688d2604f450952ed432d41bbe2a0b6ea7566d2a5d1e7e20d42af2c53d792b1c43fea817e9ad275
Test: Encrypt
Comment: Section 7, Test 3
Key: 0000000000000000000000000000000000000000000000000000000000000000
IV: 0000000000000001
Plaintext:
Ciphertext: de9cba7bf3d69ef5e786dc63973f653a0b49e015adbff7134fcb7df137821031e85a050278a7084527214f73efc7fa5b5277062eb7a0433e445f41e3
Test: Encrypt
Comment: Section 7, Test 4
Key: 0000000000000000000000000000000000000000000000000000000000000000
IV: 0100000000000000
Plaintext:
Ciphertext: ef3fdfd6c61578fbf5cf35bd3dd33b8009631634d21e42ac33960bd138e50d32111e4caf237ee53ca8ad6426194a88545ddc497a0b466e7d6bbdb004
Test: Encrypt
Comment: Section 7, Test 5
Key: 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f
IV: 0001020304050607
Plaintext:
Ciphertext: f798a189f195e66982105ffb640bb7757f579da31602fc93ec01ac56f85ac3c134a4547b733b46413042c9440049176905d3be59ea1c53f1 \
5916155c2be8241a38008b9a26bc35941e2444177c8ade6689de95264986d95889fb60e84629c9bd9a5acb1cc118be563eb9b3a4a472f82e \
09a7e778492b562ef7130e88dfe031c79db9d4f7c7a899151b9a475032b63fc385245fe054e3dd5a97a5f576fe064025d3ce042c566ab2c5 \
07b138db853e3d6959660996546cc9c4a6eafdc777c040d70eaf46f76dad3979e5c5360c3317166a1c894c94a371876a94df7628fe4eaaf2 \
ccb27d5aaae0ad7ad0f9d4b6ad3b54098746d4524d38407a6deb
Test: Encrypt

75
TestVectors/xchacha.txt Normal file
View File

@ -0,0 +1,75 @@
AlgorithmType: SymmetricCipher
Name: XChaCha20
Source: https://tools.ietf.org/html/draft-arciszewski-xchacha
#
Comment: A.2. Example and Test Vector for XChaCha20
Key: 80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f \
90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f
IV: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f \
50 51 52 53 54 55 56 58
Plaintext: r304 00
Ciphertext: 29 62 4b 4b 1b 14 0a ce 53 74 0e 40 5b 21 68 54 \
0f d7 d6 30 c1 f5 36 fe cd 72 2f c3 cd db a7 f4 \
cc a9 8c f9 e4 7e 5e 64 d1 15 45 0f 9b 12 5b 54 \
44 9f f7 61 41 ca 62 0a 1f 9c fc ab 2a 1a 8a 25 \
5e 76 6a 52 66 b8 78 84 61 20 ea 64 ad 99 aa 47 \
94 71 e6 3b ef cb d3 7c d1 c2 2a 22 1f e4 62 21 \
5c f3 2c 74 89 5b f5 05 86 3c cd dd 48 f6 29 16 \
dc 65 21 f1 ec 50 a5 ae 08 90 3a a2 59 d9 bf 60 \
7c d8 02 6f ba 54 86 04 f1 b6 07 2d 91 bc 91 24 \
3a 5b 84 5f 7f d1 71 b0 2e dc 5a 0a 84 cf 28 dd \
24 11 46 bc 37 6e 3f 48 df 5e 7f ee 1d 11 04 8c \
19 0a 3d 3d eb 0f eb 64 b4 2d 9c 6f de ee 29 0f \
a0 e6 ae 2c 26 c0 24 9e a8 c1 81 f7 e2 ff d1 00 \
cb e5 fd 3c 4f 82 71 d6 2b 15 33 0c b8 fd cf 00 \
b3 df 50 7c a8 c9 24 f7 01 7b 7e 71 2d 15 a2 eb \
5c 50 48 44 51 e5 4e 1b 4b 99 5b d8 fd d9 45 97 \
bb 94 d7 af 0b 2c 04 df 10 ba 08 90 89 9e d9 29 \
3a 0f 55 b8 ba fa 99 92 64 03 5f 1d 4f be 7f e0 \
aa fa 10 9a 62 37 20 27 e5 0e 10 cd fe cc a1 27
Test: Encrypt
#
Comment: A.2. Example and Test Vector for XChaCha20
Key: 80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f \
90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f
IV: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f \
50 51 52 53 54 55 56 58
Plaintext: 54 68 65 20 64 68 6f 6c 65 20 28 70 72 6f 6e 6f \
75 6e 63 65 64 20 22 64 6f 6c 65 22 29 20 69 73 \
20 61 6c 73 6f 20 6b 6e 6f 77 6e 20 61 73 20 74 \
68 65 20 41 73 69 61 74 69 63 20 77 69 6c 64 20 \
64 6f 67 2c 20 72 65 64 20 64 6f 67 2c 20 61 6e \
64 20 77 68 69 73 74 6c 69 6e 67 20 64 6f 67 2e \
20 49 74 20 69 73 20 61 62 6f 75 74 20 74 68 65 \
20 73 69 7a 65 20 6f 66 20 61 20 47 65 72 6d 61 \
6e 20 73 68 65 70 68 65 72 64 20 62 75 74 20 6c \
6f 6f 6b 73 20 6d 6f 72 65 20 6c 69 6b 65 20 61 \
20 6c 6f 6e 67 2d 6c 65 67 67 65 64 20 66 6f 78 \
2e 20 54 68 69 73 20 68 69 67 68 6c 79 20 65 6c \
75 73 69 76 65 20 61 6e 64 20 73 6b 69 6c 6c 65 \
64 20 6a 75 6d 70 65 72 20 69 73 20 63 6c 61 73 \
73 69 66 69 65 64 20 77 69 74 68 20 77 6f 6c 76 \
65 73 2c 20 63 6f 79 6f 74 65 73 2c 20 6a 61 63 \
6b 61 6c 73 2c 20 61 6e 64 20 66 6f 78 65 73 20 \
69 6e 20 74 68 65 20 74 61 78 6f 6e 6f 6d 69 63 \
20 66 61 6d 69 6c 79 20 43 61 6e 69 64 61 65 2e
Ciphertext: 7d 0a 2e 6b 7f 7c 65 a2 36 54 26 30 29 4e 06 3b \
7a b9 b5 55 a5 d5 14 9a a2 1e 4a e1 e4 fb ce 87 \
ec c8 e0 8a 8b 5e 35 0a be 62 2b 2f fa 61 7b 20 \
2c fa d7 20 32 a3 03 7e 76 ff dc dc 43 76 ee 05 \
3a 19 0d 7e 46 ca 1d e0 41 44 85 03 81 b9 cb 29 \
f0 51 91 53 86 b8 a7 10 b8 ac 4d 02 7b 8b 05 0f \
7c ba 58 54 e0 28 d5 64 e4 53 b8 a9 68 82 41 73 \
fc 16 48 8b 89 70 ca c8 28 f1 1a e5 3c ab d2 01 \
12 f8 71 07 df 24 ee 61 83 d2 27 4f e4 c8 b1 48 \
55 34 ef 2c 5f bc 1e c2 4b fc 36 63 ef aa 08 bc \
04 7d 29 d2 50 43 53 2d b8 39 1a 8a 3d 77 6b f4 \
37 2a 69 55 82 7c cb 0c dd 4a f4 03 a7 ce 4c 63 \
d5 95 c7 5a 43 e0 45 f0 cc e1 f2 9c 8b 93 bd 65 \
af c5 97 49 22 f2 14 a4 0b 7c 40 2c db 91 ae 73 \
c0 b6 36 15 cd ad 04 80 68 0f 16 51 5a 7a ce 9d \
39 23 64 64 32 8a 37 74 3f fc 28 f4 dd b3 24 f4 \
d0 f5 bb dc 27 0c 65 b1 74 9a 6e ff f1 fb aa 09 \
53 61 75 cc d2 9f b9 e6 05 7b 30 73 20 d3 16 83 \
8a 9c 71 f7 0b 5b 59 07 a6 6f 7e a4 9a ad c4 09
Test: Encrypt

View File

@ -18,7 +18,7 @@ USING_NAMESPACE(std)
#endif
// Used for testing the compiler and linker in cryptest.sh
#if defined(CRYPTOPP_ADHOC_MAIN)
#if defined(CRYPTOPP_ADHOC_MAIN) || defined(ADHOC_MAIN)
int main(int argc, char *argv[])
{

1410
adv-simd.h

File diff suppressed because it is too large Load Diff

2357
adv_simd.h Normal file

File diff suppressed because it is too large Load Diff

1215
aes_armv4.S Normal file

File diff suppressed because it is too large Load Diff

30
aes_armv4.h Normal file
View File

@ -0,0 +1,30 @@
/* Header file for use with Cryptogam's ARMv4 AES. */
/* Also see http://www.openssl.org/~appro/cryptogams/ and */
/* https://wiki.openssl.org/index.php?title=Cryptogams_AES */
#ifndef CRYPTOGAMS_AES_ARMV4_H
#define CRYPTOGAMS_AES_ARMV4_H
#ifdef __cplusplus
extern "C" {
#endif
//#define AES_MAXNR 14
//typedef struct AES_KEY_st {
// unsigned int rd_key[4 * (AES_MAXNR + 1)];
// int rounds;
//} AES_KEY;
// Instead of AES_KEY we use a 'word32 rkey[4*15+4]'. It has space for
// both the AES_MAXNR round keys and the number of rounds in the tail.
int AES_set_encrypt_key(const unsigned char *userKey, const int bits, unsigned int *rkey);
int AES_set_decrypt_key(const unsigned char *userKey, const int bits, unsigned int *rkey);
void AES_encrypt(const unsigned char in[16], unsigned char out[16], const unsigned int *rkey);
void AES_decrypt(const unsigned char in[16], unsigned char out[16], const unsigned int *rkey);
#ifdef __cplusplus
}
#endif
#endif /* CRYPTOGAMS_AES_ARMV4_H */

Some files were not shown because too many files have changed in this diff Show More