Commit Graph

2845 Commits

Author SHA1 Message Date
Jeffrey Walton
7779fa3e7a
Fix NEON detection on Aarch32 and Aarch64
I wish GCC would get its head out of its ass and define the apprpriate defines. NEON/ASIMD cannot be disgorged from Aarch32/Aarch64 just like SSE2 cannot be disgorged from x86_64. They are core instruction sets
2017-08-17 02:15:42 -04:00
Jeffrey Walton
6e35e7387a
Add debug configuration to Travis 2017-08-17 01:47:08 -04:00
Jeffrey Walton
f099d2df91
Remove ios-tv from allow_failures 2017-08-16 23:15:23 -04:00
Jeffrey Walton
3887c919c3
Clear unused variable warnings under MSVC 2017-08-16 22:56:36 -04:00
Jeffrey Walton
df280a509a
Disable Carryless Multiplies for Clang
Clang causes too many problems. Early versions of the compiler simply crashes. Later versions of the compiler still have trouble with Intel ASM and still produce incorrect results on occassion. Additionally, we have to special case the integrated assemvler. Its making a mess of the code and causing self test failures
2017-08-16 22:10:53 -04:00
Jeffrey Walton
1450847e40
Update comments 2017-08-16 21:43:31 -04:00
Jeffrey Walton
5a32fbbeba
Fix "warning: binding dereferenced null pointer to reference has undefined behavior"
This shows up under debug builds when testing instantiations.

 warning: binding dereferenced null pointer to reference has
      undefined behavior [-Wnull-dereference]
        DH2 dh(*(SimpleKeyAgreementDomain*)NULLPTR);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2017-08-16 20:49:03 -04:00
Jeffrey Walton
b8e794cc6d
Add SHACAL2 optimizations
Thanks to Botan for providing these
2017-08-16 14:33:31 -04:00
Jeffrey Walton
c40a4dc9f7
Fix Clang warning on missing template definitions 2017-08-16 12:21:07 -04:00
Jeffrey Walton
8f4b0dc081
Suppress C4251 and C4275 warnings in project files (Issue 412) 2017-08-16 11:24:48 -04:00
Jeffrey Walton
b0b749f392
Fold shuffles after loads for SHACAL2 2017-08-16 10:40:00 -04:00
Jeffrey Walton
1ab1e08ac5
Add Intel SHA implementation for SHACAL2 encryption
The implementation came from Jack Lloyd and the Botan team. Jack and the Botan was gracious and allowed us to use Botan's x86_encrypt_blocks function. They also allowed us to release it under the Crypto++ licensing terms. Also see https://github.com/randombit/botan/pull/1151/files
2017-08-16 06:13:06 -04:00
Jeffrey Walton
b311aabc31
Update documentation 2017-08-16 05:42:58 -04:00
Jeffrey Walton
e19fad007f
Fix library version number in script 2017-08-16 05:36:11 -04:00
Jeffrey Walton
c5c6a6af5c
Fix Doxygen constant documentation 2017-08-16 05:11:37 -04:00
Jeffrey Walton
08c37e5887
Update comments in Rijndael head comments 2017-08-15 14:26:30 -04:00
Jeffrey Walton
6f36c7deae
Cleared UBsan finding in Default's GenerateKeyIV
passed:  128 deflates and inflates
passed:  128 zlib decompress and compress
default.cpp:69:2: runtime error: null pointer passed as argument 2, which is declared to never be null
/usr/include/x86_64-linux-gnu/bits/string3.h:53:71: runtime error: null pointer passed as argument 2, which is declared to never be null

Information Dispersal and Secret Sharing...
2017-08-15 08:51:03 -04:00
Jeffrey Walton
092b3cb467
Backed off assert.
Its too noisy
2017-08-15 04:42:12 -04:00
Jeffrey Walton
659b47108a
Fix Address Sanitizer findings on GCC117
GCC117 is a Aarch64/ARM64 server with AMD's ARM chip and GCC 7.10. It looks like GCC is performing some std::string optimizations that generates a finding. We did not witness the finding on other platforms, like other Aarch64 devices and x86_64.

We will need to check if taking the address of element-0 is still approved way to get the non-const pointer to the elements
2017-08-15 03:11:03 -04:00
Jeffrey Walton
0110f8397f
Add ELEMS_MAX for SecBlock (Issue 346)
Reset the mark on additional class methods
2017-08-15 03:07:30 -04:00
Jeffrey Walton
876142b1b6
Update with latest sources and reproducible build 2017-08-15 03:05:45 -04:00
Jeffrey Walton
cebeedfefd
Fix Address Sanitizer findings on GCC117
GCC117 is a Aarch64/ARM64 server powered by AMD's ARM chip. It runs GCC 7.10. It looks like GCC is performing some std::string optimizations that generates a finding. We have not witnessed the finding on other platforms
2017-08-15 01:15:08 -04:00
Jeffrey Walton
93f085c44c
Fix test script when running on machine with RO mount of / 2017-08-14 19:31:36 -04:00
Jeffrey Walton
f8e77e0fe6
Add Apple Watch and TV to Travis testing 2017-08-14 07:54:10 -04:00
Jeffrey Walton
effa446a61
Fix test script when running on machine with RO mount of / 2017-08-14 01:48:11 -04:00
Jeffrey Walton
6a29d8c56f
Use -O1 for Asan and UBsan 2017-08-14 01:05:03 -04:00
Jeffrey Walton
2ee8e3b26d
Move free standing function into anonymous namespace
Update comments and use class constants when available
2017-08-14 00:08:55 -04:00
Jeffrey Walton
2aff92ddb6
Fix bad SHA::Transform calculation (Issue 455)
Reworked SHA class internals to align all the implementations. Formerly all hashes were software based, IterHashBase handled endian conversions, IterHashBase repeatedly called the single block SHA{N}::Transform. The rework added SHA{N}::HashMultipleBlocks, and the SHA classes attempt to always use it.

