Commit Graph

280 Commits (d43d75bf81fa2c426ae2cb034302349da655c28f)

Author SHA1 Message Date
Sean Parkinson 3366acc9ce Zephyr port of crypto 2019-02-19 11:47:44 +10:00
Takashi Kojo c7f8f9fc90 Declarations have to come before executable statements
WOLFSSL_MDK5_COMPLv5: mdk5 compiler ver 5 regards macro with args as executable statement (This seems to be fixed with v6)
2019-02-18 06:39:06 +09: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 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
Jacob Barthelmeh db5c63bb25 fix for benchmarking specific RSA key size with -rsa-sz 2019-01-18 16:47:10 -07:00
Jacob Barthelmeh b8ebd41fbc key size with AES-CMAC benchmark 2019-01-18 16:25:24 -07:00
Jacob Barthelmeh f0a3045d62 af_alg sha3 addition
hardware acceleration with RSA

add AES-GCM hardware acceleration

refactor setting RSA IV flag

check and set AF_ALG flags

fix for default AF_ALG use

set buffer alignment with Xilinx RSA

macro guard after rebase

use ALIGN64

clean up test cases
2019-01-18 16:25:24 -07:00
Tesfa Mael 739b57c753 Initial Deos RTOS port
- Added support for Deos with no file system
- Implemented a custom malloc since reusing and freeing memory is disallowed in avionics and mission critical applications.
- Added TLS client and server example with a TCP setup mailbox transport
- Timer starts at an offset of CURRENT_UNIX_TIMESTAMP specified by the user
- Uses rand_r() as a pseudo random number generator and uses the current time in seconds as a seed
- Uses strnicmp for XSTRNCASECMP instead of strncasecmp
- a readme doc included
2019-01-18 14:46:39 -08:00
Hideki Miyazaki 9879425c5f Addressed review comments 2019-01-18 10:53:48 +09:00
Hideki Miyazaki e519e1eb2a Support atecc608a on 32se with example programs 2019-01-18 08:20:20 +09:00
David Garske 3c2aa60862 Fix to allow RSA public only to build without verify only. 2019-01-11 21:11:40 -08:00
David Garske 2351047409 Fixes for various scan-build reports. 2018-12-27 11:08:30 -08:00
Jacob Barthelmeh 48c267dda8 fix warning with secure-renegotiation build and error with ntru build 2018-12-19 15:47:43 -07:00
Jacob Barthelmeh 165a80d02d fix for build with cryptonly + rsapub 2018-12-19 15:30:22 -07:00
Jacob Barthelmeh 92d59c7df4 fix for cryptonly + rsavfy build 2018-12-19 14:36:32 -07:00
David Garske c23489e6ed Added support for QAT RSA Key Generation. 2018-12-17 12:54:33 -08:00
toddouska 2ef8be2718
Merge pull request #1968 from dgarske/fixes_stm32cube_aes
Fixes for STM32 AES GCM crypto hardware acceleration
2018-12-12 14:52:35 -08:00
toddouska bdf447cec9
Merge pull request #1966 from cconlon/wctestbench
add define to use test/benchmark.h without path prefix
2018-12-12 14:50:32 -08:00
Sean Parkinson fb41510f12 Fixup for compiling verify only inline for PPC using GCC 2018-12-10 11:52:10 +10:00
Sean Parkinson c122f6082f Allow a very small build based on SHA-256 and RSA verify 2018-12-10 08:48:01 +10:00
David Garske 0a725f4d56 Fixes for AES with STM32 crypto hardware:
* Fixes to ensure the "const" input buffer is not modified for AES GCM calls with STM32 hardware crypto.
* Improvements to allow AES GCM hardware acceleration for inputs that are not a multiple of AES block size.
* Switched the wolfCrypt test for STM32_CRYPTO to use the standard AES GCM tests with 12-byte IV and less than 16-byte auth data.
* Fixes for building with the standard peripheral library.
* Fixes for building with `NO_AES_DECRYPT`.
`./configure --enable-debug --disable-shared --enable-cryptonly CFLAGS="-DNO_AES_DECRYPT"`
2018-12-07 17:23:38 -08:00
Chris Conlon d662291b3d add define to use test/benchmark.h without path prefix 2018-12-07 10:27:51 -07:00
toddouska cc93c43a52
Merge pull request #1953 from dgarske/qat2
Fixes for building with the latest QuickAssist v1.7 driver
2018-12-05 10:37:45 -08:00
David Garske ec1bd3951e Fixes for building with the latest QuickAssist v1.7 driver:
* Updated `--with-intelqa=` to support detection of QAT driver version and use different .so libs.
* Added include and lib reference for new libusdm.
* Added `QAT_ENABLE_RNG` option.
* Fix for dynamic type spelling error (`DYNAMIC_TYPE_SYMETRIC_KEY` -> `DYNAMIC_TYPE_SYMMETRIC_KEY`).
* Fix benchmark output to use "took" not "tooks".
2018-12-04 12:54:11 -08:00
John Safranek f74fb84337 Touch Up iOS Project
1. Fix iOS Benchmark reference to the async.c file.
2. Fix iOS Benchmark reference to the sp.c file. Changed to spr_c64.c.
3. Removed misc.c from iOS Benchmark as it is using inlined misc.h.
4. Added define of HAVE___UINT128_T to the user_settings.h so the
benchmark would build.
5. Wrapped the benchmark usage strings in NO_MAIN_DRIVER.
2018-12-03 10:38:56 -08:00
Takashi Kojo a203cd4901 NO_MULTIBYTE to NO_MULTIBYTE_PRINT 2018-11-29 07:04:01 +09:00
Takashi Kojo c529e011a7 NO_MULTIBYTE for multibyte non-supported IDEs 2018-11-26 08:11:31 +09:00
toddouska 4bf61a81e4
Merge pull request #1930 from tmael/portingMicriumIII
Micrium uC/OS-III port
2018-11-21 10:29:17 -08:00
Tesfa Mael 7ac8acff09 fix IAR EWARM Error[Pe028]: expression must have a constant value 2018-11-19 00:19:58 -08:00
Tesfa Mael 2ad6ce351b add micrium current_time and use correct serial function 2018-11-18 23:44:20 -08:00
Hideki Miyazaki bc09f4bd30 Porting wolfssl into ESP-IDF development framework 2018-11-17 09:36:09 +09:00
Hideki Miyazaki 1a34b9da03 Added NO_RSA condition for build failure 2018-10-12 11:02:01 +09:00
Hideki Miyazaki 63878f32ab Fixed tests failures on jenkins 2018-10-11 21:43:39 +09:00
Hideki Miyazaki b736012214 Fixed disable Option Test on jenkins 2018-10-11 19:40:35 +09:00
Hideki Miyazaki e774bfcf60 Tweaked message in Usage 2018-10-11 18:06:02 +09:00
Hideki Miyazaki b4b180c1b9 Added Japanese messages that are enabled by option switch 2018-10-11 15:42:50 +09:00
David Garske 6d18f58f81
Merge pull request #1848 from JacobBarthelmeh/Benchmark
changes to benchmark app
2018-09-26 15:10:20 -07:00
Jacob Barthelmeh d0abc10fe9 update RSA keygen benchmark and test with asynccrypt 2018-09-26 13:10:05 -06:00
Takashi Kojo e6612b34f7 use XFILE, BADFILE, XFxxxx 2018-09-25 15:39:54 +09:00
Jacob Barthelmeh 27aaedf37c add -rsa-sz which benches any RSA key size 2018-09-24 16:21:13 -06:00
Jacob Barthelmeh 04c444af35 add wolfSSL version print out to benchmark app 2018-09-14 14:17:49 -06:00
MJSPollard d4d6346ee5 fixed unused variable error 2018-09-13 08:47:01 -06:00
MJSPollard 7457ab3e14 added define to work with certain enabled options 2018-09-12 23:37:31 -06:00
MJSPollard d280359548 added option to print wolfcrypt benchmark tests in CSV format 2018-09-11 14:49:54 -06:00
Daniele Lacamera 27555d6eb7 Fix old-style function definitions 2018-09-07 09:13:20 +02:00
David Garske 9ae4ef2d5c Build fixes for `--enable-async --enable-all --with-intelqa`. Resolves conflict for `stat` variable name. Fix for DH with async. Fix for async devSize. 2018-08-21 19:51:13 -07:00
JacobBarthelmeh cb756397b3 inital AES-CBC with af_alg
progress on AES-GCM with AF_ALG and add SHA256

