Commit Graph

1857 Commits (devin/1739920896-esp32-fixes)

Author SHA1 Message Date
toddouska 8b637cbd1b Merge pull request #967 from dgarske/fix_qat
Fixes and Improvements for Intel QuickAssist
2017-06-20 14:49:56 -07:00
jrblixt 6a2824f199 Add Camellia unit test functions.. 2017-06-16 16:27:03 -06:00
jrblixt 25ce52cd0c Add IDEA unit test functions. 2017-06-14 23:43:00 -06:00
David Garske 131ccf289f Disable large alloc scrypt test. Fix unused `ret` warning in DH key gen from prev change. 2017-06-14 15:11:43 -07:00
Sean Parkinson 89e6ac91bf Improve PSK timeout checks
Post-handshake Authentication

Fix KeyUpdate to derive keys properly

Fix supported curves (not checking ctx extensions)
2017-06-14 11:28:53 -07:00
toddouska 7cc455259e Merge pull request #941 from SparkiDev/ed25519
ED25519 with certificates and TLS
2017-06-12 10:47:21 -07:00
kaleb-himes 86809cca74 Fix compile time warning with openssl extra and cryptonly 2017-06-08 20:14:15 -06:00
Sean Parkinson 1bc862ae24 Ed25519 testing in test.c 2017-06-08 09:26:49 +10:00
toddouska 320ad56139 Merge pull request #939 from dgarske/fixes_async
Fixes for build with async
2017-05-26 17:04:57 -07:00
Sean Parkinson 4134073c8d Initial revision of SHA-3 2017-05-25 09:09:50 +10:00
Chris Conlon 60c51db831 Merge pull request #928 from jrblixt/unitTest_api_sha224-RipeMd
Add sha224 RipeMd to unit test
2017-05-24 09:00:35 -06:00
David Garske 64de29f277 Fix for wolfCrypt test with enable-all and asynccrypt. 2017-05-23 15:23:58 -07:00
David Garske 1880677232 Disable wc_scrypt tests that use high memory for BENCH_EMBEDDED. 2017-05-23 14:42:19 -07:00
David Garske a616513860 Added support for AES GCM with STM32F2/STM32F4 using Standard Peripheral Library and CubeMX. Added AES ECB Decrypt for Standard Peripheral Library. Fixes for wolfCrypt test with STM32 crypto hardware for unsupported tests (AES CTR plus 9 and AES GCM with IV != 12). Improve AES CBC for STM32 to handle block aligned only. Added IDE example for SystemWorkbench for STM32 (Open STM32 tools) IDE. 2017-05-19 11:15:46 -07:00
toddouska 7f01aa917a Merge pull request #930 from dgarske/fix_win
Fixes for building AES key wrap and PKCS7 on Windows
2017-05-19 08:16:21 -07:00
David Garske d61e0243a3 Fixes for building AES key wrap and PKCS7 on Windows. Cleanup snprintf to use XSNPRINTF and changed so define is always setup. 2017-05-18 14:44:19 -07:00
jrblixt 77ac61c0f4 Prepare for PR Add Sha224 and RipeMd to unit test. 2017-05-18 13:08:25 -06:00
David Garske 4edcbc79c1 RipeMd and Sha224 added to unit test. 2017-05-18 09:32:11 -06:00
Jacob Barthelmeh 548c01ce54 updated static memory feature with pkcs7 2017-05-18 09:31:09 -06:00
Jacob Barthelmeh 66e086a0bf check return value of test case 2017-05-12 16:40:37 -06:00
David Garske c0c98c8f64 Fixes to address build warnings for GCC 7. Used `-Wimplicit-fallthrough=0` to suppress all switch fall-through warnings. 2017-05-11 15:12:16 -07:00
toddouska 5c652e398f Merge pull request #896 from dgarske/async_cleanups
Fixes for async and smallstack
2017-05-11 13:05:25 -07:00
David Garske 2e016f3b25 Refactor of the rsa_test and dh_test to better handle cleanup. 2017-05-08 12:30:54 -07:00
David Garske 17587d38f8 Fix for new AES 192/256 tests to handle async wait. 2017-05-06 00:28:01 -04:00
David Garske fdb46ac24c Fix typo with blake2b_test return code. 2017-05-05 11:11:17 -07:00
David Garske 0ca2d7c137 Renumbered return values. 2017-05-04 14:53:39 -07:00
Jacob Barthelmeh dbb67d8582 warnings for builds of haproxy, nginx, and leanpsk 2017-05-02 14:29:53 -06:00
Chris Conlon 8d032081ae Merge pull request #767 from shihrer/hexiwear_pr
Hexiwear changes and KDS Project for Hexiwear platform
2017-05-02 07:31:41 -06:00
toddouska 1a0b408658 Merge pull request #883 from dgarske/fixes_coverity
Fixes for coverity scan
2017-05-01 16:30:04 -07:00
David Garske db63fe83d4 Initial pass at fixes for coverity scan. 2017-04-28 14:59:45 -07:00
David Garske 053594eb98 Workaround for expected failed RSA operations in test.c not failing for Cavium Nitrox V. 2017-04-27 14:21:38 -07:00
David Garske d612b827b7 Fixes for build warnings on Windows. Fix PKCS7 to use const for byte array declaration. Cleanup of the pkcs7 MAX_PKCS7_DIGEST_SZ. Fix for unsigned / signed comparison warning for pkcs7_load_certs_keys in test.c. Fix for cast warning from word16 to byte in asn.c. Fix for build error with io.h refactor for InTime RTOS. 2017-04-26 09:40:33 -07:00
David Garske 5a77eaa579 Fix issue with XFREE in asn.c using invalid heap pointer. Fix issue with bad variable names and missing asterisk in test.c `pkcs7_load_certs_keys`. 2017-04-26 08:45:05 -07:00
Nickolas Lapp a8eb2614f6 Update reference for aes192/256 test to remove bad url and give specific
NIST reference document.
2017-04-19 13:13:34 -06:00
Nickolas Lapp 344c0ec747 Merge branch 'master' of github.com:wolfSSL/wolfssl 2017-04-19 10:10:23 -06:00
toddouska 5b82c2f6ec Merge pull request #853 from JacobBarthelmeh/Windows
testsuite time check on Windows system and fix dh_test if statement
2017-04-18 14:57:53 -07:00
Chris Conlon bab3fd5925 fix clang/scan-build warnings for PKCS7 2017-04-17 14:23:37 -06:00
Chris Conlon 4f26e0341b allow different hashes with PKCS7 SignedData, cleanup conditional builds 2017-04-17 09:46:26 -06:00
Michael b08e5f3b82 Merge branch 'master' into hexiwear_pr 2017-04-14 12:03:42 -06:00
Jacob Barthelmeh 53eca92cc0 change type for test instead and add RSA blinding check 2017-04-14 12:02:49 -06:00
Michael Shihrer 21d2becd6b Modified settings.h to allow building on KSDK 1.3, modified test.c and benchmark.c to work with KSDK, added KDS project for building wolfSSL for Hexiwear 2017-04-14 12:02:28 -06:00
Chris Conlon 74aafb1679 add PKCS7 SignedData with ECDSA 2017-04-14 09:29:22 -06:00
Nickolas Lapp 460197a5e0 Add aes192 and aes256 tests
Fix bug with AES decrypt for non-128 bit sizes on STM32F4 hardware
crypto
2017-04-12 20:09:47 -06:00
Jacob Barthelmeh 26c8958d1e testsuite time check on Windows system and fix dh_test if statement 2017-04-12 15:56:45 -06:00
toddouska e1a53a6c36 Merge pull request #845 from SparkiDev/cert_file
Rename caCertFile
2017-04-12 13:55:56 -07:00
David Garske 11133e578d Fixes and cleanups based on feedback from Sean. Added ifdef checks around WC_PENDING_E code to reduce code size for non-async builds. Cleanup accumulative result code checking in SSL_hmac. Cleanup of the RSA async state advancement. 2017-04-12 10:07:38 -07:00
David Garske c1640e8a3d Intel QuickAssist (QAT) support and async enhancements/fixes:
* Adds ./configure "--with-intelqa=../QAT1.6”, port files, memory management and README.md (see wolfcrypt/src/port/intel/).
* Added Intel QAT support for RSA public/private (CRT/non-CRT), AES CBC/GCM, ECDH/ECDSA, DH, DES3, SHA, SHA224, SHA256, SHA384, SHA512, MD5 and HMAC.
* wolfSSL async enabled all client and server: PKI, Encrypt/Decrypt, Hashing/HMAC and Certificate Sign/Verify.
* wolfSSL async support in functions: Encrypt, Decrypt, VerifyMAC, BuildMessage, ConfirmSignature, DoCertificate, ParseCertRelative, and MakeSignature.
* wolfCrypt test and benchmark async support added for all HW acceleration.
* wolfCrypt benchmark multi-threading support.
* Added QuickAssist memory overrides for XMALLOC, XFREE and XREALLOC. XREALLOC determines if existing pointer needs reallocated for NUMA.
* Refactor to make sure “heap” is available for async dev init.
* Added async support for all examples for connect, accept, read and write.
* Added new WC_BIGINT (in wolfmath.c) for async hardware support.
* Added async simulator tests for DES3 CBC, AES CBC/GCM.
* Added QAT standalone build for unit testing.
* Added int return code to SHA and MD5 functions.
* Refactor of the async stack variable handling, so async operations have generic args buffer area and cleanup function pointer.
* Combined duplicate code for async push/pop handling.
* Refactor internal.c to add AllocKey / FreeKey.
* Refactor of hash init/free in TLS to use InitHashes and FreeHashes.
* Refactor of the async event->context to use WOLF_EVENT_TYPE_ASYNC_WOLFSSL for WOLFSSL* and WOLF_EVENT_TYPE_ASYNC_WOLFCRYPT for WC_ASYNC_DEV*.
* Suppress error message for WC_PENDING_E.
* Implemented "wolfSSL_EVP_MD_CTX_init" to do memset.
* Cleanup of the openssl compat CTX sizes when async is enabled.
* Cleanup of AES, DES3, DH, SHA, MD5, DES3, DH, HMAC, MD5 for consistency and readability.
* Cleanup of the OPAQUE_LEN.
* Cleanup to use ENCRYPT_LEN instead of sizeof(ssl->arrays.preMasterSecret).
* Changed ssl->arrays.preMasterSecret to use XMALLOC (accelerates HW operations)
* Reduce verbosity with debug enabled for "GetMyVersion", "wolfSSL Using RSA OAEP padding" and "wolfSSL Using RSA PKCSV15 padding".
* Updated RSA un-padding error message so its different than one above it for better debugging.
* Added QAT async enables for each algorithm.
* Refactor of the async init to use _ex.
* Added WC_ASYNC_THRESH_NONE to allow bypass of the async thresholds for testing.
* Reformatted the benchmark results:
PKI: "RSA 2048 private HW 18522 ops took 1.003 sec, avg 0.054 ms, 18467.763 ops/sec"
Crypto/Hashing: SHA-256 SW 350 megs took 1.009 seconds, 346.946 MB/s Cycles per byte = 9.87
* Added min execution time for all benchmarks.
* Moved wc_*GetHash and wc_*RestorePos to appropriate files so use of isCopy flag is local.
* Fix for ECC sign status sometimes being invalid due to uninitialized ECC digest in benchmark.
* Added new DECLARE_VAR/FREE_VAR and DECLARE_ARRAY/FREE_ARRAY macros for helping setup test/benchmark variables to accelerate async.
* Added NO_SW_BENCH option to only run HW bench.
* Added support for PRNG to use hardware SHA256 if _wc devId provided.
* Fix to prevent curve tests from running against wrong curve sizes. Changed wc_ecc_set_curve to match on exact size.
* Added the wc_*GetHash calls to the wolfCrypt tests.
* Added async hardware start/stop to wolfSSL init/cleanup.
* Refactor to add wc_*Copy for hashing context (for async), which replaces wc_*RestorePos.
* Fixes for building with TI hashing (including: SHA224, missing new API’s and building with dummy build for non hw testing). Note: We need to add build test for this `./configure CFLAGS="-DWOLFSSL_TI_HASH -DTI_DUMMY_BUILD”`.
* Added arg checks on wc_*GetHash and wc_*Copy.
* Cleanup of the BuildMD5, BuildSHA, BuildMD5_CertVerify and BuildSHA_CertVerify functions.
* Added new ./configure --enable-asyncthreads, to allow enable/disable of the async threading support. If --enable-asynccrypt set this will be enabled by default if pthread is supported. Allows multi-threaded benchmarks with async simulator.
* Added checks for all hashing to verify valid ->buffLen.
* Fix for SHA512 scan-build warning about un-initialized “W_X”.
* Fix for valgrind un-initialized use of buffer in AllocDer (der->buffer) and BuildTlsFinished handshake_hash.
* Refactor of the benchmarking to use common function for start, check and finish of the stats.
* Fixed issue with ECC cache loading in multi-threading.
* Fix bug with AESNI not aligned code that assumes XMALLOC is 16-byte aligned.
* Added new WC_ASYNC_NO_… options to allow disabling of individual async algorithms. New defines are: WC_ASYNC_NO_CRYPT, WC_ASYNC_NO_PKI and WC_ASYNC_NO_HASH. Additionally each algorithm has a WC_ASYNC_NO_[ALGO] define.
* Added “wolfSSL_GetAllocators” API and fixed the wolfCrypt memcb_test so it restores callback pointers after test is complete (fixes issue with using custom allocators and test breaking it).
2017-04-10 14:45:05 -07:00
Sean Parkinson 5edcf685ca Rename caCertFile 2017-04-10 10:38:16 +10:00
toddouska 2b443a79f2 Merge pull request #836 from dgarske/stack_check_free
Fix leak in StackSizeCheck and build error with debug enabled
2017-04-07 09:35:01 -07:00
David Garske 2c13ea9a67 Cleanup name conflicts with test.h cert files (by adding “File” to end). Fix memory leak in ecc_test_buffers function. 2017-04-06 15:54:59 -07:00
dgarske 9ef26679df Merge pull request #833 from SparkiDev/asn_func
ASN Code Rework
2017-04-06 12:47:40 -07:00
David Garske d648d4f6c7 Fix leak in StackSizeCheck. Fix build error with debug enabled and stack size check. 2017-04-05 14:24:55 -07:00
toddouska 59dc839341 Merge pull request #819 from dgarske/test_static_fixes
Fixes for wolfCrypt test/benchmark with static memory
2017-04-03 15:25:45 -07:00
Sean Parkinson fd9e41dd99 ASN functions added to simplify code
Functions to get and set different ASN.1 tags have been added.
The functions are used in the asn.c file to simplify the code and ensure
all checks are done.
2017-04-03 16:56:21 +10:00
David Garske c532819659 Fixes for building with “CUSTOM_RAND_GENERATE_BLOCK”. Removed seed as backup RNG source. Fixed building on embedded system with time_t not defined (test.c should use long for asn_test). 2017-03-31 13:16:21 -07:00
David Garske 5e3d8e705e Fix RNG issue with Intel RDRAND and RDSEED accelerations not being used because HAVE_HASHDRBG was always being defined if !WOLFSSL_FORCE_RC4_DRBG. Added new --enable-intelrand option to indicate use of RDRAND preference for RNG source (if RDRAND not supported by CPU then HASHDRBG will be used). The --enable-intelasm option enables the RDSEED support for seeding HASHDRBG if CPU supports it. Allow use of seed as RNG source if --disable-hashdbrg (shows build warning). Cleanup to remove old ARC4 RNG support. Fixed random_test return code with !HAVE_HASHDRBG. Cleanup of ./configure --help alignment. 2017-03-31 13:16:21 -07:00
David Garske 34a4f1fae0 Move wolfCrypt test/benchmark to move static memory pool to global (not in stack). Fix wolfCrypt test wc_InitRng to use _ex with HEAP_HINT (when not FIPS). Added ability to use HAVE_STACK_SIZE with wolfCrypt test and benchmark. Cleanup of the benchmark_test function main wrapper. 2017-03-31 13:11:23 -07:00
toddouska ccad9f5575 Merge pull request #818 from dgarske/tkernel_port
TKernel port
2017-03-31 10:10:26 -07:00
Jacob Barthelmeh 5c2b5f86b9 testing buffer size with const DH and remove redeclaration of WOLFSSL_CRL 2017-03-30 10:53:13 -06:00
David Garske 36d9504bc3 Added NO_WRITE_TEMP_FILES option to prevent writing temp files during wolfCrypt test. 2017-03-28 19:37:55 -07:00
David Garske 75abeaecfc Updates for TKernel port (WOLFSSL_uTKERNEL2). Added support for InterNiche prconnect_pro using WOLFSSL_PRCONNECT_PRO. Cleanup the min/max functions. Add NO_STDIO_FGETS_REMAP to not include the fgets remap for WOLFSSL_uTKERNEL2. Fix TFM build warning. Added HAVE_POCO_LIB. Added wolfCrypt test temp cert path for WOLFSSL_uTKERNEL2 = /uda/. Added WOLFSSL_CURRTIME_REMAP for benchmark to allow different function name to be used for system which have a conflicting name. Add ability to use normal malloc/free with WOLFSSL_uTKERNEL2 using NO_TKERNEL_MEM_POOL. Added new XMALLOC_OVERRIDE to allow custom XMALLOC/XFREE/XREALLOC macros. Move CUSTOM_RAND_GENERATE up in RNG choices. Rename tls.c STK macros due to conflict. 2017-03-28 19:10:19 -07:00
kaleb-himes 2bcb8e53fc Address case from review 2017-03-27 16:53:13 -06:00
kaleb-himes 00ca1dcbb7 Fix for: 'Fix for build error with unused eccCaKeyFile' 2017-03-24 14:01:06 -06:00
toddouska a6ecf793ba Merge pull request #806 from dgarske/tfm_heap_reduce
Reduce heap usage with fast math when not using ALT_ECC_SIZE
2017-03-21 15:21:09 -07:00
dgarske 360fb2db0a Merge pull request #808 from kojo1/TrialProj
eccCaKeyFile in RSA/ECC test
2017-03-21 15:21:00 -07:00
toddouska 3e2fe536ad Merge pull request #809 from JacobBarthelmeh/Testing
test case when not using RSA blinding
2017-03-21 15:18:53 -07:00
David Garske 7be1077216 Fix for build error with unused “eccCaKeyFile”. 2017-03-21 08:31:07 -07:00
Sean Parkinson 8bf22b253a Fix leak in test
Use new points for compressed point testing.
2017-03-21 23:34:48 +10:00
Jacob Barthelmeh f26d584cec test case when not using RSA blinding 2017-03-20 14:15:34 -06:00
Takashi Kojo e35489fd75 eccCaKeyFile in RSA/ECC test 2017-03-20 13:46:26 +09:00
David Garske 6cc42dcacb Reduce TFM fp_int size by only adding the “int size” if ALT_ECC_SIZE or WOLFSSL_ASYNC_CRYPT is defined. Fix couple of async build errors in wolfCrypt test. 2017-03-17 15:01:18 -07:00
toddouska b9d3db8b47 Merge pull request #800 from SparkiDev/no_fs
If there is no filesystem then still compile and run
2017-03-17 12:08:49 -07:00
Sean Parkinson d22dcdb78d If there is no filesystem then still compile and run
Defaults to 2048-bit FF and 256-bit EC keys.
2017-03-16 16:00:31 +10:00
Chris Conlon a13cce9213 allow ECC private key only import 2017-03-15 16:04:17 -06:00
toddouska f38d23a315 Merge pull request #791 from dgarske/fix_ecc_test_curve_idx
Fix wc_ecc_export_point_der to use curve_id
2017-03-14 19:22:53 -07:00
Sean Parkinson 003e18ecbc Fixes for scan-build 2017-03-15 09:38:53 +10:00
toddouska 7bef7aaa81 Merge pull request #792 from SparkiDev/valgrind
Fix valgrind issues
2017-03-14 13:50:26 -07:00
toddouska 4210ce0f67 Merge pull request #789 from SparkiDev/jenkins
Fixes for extended configuration testing
2017-03-14 10:00:39 -07:00
David Garske 0eb01698f4 Fix for wolfCrypt ECC import/export point test to not use const idx and instead lookup using the “ecc_curve_id” enum value. Added new “wc_ecc_get_curve_idx” and “wc_ecc_get_curve_id” API’s. Redirected duplicate ECC function “wc_ecc_get_curve_name_from_id” to “wc_ecc_get_name”. Added “ECC_CURVE_INVALID” to indicate invalid curve_id. 2017-03-13 19:58:15 -07:00
Sean Parkinson 81731df72f Fix valgrind issues
Test program was re-using RSA and ECC key with multiple imports ops.
wc_RsaPublicKeyDecode() leaked if n parseable but not e.
2017-03-14 09:47:34 +10:00
David Garske e98a0465ae tenAsys INtime RTOS port. Porting complete for mutex semaphores, threading, file, socket and RNG. Added projects for libwolfssl and wolfExamples. The wolfExamples project includes examples for wolfCrypt Test/Benchmark and wolfSSL TLS client/server. Provided reference user_settings.h with comments and enable/disable gates. Added README.md with overview and instructions. Fixed issue building master with NO_WOLFSSL_DIR defined. Added check if old TLS is enabled that SHA and MD5 are enabled. Cleanup of the wolfCrypt test use of USE_CERT_BUFFERS with file system enabled. 2017-03-13 09:48:55 -07:00
Sean Parkinson 614231f71c Fixes for extended configuration testing 2017-03-13 11:33:39 +10:00
Jacob Barthelmeh 93f1e7cf2e remove magic number in test case 2017-03-10 13:16:22 -07:00
Jacob Barthelmeh bb81ea804c add AES get key to ARMv8 port and add check for BASE 64 encode to tests 2017-03-10 09:55:27 -07:00
Jacob Barthelmeh e8d97c9b1e make test buffers large enough for results 2017-03-10 09:36:29 -07:00
Sean Parkinson 5c9eedbf69 Fixes from merge of test coverage changes
Include new certificates in distribution.
Casting changes for clang.
Extra error code - recognize in test.
2017-03-10 09:15:18 +10:00
toddouska 2444a55afe Merge pull request #708 from SparkiDev/test_cov
Extend testing for coverage
2017-03-09 12:52:17 -08:00
toddouska c1c7c90345 add defined for default AES AUTH_TAG_MIN_SZ 2017-03-01 11:17:24 -08:00
Sean Parkinson 7ca19f9fff Protect other call to wc_EccPublicKeyDecode 2017-03-01 09:37:18 +10:00
Sean Parkinson 292a17fff8 wc_EccPublicKeyDecode changes from review 2017-03-01 09:37:18 +10:00
Sean Parkinson 455fb96faa Extend testing for coverage 2017-03-01 09:37:18 +10:00
David Garske 9c7407d18c Added return codes to wc_InitDhKey, wc_InitDsaKey and mp_set. Added missing return code checks on mp_copy in ecc.c. Fixed build with DSA and no ECC where mp_set function def would be missing. 2017-02-21 14:03:21 -08:00
Sean Parkinson 3e6ef835b1 Free the ecc keys 2017-02-17 12:06:27 -08:00
Sean Parkinson 24cd46f1f1 Fixes from code review 2017-02-17 11:05:29 -08:00
David Garske d625645338 Refactor to combine ECC-CDH with existing “wc_ecc_shared_secret()” and use flag to perform cofactor computation on private key. Added new API “wc_ecc_set_flags()” and flag “WC_ECC_FLAG_COFACTOR” to indicate key should use cofactor. Added NIST CAVS test vector for ECC CDH Primitive with P-256. 2017-02-16 16:30:30 -08:00
David Garske 39607984f7 Added ECC Cofactor DH (ECC-CDH) support with new “wc_ecc_cdh()” and “wc_ecc_cdh_ex()” API’s. Enable using “HAVE_ECC_CDH” define. 2017-02-16 13:17:08 -08:00
Jacob Barthelmeh 6a6e61f1d8 wolfCrypt cleanup in test.c moved and add wolfSSL init to testsuite with single threaded 2017-02-08 18:52:16 -07:00
toddouska ef38ab8fc5 Merge pull request #701 from JacobBarthelmeh/mutex
better compatibility with printing errors to a file
2017-02-08 11:12:17 -08:00
Jacob Barthelmeh fc899029fb account for unaligned memory when computing optimum size and update static memory tests 2017-01-27 10:50:47 -07:00
David Garske 1afe613512 Fixes for building with NO_AES_DECRYPT. Added new HAVE_AESGCM_DECRYPT to allow AES GCM Decrypt with NO_AES_DECRYPT defined, since GCM uses only encrypt routine. Only allow TLS AES if NO_AES_DECRYPT is not defined. 2017-01-18 15:56:18 -08:00
Sean Parkinson ba1315a499 Fixes from failure testing 2017-01-12 16:22:35 +10:00
toddouska fc8ab42612 Merge pull request #671 from dgarske/ecc_curve_cache
New ECC curve cache feature to improve performance
2017-01-11 13:34:32 -08:00
Jacob Barthelmeh 4be5f624e8 include logging.h in test.c 2017-01-06 16:40:19 -07:00
Jacob Barthelmeh dcb9ef6651 better compatibility with printing errors to a file 2017-01-06 14:29:16 -07:00
Takashi Kojo c57803a4a5 add test EVP_CIPHER_CTX_new/free 2016-12-28 14:45:29 -07:00
Jacob Barthelmeh 1704a8d683 expand compatibility layer with write bio function 2016-12-28 14:45:29 -07:00
Takashi Kojo 4baf494ddd add EVP_CipherUpdate/Final 2016-12-28 14:45:29 -07:00
Jacob Barthelmeh 526b602ebd AESNI support with EVP AES 2016-12-28 14:44:05 -07:00
Takashi Kojo 8ed0b83c21 Test on EVP_Cipher AES Counter 2016-12-28 14:44:05 -07:00
Takashi Kojo bb400789b8 add EVP_Cipher with EVP_aes_256_ecb() 2016-12-28 14:44:05 -07:00
Takashi Kojo 0fd50cd57a Added AES_set_encrypt/decrypt_key, AES_ecnrypt/decrypt 2016-12-28 14:44:05 -07:00
Jacob Barthelmeh 1c17b8eed6 static analysis check of null dereference and memory management 2016-12-21 16:20:18 -07:00
David Garske 6cc1fd293e Fixed issue with stack increase with curve cache disabled. Fixed issue with missing wc_ecc_curve_free() in wc_ecc_verify_hash_ex() causing mem leak. Changed ecc_curve_spec_cache to be allocated per curve. Added new wc_ecc_curve_cache_free() API to release all curve cache memory. Moved ecc_curve_spec struct and ecc_curve_load_mask enum to ecc.c. Add missing wc_ecc_fp_free() to wolfCrypt test. Added ecc.c comment for FP_ECC. 2016-12-21 12:31:02 -08:00
toddouska 6cefca6a49 Merge pull request #672 from cconlon/pkcs7fix
PKCS#7: fixes for building with AES disabled, smallstack
2016-12-19 13:46:35 -08:00
toddouska 50cf1df8da Merge pull request #669 from SparkiDev/scrypt
Implementation of scrypt
2016-12-16 15:53:48 -08:00
Chris Conlon c5fbf96557 PKCS#7: fixes for building with AES disabled, smallstack 2016-12-16 15:58:18 -07:00
toddouska d0533c6dad Merge pull request #664 from cconlon/pkcs7
PKCS#7/CMS expansion
2016-12-15 12:01:00 -08:00
Sean Parkinson 20887a8c35 Implementation of scrypt
Tests and benchmarking added.
Configure with --enable-scrypt and requires --enable-pwdbased
2016-12-14 16:57:41 +10:00
Chris Conlon e5d1e3ae10 PKCS#7: only output test bundles when PKCS7_OUTPUT_TEST_BUNDLES is defined 2016-12-13 15:27:46 -07:00
Chris Conlon dad0cfda92 add EnvelopedData ECC support, refactor pkcs7 2016-12-13 09:40:54 -07:00
dgarske 483e461c49 Merge pull request #647 from kaleb-himes/RIOT_OS
RIOT OS support, test scripts will be submitted to RIOT-OS repository
2016-12-10 19:13:19 -08:00
kaleb-himes 6c7e1785aa EXIT_TEST macro added for cleaner implementation and maintenance 2016-12-09 19:39:36 -07:00
Chris Conlon 5006306bb8 PKCS#7: add support for optional unprotectedAttributes with EncryptedData 2016-12-09 17:02:57 -07:00
Chris Conlon b5eb8dce2f add PKCS#7/CMS EncryptedContent support 2016-12-09 16:57:31 -07:00
toddouska b0b80bed78 Merge pull request #657 from cconlon/x963kdf
add ANSI-X9.63-KDF support [SEC1]
2016-12-09 13:29:41 -08:00
Chris Conlon 33e840b01b add AES key wrap support, RFC 3394 2016-12-09 09:30:56 -07:00
Chris Conlon a5b267087f add ANSI-X9.63-KDF support [SEC1] 2016-12-07 20:26:09 -07:00
kaleb-himes 162294e3e5 added benchmark app for RIOT and updated test error handling 2016-12-02 14:39:37 -07:00
kaleb-himes 684f9bad22 RIOT OS build and test scripts, build instructions 2016-12-02 13:53:05 -07:00
toddouska f922d3f2d6 Merge pull request #624 from SparkiDev/sha224
SHA224 implementation added
2016-11-15 13:53:34 -08:00
Jacob Barthelmeh 0b3d9cbccd revert AESNI padding and handle the case in aes.c 2016-11-11 16:26:29 -07:00
toddouska a0ee159fa5 Merge pull request #617 from JacobBarthelmeh/Compatibility-Layer
Compatibility layer
2016-11-10 11:47:42 -08:00
Sean Parkinson fdfc177254 SHA224 implementation added
Added SHA24 implementation and tetss.
Added HMAC-SHA224 implementation and tests.
Added RSA-SHA224 and ECDSA-SHA224.
Added MGF1-SHA224
Added OpenSSL APIs for SHA224
Configuration option to enable SHA224 and it is on by default for x86_64
2016-11-10 15:52:26 +10:00
Jacob Barthelmeh 55401fceb8 adjust alignment of arrays used for case with AESNI 2016-11-09 15:03:26 -07:00
Jacob Barthelmeh f06a392764 COMPAT. LAYER : DES set key and malloc/free 2016-11-07 13:21:05 -07:00
Chris Conlon 9a735fc873 allow PKCS#7 to be compiled with AES disabled 2016-11-02 12:18:45 -06:00
toddouska 624ec3d492 Merge pull request #607 from cconlon/pkcs7
add AES content encryption support to PKCS#7 EnvelopedData
2016-11-01 12:03:24 -07:00
Jacob Barthelmeh 09c32de412 RNG : option to not use RNG 2016-10-31 16:51:02 -06:00
Chris Conlon fa9a9175d0 add AES-256-CBC to PKCS#7 Encode/DecodeEnvelopedData 2016-10-31 14:45:57 -06:00
Chris Conlon 8c23c3cdd0 add AES-192-CBC to PKCS#7 Encode/DecodeEnvelopedData 2016-10-31 14:27:21 -06:00
Chris Conlon 17c184e720 add AES-128-CBC to PKCS#7 Encode/DecodeEnvelopedData 2016-10-31 14:27:14 -06:00
John Safranek 849ae72d3a expand the AES-CTR test to 4 blocks for 192 and 256 bit cases 2016-10-27 15:54:22 -07:00
Jacob Barthelmeh 54c51ec4a0 static analysis : Fix warnings with wc_AesCcmSetKey 2016-10-12 10:02:53 -06:00
Jacob Barthelmeh 6d82cba29c ARMv8 : AES-CTR/CBC/GCM speed ups and refactor AES 2016-09-15 22:50:00 +00:00
David Garske 2ecd80ce23 Added support for static memory with wolfCrypt. Adds new "wc_LoadStaticMemory" function and moves "wolfSSL_init_memory_heap" into wolfCrypt layer. Enhanced wolfCrypt test and benchmark to use the static memory tool if enabled. Added support for static memory with "WOLFSSL_DEBUG_MEMORY" defined. Fixed issue with have-iopool and XMALLOC/XFREE. Added check to prevent using WOLFSSL_STATIC_MEMORY with HAVE_IO_POOL, XMALLOC_USER or NO_WOLFSSL_MEMORY defined. 2016-08-29 10:38:06 -07:00
David Garske bf23b2f9d1 Fix issue with "wc_ecc_set_custom_curve" function not setting index as "ECC_CUSTOM_IDX". Cleanup of the ECC tests to return actual error code (when available) and make sure keys are free'd. Some trailing whitespace cleanup. 2016-08-26 12:35:47 -07:00
David Garske 17a34c5899 Added asynchronous wolfCrypt RSA, TLS client and Cavium Nitrox V support. Asynchronous wolfSSL client support for "DoServerKeyExchange", "SendClientKeyExchange", "SendCertificateVerify" and "DoCertificateVerify". Fixes for async DTLS. Refactor of the wolf event and async handling for use in wolfCrypt. Refactor of the async device support so its hardware agnostic. Added Cavium Nitrox V support (Nitrox tested using SDK v0.2 CNN55XX-SDK with new configure "--with-cavium-v=/dir" option). Moved Nitrox specific functions to new port file "port/cavium/cavium_nitrox.c". RSA refactor to handle async with states. RSA optimization for using dpraw for private key decode. Use double linked list in wolf event for faster/cleaner code. Use typedef for wolf event flag. Cleanup of the async error codes. wolfCrypt test and benchmark support for async RSA. Asynchronous mode enabled using "./configure --enable-asynccrypt". If no async hardware is defined then the internal async simulator (WOLFSSL_ASYNC_CRYPT_TEST) is used. Note: Using async mode requires async.c/h files from wolfSSL. If interested in using asynchronous mode please send email to info@wolfssl.com. 2016-08-15 13:59:41 -06:00
dgarske b38218a0b9 Merge pull request #524 from kaleb-himes/certs-buffs-and-tests
cert updates, new buffers, new test with buffers
2016-08-14 08:39:37 -07:00
kaleb-himes da18e463ed remove constraints on inclusion of certs_test.h 2016-08-12 17:00:22 -06:00
kaleb-himes 03295ec6d7 update certs, extend ntru to 1000 days, add der formatted ecc, new ecc buffer test
changes from first review

