805 Commits

Author SHA1 Message Date
David Garske
f2115b2c2b
Merge pull request #2652 from ejohnstown/maintenance-error
Maintenance: Error Strings
2019-12-13 15:03:32 -08:00
tmael
8450c4ae39
Merge pull request #2643 from ejohnstown/maintenance-prime
Maintentance: Prime
2019-12-06 18:50:51 -08:00
John Safranek
19a4371d48
Maintenance: Error Strings
1. One of the error string was >80 bytes long. Shortened it.
2. The function that copies an error string to an output array needs to
ensure the string is still null terminated.
3. Added a check to the wolfCrypt test to see that error strings aren't
>= 80 bytes long.
2019-12-06 09:53:39 -08:00
toddouska
bd8a612d6c
Merge pull request #2624 from ejohnstown/maintenance-ASN1
Maintenance: ASN.1
2019-12-05 16:16:42 -08:00
toddouska
6d40c20f2c
Merge pull request #2609 from JacobBarthelmeh/Compatibility-Layer
Fix for EVP CipherUpdate decrypt and add test case
2019-12-05 16:12:26 -08:00
John Safranek
2c0fda4168
Maintentance: Prime
1. Revisited the option enables around the wolfCrypt prime test. Added a
check for key generation to the check for public MP.
2019-12-05 12:23:42 -08:00
John Safranek
44fc3e14b1
Maintenance: ASN.1
1. Fix some preprocessor flag checking for function EncodePolicyOID. It
also needs to be available for OpenSSL Compatibility.
2. Fix for a name string for a test that can get left in or out
incorrectly.
2019-12-04 10:26:37 -08:00
toddouska
e1ebb39296
Merge pull request #2618 from ejohnstown/maintenance-prime
Maintenance: Prime
2019-11-27 14:06:23 -08:00
toddouska
ff85cc7740
Merge pull request #2622 from SparkiDev/ber_to_der_rework
Rework BER to DER to not be recursive
2019-11-27 14:05:36 -08:00
Sean Parkinson
776f4af7f6 Rework BER to DER to not be recursive 2019-11-27 10:20:32 +10:00
John Safranek
55540c6bd3
Replace a compile option check around some filenames for certificate testing. 2019-11-25 16:13:01 -08:00
John Safranek
3432a8a1fc
Maintenance: Prime
1. Prime test should return NO for 1. (ex function, normal math and fast
math)
2. Call mp_init() on the k value for the primality test case in the
wolfCrypt test.
2019-11-22 13:02:59 -08:00
John Safranek
481da3dcc1
Maintenance: Prime
1. Added a test case for checking "1" as a prime number to the wolfCrypt
test.
2. Allow the wolfCrypt prime test for SP builds.
3. Modify the prime test to use mp_mul rather than mp_mul_d, as the SP
math library doesn't export sp_mul_d.
2019-11-22 11:39:19 -08:00
David Garske
ffb3dfd6ec Fixes for minor test.c build configuration issues. 2019-11-22 07:01:10 -08:00
Jacob Barthelmeh
1eb1755f07 add another evp decrypt test case 2019-11-20 12:29:22 -07:00
toddouska
1ba366920c
Merge pull request #2581 from SparkiDev/ecc_fixes_add
Add deterministic ECDSA sig gen. Fix corner cases for add point.
2019-11-20 09:12:28 -08:00
toddouska
5de27443d0
Merge pull request #2596 from dgarske/mqx_fio_cleanup
Support for MQX 5.0 and cleanup of the MQX includes
2019-11-19 11:49:03 -08:00
toddouska
c6dac64438
Merge pull request #2594 from ejohnstown/maintenance-BLAKE2
Maintenance BLAKE2
2019-11-18 17:05:01 -08:00
David Garske
1542482cd5 Cleanup of the MQX file headers for STDIO. Cleanup of fio.h and nio.h includes to use wc_port.h. ZD 9453. 2019-11-18 12:14:34 -08:00
David Garske
b780982aa4 Adds "devId" crypto device and "heap" context for Hash wrappers and PBKDF
* Adds new hash wrapper init `wc_HashInit_ex`.
* Adds new PBKDF2 API `wc_PBKDF2_ex`.
ZD 9494 (using PBKDF2)
2019-11-18 11:26:56 -08:00
John Safranek
14c986360d
Maintenance BLAKE2
1. Remove BLAKE2 support from HMAC.
2. Update doxy header for HMAC with removal of BLAKE2 and addition of SHA-3.
2019-11-18 10:45:30 -08:00
Sean Parkinson
cc880e39ae Add deterministic ECDSA sig gen. Fix corner cases for add point.
In verify, two points are added and they may either be the same point
(different z) or result in infinity.
If they are the same point then a double needs to be performed instead.
Detection of infinity added.
Calculation of wc_ecc_sig_size fixed to handle wehn there are more bits
in the order than in the modulus.
2019-11-14 12:49:45 +10:00
toddouska
76e7e7349b
Merge pull request #2575 from tmael/valgrind_dhtest
Fix memory leak in dh_test
2019-11-13 11:28:04 -08:00
toddouska
46bc8e092a
Merge pull request #2582 from ejohnstown/abi-current
ABI
2019-11-13 11:24:45 -08:00
John Safranek
682cf6deac
wolfSSL ABI
Hide the RNG and ecc_key allocators from FIPS mode builds.
2019-11-11 15:16:39 -08:00
Tesfa Mael
68e4014c3f memset DhKeys 2019-11-11 09:43:10 -08:00
Tesfa Mael
99ee4a407d Fix mem leak for valgrind 2019-11-08 12:09:46 -08:00
John Safranek
c69b6fb6d1
wolfSSL ABI
1. Add a blank #define WOLFSSL_ABI to tag functions as part of the ABI
to remind developers there are rules about those functions specifically.
2. Added allocators and deallocators for WC_RNG objects and ecc_key
objects so they don't have to be used on the stack.
3. Add tests for the new allocators.
2019-11-07 13:03:12 -08:00
David Garske
0fe5d40507
Merge pull request #2568 from aaronjense/iar-build-fix
Fix changed sign warning for IAR build
2019-11-06 15:47:15 -08:00
toddouska
ba34b0d09f
Merge pull request #2547 from SparkiDev/rsa_pss_salt_len
Compile options for larger salt lengths in RSA-PSS
2019-11-06 13:03:15 -08:00
Aaron Jense
ea77cd743e Fix changed sign warning for IAR build 2019-11-06 09:59:31 -08:00
Sean Parkinson
35ec2bc6d4 Compile options for larger salt lengths in RSA-PSS
Salt length larger than the hash size allowed in RSA-PSS.
Passing -2 to PSS pad function uses maximum salt length.
Passing -2 to PSS un-pad function makes it discover salt length.
2019-11-04 14:27:02 +10:00
Sean Parkinson
7623777857 Add scrypt API that takes iterations rather than cost
iterations = 1 << cost but matches APIs in other products and standard
2019-11-01 10:15:42 +10:00
David Garske
6bc16a4acb
Merge pull request #2532 from aaronjense/mp-public-defines
Fix for configure used in wolfssl-examples/signature/rsa_vfy_only.…
2019-10-29 08:46:03 -07:00
toddouska
140796d2aa
Merge pull request #2504 from ejohnstown/sync-octeon
Synchronous OCTEON Sniffer Support
2019-10-28 12:25:57 -07:00
Aaron Jense
34c37c58f4 Fixes for configure used in wolfssl-examples/signature/rsa_vfy_only and fix for wrong WOLFSSL_MP_PUBLIC defines.
./configure CFLAGS=-DWOLFSSL_PUBLIC_MP --disable-asn --disable-filesystem --enable-static --enable-shared --enable-cryptonly --enable-sp=smallrsa2048 --enable-sp-math --disable-dh --disable-ecc --disable-sha224 --enable-rsavfy
2019-10-28 09:50:59 -06:00
David Garske
b80b10b980
Merge pull request #2498 from danielinux/stm32wb55
Support for STM32_PKA accelerator
2019-10-24 15:41:08 -07:00
Daniele Lacamera
025754e774 Fixed alignment/padding for hash. ECC tests passing on target. 2019-10-24 20:32:47 +02:00
John Safranek
17f44d4d29
OCTEON Sync
1. Add attributes to the OCTEON functions so they aren't optimized.
2. Disable the same test cases for OCTEON as we do QAT in sync.
2019-10-24 10:00:20 -07:00
John Safranek
b8f4b1a712 QAT Header Hiding
For the sync QAT, the QAT headers are included into the library after it
has been built and is being used. The actual headers should only be used
when building wolfSSL and should be hidden from the user.
1. Most of the functions in the sync QAT and OCTEON headers don't need
to be exported. Move all of that into the source files. Only export the
init and deinit functions.
2. Remove inline from the OCTEON support functions.
3. Remove the AES-ECB files for sync OCTEON as unused.
4. Configure defaults to OCTEON2 build, can be overridden with variable.
2019-10-23 09:58:11 -07:00
John Safranek
1ad23334bf Sync Sniffer API Cleanup
1. Switched the IntelQa sync API back to local.
2. Added two functions to setup and cleanup the IntelQA device.
3. Changed the Octeon functions to match the IntelQa functions.
4. Updated sniffer, wolfcryptest, and benchmark.
2019-10-23 09:58:11 -07:00
John Safranek
54f0b1a44a Sync QAT Fixes
1. The QAT callback's worker functions need to copy the IV into the AES IV register. QAT doesn't update it automatically.
2. Update the GMAC test to set its device to INVALID_DEVID.
3. Always allocate NUMA buffers before running crypto operation and store the results.
4. The QAT does not like non-multiple of 4 iv lenths, and aad lengths. Or 0. Remove a few test cases for those.
5. QAT wasn't getting a pointer to store the auth tag for GCM. Then store it.
2019-10-23 09:58:11 -07:00
John Safranek
825f311959 add OCTEON and QAT to wolfCrypt test, update SHA-1 to reset ret when it will do the software sha 2019-10-23 09:58:10 -07:00
Jacob Barthelmeh
09a0859865 fix for fortress and no sha build with encrypted keys 2019-10-21 09:37:24 -06:00
David Garske
5c07391f1b Various fixes for asynchronous mode:
* Fix for AES CBC issue with IV (QAT only).
* Fix for test cases with QAT.
* Remove poorly placed debug for AES CFB.
2019-10-15 11:18:55 -07:00
Jacob Barthelmeh
d7fe000cfe M68K (coldfire MCF5441X) wolfcrypt build and examples
fix for make dist and cleanup makefile

add aes file to Makefile

macro guards and entropy warning

add AES to build
2019-10-11 14:56:34 -06:00
Sean Parkinson
901ee627fc Fixes from using cppcheck tool
Various fixes for uninitialized variable use.
sniffer.c: close file when seek fails
tls.c: fix QSH_GET_SIZE macro
wolfio.c: uIPGenerateCookie: use the parameter, _ctx, instead of self
referencing.
wolfssl_adds.c: check for equivalent to XBADFILE to indicate error.
SP: change right shift of signed value to unsigned
sp_int.h: define 128-bit types
types.h: change a XMALLOC define to not use (,,) - cppcheck doesn't like
it and is unnecessary.
2019-10-01 09:22:00 +10:00
John Safranek
b92509144b
Merge pull request #2475 from dgarske/qat_key
Fixes and improvements for async
2019-09-20 10:44:33 -07:00
Chris Conlon
33a83cdba0
Merge pull request #2436 from miyazakh/Renesas_TSIP_Port
Support renesas tsip
2019-09-19 14:44:33 -06:00
toddouska
2dbf3f81fc
Merge pull request #2474 from SparkiDev/sp_int_prime
Add support for prime checking to sp_int.c
2019-09-19 13:44:22 -07:00