Commit Graph

807 Commits (45d55c8f38b9e3a68fe7b2221b51bb5c060dfb4d)

Author SHA1 Message Date
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
David Garske 6aecdf59c1 Fixes for async build and tests. 2019-09-19 12:30:05 -07:00
Hideki Miyazaki 5c6f6fdb7d Renesas TSIP Support
merged from private repo

removed unneccessary #include
make line as 80 characters
added simple tls server
Disable TLS-linked API use when being SERVER SIDE, still use certificate verify API
Added utility tools, generate signature arrays etc
added vars to store tsip hmac keys
fix build failure when disabling dc_printf
2019-09-19 11:18:52 +09:00
Sean Parkinson 0bc16d47e2 Add support for prime checking to sp_int.c
This allows SP to support:
- DH parameter checking
- DH parameter generation
- RSA key generation
Improved performance of sp_mod operation.
Reworked some functions to have one exit point (return statement).
Fixed sp_sub_d().
Changed tests to perform 2048-bit RSA key generation only when using SP
math.

Fixed Intel x86_64 C file to not have DH specific functions available
unless WOLFSSL_HAVE_SP_DH is defined.
Fixed tfm to return an error when t is not the correct size in
fp_isprime_ex().
2019-09-19 09:08:15 +10:00
Hideki Miyazaki 82d531562c Fixed build warnings due to esp-idf update
Fixed server application TLS communicatio failure
2019-09-09 08:25:02 +09:00
toddouska b19e785c2c
Merge pull request #2418 from dgarske/sha3_keccak256
Added support for older KECCAK256
2019-09-03 15:42:05 -07:00
toddouska 492ce6ac91
Merge pull request #2414 from dgarske/pkcs8_asn1
Added support for loading a PKCS8 ASN.1 formatted private key
2019-09-03 15:36:31 -07:00
John Safranek 2ba6c66d44 Fix ECC key load test
When using the configure options '--enable-certgen --enable-certext CPPFLAGS=-DWOLFSSL_VALIDATE_ECC_IMPORT', the ecc_decode_test() will fail the "good" test case. It is using the point (1, 1) in the test, and that fails the key validation. Changed the good key to one of the keys we have in the certs directory. The additional validation checks that the point is on the curve, and is validated in FIPS mode.
2019-08-22 14:18:59 -07:00
David Garske 154930d128 Added support for older KECCAK256 used by Ethereum. Uses existing hash flag API's.
To use add build flag `CFLAGS="-DWOLFSSL_HASH_FLAGS"`.

Example:

```c
wc_Sha3_SetFlags(&sha, WC_HASH_SHA3_KECCAK256);
```
2019-08-20 16:14:37 -07:00
David Garske 24bfea1ad2 Fixes for various build options (!NO_RSA, HAVE_ECC, NO_PKCS8, NO_PKCS12). Added new `NO_CHECK_PRIVATE_KEY` to allow reduce code size when not required. 2019-08-20 10:38:08 -07:00
David Garske 3e1c103c78 Added support for loading a PKCS8 ASN.1 formatted private key (not encrypted). 2019-08-16 16:09:00 -07:00
Sean Parkinson 2a22179068 Specialized mod exponentiation for base 2 in tfm.c and integer.c 2019-08-02 15:50:08 +10:00
toddouska 4f0fd2c2f9
Merge pull request #2302 from SparkiDev/ecc_pubkey_check
Add checks of public key for ECC and curve25519
2019-08-01 11:50:02 -07:00
toddouska d4ab1c7e86
Merge pull request #2383 from SparkiDev/sp_dh_2
Special implementation of mod exp when base is 2 in SP
2019-07-30 16:02:38 -07:00
David Garske e3653a7a07 Various spelling corrections. 2019-07-29 08:14:07 -07:00
Sean Parkinson 23af4e92f3 Special implementation of mod exp when base is 2 in SP 2019-07-29 12:58:07 +10:00
Sean Parkinson 4778dac49f Add checks of public key for ECC and curve25519 2019-07-29 10:42:44 +10:00
toddouska 7ca9b23b76
Merge pull request #2361 from dgarske/bench_vs
Fixes for wolfCrypt benchmark and test Visual Studio projects
2019-07-22 11:29:33 -07:00
David Garske aed1e433b2 Updates to benchmark/test Visual Studio projects to properly reference x64. Added missing files to VS projects. Example settings for enabling SP and AESNI in Visual Studio in IDE/WIN/user_settings.h. 2019-07-19 13:08:13 -07:00
David Garske 0bcae86038 Fixes for wolfCrypt benchmark and test Visual Studio projects. Fixes for benchmark.c compile errors in bench_hmac with Visual Studio. Added README.md files for benchmark and test. 2019-07-18 11:39:59 -07:00
Jacob Barthelmeh 7e79e3a6bf fix for build with disable filesystem 2019-07-17 16:28:58 -06:00
Jacob Barthelmeh f63656f18b macro guard on test case with disable AES 2019-07-17 15:22:29 -06:00
Chris Conlon 2e308ea82c
Merge pull request #2260 from JacobBarthelmeh/PKCS7
PKSC7 firmware revision + callback / get SID
2019-07-16 10:51:38 -06:00
Jacob Barthelmeh a25d04044a save rid for kari callback 2019-07-15 12:32:19 -06:00
Jacob Barthelmeh d7a86de969 add wrap CEK callback, test, and adjustment for fwWrappedFirmwareKey 2019-07-15 12:32:19 -06:00
Jacob Barthelmeh 84653a7fb5 improvements on test code 2019-07-15 12:32:19 -06:00
Jacob Barthelmeh a7a51d8f33 scan-build warnings / fixes 2019-07-15 12:32:19 -06:00
Jacob Barthelmeh ab0029f9ac add setter function for ctx and pkcs7 callback, add test cases 2019-07-15 12:32:19 -06:00
Jacob Barthelmeh 051112a101 adjust time.h for port due to tm struct change 2019-07-12 13:55:04 -06:00
kaleb-himes d7b50874f6 Fix leak in dh_test 2019-07-10 13:28:00 -06:00
toddouska d824b78af0
Merge pull request #2323 from dgarske/various_fixes
Various fixes, improvements to build options for reduced code size and static benchmarks
2019-07-08 13:02:22 -07:00
David Garske 011fa6bafd Added PBKDF2 benchmark. Benchmark improvements to capture results in static buffer (helps benchmarking on systems without printf support). Added benchmark "-print" option to show summary. Added wolfCrypt test version header. 2019-07-05 11:29:14 -07:00
David Garske d5f3fa2ff8 Added DES3 Crypto callback support. 2019-07-02 10:15:53 -07:00
Sean Parkinson ee023c6bf4 Simple checks of DH public value from peer.
Add test for wc_DhCheckPubValue
2019-06-25 11:12:33 +10:00
toddouska 15552be934
Merge pull request #2280 from cconlon/selftestccm
CAVP self test build fixes for AES-CCM and PKCS7
2019-06-24 15:55:18 -07:00
Sean Parkinson 71cb117dda Better length checks when parsing ASN.1 certificates 2019-06-19 10:05:21 +10:00
Chris Conlon c2032c64d2 CAVP self test build fixes for AES-CCM and PKCS7 2019-06-18 08:29:49 -07:00
Sean Parkinson a4bdfbf953 Fix for small stack in test.c 2019-06-14 08:43:36 +10:00
Sean Parkinson 102ecac70c
Merge pull request #2237 from julek-wolfssl/proper-arm-chacha-poly1305
ARM Chacha20 assembly code
2019-06-12 22:21:47 +10:00
John Safranek 01ad44feef
Merge pull request #2276 from kaleb-himes/BOTH_FIPS_VERSION_TESTING
Adjustment to test.c for merge of WCv4.0.1 changes
2019-06-11 13:21:42 -07:00
David Garske 24042c973a
Merge pull request #2259 from tmael/port_SiFive_RISCV
Added support for RISC-V SiFive HiFive Freedom platforms
2019-06-10 20:38:43 -07:00
toddouska 1f0a46331b
Merge pull request #2270 from dgarske/stsafe_tls
STSAFE Improvements to support Crypto Callbacks
2019-06-10 13:34:20 -07:00
Juliusz Sosinowicz a48981c3c6 Chacha20 ARM optimization 2019-06-10 19:21:46 +02:00
kaleb-himes c5aa13021a Adjustment to test.c for merge of WCv4.0.1 changes 2019-06-07 16:09:35 -06:00
toddouska 02c2782e39
Merge pull request #2272 from JacobBarthelmeh/SanityChecks
remove store of last block w/o padding and adjust padding last block case
2019-06-07 10:29:29 -07:00
Jacob Barthelmeh 87d24f4488 add additional test case for evp 2019-06-06 16:14:00 +07:00
Hideki Miyazaki 64b8af728b skip mutex lock after free 2019-06-06 11:06:29 +09:00
David Garske 074e770c98 * Fix to ensure user_settings.h can be included for bio.c and evp.c when IDE or compiler tries to build it directly. Allows for wildcard .c include along with `WOLFSSL_IGNORE_FILE_WARN`.
* Fix for building SP cortex M without RSA.
* Fix for type-cast warning with STSAFE-A100.
* Improved the RNG seed test to prevent type-case warning.
2019-06-04 15:57:31 -07:00
toddouska 7624d90590
Merge pull request #2258 from dgarske/no_stdlib
Improvements for no standard lib and no malloc/free builds
2019-05-31 14:59:33 -07:00
Tesfa Mael 87fb9f73e9 Added RISC-V SiFive FE310 support
Added freedom-e-sdk based makefile
Updated ecc test code to not allocate more memory than requried
Run wolfcrypt and benchmark tests on the SiFive HiFive1 targets
2019-05-28 17:48:36 -07:00
David Garske 5ea13a09f6 Adds Blake2s support (--enable-blake2s), which provides 32-bit Blake2 support. 2019-05-28 10:30:19 -07:00
David Garske f26a9589ff Added support for printf override using XPRINTF for wolfCrypt test/benchmark. Added ability to override snprintf with XSNPRINTF. If `STRING_USER` is defined no standard lib `<string.h>` or `<stdio.h>` will be included. 2019-05-23 22:03:38 -06:00
David Garske a89a2839de Fixes for building with `WOLFSSL_NO_MALLOC`. Fixes for static memory in bench embedded case. Added support for elimination of XMALLOC/XFREE when building with `NO_WOLFSSL_MEMORY` and `WOLFSSL_NO_MALLOC`. If used with `WOLFSSL_MALLOC_CHECK` will trap failures with `malloc_check` 2019-05-23 22:00:41 -06:00
David Garske 10dde24363 Added support for `SHOW_CERTS` with `OPENSSL_EXTRA_X509_SMALL` for embedded debugging of certs. Minor build warning fixes with `OPENSSL_EXTRA` and `STM32_HASH` on IAR. 2019-05-14 09:24:59 -07:00
Sean Parkinson dc98832757 Add more tests for Ed25519ctx and Ed25519ph 2019-05-01 09:24:08 +10:00
Sean Parkinson 9d736898cc Support Ed25519 sign/verify algorithms ctx and ph 2019-04-30 16:57:20 +10:00
toddouska 12a7c32530
Merge pull request #2170 from tmael/nRF52840CryptoCell
Initial CryptoCell-310 support on nRF52840
2019-04-24 11:09:46 -07:00
Jacob Barthelmeh 2a6ab9549b add macro guards 2019-04-23 13:51:58 -06:00
David Garske 6c65550eab Added CryptoCell-310 support
- SHA-256
- AES CBC
- CryptoCell 310 RNG
- RSA sign/verify and RSA key gen
- RSA encrypt/decrypt, decrypt inline
- ECC sign/verify/shared secret
- ECC key import/export and key gen pairs
- Hardware RNG and RTC of nRF52840 for benchmark timing source
- readme doc
2019-04-23 10:04:41 -07:00
David Garske 2c5f268f16 Port for Telit IoT AppZone SDK
* Added new `WOLFSSL_TELIT_M2MB` build option to enable support for RNG, Time, Mutex, FileSystem and Directory.
* Added `XTIME_MS` macro to simplify the tls13.c layer time requirement.
* Cleanup of the wolfCrypt benchmark and test printf remapping.
* Added wolfCrypt optional memory test enabled with `COMPLEX_MEM_TEST`.
* Added wolfCrypt test / benchmark feature for allowing "sleep" between long operations using `TEST_SLEEP()`.
* Fix for extern with `sp_ModExp_2048` when building with `--cpp` option.
2019-04-08 06:43:25 -07:00
Sean Parkinson cc5ba81245 SHA-3 support in Hash 2019-04-05 14:52:23 +10:00
David Garske 26cbfcdee0 Fix for AES GCM decrypt test with Async. 2019-04-01 05:58:44 -07:00
David Garske 1906179a1b Fix for `HAVE_ECC_CDH` wolfCrypt test with async using the wrong size for x and y. With async the `sizeof(sharedA) == 8` and it should be `ECC_SHARED_SIZE`. 2019-03-28 18:48:32 -07:00
Sean Parkinson b40e0888ad Fixes for different build configurations 2019-03-26 08:06:19 +10:00
Sean Parkinson b24e122a0d Fixes for RSA verify only builds 2019-03-26 08:06:19 +10:00
John Safranek 22b2ae7358 Release Fixes
1. Fix for the enable-afalg option from Jacob Barthelmeh.
2. Client fix for enable-sp+enable-sp-math option from David Garske.
3. Added a couple of typecasts to some mallocs.
4. Modified the option guard for the mask member of Options for the webserver build.
5. Added some more padding to the opaque structures used for SHA_CTX and AES_KEY.
6. Added WOLFSSL_API to the stack logging functions.
2019-03-19 13:55:17 -07:00
John Safranek 246c444b93 Updates for v4.0.0
Update the copyright dates on all the source files to the current year.
2019-03-15 10:37:36 -07:00
John Safranek 27ea9d9bce Configure Fixes
1. The combination enable-all and disable-rsa breaks some of the
testing. Added the NO_RSA guards as appropriate.
2. Disabled the OCSP stapling and CRL tests when RSA is disabled as they
use test certificates with RSA keys.
2019-03-13 17:54:33 -07:00
toddouska 696fe47de2
Merge pull request #2125 from embhorn/zd4297
Decoded cert cache feature
2019-03-12 14:02:47 -07:00
Eric Blankenhorn 2b59aefe80 Update from review 2019-03-11 18:14:37 -05:00
Eric Blankenhorn 8b6bd306f3 Update from review 2019-03-11 18:03:29 -05:00
toddouska 436a46a9f4
Merge pull request #2131 from dgarske/qat_v3.15.8
Fix for async wolfCrypt test with AES GCM.
2019-03-11 15:50:57 -07:00
toddouska c0ee01bbf6
Merge pull request #2123 from dgarske/stm32_gcm
Fixes for STM32 AES GCM
2019-03-11 12:53:27 -07:00
Kaleb Himes 1dcd6b92a0 Fix leak in wolfcrypt test app detected w/ WC_RSA_NO_PADDING set (#2145)
Fix leak in wolfCrypt test with `WC_RSA_NO_PADDING`
2019-03-08 14:13:38 -08:00
Chris Conlon da27a4da10
Merge pull request #2119 from jrblixt/feature-WICED-Studio-v6_1-PR02262019
Feature wiced studio v6 1 pr02262019
2019-03-04 17:45:42 +01:00
David Garske e87433e2b6 Fix for async wolfCrypt test with AES GCM. 2019-03-01 09:56:38 -08:00
Eric Blankenhorn e8c3e8dd63 Decoded cert cache feature 2019-02-28 16:59:19 -06:00
toddouska 8f3f27065c
Merge pull request #2114 from dgarske/qat_bench
Fixes and improvements for async / QuickAssist
2019-02-27 14:49:32 -08:00
toddouska b830447690
Merge pull request #2113 from JacobBarthelmeh/Testing
EVP decrypt with padding fix
2019-02-27 14:35:57 -08:00
David Garske 164eb30732 Fixes for STM32 AES GCM. Hardware does not correctly compute authTag if input is not a multiple of block size, so fall-back to software for tag only. Hardware also only supports IV of 12 or 16 bytes, so fall-back to software in those cases. ZD 4712 2019-02-27 11:07:03 -08:00
Jacob Barthelmeh b33023df2f fix setting outlen with wolfSSL_EVP_CipherUpdate decryption 2019-02-26 15:27:25 -07:00
jrblixt 8a47af0edc Added benchmark tests to WICED wolfcrypt test app.
Updated the user_settings.h loc per David.
TLS13; SNI; MAX_FRAG
Configure for wolfCrypt bench.
Update README.
2019-02-26 10:37:58 -07:00
Kiwamu Okabe 95658be0ce WICED wolfCrypt-TLS_cli_srv-Https_cli 2019-02-26 10:37:48 -07:00
David Garske 9a129e89c1 Fixes for building with no filesystem and `--enable-testcert` or `WOLFSSL_TEST_CERT`. Fixes nightly expected configurations test. 2019-02-26 09:36:31 -08:00
David Garske b45241f6f8 Fix to use QAT for ECC sign and verify when SP is enabled and key was initialized with devId. Fixes issues with wolfCrypt test and QAT not properly calling "again" for the ECC sign, verify and shared secret. 2019-02-25 14:51:15 -08:00
David Garske 9ff976a6e1 Fixes for wolfCrypt test with asynchronous support enabled and `--enable-nginx`. 2019-02-22 13:47:34 -08:00
Jacob Barthelmeh 8b0bcdaf29 EVP decrypt with padding fix 2019-02-22 10:05:15 -07:00
David Garske 289f51a77d Fixes for various spelling errors. 2019-02-21 13:29:44 -08:00
Sean Parkinson 5e1eee091a Add threaded samples using buffers and sockets 2019-02-19 11:47:45 +10:00
Sean Parkinson 3366acc9ce Zephyr port of crypto 2019-02-19 11:47:44 +10:00
David Garske eb8a2f3a03 Minor fixes to CryptoCb wolfCrypt test for AES test and hash support for update/final in same callback. 2019-02-12 16:03:10 -08:00
David Garske 88d3abb1e6 Added Crypto callback HMAC support. 2019-02-12 16:03:10 -08:00
Sean Parkinson 47922a4d87 Support in SSL for setting a private key id
Works with PKCS #11 to use key on device.
2019-02-11 10:38:38 +10:00
toddouska 4a5652f318
Merge pull request #2061 from SparkiDev/x86_asm_not_in_c
Pull out x86_64 ASM into separate files
2019-02-01 10:01:34 -08:00
toddouska 1258467b0a
Merge pull request #2054 from SparkiDev/pkcs11_rng
Add support for random and getting entropy (seed) with PKCS#11
2019-02-01 09:59:12 -08:00
toddouska 4a177a8a30
Merge pull request #1997 from tmael/portingDeos
Initial Deos RTOS port
2019-02-01 09:56:55 -08:00
Sean Parkinson 7822cef1ac Pull out x86_64 ASM into separate files 2019-01-29 13:08:24 +10:00
Sean Parkinson 743f8b576f Add support for random and getting entropy (seed) with PKCS#11
Getting the seed from a device has been added.
If the HASH_DRBG is available, PKCS#11 will be used for generating the
seed.
Otherwise, all generated random data will come from PKCS#11 device.
2019-01-25 08:01:30 +10:00
Jacob Barthelmeh 253915866d make build more modular 2019-01-18 16:25:24 -07:00