move to 256 bit defines
2016-08-12 13:00:52 -06:00
Jacob Barthelmeh b502d9dcf7 help static analysis tools 2016-08-10 14:23:27 -06:00
David Garske a17bc2a42e Fix build issue with ASN enabled and no HMAC (missing MAX_DIGEST_SIZE). Switch to using WC_MAX_DIGEST_SIZE from hash.h, which is always available. Added small stack option for digest in MakeSignature. Fixed build error with unused "testVerifyCount" if "NO_ECC_SIGN" or "NO_ECC_VERIFY". 2016-08-05 12:19:30 -07:00
Jacob Barthelmeh e8f7d78fc4 add helper functions for choosing static buffer size 2016-07-21 12:11:15 -06:00
David Garske e0f2bbd1b4 Added comment about why 0's test is disabled. ECC without Shamir fails with fast or normal math. 2016-07-19 19:12:45 -07:00
David Garske 5e2502fa95 ECC without Shamir has issues testing all zero's digest, so disable this test if not using Shamir method. Fixed comment about "NO_ECC_SECP". 2016-07-19 14:34:32 -07:00
toddouska 7a419ba6d8 Merge pull request #472 from dgarske/ecc_brainpool_koblitz
ECC and TLS support for all SECP, Koblitz and Brainpool curves
2016-07-19 11:44:53 -07:00
toddouska d235a5f0cc add WC_RSA_BLINDING, wc_RsaSetRNG() for RSA Private Decrypt which doesn't have an RNG 2016-07-18 11:57:47 -07:00
David Garske 7a1acc7e56 Added TLS support for all SECP and Brainpool curves. Added ECC curve specs for all Brainpool, Koblitz and R2/R3. Adds new "HAVE_ECC_BRAINPOOL", "HAVE_ECC_KOBLITZ", "HAVE_ECC_SECPR2" and "HAVE_ECC_SECPR3" options. ECC refactor to use curve_id in _ex functions. NID and ECC Id's match now. Added ability to encode OID (HAVE_OID_ENCODING), but leave off by default and will use pre-encoded value for best performance. 2016-07-07 10:59:45 -07:00
David Garske dcdc28e014 Remove double call to "wolfCrypt_Init()" in test.c. Appears to have been added in static memory merge on 6/10. 2016-06-30 16:51:13 -07:00
David Garske 5b3a72d482 Cleanup of stdlib function calls in the wolfSSL library to use our cross-platform "X*" style macros in types.h. 2016-06-29 11:11:25 -07:00
toddouska ac6635593b Revert "Bio" 2016-06-27 10:53:34 -07:00
Jacob Barthelmeh 49934a5c91 Merge https://github.com/wolfSSL/wolfssl into bio 2016-06-24 14:22:14 -06:00
Ludovic FLAMENT 0c43123a01 Fix BIO based on review 2016-06-24 10:54:58 +02:00
John Safranek ffb537c33f removed dependency on AES-NI for the AES-direct test 2016-06-23 15:34:09 -06:00
David Garske dd52af0872 ECC cleanup / fixes. Improvements to ECC with fast math enabled to avoid mp_clear on stack variables. Refactor of ECC failure cleanup (fixes possible mem leaks with small stack enabled). Refactor of "fp_is*" response checks to use FP_YES or FP_NO. Pulled libtom enhancement/cleanup of fp_isprime. Fix for compressed keys import with custom curves (still having some issues though). 2016-06-21 15:27:51 -07:00
David Garske aa1a405dd1 Fixes for compressed keys. Fix to fast math "mp_cnt_lsb" to return proper value, which fixes "mp_jacobi", which fixes "mp_sqrtmod_prime", which fixes compressed keys for 224-bit key. Removed workarounds for compressed keys. Added new configure option "--enable-compkey". Fixed issue with normal math and custom curves where "t2" could be free'd and used. Fixed issue with mp_dump in integer.c, with not allocating correctly sized buffer for toradix. 2016-06-21 14:06:02 -07:00
Jacob Barthelmeh ea71814518 Merge https://github.com/wolfSSL/wolfssl 2016-06-17 13:58:53 -06:00
David Garske 6da166d83b Enhancement / cleanup of the "wc_ecc_make_key_ex" API so it can be used with "keysize" or "dp" and allows compatibility with existing "wc_ecc_make_key". Note: "wc_ecc_make_key_ex" was not previously public, so changing it at this point is okay. 2016-06-16 10:38:15 -07:00
David Garske d55663eaee Added ECC API's for using custom curves that are not in the "ecc_sets" list. Added wolfCrypt test to validate/demonstrate custom curve using BRAINPOOL256R1. Exposed "wc_ecc_make_key_ex" and added "wc_ecc_import_x963_ex" / "wc_ecc_import_raw_ex" API's that accept "const ecc_set_type*" for custom curve. Internally use "ECC_CUSTOM_IDX" (-1) to define custom curve is used. Added "--enable-ecccustcurves" option to configure.ac. 2016-06-16 10:09:41 -07:00
David Garske bb17bac018 Updated the naming for the ECC curve sets. Additional comments for each curve parameter. 2016-06-14 16:56:22 -07:00
toddouska a156cedabc Merge pull request #435 from JacobBarthelmeh/staticmemory
Staticmemory
2016-06-10 17:03:49 -07:00
Jacob Barthelmeh e214086dce tlsx with static memory / account for session certs size 2016-06-08 09:18:43 -06:00
toddouska c48db891d1 Merge pull request #433 from ejohnstown/aes-cmac
Aes cmac
2016-06-07 16:48:46 -07:00
Jacob Barthelmeh 738373038b clean up staticmemory with crl 2016-06-06 17:50:54 -06:00
Jacob Barthelmeh e1edadafe1 ocsp with static memory, remove unused function 2016-06-06 16:19:33 -06:00
Jacob Barthelmeh 2feee8856e revise static memory and update heap hint 2016-06-04 19:03:48 -06:00
Jacob Barthelmeh 104ff12e76 add staticmemory feature 2016-06-04 19:01:23 -06:00
John Safranek ae093ded8f add standalone AES-CMAC generate and verify functions 2016-05-25 09:22:39 -07:00
John Safranek 9bf4598772 use constant for Cmac type 2016-05-24 16:46:04 -07:00
John Safranek c0cbc97b06 add AES-CMAC 2016-05-23 17:50:36 -07:00
Ludovic FLAMENT ab1d6c91bf fix errors (win32, met leak) 2016-05-23 13:46:26 +02:00
Ludovic FLAMENT 99b5aa587f Fix errors (jenkins) 2016-05-23 11:11:57 +02:00
David Garske 5eb7768d00 Added missing wolfCrypt_Init() to wolfCrypt tests. 2016-05-22 18:18:06 -07:00
Ludovic FLAMENT ed4f67058a Merge branch 'master' of https://github.com/wolfssl/wolfssl 2016-05-20 21:51:13 +02:00
Ludovic FLAMENT 4017e0f8dd fix BIO issues :
- remove unrequited tests
- fix compilations for lighty, stunned, openssh
- wc_BioGetAcceptSocket IPv4 / IPv6 support
- remove <stdio.h> from bio.h
- add NO_STDIO_FILESYSTEM for BIO_printf
- memset -> XMEMSET
- strlen -> XSTRLEN
2016-05-15 20:22:19 +02:00
David Garske fa5dd01001 Fixes/improvements to the wolfCrypt ECC tests. Fixed bug with sharedA/sharedB being too small when BENCH_EMBEDDED is used and curve size over 256 bit. Added error message for ECC test failures, to show the curve size used. Fix to wc_ecc_verify_hash test to use digest that is not all zeros as that doesn't work correctly for non-Shamir ECC math. Changed return code for wc_ecc_check_check so its unique. 2016-05-09 09:51:11 -07:00
Ludovic FLAMENT f438e7ac65 Fix for Fedora 32/64 2016-05-09 08:13:17 +02:00
Ludovic FLAMENT 03b571cde4 fix some bugs, add Windows support 2016-05-07 21:12:08 +02:00
Chris Conlon 8f3e1165a1 add Whitewood netRandom client library support 2016-05-05 15:31:25 -06:00
Ludovic FLAMENT 5d1de3bb33 One file for all BIO functions in wolfcrypt
move required functions from wolfssl to wolfcrypt
add client/server tests for BIO
2016-05-05 12:58:21 +02:00
David Garske 822d71431e Moved mem_track.h into wolfssl/wolfcrypt. Added new WOLFSSL_DEBUG_MEMORY option. Added documentation for using mem_track and new debug memory option. 2016-05-04 10:04:38 -07:00
Ludovic FLAMENT 1bd65cc8a9 First version for OpenSSL BIO compatibility 2016-04-29 16:34:11 +02:00
Kaleb Himes b2af02a783 Merge pull request #383 from kojo1/MDK5
fixes for MDK5 compiler
2016-04-26 16:11:59 -06:00
toddouska 86cbabf035 Merge pull request #392 from wolfSSL/aesni-update
AES-NI Update
2016-04-20 14:27:52 -07:00
John Safranek 57fce85531 modify AES-CBC with AESNI test to check all key sizes for each message size checked 2016-04-13 12:18:59 -07:00
John Safranek 8524afc56a 1. Rename routine AES_CBC_decrypt_ex as AES_CBC_decrypt_by8
2. Added routine AES_CBC_decrypt_by6 that does six at a time.
3. Setting HAVE_AES_DECRYPT_BY6 or _BY8 (or not setting it) selects
   the 6, 8, or 4 way version of the assembly routine.