add aes-gcm test cases and finish logic of aes-gcm with AF_ALG

formating of tabs and white space

add files to dist

adding ecb and ctr mode with af_alg

make length of buffers for ctr be AES_BLOCK_SIZE

formating and add support for sha256 copy/gethash

sanity checks on arguments

cast return values and valgrind tests

make it easier to use sha256 with af_alg

remove hard tabs

add endif for after rebase
2018-08-01 08:54:20 -06:00
Chris Conlon 5c940351b7 add include for task.h for FREERTOS in benchmark.c 2018-07-18 16:52:16 -06:00
toddouska 5d767aa004
Merge pull request #1641 from ejohnstown/rename-inline
Rename INLINE
2018-06-27 09:34:41 -07:00
John Safranek 586874b997 Rename INLINE
1. Renamed the macro INLINE as WC_INLINE.
2. For FIPS and the "selftest" build, define INLINE as WC_INLINE. Allows the FIPS code to work unchanged.
2018-06-26 15:17:46 -07:00
David Garske ed1c56a4fc Benchmark support for 3072-bit RSA and DH when `USE_CERT_BUFFERS_3072` is defined. 2018-06-22 09:30:33 -07:00
Eric Blankenhorn a0d8327320 Coverity fixes 2 (#1493)
* Coverity fixes for wolfcrypt folder
* Fixes for remaining issues
* Fixes for test files
2018-04-13 05:35:18 -07:00
David Garske c83e63853d Refactor unqiue hash types to use same internal values (ex WC_MD5 == WC_HASH_TYPE_MD5). Refactor the Sha3 types to use wc_ naming. 2018-04-09 13:28:15 -07:00
David Garske c9d840ed8d Fix for the `HAVE_THEAD_LS` case with `FP_ECC` where starting a new thead and doing ECC operations and not calling `wc_ecc_fp_free`. Added missing `wolfCrypt_Init` to API docs. 2018-03-27 14:29:39 -07:00
Jacob Barthelmeh 772651c17a update tests and benchmark for HAVE_AES_DECRYPT 2018-02-19 17:32:39 -07:00
Jacob Barthelmeh 02753e53a5 add some of AES key size macros to benchmark.c and test.c 2018-02-19 17:28:53 -07:00
toddouska c66ebb6748
Merge pull request #1317 from SparkiDev/chacha20_sb_avx2
Improve performance of chacha20-poly1305 on AVX and AVX2.
2018-02-02 10:46:39 -08:00
Sean Parkinson 4d75f337bb Fix AVX2 final func to reset state 2018-01-24 16:36:44 -08:00
Sean Parkinson f2079ca792 Added option to benchmark RSA sign/verify instead of enc/dec 2018-01-18 11:35:19 +10:00
toddouska 2e6f97621a
Merge pull request #764 from JacobBarthelmeh/Compatibility-Layer-Part3
Compatibility layer part3
2018-01-13 09:57:14 -08:00
Jacob Barthelmeh df7917fcd9 add --enable-aescfb, add comments, include of stdio with snprintf 2018-01-12 11:05:43 -07:00
Jacob Barthelmeh c2a6c6c395 add CFB mode for AES 2018-01-11 15:23:15 -07:00
David Garske 481f4765eb Cleanup to remove duplicate MAX_DIGEST_SIZE in hmac.h and refactor to use WC_MAX_DIGEST_SIZE. Cleanup for HMAC to include hash.h and refactor HMAC_BLOCK_SIZE to WC_HMAC_BLOCK_SIZE. Fix build warning in benchmark.c with unused variable if features are disabled. 2018-01-11 09:52:49 -08:00
toddouska f2375f3fee
Merge pull request #1271 from SparkiDev/chacha20_sb
Improve performance of small number of blocks for chacha20
2018-01-02 09:40:49 -08:00
David Garske f71047ef2d Fix for building with `BENCH_EMBEDDED`. Fix for building without OPENSSL_EXTRA where wolfSSL_OPENSSL_malloc assumes size_t is defined. Improvements to the GCC-ARM IDE example. 2017-12-29 08:19:21 -08:00
Chris Conlon 7bc5bcb86a benchmark.c fixes for NO_MAIN_DRIVER, const arrays 2017-12-20 14:55:35 -07:00
Chris Conlon e4ac38c532 fix valgrind use of uninitialized value warning 2017-12-20 11:35:30 -07:00
Sean Parkinson 31aa5e308d Improve performance of small number of blocks for chacha20 2017-12-19 18:02:21 +10:00
toddouska 26019b3441
Merge pull request #1262 from SparkiDev/benchmark
Improve benchmark program
2017-12-11 15:55:00 -08:00
Sean Parkinson 704b332960 Add usage information
Only recognize on command line algorithms compiled in.
2017-12-11 11:40:11 +10:00
Sean Parkinson 2954b67f96 Improve benchmark program
Supports command line choosing of algorithms to benchmark.
Display benchmarks in powers of 10 (1000, 1000*1000) instead of
powers of 2 (1024, 1024*1024).
2017-12-08 13:57:34 +10:00
David Garske bababf115a Moved to IDE/XCODE. Fixed build warnings with xcode. Updated the `user_settings.h` to support fast math, ECC, timing resistance, single precision math, ARMv8, SHA3, ChaCha20/Poly1305, Ed/Curve25519 and ensure default disables are defined. Added Xcode iOS benchmark example. Runs wolfCrypt test, wolfCrypt benchmark and the new TLS benchmark by cipher suite. 2017-12-07 11:02:19 +01:00
Takashi Kojo 86a287be01 fix compile error with EWARM 2017-11-27 09:01:33 +09:00
David Garske e591576cdf Cleanup of the RSA exponent hard coded value. 2017-11-06 10:23:06 -08:00
David Garske 911b6f95f8 Release v3.12.2 (lib 14.0.0). Updated copywright. 2017-10-22 15:58:35 -07:00
David Garske f23ec7d5f2 Fix for building with `--disable-oldnames`. 2017-10-18 10:22:35 -07:00
toddouska 9920bdf097 Merge pull request #1103 from SparkiDev/sp_rsa
Single Precision maths for RSA, DH and ECC
2017-10-18 08:44:47 -07:00
Chris Conlon e49560fbf0 add missing parameter in SHOW_INTEL_CYCLES 2017-10-17 09:31:21 -06:00
Chris Conlon 7dccd9d478 set hash size for PIC32MZ hardware crypto 2017-10-17 09:30:26 -06:00
Chris Conlon d5b7c13fbf change enc/dec labels for AES, move scrypt bench below HMAC 2017-10-17 09:30:26 -06:00
Chris Conlon d65704c6b4 add benchmarks for AES-128/192/256-ECB 2017-10-17 09:30:16 -06:00
Sean Parkinson 90f8f67982 Single Precision maths for RSA (and DH)
Single Precision ECC implementation
2017-10-17 08:36:39 +10:00
Chris Conlon 9a6e4b2939 add separate benchmarks for AES-128/192/256-GCM 2017-10-16 14:43:39 -06:00
Chris Conlon 1e445e10a1 add separate benchmarks for AES-128/192/256-CTR 2017-10-16 14:43:38 -06:00
Chris Conlon 2b077b2792 add separate benchmarks for AES-128/192/256-CBC 2017-10-16 14:43:38 -06:00
Chris Conlon 1f72696359 add HMAC-MD5/SHA/SHA224/SHA384/SHA512 benchmarks 2017-10-16 14:43:38 -06:00
David Garske 6707be2b0e Added new `--disable-oldnames` option to allow for using openssl along-side wolfssl headers (without OPENSSL_EXTRA). Add `--enable-opensslcoexist` which makes sure `oldnames` is disabled. Refactor of `SSL_` to `WOLF_SSL_`. Refactor of `SHA`, `MD5`, `SHA224`, `SHA256`, `SHA512` and `SHA384` to `WC_` naming. 2017-10-11 09:10:42 -07:00
David Garske ee6f88cd98 Fix cast warnings with wolfCrypt test/benchmark. Cleanup of 80 char max line length in wolfCrypt test. 2017-09-22 15:22:42 -07:00
David Garske eec5f9bb41 Fixes for benchmark after buffers were moved into thread. Needed THREAD_LS_T and fixed benchmark alloc failure cleanup. 2017-09-22 11:35:46 -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
David Garske 3f16fba4f8 Fix build warning with possible use of unitialized `ret`. 2017-09-15 10:41:43 -07:00
Jacob Barthelmeh 398252ddad add XtsAes structure and change XTS-AES API 2017-09-08 16:00:33 -06:00
Jacob Barthelmeh ef73c1df7c add AES-XTS mode --enable-xts 2017-08-30 17:50:15 -06:00
David Garske b32be20110 Refactored async event intialization so its done prior to making possible async calls. Added `threadId` and removed volatile attribs in `WOLF_EVENT`. Fixed possible unitialized value in benchmark ret. 2017-08-15 21:19:28 -07:00
David Garske a9c943d5bd Fix jenkins warning with possible uninitialized 'ret'. 2017-08-15 21:19:28 -07:00
David Garske 44a3622248 Fixes to better handle threading with async. Fix `wc_CamelliaCbcEncrypt` return code checking. Fix to ensure cycles per byte shows on same line. Refactor of async event state. Refactor to initalize event prior to operation (in case it finishes before adding to queue). Add `HAVE_AES_DECRYPT` to --enable-all option. Cleanup benchmark error display. 2017-08-15 21:19:28 -07:00
David Garske 4e735631e7 Fixes for PIC32MZ:
* Adds crypto HW support for AES Direct and AES CCM.
* Fixes to enable PIC32MZ hardware hashing where updates are cached via heap buffer and final performs single operations against hardware.
* Fix for benchmark with 1024-bit certs passing in wrong size for `wc_RsaPrivateDecrypt` when using `USE_CERT_BUFFERS_1024`.
* Fix to resolve missing `strncasecmp` for the Microchip XC32. Workaround to use case sensitive version instead. This error occurred when building with HAVE_ECC defined in Harmony with XC32.
* Cleanup of the PIC32MZ crypto and hashing hardware code. Replace `pic32mz-hash.c` with `pic32mz-crypt.c`
* Add user_settings.h for mplabx and mcapi examples.
* Sync up with Harmony changes for MCAPI.
2017-08-01 12:42:09 -07:00
Sean Parkinson bde6a35ac4 Assembly optimization for AES-NI, and AVX1 and AVX2
Unroll the loop for 8.
Use new optimized maths.
Fix SHA-384 to use SHA-512 assembly code.
Only perform CPU id check in one place.
2017-07-25 08:50:39 +10:00
toddouska 36c2ee92dc Merge pull request #1050 from JacobBarthelmeh/ARMv8
Xilinx port
2017-07-24 15:37:05 -07:00