Jeffrey Walton
fa39314b7a
Add XLC 12 loads and stores for AIX (PR #907 )
...
Add XLC 12 loads and stores for AIX
2019-10-26 22:11:49 -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
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
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
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
1966d13617
Cleanup BLAKE2 m_keyLength and m_digestSize
2018-11-25 02:05:02 -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
322c67f373
Use previous digest size as a default value in BLAKE2
2018-11-21 13:28:21 -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
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
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
8b4da4ca68
Update comments
2018-11-15 04:12:35 -05: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
fc17f160ac
Remove unneeded BLAKE2B_IV from Blake2s source file
2018-11-02 19:21:57 -04:00
Jeffrey Walton
d2b64a4d63
Add BLAKE2b Power8 implementation (GH #731 )
2018-11-02 18:34:46 -04:00
Jeffrey Walton
659c0c113c
Add BLAKE2b Power8 implementation (GH #729 )
2018-10-30 06:20:31 -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
b74a6f4445
Add algorithm provider member function to Algorithm class
2018-07-06 09:23:37 -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
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
01136e2c7b
Clear clang-tidy warnings
2018-01-23 21:15:26 -05:00
Jeffrey Walton
fe257e92a9
Add const-ness to internal BLAKE2 functions (GH #527 )
2017-12-06 17:40:34 -05:00
Jeffrey Walton
b436411de5
Fix MSVC 2017 hang on BLAKE2 (GH #527 )
...
It looks like the macros for BLAKE2B and BLAKE2S round functions were too much for the compiler to handle
2017-12-06 14:02:28 -05:00
Jeffrey Walton
b08596da44
Add CRYPTOPP_SLOW_ARMV8_SHIFT for Aarch32 and Aarch64
...
Both BLAKE2 and SPECK slow down when using NEON/ASIMD. When just BLAKE2 experienced the issue, it was a one-off problem. Its now wider than a one-off, so add the formal define
2017-11-23 02:22:27 -05:00
Jeffrey Walton
c49b6d4d71
Cleanup comments and old code artifacts
2017-11-15 21:11:42 -05:00
Jeffrey Walton
e8bed05b7d
Use SSE4.1 instead of SSE4.2 for BLAKE2
...
BLAKE2 requires SSE4.1, no SSE4.2. This change should have been made when we split SSE4 into .1 and .2, but we needed more OS X and LLVM testing
2017-11-15 20:08:06 -05:00
Jeffrey Walton
f1386ad894
Fix SunCC 12.5 compile with -std=c++11
2017-11-13 13:08:56 -05:00
Jeffrey Walton
b40ca97550
Update documentation
2017-11-12 16:35:44 -05:00
Jeffrey Walton
b079803856
Fix compile under Embarcadero (GH #498 )
...
[bcc32c Error] blake2.cpp(49): 'alignas' must be specified on definition if it is specified on any declaration
2017-09-15 12:43:18 -04:00
Jeffrey Walton
602fa05825
Cleared unused variable warning under MSC
2017-09-01 14:19:48 -04:00
Jeffrey Walton
6544f75769
Clear strict aliasing rule violation in BLAKE2
...
There was no aliasing violation in practice. We used a to assign the right pointer. If the compiler would have removed the unneeded assignment based on T_64bit, then we would not have been flagged.
2017-09-01 11:36:22 -04:00
Jeffrey Walton
e2c377effd
Split source files to support Base Implementation + SIMD implementation (GH #461 )
...
Split source files to support Base Implementation + SIMD implementation
2017-08-17 12:33:43 -04:00
Jeffrey Walton
863bf9133c
Cleanup casts due to Clang
2017-08-13 06:32:09 -04:00
Dmitry S. Baikov
369fa3bc52
NULLPTR fix for blake2
2017-05-11 07:04:51 +03:00
Dmitry S. Baikov
e8e0b1c3f2
blake2: Fixed initialization when using non-keyed constructor with non-standard digest size. Added test vectors.
...
https://github.com/weidai11/cryptopp/issues/415
Test vectors generated with pyblake2 which uses 'BLAKE2 reference source code package' by Samuel Neves
2017-05-11 06:46:56 +03:00
Jeffrey Walton
c21023e2dc
Removed 'aligned' makefile target. It was made default in 5.6.5
2017-03-28 23:49:58 -04:00
Jeffrey Walton
5efb019d8b
Add C++ nullptr support (Issue 383)
2017-03-01 06:10:06 -05:00
Jeffrey Walton
8c20630c2d
Remove extra preamble for copyright.
...
Similar text may be added in the future
2017-02-21 02:54:09 -05:00
Jeffrey Walton
b8adc91ce8
Add asserts to validation routines
2017-01-29 04:58:56 -05:00
Jeffrey Walton
23fbba488d
Add BLAKE2B_ and BLAKE2S_ prefix to macros, remive \#undef's
2017-01-22 22:44:35 -05:00
Jeffrey Walton
6e1a021511
Comments and whitespace (Issue 367)
2017-01-22 13:34:50 -05:00
Jeffrey Walton
9dd2744419
Disable NEON for Cortex-A53 and A57 processors (Issue 367)
2017-01-22 13:18:35 -05:00