4. Modified AES-NI decrypt test to loop checking against the test
   bolus from 1 AES block to the whole 24 blocks.
2016-04-12 10:10:55 -07:00
Takashi Kojo cfd5af341b fixed test.c compile error and server.c/client.c/ssl.c warnings with MDK5 compiler. 2016-04-12 11:05:30 +09:00
John Safranek b75dc127f3 1. Attempting to perform 8 AES-CBC decrypt operations simultaneously.
2. Added code to test large AES-CBC decrypts.
2016-04-08 11:53:40 -07:00
toddouska c6e4fb8cf8 Merge pull request #378 from JacobBarthelmeh/Testing
autoconf checks on some builds that break, macro for no server, and u…
2016-04-08 11:01:46 -07:00
Jacob Barthelmeh 5b4f17545b autoconf checks on some builds that break, macro for no server, and user rsa 2016-04-06 15:36:50 -06:00
Jacob Barthelmeh 4f8fffbc37 add wc_EccPublicKeyToDer function 2016-04-06 15:15:56 -06:00
David Garske 03765ecca7 Fixes to cleanup unnecessary ECC make key, check key and free in ECC vector item test. 2016-03-25 13:22:31 -07:00
toddouska 1649af37be fix ecc curve test in normal math mode, free is needed 2016-03-25 11:33:35 -07:00
toddouska 2dfc7faa73 Merge pull request #355 from dgarske/EccTestCleanup
wolfCrypt ECC test improvements and code cleanup
2016-03-23 12:18:42 -07:00
David Garske 0fc5575b8b Fixed typo with WOLFSSL_VALIDATE_ECC_IMPORT defined. Disable ECC-224 bit compressed key test since it isn't working. Cleanup in accel_fp_mul for KB_SIZE. 2016-03-18 15:41:03 -07:00
David Garske 369930238a Cleanup of the ecc_test functions to break areas into separate functions providing WC_RNG and key size. Added ECC tests by key size for all enabled curves. Added actual key size on wc_ecc_make_key for the NIST test vectors. Added ECC testing of wc_ecc_verify_hash with digests having 0's and sequence (1,2,3,...) and made sure it runs verify twice. 2016-03-17 15:31:45 -07:00
Jacob Barthelmeh e99a5b0483 prepare for release v3.9.0 2016-03-17 16:02:13 -06:00
toddouska 10e74f7200 Merge pull request #353 from dgarske/EccUnsignedSizeCheckFix
Fixed bug where mp_unsigned_bin_size returning 0 could produce a UINT…
2016-03-17 10:50:01 -07:00
David Garske 19967dd264 Fixed bug where mp_unsigned_bin_size returning 0 could produce a UINT_MAX (based on -1) resulting in invalid index to an array. Added test case for this if FP_ECC is defined. 2016-03-17 09:39:10 -07:00
toddouska 46a01c29d8 Merge pull request #350 from JacobBarthelmeh/master
check for invalid RSA OAEP with SHA512 test case
2016-03-16 16:25:13 -07:00
Jacob Barthelmeh 4c3ddac23c catch invalid test case of RSA-OAEP and fix cast 2016-03-16 14:51:25 -06:00
David Garske 0683ecb727 Fixed FreeCRL issue with strdup memory. Added additional checks for WOLF_AES_CBC and WOLF_AES_COUNTER. Disabled memory tracker by default for wolfCrypt test and benchmark. Updated README to better document Linux Binutils LD bug workaround. 2016-03-16 09:41:19 -07:00
David Garske f0ea9d747f Fix possible positive return value for random_rng_test. Removed reference to nrf51_aes_decrypt, which is not supported, and added compile error for it. Corrected ecc_test_raw_vector return code checking. Cleanup in InitMemoryTracker. 2016-03-15 18:33:24 -07:00
David Garske bf058ef1b9 Fixed Jenkins error reports for mem_track msg, incorrect #ifdef in aes_test and ecc_test_raw_vector response code checking. Fixed C89 compliance with wc_AesSetKey. Fixed nrf_drv_rng_init response checks in RNG code. Reverted comment change in AES. Fixed nRF51 AES CBC Encrypt support. Added response code checking for nrf51_aes_set_key. 2016-03-15 17:18:03 -07:00
David Garske a38183b816 Port for Nordic nRF51 RNG, RTC and AES. Added RNG test for wc_RNG_GenerateBlock 0's check even if HAVE_HASHDRBG is enabled. Added NIST test vectors for ECC P-256, P-384 and P-521. Added helpful debug message in ECC import if issue finding ecc_sets[] for curve. Moved memory tracker into separate file and added support for it to wolfcrypt test and benchmark. Added Ed255519/Curve25519 options for granular control of sign, verify, shared secret, import and export. Added AES options for max key size (AES_MAX_KEY_SIZE), no decrypt (NO_AES_DECRYPT) and no CBC (NO_AES_CBC). 2016-03-15 13:58:51 -07:00
Jacob Barthelmeh 6e1c5b3801 disable CERT_EXT policies check when SEP is used instead 2016-03-09 17:22:38 -07:00
kaleb-himes 24d93c90cd update for configure option --disable-sha 2016-02-16 12:03:37 -07:00
toddouska 3d8f91d418 Merge pull request #302 from dgarske/EccOnlyNoSignVerify
New ECC and ASN build options for reduce build size options
2016-02-15 12:13:43 -08:00
David Garske aeaac15682 Fixed compile errors in signature.c if ECC on but ECC sign/verify disabled. Added new NO_ASN_TIME option to reduce ASN size for space constrained or missing RTC. Added check to make sure ASN is enabled if ECC sign/verify is enabled. 2016-02-12 13:16:39 -08:00
David Garske 08c663a4ac Added new CUSTOM_RAND_GENERATE_BLOCK option that allows override and disabling of the HASHDRBG for customers who have a HW RNG they would like to use instead.
Examples:
"./configure --disable-hashdrbg CFLAGS="-DCUSTOM_RAND_GENERATE_BLOCK= custom_rand_generate_block".
OR
/* RNG */
//#define HAVE_HASHDRBG
extern int custom_rand_generate_block(unsigned char* output, unsigned int sz);
2016-02-12 11:59:51 -08:00
David Garske a83ff6aada Updated the configure.ac comments about big int being used for ECC and DH. Moved the checks for ecc/asn and psk/asn until after cryptonly value is set and fixed so those checks work for normal build and are excluded for crypt only builds. 2016-02-10 13:03:53 -08:00
David Garske 8d0d5a3f90 Fixes so ECC only build works. Fixes so ECC enabled with ASN disabled works and will prevent ECC sign/verify. 2016-02-10 08:53:09 -08:00
David Garske be4c400d16 Fixes for disabling the crypt test and benchmark. Added new "./configure --disable-crypttests" option. Also made sure use of both NO_CRYPT_BENCHMARK and NO_CRYPT_TEST in "./configure CFLAGS=-D" scenario work correctly. 2016-02-04 12:06:24 -08:00
David Garske f8876854f4 Spelling fixes in comments and error strings (ALGO_ID_E, ASN_TIME_E and WOLFSSL_ERROR function). 2016-01-29 16:13:09 -08:00
Jacob Barthelmeh 7d71d756f3 update ChaCha20-Poly1305 to most recent RFCs 2016-01-27 14:03:05 -07:00
Chris Conlon 0801eeac8d update support for Freescale KSDK 1.3.0 2016-01-25 10:41:26 -07:00
Jacob Barthelmeh 197f25f135 use type enum wc_HashType rather than int 2016-01-20 15:31:08 -07:00
Jacob Barthelmeh 008612ec70 OAEP w/ smallstack and fixs 2016-01-14 14:26:17 -07:00
Jacob Barthelmeh d815affe83 RSA OAEP padding 2016-01-05 10:56:15 -07:00
Moisés Guimarães 9b8f26329d improves srp unit test to use random salt; 2015-11-10 17:43:02 -03:00
John Safranek 3b102862b1 exclude new AES-GCM test when in FIPS mode 2015-11-03 16:57:38 -08:00
John Safranek 23ba31cbdd 1. Fixed bug where AES-GCM IVs had to only be 12 bytes. Now
accepts any length.
2. Added test case for AES-GCM using an 60 byte IV.
3. AesGcmSetKey doesn't calculate H value in AES-NI mode.
2015-11-03 16:47:42 -08:00
John Safranek f8aeac608c 1. Add C NI-intrinsic AES-GCM encrypt and decrypt.
2. Fix error string for wolfcrypt test of GMAC.
3. Add AES-GCM Decrypt to benchmark.
2015-10-30 16:03:26 -07:00
Chris Conlon 7e5be2f313 fix resource cleanup in testsuite and wolfcrypt test 2015-10-09 10:57:55 -06:00
Jacob Barthelmeh 10276944d3 return value on AES CCM encrypt 2015-10-02 11:40:47 -06:00
Ludovic FLAMENT c7193672a5 fix IDEA modular inverse, add CBC tests with random values 2015-09-27 15:05:01 +02:00
Ludovic FLAMENT f68400da40 add IDEA cipher (ECB and CBC mode)
add support of SSL_RSA_WITH_IDEA_CBC_SHA cipher suite (SSLv3, TLS v1.0 and TLSv1.1)
2015-09-23 16:16:39 +02:00
toddouska de04565c1e fix cert_ext test memory leak 2015-09-14 13:15:53 -07:00
Ludovic FLAMENT 10165e966c remove OPENSSL_EXTRA requirement 2015-09-14 21:14:01 +02:00
Ludovic FLAMENT 0ecd6435e9 remove CERT_EXT from enable-bump
cortex test are only done if openssl extra is set
2015-09-14 18:45:14 +02:00
Ludovic FLAMENT 25f24ed34f fix to build on Fedora 32bits and Windows 2015-09-08 08:49:29 +02:00
Ludovic FLAMENT b685dfb2e7 Merge branch 'master' of https://github.com/wolfSSL/wolfssl 2015-09-07 10:23:46 +02:00
Ludovic FLAMENT d2ea6f7ef0 Add support for :
- PEM public key loading
  - set/get KeyUsage in CSR and X.509
  - set/get SKID in CSR and X.509
  - set/get AKID in X.509
  - set/get two Certificate Policies OID in X.509
