Commit Graph

654 Commits (devin/1739920896-esp32-fixes)

Author SHA1 Message Date
Kareem 2f1a37769e Fix doAsync warning in bench_ecc. 2021-11-08 11:42:05 -07:00
Daniel Pouzzner 6ba55edd50 fix async warnings 2021-10-29 14:37:39 -06:00
John Safranek 75df6508e6 Add a read enable for private keys when in FIPS mode. 2021-10-26 20:24:29 -05:00
Daniel Pouzzner f264741aa0 benchmark.c: fix -Wstringop-truncation in _ASYNC_CRYPT bench_stats_add(). 2021-10-26 20:24:27 -05:00
Daniel Pouzzner e3989edd39 wolfcrypt/benchmark/benchmark.c: fix typo. 2021-10-26 20:24:27 -05:00
Daniel Pouzzner cff7c5b3c0 wolfcrypt/benchmark/benchmark.c: in bench_dh(), add a missing #ifdef HAVE_PUBLIC_FFDHE around a DhParams use. 2021-10-26 20:24:26 -05:00
John Safranek f53a4db4e7 Unwind a few changes adding guards so it'll build with old FIPS. 2021-10-26 20:24:26 -05:00
John Safranek 908ec9b14a Modify ffdhe to not return addresses. 2021-10-26 20:24:25 -05:00
John Safranek 976402e04b RNG Update
1. When the seed callback is enabled, allow wc_GenerateSeed() to be used
   as a default callback.
2. Modify all the tests and examples to use the default seed callback if
   the seed callback is enabled.
2021-10-26 20:24:25 -05:00
kaleb-himes 5859779ddf Check-in non-FIPS specific porting changes for OE22
Fix no new line

Change comment style in testsuite.c

Add include for proper socket header in wolfio.h

Add dc_log_printf support to benchmark application

Pull in changes for examples

Refector NETOS check in test.c

Fix format and remove settings used only for validation testing

Implement peer review feedback

Address last items noted in peer review

Add new README to include.am

Adjust comment style on TODO

Gate changes in client and server properly

Add static on customer feedback

Fix settings include

