dgarske
28c15bed1c
Merge pull request #1141 from SparkiDev/chacha_avx1
...
Fix ChaCha to check for AVX1
2017-09-20 09:57:20 -07:00
kaleb-himes
60dca94821
Update HASH_DRBG Reseed mechanism and add test case
2017-09-20 10:36:36 -06:00
David Garske
4d8e1c9e5a
Minor build fixes for unused function and variable.
2017-09-19 12:48:57 -07:00
David Garske
816767744f
Fix for STM32 AES-CTR (tested on STM32F437). Improvement to the STM32 RNG code to detect improper RNG_CLK. Cleanup of the PIC32MZ Aes struct variables and the AES-CTR (tested on PIC32MZ2048).
2017-09-18 16:08:09 -07:00
John Safranek
2620cb4559
OpenSSL Compatibility Additions and Fixes
...
1. Added a check on the hex2bn function for null strings to be treated like the NULL pointer.
2. Added some more test cases to the big number unit test.
3. Added wolfSSL_EVP_add_cipher() analogous to wolfSSL_EVP_add_digest().
4. Implemented `RSA_public_encrypt()` and `RSA_private_decrypt()` for the OpenSSL compatibility layer.
5. Added `RSA_PKCS1_OAEP_PADDING` as an option to the new functions.
6. Fixed the constness on the `from` parameter in function `RSA_public_decrypt()`. Note: this does not allow OAEP to be used in FIPS mode.
7. Added size constants for EVP_MAX_BLOCK_LENGTH, RSA_PKCS1_PADDING_SIZE, and RSA_PKCS1_OAEP_PADDING_SIZE.
8. Added functions `wolfSSL_EVP_PKEY_new_mac_key()` and `wolfSSL_EVP_PKEY_get0_hmac()` for storing HMAC keys in an EVP_PKEY structure for use later.
9. Added the routines EVP_DigestSignXXX(). They only work w.r.t HMAC.
10. Added the ForceZero() to EVP_MD_CTX_cleanup().
11. Modified the EVP_MD_CTX structure to have a union with both the hasher and a wolfCrypt Hmac structure.
12. Added a mapping of SHA1->SHA to the list of digest name aliases in wolfSSL_EVP_get_digestbyname().
13. Changed the mapping of ssl3-sha1->SHA.
14. When using RSA blinding, the OpenSSL compatibility layer RSA object was attempting to decrypt without an RNG. Added an RNG if needed.
15. Add comment to wolfSSL_BN_hex2bn() to cover usage w.r.t. string length. Remember to keep the length even, front-pad with zeroes if needed.
16. Added tests for the new functions.
2017-09-18 13:53:44 -07:00
David Garske
a9e540fc07
Moved the bench_ buffer allocation/free into the thread, so the THREAD_LS has a unique one for each which resolves issues with benchmark when using the USE_QAE_THREAD_LS
option.
2017-09-15 14:02:06 -07:00
dgarske
23903ec903
Merge pull request #1144 from kaleb-himes/FIPS-TEST
...
NULL plaintext input is supported in FIPS testing
2017-09-15 13:21:32 -07:00
David Garske
3f16fba4f8
Fix build warning with possible use of unitialized ret
.
2017-09-15 10:41:43 -07:00
David Garske
27d607efa3
Fixes for AES on STM32 with StdPeriLib and fix for building with NO_STM32_CYPTO
. Researching better solution for AES-CTR
.
2017-09-15 10:39:09 -07:00
David Garske
dcab2f47ee
Fixes for STM32 hardware acceleration. Adds CubeMX HAL hashing support for MD5, SHA1, SHA224 and SHA256. Adds support for STM32F7 (WOLFSSL_STM32F7
). Fixes issue with AES-GCM and STM32F2. Cleanup of the STM32 macros (adds NO_STM32_HASH
, NO_STM32_CRYPTO
and NO_STM32_RNG
to optionally disable hardware acceleration).
2017-09-15 10:39:09 -07:00
kaleb-himes
63e8d63943
Update following review
2017-09-15 10:52:33 -06:00
kaleb-himes
1f7d73f626
NULL plaintext input is supported in FIPS testing
2017-09-14 20:14:21 -06:00
Jacob Barthelmeh
f97f9a6158
init hardware acc. use of public RSA key with public key decode functions
2017-09-14 17:07:19 -06:00
Jacob Barthelmeh
e10b2f027f
fix for clang warning on RsaKey redefinition
2017-09-14 15:08:15 -06:00
Jacob Barthelmeh
1b3a8f40b8
account for 8k keys with MySQL compatibility
2017-09-14 09:37:32 -06:00
Sean Parkinson
7721aca114
Fix ChaCha to check for AVX1
2017-09-14 09:07:04 +10:00
toddouska
23fff62d8b
Merge pull request #1135 from dgarske/cy
...
Fix issue with empty array (requires C99 compliance).
2017-09-13 14:39:50 -07:00
toddouska
4c31c53f37
Merge pull request #1128 from JacobBarthelmeh/AES
...
AES XTS feature addition
2017-09-13 14:38:15 -07:00
Jacob Barthelmeh
398252ddad
add XtsAes structure and change XTS-AES API
2017-09-08 16:00:33 -06:00
David Garske
2c39219f2a
Fix issue with empty array (requires C99 compliance).
2017-09-08 11:24:55 -07:00
Kaleb Himes
c018a1abf3
Merge pull request #1130 from SparkiDev/cpuid_fix
...
MSVC fix around cpuid check
2017-09-08 11:04:50 -06:00
Jacob Barthelmeh
c482524b78
big endian testing and packing Aes struct
2017-09-01 15:32:55 -06:00
Sean Parkinson
6a226efd15
MSVC fix around cpuid check
2017-09-01 08:43:28 +10:00
Kaleb Himes
3da5ddd49e
Merge pull request #1123 from SparkiDev/poly1305_fix
...
Fix for the AVX implemetation of Poly1305
2017-08-31 10:21:00 -06:00
Jacob Barthelmeh
ef73c1df7c
add AES-XTS mode --enable-xts
2017-08-30 17:50:15 -06:00
Sean Parkinson
3b351fd640
Fix to stop inlining of assembly code with fixed label
2017-08-30 10:51:44 +10:00
Jacob Barthelmeh
3dbe5d2af9
fixes for Windows build
2017-08-29 12:02:24 -06:00
Sean Parkinson
e6cf3c88f2
Fix for the AVX implemetation of Poly1305
...
Need one more multiple of r (0..6 instead of 0..5)
2017-08-28 11:44:27 +10:00
Jacob Barthelmeh
a308a56044
fix creating shared secret with ECC private only key
2017-08-25 09:07:03 -06:00
toddouska
2d5194cdf0
Merge pull request #1113 from JacobBarthelmeh/Testing
...
add function to generate public ECC key from private key
2017-08-24 10:40:27 -07:00
Jacob Barthelmeh
b10e0b789b
fix error return value when unable to extract ECC public key
2017-08-23 14:45:08 -06:00
Chris Conlon
73b8be8fcc
Merge pull request #1039 from jrblixt/unitTest_api_addDsa-PR07192017
...
Add Dsa unit test functions.
2017-08-22 15:46:46 -06:00
David Garske
7c604bfc48
Fixes for building with WOLFSSL_ATECC508A
.
2017-08-22 13:11:20 -07:00
Jacob Barthelmeh
c25832ad14
type cast the return of fread
2017-08-22 14:06:25 -06:00
Jacob Barthelmeh
71f4d546a8
add function to generate public ECC key from private key
2017-08-22 14:06:25 -06:00
toddouska
fbae4420ad
Merge pull request #1110 from dgarske/pic32mz_largehash
...
Fixes for PIC32MZ to support large hashing using hardware
2017-08-22 09:24:05 -07:00
Chris Conlon
439e803bd1
Merge pull request #1107 from JacobBarthelmeh/UnitTests
...
build option for certificate buffers with PKCS7 test
2017-08-22 10:05:36 -06:00
David Garske
07d137480d
Fix to PIC32MZ handling of hashing empty string. Changed default MPLABX/MCAPI user_settings.h to use 2048-bit. All tests passed!
2017-08-21 15:19:18 -07:00
David Garske
075adcb15b
Add wolfCrypt hash tests for empty string. Add large hash test for SHA2 384/512 and SHA3. Cleanup hashing error handling to call free. RSA spelling fixes. RSA error detail for bad padding.
2017-08-21 14:03:48 -07:00
David Garske
5a27e2f621
Fix so PIC32MZ works in caching mode after large hash. Reduced default block size for large hash to 256 (512 bytes total).
2017-08-21 11:10:16 -07:00
toddouska
8a37af42bf
Merge pull request #1108 from dgarske/fix_async_misc
...
Fixes for async ECC encrypt, ParseCertRelative and API Unit test inits
2017-08-18 11:44:28 -07:00
David Garske
74ed94ddb1
Fixes to support large hashing against HW without caching (in exclusive hardware access) Large hashing uses previous hash code with two descriptors and polling. Added wolfCrypt large hash tests for MD5, SHA and SHA256. Add missing MCAPI set size API's. Cleanup AES GCM large test. Changed MPLABX projects to default to PIC32MZ2048EFM144.
2017-08-18 11:25:30 -07:00
Jacob Barthelmeh
7460aaf5ea
build option for certificate buffers with PKCS7 test
2017-08-18 11:07:40 -06:00
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