Commit Graph

751 Commits

Author SHA1 Message Date
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