Now SHA{N}::Transform calls into SHA{N}_HashMultipleBlocks, which is a free standing function. An added wrinkle is hardware wants little endian data and software presents big endian data, so HashMultipleBlocks accepts a ByteOrder for the incoming data. Hardware based SHA{N}_HashMultipleBlocks can often perform the endian swap much easier by setting an EPI mask so it was profitable to defer to hardware when available.

The rework also removed the hacked-in pointers to implementations. The class now looks more like AES, GCM, etc.
2017-08-13 16:05:39 -04:00
Jeffrey Walton
863bf9133c
Cleanup casts due to Clang 2017-08-13 06:32:09 -04:00
Jeffrey Walton
f02bf91ee5
Revert 95ee8975b4 and 7d21cdd54e (Issue 408)
This broke some OS X builds. We need more testing. Ugh...
2017-08-13 04:31:17 -04:00
Jeffrey Walton
95ee8975b4
Use blockSize in error message thrown 2017-08-12 20:29:33 -04:00
Jeffrey Walton
7d21cdd54e
Convert GCM to use runtime blocksize checking (Issue 408)
GCM is still only defined for 16-byte ciphers, but this is where we need to be when we add the larger polynomials
2017-08-12 16:14:29 -04:00
Jeffrey Walton
f5aa6f1f06
Cast enums to int for comparison 2017-08-11 17:15:13 -04:00
Jeffrey Walton
953252e44d
Move from 'static' to 'enum' for class constants
Enums don't take up space in class objects. Its should result in smaller objects and faster code
2017-08-11 17:13:15 -04:00
Jeffrey Walton
173dd0b530
Add AES for ARMv8 (Issue 458) 2017-08-11 07:31:09 -04:00
Jeffrey Walton
e5b1be035e
Add iOS testing to Travis 2017-08-10 22:59:00 -04:00
Jeffrey Walton
24bc2b8567
Add HMAC(SHA256) benchmark 2017-08-07 19:04:14 -04:00
Jeffrey Walton
58b731c645
Fix "Integer constant is too large for 'long' type"
kalyna.cpp:432: error: integer constant is too large for 'long' type
kalyna.cpp:509: error: integer constant is too large for 'long' type
kalyna.cpp:608: error: integer constant is too large for 'long' type
kalyna.cpp:713: error: integer constant is too large for 'long' type
kalyna.cpp:833: error: integer constant is too large for 'long' type
...
2017-08-07 09:46:33 -04:00
Jeffrey Walton
086ad70feb
Update documentation 2017-08-05 07:53:52 -04:00
Jeffrey Walton
0357e508e4
Make nonce a class member rather than temporary
Effectively this creates a workspace for encrypting the nonce. The zeroizer will run when the class is destroyed, rather than each invocation of UncheckedSetKey.
Performance went from 3.6 cpb as a temporary to 2.9 cpb as a class member
2017-08-05 06:05:57 -04:00
Jeffrey Walton
bf35d58ad7
Cleanup selft tests 2017-08-05 05:32:43 -04:00
Jeffrey Walton
326700f6ec
Fix library version numbers
They were inadvertently checked-in with the SHA doc updates
2017-08-05 01:08:25 -04:00
Jeffrey Walton
d779462a38
Update documentation 2017-08-05 01:05:58 -04:00
Jeffrey Walton
8db50f25ad
Update documentation 2017-08-05 01:02:12 -04:00
Jeffrey Walton
20def29d33
Use MOVDQU for SSE2 in static transform (Issue 455)
Updated documentation
2017-08-05 00:24:02 -04:00
Jeffrey Walton
a2cab93117
Add hash static transform test (Issue 455) 2017-08-04 23:35:38 -04:00
Jeffrey Walton
662cccce3b
Switch to reinterpret_cast in MDC 2017-08-04 19:11:53 -04:00
Jeffrey Walton
3fe6709ae7
Cleanup comments in AppVeyor config file 2017-08-04 19:11:16 -04:00
Jeffrey Walton
18a05659f3
Switch from -O2 to -O3 in the makefile (Issue 454)
Also see https://groups.google.com/d/msg/cryptopp-users/AEiGyjq15tw/GBAyDA6fBgAJ
2017-08-04 18:31:52 -04:00
Jeffrey Walton
860a9f4266
Use non-0 seed OldRandomPool test
This should tickle endianness issues
2017-08-04 16:57:45 -04:00