Update latest peer feedback
2021-10-22 15:01:14 -06:00
Anthony Hu 33cb823148
Remove legacy NTRU and OQS (#4418)
* Remove NTRU and OQS

* Keep the DTLS serialization format backwards compatible.

* Remove n from mygetopt_long() call.

* Fix over-zealous deletion.

* Resolve problems found by @SparkiDev
2021-09-24 08:37:53 +10:00
Daniel Pouzzner 45e9872714 wolfcrypt/benchmark: fix output buffer size in bench_eccEncrypt(). 2021-09-20 10:27:13 -05:00
David Garske b6665df6a8
Fixes for sniffer handling of TCP spurious retransmission (#4372)
* Fix for sniffer to better handle spurious retransmission edge case. ZD 12852

* Fix for sniffer to not send alerts during application data processing.

* Fix for missing semi-colon on XFREE.

* Fix for `bench_stats_print` with stack variable name used in `bench_ecc`. Improve benchmark thread cleanup, CPU count calcuation and stat blocking logic.
2021-09-08 09:40:58 +10:00
Sean Parkinson d372f097f7 SP C: change number of words for RSA/DH
Faster small code and fast code.
Allow fixed 4096-bit FFDHE parameters in benchmark.
Convert [u]int[32|64|128]*_t types to sp_[u]int[32|64|128].
Add a div for when top bits are all 1
WOLFSSL_SP_FAST_LARGE_CODE added to make mul_add function faster on
non-embedded platforms.
Change mod_exp window sizes for same performance but less memory.
P256 with c32 now 9 words instead of 10.
2021-07-22 13:12:31 +10:00
Chris Conlon ffd69f6426
Merge pull request #4141 from kaleb-himes/FIPS_ANDROID_v454
Changes to support Android app with wolfCrypt module v4.5.4
2021-07-21 11:23:42 -06:00
John Safranek 77c9b36b5a
Merge pull request #4181 from dgarske/sniffer_keycb
Sniffer fixes and new sniffer key callback support
2021-07-19 13:26:17 -07:00
Daniel Pouzzner 9b43e57ccf ED: add streaming API to the ED verify routines: wc_ed*_verify_msg_init(), wc_ed*_verify_msg_update(), wc_ed*_verify_msg_final();
harmonize the ED448 API with the ED25519 API by making wc_ed448_verify_msg_ex() and wc_ed448_init_ex() public functions;

track devId and heap pointer in ed*_key.{devId,heap}, and pass them through to sha init functions;

add ed*_key.{sha,sha_clean_flag}, and ed*_hash_{reset,update,final} functions, and use them for all ED hashing ops, to support streaming API and for optimally efficient reuse for the preexisting ED calls;

add ed448_hash() akin to ed25519_hash(), and use it in place of wc_Shake256Hash(), for .sha_clean_flag dynamics.

add to wc_ed*_import_private_key() the ability to import the combined key generated by wc_ed*_export_private() without supplying the redundant public key;

add macro asserts near top of ed*.h to assure the required hash functions are available;

fix {NO,HAVE}_ED*_{SIGN,VERIFY};

wolfcrypt/test/test.c: add missing key initializations in ed*_test();

wolfcrypt/test/test.c: fix unaligned access in myDecryptionFunc() detected by -fsanitize=address,undefined.
2021-07-16 13:49:47 -05:00
kaleb-himes f408eeb5bb Implement peer review suggestions 2021-07-16 09:57:11 -06:00
David Garske db32570ab3 Fix for missing `sp_radix_size` with `WC_MP_TO_RADIX`. 2021-07-12 13:40:55 -07:00
Sean Parkinson 34528eb6c9 ECC bench: can't use SAKKE curve with ECDH/ECDSA
Skip curve benchmarking when all curves are being benchmarked.
2021-07-06 12:19:50 +10:00
Elms 56d879f422 address scan-build issues for clang 6 and 10 2021-06-30 21:58:30 -07:00
Sean Parkinson 8592053856 Regression test fixes
./configure --enable-all --disable-rsa
./configure --disable-chacha --disable-asm
./configure --disable-rsa --disable-ecc --disable-dh --enable-curve25519
--enable-cryptonly (and ed25519, curve448, ed448)
./configure --disable-tls13 --enable-psk --disable-rsa --disable-ecc
--disable-dh C_EXTRA_FLAGS=-DWOLFSSL_STATIC_PSK
./configure --disable-oldtls --enable-psk -disable-rsa --disable-dh
-disable-ecc --disable-asn C_EXTRA_FLAGS=-DWOLFSSL_STATIC_PSK
--enable-lowresource --enable-singlethreaded --disable-asm
--disable-errorstrings --disable-pkcs12 --disable-sha3 --disable-sha224
--disable-sha384 --disable-sha512 --disable-sha --disable-md5
-disable-aescbc --disable-chacha --disable-poly1305 --disable-coding
Various build combinations with WOLFSSL_SP_MATH and WOLFSSL_SP_MATH_ALL
2021-06-25 09:18:06 +10:00
kaleb-himes b29fa9bd33 Changes to support Android app with wolfCrypt module v4.5.4 2021-06-17 08:11:40 -06:00
Daniele Lacamera 6d1981abd1 Do not directly include psoc6 port header to prevent loops 2021-06-08 08:24:43 +02:00
Elms 57f4adf438 DEOS: updated memory and add DTLS
Tested: DDC-I 9.2.0r94156 and OpenArbor on PPC hardware
2021-04-16 15:39:19 -07:00
Jacob Barthelmeh 9a86f133c8 additional fixes for reports with test cases 2021-04-05 21:26:52 +07:00
toddouska 1643bec05f
Merge pull request #3862 from kaleb-himes/WIN32_WCE_PORTING
_WIN32_WCE port of wolfCrypt - OE12
2021-03-23 14:40:48 -07:00
kaleb-himes b3eb2e3ddd Implement peer review feedback
Fix items that were missed from peer review

Remove dead code

Add ret capture of return from XVSNPRINTF
2021-03-22 11:55:16 -06:00
Sean Parkinson 35659be06f AES GCM: implement streaming
Updated EVP layer to use streaming API when enabled.
Assembly for x64 updated to include streaming.
2021-03-16 16:39:49 +10:00
toddouska 3ac03d3d66
Merge pull request #3805 from JacobBarthelmeh/copyright
update copyright date to 2021
2021-03-15 16:16:50 -07:00
toddouska 5fd0950a3a
Merge pull request #3654 from SparkiDev/sakke_eccsi
ECCSI and SAKKE: add support
2021-03-15 16:15:59 -07:00
David Garske 2e247cc176
Merge pull request #3870 from JacobBarthelmeh/Benchmark
fix for using devId with benchmarking ECC
2021-03-15 10:09:23 -07:00
JacobBarthelmeh e9b39c3091 fix for using devId with benchmarking ECC 2021-03-12 21:14:20 +07:00
Sean Parkinson a55e94cf6f ECCSI and SAKKE: add support
Fixes for static code analysis included.
Added const to function parameters.
Zeroise some temporaries.
2021-03-12 09:31:22 +10:00
Jacob Barthelmeh c729318ddd update copyright date 2021-03-11 13:42:46 +07:00
kaleb-himes 16d55b0b86 _WIN32_WCE port of wolfCrypt - OE12
Add user_settings.h for OE12

Restrict LPCWSTR typecast to be WINCE specific
2021-03-10 17:02:21 -07:00
toddouska 72eebd6e75
Merge pull request #3795 from JacobBarthelmeh/CAAM
Addition of QNX CAAM driver
2021-03-10 15:04:21 -08:00
Jacob Barthelmeh 79ec07f5e1 adjustment after rebase 2021-03-03 18:45:40 +07:00
Jacob Barthelmeh 69a0b643be removing some magic numbers 2021-03-03 18:45:40 +07:00
David Garske 9ebdc8d61c Additional fixes for building without RNG. Fix for possible use of `key->dp == NULL` in `wc_ecc_export_ex`. 2021-02-24 13:21:54 -08:00
David Garske 10be54054e Minor fixes for build errors and bad macro names. 2021-02-18 10:55:47 -08:00
David Garske c62b48f7d0 Fixes for building with RSA public or verify only. Fixes issue with reserved "div" keyword as variable name. ZD11585 2021-02-18 07:47:00 -08:00
Sean Parkinson 763f388471 SP int: get rsavfy and rsapub working again 2021-02-09 09:58:23 +10:00
toddouska f91dcb950c
Merge pull request #3670 from dgarske/keil
Fix for ARM Keil MDK compiler issue with `DECLARE_VAR_INIT`.
2021-01-25 14:57:05 -08:00
David Garske 05e1ee1694 Cleanup to use fixed sizes from defines for `DECLARE_VAR`. Resolves issue with Visual Studio and using a variable (even const) to declare an array size. 2021-01-25 09:14:12 -08:00
toddouska 920c443864
Merge pull request #3250 from JacobBarthelmeh/Benchmark
add brainpool benchmark
2021-01-22 10:08:21 -08:00
Jacob Barthelmeh 6fa1556daf guard -ecc-all with HAVE_SELFTEST macro 2021-01-22 16:13:31 +07:00
David Garske 1ee40ad7bd Fix to always init the variable (not just when from heap). Cleanup of the `DECLARE_` uses to make sure all allocations succeeded. 2021-01-21 17:12:29 -08:00
toddouska 5837d5e8de
Merge pull request #3649 from dgarske/stm_aesgcm_perf
STM32 AES GCM crypto hardware performance improvements
2021-01-21 15:55:58 -08:00
Jacob Barthelmeh b418936f72 account for FIPS and g++ builds 2021-01-22 04:21:23 +07:00
Jacob Barthelmeh 177f4aecb6 add all curves to benchmark 2021-01-22 03:20:41 +07:00
Jacob Barthelmeh e3fa462d72 add brainpool benchmark of key generation 2021-01-22 02:55:26 +07:00
JacobBarthelmeh fe37137f12 add brainpool benchmark 2021-01-22 02:44:11 +07:00
David Garske 17f101ef13 Fix for ARM Keil MDK compiler issue with `DECLARE_VAR_INIT`. 2021-01-20 16:57:30 -08:00
David Garske 9ea5041d9d Benchmark for GMAC (AES GCM GHASH). 2021-01-19 13:42:25 -08:00
Sean Parkinson 6a5e802cc4 Disable algs: fix code to compile with various algs off/on
benchmark.c: Only X25519/Ed25519/X448/Ed448 now compiles
asn.c/asn.h: Only DSA now compiles
2021-01-19 09:54:21 +10:00
Jacob Barthelmeh a948066f86 some infer fixes 2020-12-17 01:49:48 +07:00
toddouska bd871280d7
Merge pull request #3497 from elms/erf32/se_acceleration
ERF32: HW acceleration
2020-12-14 15:43:15 -08:00
Sean Parkinson dbe4ce0e24 SP: Get RSA verify only to build with DH
Fix configuration: --enable-rsavfy --enable-sp --enable-cryptonly
[--enable-sp-asm]
2020-12-07 09:46:14 +10:00
Elms 9f7ef0b3e6 SiLabs: Add ECC hardware acceleration support 2020-11-30 21:01:49 -08:00
Elms 1899a72d27 Micrium: benchmark fixes
* Time update for v5.8 to avoid rollover issues
 * define `XSNPRINTF`
 * `printf` based on Micrium version
2020-11-30 16:32:30 -08:00
Sean Parkinson 91d23d3f5a Implement all relevant mp functions in sp_int 2020-11-19 11:58:14 +10:00
Daniel Pouzzner 5fe1586688 fix 34 deadcode.DeadStores detected by llvm11 scan-build. 2020-11-11 13:04:14 -06:00
Daniel Pouzzner 2d149b1bef benchmark.c: backport fixes to bench_dh() DH key size initialization from SparkiDev:sp_math_all. 2020-11-04 15:35:58 -06:00
John Safranek dbf18b8532
Test ECC-521 Only
Update benchmark and wolfcrypt test to support using only ECC-521 in a custom curve list.
2020-09-28 09:22:24 -07:00
Daniel Pouzzner 60a686f48c tidying suggested by Sean in review. 2020-09-23 18:32:16 -05:00
Daniel Pouzzner 8b19a9b58c benchmark.c: fix always-true tests for DECLARE_VAR_IS_HEAP_ALLOC. 2020-09-23 18:32:16 -05:00
Daniel Pouzzner 6c32a730c2 more work on DECLARE_VAR -- fix allocation failure handling in bench_rsa_helper() to avoid uninitialized variables. 2020-09-23 18:32:16 -05:00
Daniel Pouzzner 426de2101a more work on DECLARE_VAR -- proper handling of failed allocations. WIP. 2020-09-23 18:32:16 -05:00
David Garske 083f143c89 Fixes for warnings with minimum ECC build. 2020-08-21 15:47:02 -07:00
David Garske 25f9d15980 Fix for benchmark example when using the ECC encrypt (`--enable-eccencrypt`) and timing resistance. New timing resistance RNG requirements for ECC Shared Secret. 2020-08-20 14:25:06 -07:00
John Safranek 3f6861ee82
FIPS Ready Fix with ECC Timing Resistance
Commit 6467de5 added some timing resistance to ECC shared secret
agreement. It involved adding an RNG object to the ecc keys so
a random z value can be added to the mix. The older FIPS release
has ECC outside the boundary, so it uses the new ECC code. FIPSv2
has ECC inside the boundary, but all the TLS code checks for that
version of FIPS and leaves out the calls to the new functions as
it is using an older version of ecc.c. FIPS Ready uses the latest
version of ecc.c but compiles as FIPSv2. So, the code outside of
the crypto layer is treating ECC as FIPSv2 and not calling the new
functions, but the crypto layer assumes the RNG should be present,
and errs out on testing.
1. Added a separate option for FIPS Ready to the enable-fips
   configure option. `--enable-fips=ready`. It will treat FIPS
   Ready as the next kind of FIPS release. FIPS Ready will be
   treated like FIPS v3 in the build.
2. Changed the C preprocessor checks for FIPS version 2 to be
   checks for not version 2, with respect to ECC Timing Resistance
   and FIPS builds.
2020-08-14 10:54:55 -07:00
Sean Parkinson 6467de5a88 Randomize z ordinates in scalar mult when timing resistant
An RNG is required for shared secret calculation now.
Use wc_ecc_set_rng() to set an RNG against the ECC object.
ECC verification does not need timing resistance and does not randomize
z ordinates.
2020-08-11 16:12:47 +10:00
David Garske 9160a126e4 Fixes for running wolfCrypt test/benchmark with SECP256R1 disabled. Improved detection of ECC key generation size. 2020-07-28 11:43:48 -07:00
David Garske d43d75bf81 Updates to xcode projects to add new files.
Ran updated iPhone X benchmarks:

```
RNG                330 MB took 1.010 seconds,  326.879 MB/s
AES-128-CBC-enc    920 MB took 1.005 seconds,  915.507 MB/s
AES-128-CBC-dec   6095 MB took 1.000 seconds, 6092.130 MB/s
AES-192-CBC-enc    820 MB took 1.000 seconds,  819.644 MB/s
AES-192-CBC-dec   4860 MB took 1.001 seconds, 4855.794 MB/s
AES-256-CBC-enc    710 MB took 1.005 seconds,  706.419 MB/s
AES-256-CBC-dec   3935 MB took 1.001 seconds, 3930.830 MB/s
AES-128-GCM-enc   1245 MB took 1.003 seconds, 1241.589 MB/s
AES-128-GCM-dec    575 MB took 1.001 seconds,  574.547 MB/s
AES-192-GCM-enc   1235 MB took 1.001 seconds, 1234.343 MB/s
AES-192-GCM-dec    570 MB took 1.003 seconds,  568.521 MB/s
AES-256-GCM-enc   1230 MB took 1.003 seconds, 1226.034 MB/s
AES-256-GCM-dec    570 MB took 1.001 seconds,  569.199 MB/s
3DES                10 MB took 1.386 seconds,    7.213 MB/s
MD5                 95 MB took 1.037 seconds,   91.629 MB/s
SHA                 80 MB took 1.013 seconds,   78.943 MB/s
SHA-256           1625 MB took 1.000 seconds, 1624.565 MB/s
SHA3-224            60 MB took 1.010 seconds,   59.399 MB/s
SHA3-256            60 MB took 1.073 seconds,   55.921 MB/s
SHA3-384            45 MB took 1.042 seconds,   43.195 MB/s
SHA3-512            35 MB took 1.164 seconds,   30.063 MB/s
HMAC-MD5            95 MB took 1.044 seconds,   91.014 MB/s
HMAC-SHA            80 MB took 1.007 seconds,   79.480 MB/s
HMAC-SHA256       1705 MB took 1.001 seconds, 1703.126 MB/s
RSA     2048 public      32800 ops took 1.003 sec, avg 0.031 ms, 32716.405 ops/sec
RSA     2048 private      1200 ops took 1.041 sec, avg 0.868 ms, /33 ops/sec
DH      2048 key gen      2354 ops took 1.000 sec, avg 0.425 ms, 2353.254 ops/sec
DH      2048 agree        2500 ops took 1.013 sec, avg 0.405 ms, 2467.525 ops/sec
ECC      256 key gen     46503 ops took 1.000 sec, avg 0.022 ms, 46502.069 ops/sec
ECDHE    256 agree       14100 ops took 1.005 sec, avg 0.071 ms, 14034.697 ops/sec
ECDSA    256 sign        29600 ops took 1.003 sec, avg 0.034 ms, 29500.554 ops/sec
ECDSA    256 verify      11000 ops took 1.007 sec, avg 0.092 ms, 10921.516 ops/sec
```
2020-06-12 10:39:26 -07:00
JacobBarthelmeh 6a7a8fa5b7 updated RSA calls to Xilsecure 2020-05-19 19:27:21 -06:00
David Garske 6185e0f477 Remove execute bit on files. 2020-04-27 11:16:02 -07:00
Sean Parkinson ba401c9bde Fix testing using 4096 bits keys and parameters
RSA PKCS #1.5 padding for signing is not reliant on a random.
2020-04-14 12:03:51 +10:00
Sean Parkinson 411aee6e05 Fixes from cppcheck
Added PRIVATE_D version of rsa private key operation for SP
implementation for specific platforms.
WC_NO_RNG results in warnings when RNG calls don't do anything.
Added ifdef checks for variables not used otherwise.
Remove superfluous if statements like when checking ret == 0.
Change names of globals that are generic and are used locally before
global definition.
Remove definition of variable len that isn't used except as a
replacement for sz which is parameter.
Don't subtract two variables when one has just been assigned the value
of the other.
Fix shifting of signed value.
Fix parameter checking in aes.c and des3.c for platform specific code.
2020-04-08 09:46:22 +10:00
David Garske 2706d6d48a Improve the benchmark to use snprintf then printf. Resolve issue showing results with xil_printf. 2020-03-20 12:34:08 -07:00
David Garske 3127a7e9e5 Fixes for building with bare-metal on Xilinx SDK with zynqmp. Added Zynqmp benchmark timer support. 2020-03-20 12:22:47 -07:00
Sean Parkinson 2c6eb7cb39 Add Curve448, X448, Ed448 implementations 2020-02-28 09:30:45 +10:00
Jacob Barthelmeh ab49120652 add aesofb benchmark 2020-02-20 17:28:32 -06:00
Sean Parkinson 8972bf6278 Add support for P384 curve into SP 2020-02-17 15:46:34 +10:00
Chris Conlon b62064f6a8
Merge pull request #2737 from JacobBarthelmeh/dks7g2
changes for build with s7g2
2020-02-13 14:07:44 -07:00
Sean Parkinson 55ea2facdd Changes to clear issues raised by cppcheck 2020-01-30 14:24:32 +10:00
JacobBarthelmeh c01cd808da changes for build with s7g2
add project info

add project info

adjust wolfssl library template

change TRNG collection

fix include.am

fix argument for TRNG

rename example templates

comment out DEBUG_WOLFSSL

change include.am

update license
2020-01-14 17:48:41 -07:00
Chris Conlon 45c5a2d39c update copyright to 2020 2020-01-03 15:06:03 -08:00
toddouska deac82c8ed
Merge pull request #2683 from dgarske/various_items
Various cleanups and fixes
2019-12-27 13:53:39 -08:00
toddouska 78fa84be00
Merge pull request #2649 from SparkiDev/rsa_pubonly
Fix RSA public key only builds
2019-12-27 12:55:34 -08:00
David Garske 22f0b145d3 Various cleanups and fixes:
* Fix for key gen macro name in benchmark.c
* Fix for possible RSA fall-through warning.
* Fix for building `WOLFSSL_STM32_PKA` without `HAVE_ECC`.
* Added option to build RSA keygen without the DER to PEM using `WOLFSSL_NO_DER_TO_PEM`.
* Added options.h includes for test.c and benchmark.c.
* Added printf warning on the math size mismatch in test.c.
* Added support for benchmarking larger sizes.
* TLS benchmarks for HiFive unleashed.
2019-12-18 07:09:26 -08:00
kaleb-himes 0a38d7c178 Add CCM Decryption to benchmarking 2019-12-12 13:53:30 -07:00
Sean Parkinson 2528121925 Fix RSA public key only builds
Client side only and no client auth
2019-12-06 20:42:27 +10: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
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 67b11b8ece Fixing some play-nice between sync QAT and sync Octeon. 2019-10-23 09:58:10 -07:00
John Safranek 989c964a95 Synchronous Cavium OCTEON Support for Sniffer
1. Add configure option for sync IntelQA that uses the crypto callback API.
2. Make a synchonous copy of the quickassist files.
3. Tie in the crypto device to the sniffer.
4. When making a sniffer build, define static DH enabled.
5. The readme files in the Cavium were being added to the distro optionally, changed to always add the readme files.
6. Added an include of the cavium_octeon header in the wc_ports.c.
7. Updated the Cavium OCTEON callback for AES-GCM.
8. Add the global tag to the list of crypto callback function pointers.
9. Add an accessor to the OCTEON crypto callback module to return the device ID of the OCTEON device.
10. Add a new version of ssl_SetWatchKeyCallback which takes an additional parameter of a device ID. This ID is used to set up the wolfSSL_CTXs in the sniffer session trackers.
11. Update the benchmark to use sync OCTEON and QAT.
2019-10-23 09:58:10 -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 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
Tesfa Mael 4e62d1f509 Fix for RSA inline 2019-09-11 22:57:54 -07:00
toddouska 31461dbfb5
Merge pull request #2373 from dgarske/mpint
Improvements to atoi, mp_int allocations and STSAFE-A100 error handling
2019-08-02 15:43:20 -07:00
Jacob Barthelmeh 6a52e0a138 fix help print out of benchmark 2019-07-31 11:47:26 -06:00
Sean Parkinson 23af4e92f3 Special implementation of mod exp when base is 2 in SP 2019-07-29 12:58:07 +10:00
David Garske b0444bcfa1 Refactor to add `XATOI` for standard library function. 2019-07-23 15:36:59 -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
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
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
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 891a645eaa Added benchmarking `-thread <num>` argument support for asynchronous crypto to allow run-time selection of thread count. ZD 4903. 2019-05-07 07:07:56 -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
David Garske e8afb6ea51
Merge pull request #2174 from embhorn/zd4879
Fixes for static analysis issues
2019-04-01 08:48:40 -07:00
Eric Blankenhorn cffe7eccde Fixes for high impact issues 2019-03-28 12:08:19 -05: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 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
toddouska 0d48a4a1a7
Merge pull request #2133 from dgarske/fixes_16bit
Fixes for data types, cast warnings and shift operations when using 16-bit platform
2019-03-12 16:53:27 -07:00
Chris Conlon d699b65a25
Merge pull request #2026 from kojo1/mdk-CMSISv2
MDK CMSIS RTOSv2
2019-03-06 09:36:49 -07:00
David Garske 621e1656b4 Fixes for data types, cast warnings and shift operations when using 16-bit platform. Added new `--enable-16bit` build option, which defines `WC_16BIT_CPU`. Fix build error when using `WOLFSSL_LEANPSK` and `NO_WOLFSSL_MEMORY`.
Tested using `avr-gcc` version 8.3.0 with: `./configure --host=avr --enable-16bit --disable-filesystem --enable-singlethreaded CFLAGS="-DWOLFSSL_GENSEED_FORTEST -DWOLFSSL_USER_CURRTIME -DWOLFSSL_USER_IO -DWOLFSSL_NO_SOCK -DNO_WRITEV -DUSER_TICKS" --enable-tls13 --enable-compkey --enable-certgen --enable-certext --enable-keygen --enable-session-ticket --enable-maxfragment`. Also with `--enable-fastmath`.
2019-03-01 15:54:08 -08:00
David Garske 77ffeccb0b Fixes to QAT enables for benchmark for HMAC. Adds new `NO_HW_BENCH` to support using multi-threaded software only benchmarks. 2019-02-26 14:34:03 -08:00
David Garske 1512f4da90 Correct the output for multi-threaded benchmark usign `-base10` option. 2019-02-26 13:38:33 -08:00
David Garske 55ca2c2da7 Added build-time override for benchmark thread count `WC_ASYNC_BENCH_THREAD_COUNT`. 2019-02-21 10:45:09 -08:00
Takashi Kojo 161e815c03 remove hard tab 2019-02-20 04:14:17 +09:00
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
Jacob Barthelmeh 59a46d08d9 Xilinx port 2017-07-21 17:39:47 -06:00
David Garske f0d6299581 Fix issue with `benchmark_init` refactor where malloc failure could use null pointer. Added error checking on the `wolfCrypt_Init()`. 2017-07-21 09:31:12 -07:00
David Garske 0a63221220 Fix for SHA3 benchmark digest size for 224. Fix for building track and debug memory together. Fix for hash test order of SHA256 wrong. Fix for asn `SkipObjectId` missing, when RSA and ECC disabled. Enhancement to allow individual bench calls with bench init/free. 2017-07-19 18:14:57 -07:00
Chris Conlon f8c0a52170 Merge pull request #996 from jrblixt/unitTest_api_addAes-PR06152017
Unit test api add AES.
2017-07-11 08:36:13 -07:00
toddouska e767d40656 Merge pull request #1006 from cconlon/mqx
Update MQX Classic, mmCAU Ports
2017-07-05 10:30:20 -07:00
David Garske a025417877 Fix issue with QAT and DH operations where key size is larger than block size. Fix issue with DhAgree in TLS not setting agreeSz, which caused result to not be returned. Renamed the internal.c HashType to HashAlgoToType static function because of name conflict with Cavium. Optimize the Hmac struct to replace keyRaw with ipad. Enable RNG HW for benchmark. Fixed missing AES free in AES 192/256 tests. 2017-06-30 11:35:51 -07:00
Chris Conlon 15a1c9d48e fixes for MQX classic with Codewarrior 2017-06-28 12:28:40 -06:00
jrblixt a3b21f0394 Aes unit test functions. 2017-06-26 15:16:51 -06:00
jrblixt 6a2824f199 Add Camellia unit test functions.. 2017-06-16 16:27:03 -06:00
toddouska b778ddfea2 Merge pull request #957 from SparkiDev/tls13_updates
Tls13 updates
2017-06-14 14:59:11 -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
Nickolas Lapp 1e94868432 Add LINUX SGX Support for building of wolfSSL static library. See README
in IDE/LINUX-SGX/README.md.
2017-06-13 17:34:45 -07:00
Levi Rak 267753acdd add void to function prototype 2017-06-12 10:28:10 -06: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 c1664bd1a0 Fixes for async with benchmark tool. 2017-05-23 15:41:42 -07:00
toddouska bdaa827114 Merge pull request #927 from dgarske/fix_nxp_ltc
Build fixes for NXP KSDK with MMCAU / LTC after Hexiwear changes
2017-05-19 08:49:54 -07:00
jrblixt 77ac61c0f4 Prepare for PR Add Sha224 and RipeMd to unit test. 2017-05-18 13:08:25 -06:00
David Garske 30db8e95a7 Build fixes for KSDK NXP MMCAU / LTC after Hexiwear changes. 2017-05-18 11:52:20 -07:00
David Garske 48895cf03b Added argument for benchmark block size. Usage: `./wolfcrypt/benchmark/benchmark 128`. Automatic calculation for showing as bytes, KB or MB. 2017-05-18 11:24:32 -07:00
David Garske 4edcbc79c1 RipeMd and Sha224 added to unit test. 2017-05-18 09:32:11 -06:00
David Garske e8cf4b5ff0 Coverity fixes for TLS 1.3, async, small stack and normal math. 2017-05-09 09:13:21 -07:00
Jacob Barthelmeh dbb67d8582 warnings for builds of haproxy, nginx, and leanpsk 2017-05-02 14:29:53 -06:00
toddouska 27aafd674a Merge pull request #886 from dgarske/fixes_coverity2
Fixes for coverity scan (part 2)
2017-05-02 08:53:03 -07: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
David Garske 9491027c85 Fixes for coverity scan (part 2). 2017-05-01 16:34:24 -07:00
David Garske db63fe83d4 Initial pass at fixes for coverity scan. 2017-04-28 14:59:45 -07:00
Michael b08e5f3b82 Merge branch 'master' into hexiwear_pr 2017-04-14 12:03:42 -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
David Garske 4c6a70861b Fix build errors with --enable-scrypt. 2017-04-13 09:37:48 -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
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
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
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
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
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
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
John Safranek ac0181d527 In benchmark, change the calls to InitRNG to the explicit
heap versions like all the other crypt calls so it works
with static memory. Plays nice with FIPS mode if available.
2017-01-20 15:36:08 -08: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
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 dcb9ef6651 better compatibility with printing errors to a file 2017-01-06 14:29:16 -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
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
kaleb-himes 6c7e1785aa EXIT_TEST macro added for cleaner implementation and maintenance 2016-12-09 19:39:36 -07:00
kaleb-himes 9e17b2b0aa Merge branch 'master' of https://github.com/wolfssl/wolfssl into RIOT_OS 2016-12-09 13:09:25 -07:00
David Garske eaca90db28 New Atmel support (WOLFSSL_ATMEL) and port for ATECC508A (WOLFSSL_ATECC508A). Adds wolfCrypt support for ECC Hardware acceleration using the ATECC508A. Adds new PK callback for ECC shared secret. Fixed missing "wc_InitRng_ex" when using "CUSTOM_RAND_GENERATE_BLOCK". Added ATECC508A RNG block function for P-RNG bypass ability. Added internal "wolfSSL_GetEccPrivateKey" function for getting reference to private key for ECC shared secret (used in test.h for testing PK_CALLBACK mode). Added README.md for using the Atmel ATECC508A port. 2016-12-07 07:57:55 -08:00
kaleb-himes 162294e3e5 added benchmark app for RIOT and updated test error handling 2016-12-02 14:39:37 -07: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
toddouska 3780f452e8 Merge pull request #609 from JacobBarthelmeh/ARMv8
ARMv8 : clang build with ARMv8
2016-11-03 09:02:20 -07:00
JacobBarthelmeh 6f06b60bc0 ARMv8 : clang build with ARMv8 2016-11-01 13:38:01 -07:00
Jacob Barthelmeh 09c32de412 RNG : option to not use RNG 2016-10-31 16:51:02 -06:00
toddouska 2ecf7090ca Merge pull request #595 from JacobBarthelmeh/Testing
static analysis : Fix warnings with wc_AesCcmSetKey
2016-10-12 11:27:29 -07:00
Jacob Barthelmeh 54c51ec4a0 static analysis : Fix warnings with wc_AesCcmSetKey 2016-10-12 10:02:53 -06:00
Jacob Barthelmeh eb9161d8a7 ARMv8 : sanity checks 2016-10-10 15:08:59 -06:00
Jacob Barthelmeh 6d73175b22 Benchmark App : fixed some invalid set key sizes 2016-09-17 15:07:38 -06:00
Jacob Barthelmeh 41912b92c6 initial ARMv8 instructions 2016-09-01 18:10:06 +00:00
David Garske 6a70403547 Fix for "not used" devId in benchmark. 2016-08-29 11:01:16 -07: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 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
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
John Safranek 61801e06df add benchmark for AES-CMAC 2016-05-25 16:12:19 -07:00
David Garske c1507957c4 Added a benchmark for ECC encrypt/decrypt when enabled via "HAVE_ECC_ENCRYPT" or "--enable-eccencrypt --enable-hkdf". 2016-05-19 11:42:00 -07:00
Chris Conlon 8f3e1165a1 add Whitewood netRandom client library support 2016-05-05 15:31:25 -06:00
toddouska ee21d33794 Merge pull request #407 from wolfSSL/embOS-port
embOS port
2016-05-05 13:27:27 -07:00
kaleb-himes 6e26cac686 Reworking directories and simplify README 2016-05-04 13:03:05 -07: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
kaleb-himes d184f8b1aa wolfSSL embOS port Initialize
self-review complete

Removed autogenerated files
2016-05-03 17:09:55 -06:00
John Safranek 698b1cc7dc update benchmark to show AES-CBC decrypt speed 2016-04-08 13:33:41 -07:00
David Garske dd28d53cfb Fix build issues with new async changes. Fixed issue with unused args preSigSz and preSigIdx with PSK enabled and ECC + RSA disabled. Fixed issue with missing qsSz variable in DoClientKeyExchange. Fixed missing DhAgree and DhKeyGen with NO_CERTS and PSK enabled. Fixed a couple scan-build warnings with "Value stored to '' is never read". 2016-04-01 09:23:46 -07:00
David Garske f539a60a40 Adjusted the RNG benchmark to split into smaller requests of max allowed RNG size. 2016-03-25 06:59:35 -07:00
David Garske 27e041246f Added benchmark for the RNG. 2016-03-24 08:42:19 -07:00
Jacob Barthelmeh e99a5b0483 prepare for release v3.9.0 2016-03-17 16:02:13 -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 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
David Garske 731e13ecf2 Fixes issue with building crypt benchmark with only ED/Curve25519 enabled with static rng missing. 2016-02-22 16:46:13 +01: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
kaleb-himes bf1af39027 benchmark needs a main if NO_CRYPT_BENCHMARK defined 2016-02-04 12:07:39 -07:00
David Garske dda0de4baa Added optional define "NO_CRYPT_BENCHMARK" to allow disabling benchmark code. 2016-02-01 13:04:30 -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
David Garske 07c79f9dc3 Fixes unused argument build error seen on CrossWorks (Issue #255). 2016-01-14 21:09:01 -08:00
David Garske 09793e3206 Added benchmark.h to expose the benchmark_test function. Updated a couple of projects to use the new benchmark header. 2015-11-17 08:52:12 -08:00
toddouska 54a0a3370a fix wolfSSL_Init to only call new wolfCrypt_Init() once 2015-11-02 12:35:43 -08:00
toddouska 28dcef2d71 gcm benchmark results format alignment 2015-11-02 09:39:34 -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
Jacob Barthelmeh dc31b9238f wolfcrypt init 2015-10-23 11:55:17 -06:00
toddouska d669fc28c2 add idea benchmark, cleanup 2015-09-23 14:42:48 -07:00
Takashi Kojo 9af596dfff add config files 2015-08-12 17:55:18 +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
John M. Schanck 53fb9188e7 Use ntru functions from stable libntruencrypt api
ntru_crypto_external_drbg_instantiate has been renamed
to ntru_crypto_drbg_external_instantiate in the 1.0.0
release of libntruencrypt. Made various other small changes
to build against libntruencrypt.
2015-07-16 15:43:50 -04:00
Jacob Barthelmeh 14723b7e65 QSH (quantum-safe handshake) extension 2015-07-07 09:55:58 -06:00
Takashi Kojo fe3253e618 IAR/EWARM wolfSSL name change 2015-06-01 20:02:20 +09:00
Takashi Kojo 559404137e moving xxxGetHash to hash.c 2015-05-27 18:37:19 +09:00
Takashi Kojo aaa1fe813a Added aes.c/des3.c 2015-05-22 09:55:49 +09:00
toddouska 8f8fb3834a reduce benchmark stack use, reduce max variable sizes 2015-05-07 14:24:58 -07:00
toddouska 114fc18c33 add alignment to benchmark key/iv 2015-04-30 17:10:33 -07:00
toddouska d090721730 fix cycles per byte format is cycles > 100 2015-03-28 14:38:29 -07:00
toddouska 905e5801f8 fix benchmark format, GB/s won't misalign output 2015-03-27 21:36:35 -07:00
toddouska 495fbe087e allow dh to be used w/o certs and asn 2015-03-27 14:28:05 -07: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
toddouska 2e7d3a9121 cleanup ed benchmark 2015-03-19 13:00:20 -07: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
toddouska 1395c88ec4 Merge pull request #14 from lchristina26/master
fix STM32 bug in benchmark.c
2015-02-25 13:39:49 -08:00
lchristina26 f04b042c73 fix STM32 bug in benchmark.c 2015-02-25 11:43:30 -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
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
John Safranek 7cff22c4b0 moved the buffers, key, and iv around in the file so lean-psk would still build 2015-01-30 10:43:31 -08:00
toddouska c5b495c44e fix HASH-DRBG memory leak in benchmark 2015-01-28 12:29:53 -08:00
toddouska d6d56c8532 fix missing function argument to get_intel_cycles() 2015-01-26 16:49:28 -08:00
toddouska a682d53f67 add cycles per byte to gcc + x86_64 benchmarks 2015-01-26 16:33:30 -08:00
John Safranek 2bcd55226f Merge branch 'ecc2' 2015-01-23 10:37:55 -08:00
John Safranek 2e6d118a50 allow different sized fast math for both RSA and ECC
add C_EXTRA_FLAGS "-DALT_ECC_SIZE" to enable, and set
size with "-DFP_MAX_BITS_ECC=512", default is 512
2015-01-23 10:26:41 -08:00
kaleb-himes b0e88e32ff Error printouts name changed 2015-01-20 12:36:20 -07:00
Jacob Barthelmeh 3345293ad7 debugging the debugging function in benchmark 2015-01-14 17:01:44 -07:00
kaleb-himes 8fe965cf24 ntru wc_ fixes 2015-01-14 09:52:33 -07:00
Jacob Barthelmeh d366599285 adding comment to header and _fips to c files 2015-01-08 10:42:01 -07:00
kaleb-himes a389620a29 Copyright (C) updates 2015-01-08 09:39:04 -07:00
kaleb-himes ce65bef5a8 enable-fpecc enable-ecc 2015-01-06 13:42:02 -07:00
Jacob Barthelmeh cbbdfc7b96 wolfcrypt api testwolfcrypt update 2014-12-29 14:35:46 -07:00
kaleb-himes edf53a1ed0 new changes 2014-12-29 10:27:03 -07:00