1678 Commits

Author SHA1 Message Date
David Garske
84a396b7dc Additional init fixes for unit tests based on async valgrind report. 2017-08-17 12:41:18 -07:00
David Garske
c06e672eb7 Added missing AES/DES3/HMAC init functions for helping with valgrind reports on unitialized use for async markers. 2017-08-17 09:58:46 -07:00
David Garske
ff6a136b8a Enhancement to add strtok implementation for platforms where it is not available such as MinGW. 2017-08-16 13:21:31 -07:00
David Garske
f7ca2f157d Improvement on the ParseCertRelative fixes for intializing the event prior to operation. Fix possible uninitialized value with DecryptKey and DES3. 2017-08-16 13:19:31 -07:00
David Garske
68c04bd821 Fix for ECC encrypt/decrypt with async enabled. Reverts previous change from PR #1101 and adds return code checking for wc_AsyncWait. ECC shared secret needs to be in loop to call again for completion. 2017-08-16 12:04:57 -07:00
toddouska
53e05786da Merge pull request #1101 from dgarske/fix_bench_async
Fixes for async multi-threading
2017-08-16 10:15:55 -07:00
David Garske
1f80fb952f Fix issue with using wrong asyncDev in ConfirmSignature. Fix un-initialized Hmac in API unit tests. 2017-08-15 21:20:32 -07:00
David Garske
ccc226eae4 Fixes for refactor to initialize the asyncDev.event prior to call for ParseCertRelative, ConfirmSignature and ECC shared secret (return code). Scan-build and G++ fixes. 2017-08-15 21:20:32 -07:00
David Garske
b32be20110 Refactored async event intialization so its done prior to making possible async calls. Added threadId and removed volatile attribs in WOLF_EVENT. Fixed possible unitialized value in benchmark ret. 2017-08-15 21:19:28 -07:00
David Garske
a9c943d5bd Fix jenkins warning with possible uninitialized 'ret'. 2017-08-15 21:19:28 -07:00
David Garske
b4aaeb5768 Fix for possible leak with multi-threading and curve cache. Note memory leak still possible with --enable-fpecc and async multithreading. Add voltaile on event state and ret to resolve possible multi-thread timing issue. Use define for --enable-stacksize init value. 2017-08-15 21:19:28 -07:00
David Garske
44a3622248 Fixes to better handle threading with async. Fix wc_CamelliaCbcEncrypt return code checking. Fix to ensure cycles per byte shows on same line. Refactor of async event state. Refactor to initalize event prior to operation (in case it finishes before adding to queue). Add HAVE_AES_DECRYPT to --enable-all option. Cleanup benchmark error display. 2017-08-15 21:19:28 -07:00
Chris Conlon
2f92998529 update test.c for Micrium port and XSTRNCPY 2017-08-11 14:30:25 -06:00
Chris Conlon
f6d0b2898d update Micrium uC/OS-III port 2017-08-11 14:30:15 -06:00
Sean Parkinson
21a8662948 Merge pull request #1093 from toddouska/polyold
have poly asm detect older compilers w/o avx2 like chacha does
2017-08-11 08:27:34 +10:00
Chris Conlon
5865816198 fix wc_ecc_import_private_key_ex() with WOLFSSL_VALIDATE_ECC_IMPORT with private only, wolfcrypt test 2017-08-10 10:04:14 -06:00
toddouska
36b1a666d0 have poly asm detect older compilers w/o avx2 like chacha does 2017-08-09 09:52:06 -07:00
toddouska
df1e5f2e1a Merge pull request #1091 from dgarske/fix_async_aes
Fix async issue with AES set key trying to use a NULL IV.
2017-08-09 09:44:46 -07:00
toddouska
04c16ca843 Merge pull request #1086 from SparkiDev/sha256_sha512_gcc44
GCC 4.4 on Linux doesn't like empty clobber list
2017-08-09 09:41:58 -07:00
toddouska
af4158d231 Merge pull request #1084 from SparkiDev/aesni_avx2_fix
Fix for AVX2 unrolled code
2017-08-09 09:39:38 -07:00
toddouska
d12e98eea3 Merge pull request #1079 from SparkiDev/poly1305_asm
Poly1305 Intel Assembly code - AVX and AVX2
2017-08-09 09:37:09 -07:00
David Garske
f27b3a83aa Fix async issue with AES set key trying to use a NULL IV. 2017-08-07 17:47:59 -07:00
Sean Parkinson
032d606f99 GCC 4.4 on Linux doesn't like empty clobber list 2017-08-04 14:07:55 +10:00
Sean Parkinson
32cedb2b12 Fix for AVX2 unrolled code 2017-08-04 12:40:10 +10:00
Sean Parkinson
d0ff6067a6 Chacha asm fix - can't use buffer in old compiler 2017-08-04 12:17:41 +10:00
Sean Parkinson
ea6b719ec2 Fix register issue 2017-08-04 08:39:09 +10:00
David Garske
3be4e0823e Adds option --enable-chacha=noasm to allow disabling the Intel AVX/AVX2 speedups when used with --enable-intelasm. 2017-08-03 13:39:46 -07:00
toddouska
4d6cb66bc1 Merge pull request #1082 from dgarske/fix_intelasm_aesgcm
Fixes for `intelasm` and AES GCM with AVX2
2017-08-03 12:35:00 -07:00
David Garske
4a5ecb8a15 Fix typo with xmm5 (was xxm5). Workaround for Clang issues with AVX2 and using register __m128i tmp3 asm("xmm6"); syntax by using NO_UNROLL option. 2017-08-03 10:47:21 -07:00
David Garske
b0eeed364b Fix for intelasm and ChaCha20 with causing "error: unknown type name '__m256i'" on some compilers. Fix is to change the __m128i and __m256i to arrays of word64 (source Sean PR #1079). 2017-08-03 10:00:20 -07:00
Sean Parkinson
5c2736f1a9 Poly1305 Intel Assembly code - AVX and AVX2 2017-08-03 14:35:09 +10:00
Sean Parkinson
31854c1566 Stop using positional parameters in inline asm 2017-08-03 13:55:30 +10:00
dgarske
108f6a4958 Merge pull request #1077 from JacobBarthelmeh/StaticAnalysisTests
Static analysis tests
2017-08-02 15:08:32 -07:00
toddouska
635bacef28 Merge pull request #357 from kojo1/PIC32
Fixes for PIC32MZ
2017-08-02 13:14:06 -07:00
Jacob Barthelmeh
433ca50292 remove unneeded XMEMSETs 2017-08-02 14:04:41 -06:00
Jacob Barthelmeh
edce23b563 use memset when initializing DecodedCert structure 2017-08-02 10:50:34 -06:00
Jacob Barthelmeh
43b04af388 adjust sanity check in integer.c to avoid reading uninitialized values 2017-08-02 10:39:05 -06:00
Jacob Barthelmeh
062f3efa6d adjust integer.c for loop range 2017-08-02 10:29:34 -06:00
David Garske
65b8389af0 Fix for handling hash copies to make sure copied buffer is not free’d. Resolves issues when testing TLS connection with wolfssl_tcp_client and openurl https://www.google.com/. 2017-08-02 08:42:04 -07:00
David Garske
4e735631e7 Fixes for PIC32MZ:
* Adds crypto HW support for AES Direct and AES CCM.
* Fixes to enable PIC32MZ hardware hashing where updates are cached via heap buffer and final performs single operations against hardware.
* Fix for benchmark with 1024-bit certs passing in wrong size for `wc_RsaPrivateDecrypt` when using `USE_CERT_BUFFERS_1024`.
* Fix to resolve missing `strncasecmp` for the Microchip XC32. Workaround to use case sensitive version instead. This error occurred when building with HAVE_ECC defined in Harmony with XC32.
* Cleanup of the PIC32MZ crypto and hashing hardware code. Replace `pic32mz-hash.c` with `pic32mz-crypt.c`
* Add user_settings.h for mplabx and mcapi examples.
* Sync up with Harmony changes for MCAPI.
2017-08-01 12:42:09 -07:00
Jacob Barthelmeh
c20859e67d add sanity check in fast-rsa and change loop behavior when generating fast-rsa key 2017-08-01 11:29:16 -06:00
toddouska
0c753718bd Merge pull request #1042 from SparkiDev/chacha_asm
Intel Assembly optimizations for ChaCha20 - AVX and AVX2
2017-07-31 16:27:17 -07:00
toddouska
a27738b5f9 Merge pull request #1071 from dgarske/cleanup_tests
Cleanup AES GCM large test
2017-07-31 16:13:06 -07:00
David Garske
2051a05139 Cleanup AES GCM large test. Move test into stack and disable if using BENCH_EMBEDDED. 2017-07-31 14:09:30 -07:00
David Garske
8a11b78960 Fix for normal math mp_read_unsigned_bin where mp_zero was also resetting the raw source. This caused failures with QAT when using normal math. 2017-07-31 14:09:15 -07:00
Sean Parkinson
d452f97e99 Fix cpuid to work with different configs
Fix 'may be uninitialized' warning in aes.c
Fix memory overwrite in AES-CBC when using AESNI.
2017-07-28 08:41:49 +10:00
dgarske
bc72d0c2d5 Merge pull request #1063 from JacobBarthelmeh/Testing
C89 compliance with variable declaration
2017-07-26 16:19:25 -07:00
dgarske
d5cf5f9887 Merge pull request #1062 from JacobBarthelmeh/UnitTests
update sanity checks with ARMv8 port
2017-07-26 16:18:37 -07:00
Jacob Barthelmeh
0978dd4285 C89 compliance with variable declaration 2017-07-26 15:29:00 -06:00
Jacob Barthelmeh
637ca44e6a update sanity checks with ARMv8 port 2017-07-26 11:05:20 -06:00