2015-09-07 09:51:21 +02:00
Takashi Kojo cf80a6f639 pkcs7: avoid initial value of pointer to auto value for embedded compilers 2015-08-29 21:22:30 +09:00
Takashi Kojo 2a141f6a82 ed25519: fixed initial data to auto values for embedded compilers 2015-08-29 12:08:52 +09:00
Ludovic FLAMENT 33595a0b3c Merge branch 'master' of https://github.com/wolfSSL/wolfssl 2015-08-19 08:08:49 +02:00
toddouska 09b2da799f Merge pull request #125 from kojo1/MDK4
MDK4 name change
2015-08-14 14:59:25 -07:00
Ludovic FLAMENT 838a873cf1 Merge branch 'master' of https://github.com/wolfSSL/wolfssl 2015-08-13 10:20:47 +02:00
Nickolas Lapp 910fd79a1d Changes to remove scan-build warnings when compiling with full build 2015-08-12 13:58:23 -06:00
Takashi Kojo 30f6bc1e27 MDK4, wolfSSL name change 2015-08-12 16:45:40 +09:00
Chris Conlon 0cd893a51b Freescale: Use new I/O where applicable 2015-08-07 16:22:31 -06:00
Chris Conlon 5d40c5f566 Rename RNG to WC_RNG for Freescale, add NO_OLD_RNGNAME define to completely remove RNG type usage 2015-08-07 11:53:19 -06:00
toddouska d3c8ff3488 Merge branch 'master' of github.com:wolfssl/wolfssl 2015-08-07 09:42:07 -07:00
Ludovic FLAMENT aa0852bf71 Fix Curve25519 test 2015-08-06 08:51:41 -07:00
Ludovic FLAMENT d050c10581 add support for curve 25519 and Ed25519 in OpenSSH
refactor curve25519 and Ed25519 code
fix warning in PEM_xxx_mem_xxx functions
2015-08-06 08:51:41 -07:00
Moisés Guimarães 114e3edc27 add srp example to test.c 2015-08-04 16:02:44 -03:00
Ludovic FLAMENT 281ba1c4c5 Fix Curve25519 test 2015-08-03 09:05:02 +02:00
Ludovic FLAMENT 409126a97c add support for curve 25519 and Ed25519 in OpenSSH
refactor curve25519 and Ed25519 code
fix warning in PEM_xxx_mem_xxx functions
2015-08-01 18:28:18 +02:00
toddouska 75b9d809b3 fix build 267 case 932, certgen w/o sha 2015-07-31 11:24:34 -07:00
Ludovic FLAMENT 8d7d803e58 add wc_DerToPemEx to restore compatibility API with wc_DerToPem 2015-07-24 07:50:29 +02:00
Ludovic FLAMENT 8951d72f03 Merge branch 'master' of https://github.com/wolfSSL/wolfssl
Fix DSA key generation
2015-07-23 13:24:20 +02:00
Ludovic FLAMENT 349edd40c2 Add support for OpenSSH ssh-keygen tools
refactor existing code
2015-07-22 14:18:07 +02:00
toddouska dafb5a80e7 recommit invalid free w/o smallstack 2015-07-07 09:23:02 -07:00
Jacob Barthelmeh 304982a597 Big Endian System ChaCha20 counter, auto tests added for ChaCha20 counter 2015-07-06 15:29:53 -06:00
toddouska a62589f3fc add wc_ecc_check_key(), import validate option too 2015-06-16 11:29:27 -07:00
Jacob Barthelmeh e461bc72b8 curve25519 and ed25519 low memory 2015-06-05 15:39:37 -06:00
John Safranek 77fe4f3a2e Fixes #71. Disable SHA works with TLS, PWDBASED, testing. 2015-05-28 10:25:41 -07:00
John Safranek 69b4b37e86 modify ossl-extra HMAC testcase to use longer password 2015-05-12 16:16:44 -07:00
John Safranek 0b1ea204b7 cleaned up Windows build warnings 2015-05-12 11:59:07 -07:00
toddouska d2c53c3229 reduce wolfcrypt test stack use, curve25519 2015-05-07 15:25:20 -07:00
John Safranek c1adae2fe4 moved FOURK_BUF constant to top of file 2015-04-10 08:06:59 -07:00
toddouska 500ee73be4 fix opensslextra set_timeout assumes long > int 2015-03-29 12:00:04 -07:00
toddouska c90977c7a5 fix windows build 2015-03-29 11:51:05 -07:00
toddouska 495fbe087e allow dh to be used w/o certs and asn 2015-03-27 14:28:05 -07:00
Chris Conlon d4a3e83582 fix OPENSSL_EXTRA + NO_MD5 build, fixes issue #26 2015-03-26 13:52:06 -06:00
toddouska 8f6d7a1ce7 rename ecc25519 to curve25519, less confusing with ed25519 now in play too 2015-03-24 11:56:40 -07:00
John Safranek 9f2454fc78 Added a noop function wc_FreeRng() for when not using the HashDRBG to keep
the calls to InitRng and FreeRng simple and balanced.
2015-03-20 14:19:35 -07:00
Chris Conlon 0afd09d900 fix OPENSSL_EXTRA + NO_AES build 2015-03-20 11:25:22 -06:00
Chris Conlon 6c963c8d8e fix OPENSSL_EXTRA + NO_DES3 build 2015-03-20 10:59:54 -06:00
toddouska 478a8bb059 adjust ./configure format, change ed sign/verify to msg from hash 2015-03-19 12:48:32 -07:00
Jacob Barthelmeh d89d524570 initial ed25519 implementation 2015-03-19 11:40:41 -06:00
Chris Conlon 5577555ce3 adjust test.c CERT_GEN for Freescale MFS examples 2015-03-18 18:21:52 -06:00
toddouska 0316dd2ef6 fix github issue #35, allow user to pick ecc curves with ECC_USER_CURVES and separate HAVE_ECCxxx defines 2015-03-18 13:36:07 -07:00
Jacob Barthelmeh 7ef362d4ba format of curve25519 key 2015-03-05 15:38:07 -07:00
toddouska 9d20e712bf add autoconf support for chapoly-aead, wipe temp polykey, minor whitespace adjusts 2015-02-24 12:33:52 -08:00
Andrew Burks 0e5f879d0b Added documentation and benchmarks. 2015-02-24 10:00:39 -08:00
Andrew Burks 8c3410d6c2 Added wolfcrypt API for the ChaCha20-Poly1305 AEAD. 2015-02-24 09:15:11 -08:00
toddouska 420668c1f9 tiddy up 25519 2015-02-19 16:07:13 -08:00
Jacob Barthelmeh 4babd2cf2d added in curve25519 crypto 2015-02-19 10:59:05 -07:00
toddouska de7c9da363 Merge branch 'leah-master' 2015-02-16 14:24:28 -08:00
John Safranek 16e468b05f updated PBKDF2 test to use longer password 2015-02-16 11:33:06 -08:00
Leah b26b5f1b51 Merge pull request #1 from wolfSSL/master
update to current wolfssl version
2015-02-11 16:33:44 +00:00
lchristina26 1ef9d7852c fixes from scan-build output in test.c 2015-02-06 08:42:37 -07:00
kaleb-himes 55d30ca277 new client-ecc-cert.pem/renewcerts updates/certs relavent name changes 2015-02-02 09:10:07 -07:00
kaleb-himes 8fe965cf24 ntru wc_ fixes 2015-01-14 09:52:33 -07:00
Jacob Barthelmeh e6a84243ee chacha-poly aead test 2015-01-09 15:18:20 -07:00
kaleb-himes 878c1889b3 Merge branch 'master' of https://github.com/kaleb-himes/cyassl 2015-01-08 09:40:17 -07:00
kaleb-himes a389620a29 Copyright (C) updates 2015-01-08 09:39:04 -07:00
Jacob Barthelmeh 6195ae1db2 placement of poly1305 in test file 2015-01-07 15:37:55 -07:00
kaleb-himes 0dbdb35222 enable-md4, enable-hkdf, disable-memory 2015-01-06 10:41:47 -07:00
Jacob Barthelmeh 2520973b73 update to c files for name change and pwdbased along with debugging src function calls 2015-01-03 19:09:48 -07:00
Jacob Barthelmeh 3483816f9f fix to test.c and asthetics fo asn_public.h 2014-12-31 11:00:38 -07:00
kaleb-himes 59eb83c6e9 auto-tools and wc_ updates 2014-12-31 10:01:32 -07:00
kaleb-himes edf53a1ed0 new changes 2014-12-29 10:27:03 -07:00
Jacob Barthelmeh 5107c6c12b debugging linking error 2014-12-19 15:30:07 -07:00
Kaleb Himes c97db6ba6e src updated, CTaoCrypt -> wc_ 2014-12-19 11:27:01 -07:00
Kaleb Himes cf8cf779c5 headers and include.ams 2014-12-17 15:33:22 -07:00