Commit Graph

19295 Commits (9bc3b867e065277d2f47c6c6a0eddf5adaf6ec9c)

Author SHA1 Message Date
Andras Fekete aff4d4a7d3 The size of the packet could vary by up to 5 bytes 2023-02-28 17:04:40 -05:00
Kareem 08a3e2cb6e Avoid building TLSX_SetResponse unless it is being used. Initialize PIC32 UPDPTR register in all cases. 2023-02-28 14:37:45 -07:00
David Garske 58236632ca Fix for PKCS7 with asynchronous crypto enabled. The addition of the `devId` field will attempt to leverage crypto callbacks and async hardware, so convert `WC_PENDING_E` to blocking. 2023-02-28 13:22:39 -08:00
Daniel Pouzzner b133f6bbf7
20230223-refactor-test-c-error-codes (#6135)
* wolfcrypt/test/test.{c,h}: refactor to capture and encode error retvals using WC_TEST_RET_*() macros (based on line numbers), and print line and return code in err_sys().
* wolfcrypt/test/test.h: cast back to int in WC_TEST_RET_ENC(), to fix MSVC warning.
* configure.ac: add shake128 and shake256 to enable-all and enable-all-crypto;
* wolfcrypt/benchmark/benchmark.c: fix gating for bench_shake128() from !defined(WOLFSSL_NO_SHAKE128) to defined(WOLFSSL_SHAKE128).
* wolfcrypt/test/test.h: add WC_TEST_RET_TAG_* and WC_TEST_RET_DEC_TAG(), and refactor WC_TEST_RET_{ENC,DEC}_*() macros to implement the tag mechanism;
* add render_error_message() with tag-specific rendering of error strings;
* wolfcrypt/test/test.c: smallstack refactor of shake128_test() and shake128_absorb_test();
* wolfcrypt/test/test.c: change gating around mp_test() and related routines from defined(HAVE_VALGRIND) to defined(WOLFSSL_PUBLIC_MP);
* smallstack refactor of mp_test();
* refactor a slew of WC_TEST_RET_ENC_NC associated with XFOPEN/XFREAD to be WC_TEST_RET_ENC_ERRNO, and add error detection for XFREAD (previously silently tolerating zero retvals).
* wolfcrypt/test/test.c: build mp_test() only if WOLFSSL_SP_MATH_ALL or USE_FAST_MATH (in addition to WOLFSSL_PUBLIC_MP), because many general purpose functions such as sp_mulmod() are gated out in SP builds without WOLFSSL_SP_MATH_ALL.
* wolfcrypt/test/test.c: fix array bounds flubs in shake128_test();
* don't print_fiducials() in wolfcrypt_test() header, but rather, after render_error_message() in err_sys().
* wolfcrypt/test/test.{c,h}: wrap some overlong lines, and fix an unused-variable warning in mp_test_set_is_bit().
* wolfcrypt/test/test.c: fixes for several misplaced and several missing WC_TEST_RET_ENC_EC()s.
2023-02-28 13:02:37 -08:00
Andras Fekete 41ce9afef4 Better dependency list
Need 32bit compilation support as well as ARM/AARCH64
2023-02-28 11:19:09 -05:00
Andras Fekete 7b96cd2220 Switch out gcc-multilib for more modern multiarch 2023-02-28 09:29:23 -05:00
Sean Parkinson 397537e691 AES-GCM: MSVC use generated assembly instead of inline
AES-GCM for MSVC was using inline assembly.
Add MSVC version of AES-GCM assembly and use it instead.
Removed inline assembly.
2023-02-28 14:56:29 +10:00
David Garske 79eaf10041
Merge pull request #6139 from bandi13/fixOpenVpn
Attempt to fix build error
2023-02-27 17:56:26 -08:00
Sean Parkinson c7b4bb1b27
Merge pull request #6128 from tim-weller-wolfssl/zd15454-benchmark-windows-update
Update wolfCrypt benchmark windows build files to support x64 Platform
2023-02-28 08:28:20 +10:00
Andras Fekete 2cbf5435c6 Attempt to fix build error 2023-02-27 17:07:13 -05:00
David Garske 950e0d100a
Merge pull request #6133 from philljj/zd15662
Fix malloc of zero size in fast_s_mp_sqr and fast_s_mp_mul_digs.
2023-02-27 10:47:29 -08:00
David Garske 12ccd01127
Merge pull request #6131 from anhu/STM32_kyber
Changes that make kyber work on STM32
2023-02-27 08:14:02 -08:00
Anthony Hu 49ae7d4845 Make old compilers happy. 2023-02-24 17:13:47 -05:00
JacobBarthelmeh 041d9c4510
Merge pull request #6130 from gojimmypi/Espressif_OpenSSL_interim
fix WOLFSSL_SHA_CTX for OpenSSL w/Espressif HW hash
2023-02-24 14:58:08 -07:00
David Garske f3f2f6ccb9
Merge pull request #6126 from tmael/rpm_fix
Fix RPM build
2023-02-24 13:35:52 -08:00
Tim Weller fd3d8c407d Update wolfCrypt benchmark Windows / Visual Studio build files to include x64 Configuration/Platform combinations (e.g. Debug-x64) and fixed compilation errors in benchmark.c related to conditional-compilation. 2023-02-24 11:53:01 -06:00
David Garske 469226f214
Merge pull request #6107 from anhu/ecc_pub
Fixes for encoding/decoding ecc public keys.
2023-02-24 08:36:15 -08:00
jordan 22b1857bee Fix malloc of zero size in fast_s_mp_sqr and fast_s_mp_mul_digs. 2023-02-24 10:18:36 -06:00
Andras Fekete 392ddd1b4a Remove conflicts 2023-02-24 10:38:35 -05:00
David Garske b1f421d0a6 Improve the "adder" for compatibility layer SHA context when hardware acceleration is used. 2023-02-24 07:28:15 -08:00
gojimmypi aef44ff029 fix WOLFSSL_SHA_CTX for OpenSSL w/Espressif HW hash 2023-02-24 07:20:55 -08:00
Andras Fekete d98dd53f55 Add one more utility 2023-02-24 09:48:15 -05:00
Andras Fekete 62748ba451 One more liboqs flag 2023-02-24 09:47:47 -05:00
Andras Fekete 559db5f314 Build liboqs for distribution
This makes it possible to use the library on same architecture but different processor type.
2023-02-24 09:47:47 -05:00
Andras Fekete 2b96f4bd16 Add in liboqs 2023-02-24 09:47:47 -05:00
Andras Fekete 87b7988643 Add cross compilers 2023-02-24 09:47:24 -05:00
Anthony Hu 1fcff5b30d Changes that make kyber work on STM32
(wolfcrypttest and benchmark)
2023-02-24 04:08:07 -05:00
David Garske b2a6203ec0
Merge pull request #6129 from SparkiDev/ed25519_doc_fix
Ed25519 doxygen update
2023-02-23 19:53:41 -08:00
Sean Parkinson 695aa2e6a0 Ed25519 doxygen update
Fix return comments to match code.
2023-02-24 08:54:16 +10:00
Anthony Hu c2daca1393 Fixes for encoding/decoding ecc public keys. 2023-02-23 13:56:48 -05:00
Anthony Hu d85ee5c87f
Merge pull request #6124 from embhorn/zd15573
Fix NID conflict NID_givenName and NID_md5WithRSAEncryption
2023-02-23 18:15:28 +00:00
David Garske 69ceedbcff
Merge pull request #5938 from JacobBarthelmeh/RT1170
Port to RT1170 and expand CAAM driver
2023-02-22 20:11:58 -08:00
David Garske ffa392cdb5
Merge pull request #6125 from embhorn/gh6007
Include sys/time.h for WOLFSSL_RIOT_OS
2023-02-22 16:06:10 -08:00
David Garske 434e869b1d
Merge pull request #6109 from nunojpg/master
Fix out of bound memset to 0
2023-02-22 15:43:09 -08:00
David Garske a8b8092ff8
Merge pull request #6122 from anhu/WOLFSSL_HAVE_KYBER
HAVE_KYBER --> WOLFSSL_HAVE_KYBER
2023-02-22 14:55:29 -08:00
JacobBarthelmeh 121ee7a6df fix spelling, refactor openssl extra struct, remove magic number, use static mutex 2023-02-22 14:31:16 -08:00
David Garske 2e7713f4c2
Merge pull request #6120 from embhorn/zd15698
Fix NULL dereference in TLSX_CSR_Parse
2023-02-22 13:43:43 -08:00
Eric Blankenhorn 3d71d3c388 Include sys/time.h for WOLFSSL_RIOT_OS 2023-02-22 15:36:50 -06:00
Eric Blankenhorn b32036258d Fix NID conflict NID_givenName and NID_md5WithRSAEncryption 2023-02-22 15:02:52 -06:00
Anthony Hu bd3ae97603 HAVE_KYBER --> WOLFSSL_HAVE_KYBER 2023-02-22 15:05:47 -05:00
JacobBarthelmeh b801a96f8c Port to RT1170 and expand CAAM driver 2023-02-22 08:26:25 -08:00
Eric Blankenhorn 0a928208f2 Fix NULL dereference in TLSX_CSR_Parse 2023-02-22 08:19:11 -06:00
Sean Parkinson b81759173a
Merge pull request #5840 from kareem-wolfssl/dynSessCache2
Add dynamic session cache which allocates sessions from the heap.
2023-02-22 15:14:38 +10:00
David Garske 74bad76707
Merge pull request #6117 from SparkiDev/priv_key_id_fix
Private Key ID: change to always set priv key type and size
2023-02-21 19:23:51 -08:00
Sean Parkinson 05365f6052
Merge pull request #6116 from dgarske/various2
Cleanup function logging
2023-02-22 12:27:26 +10:00
Tesfa Mael bfcc615e44 Fix rpm build 2023-02-21 15:02:10 -08:00
Sean Parkinson 39cfd8e566 Private Key ID: change to always set priv key type and size
When a certificate is loaded then the private key type and size is set
based on the public key.
Always set, even if previously set.
Use case is setting an RSA certificate against ctx and then setting EC
certificate against ssl.
2023-02-22 08:07:27 +10:00
Rhys Hansen fa41754b83
RX64/RX71 SHA hardware support updates
Made the following updates based on review feedback
Fixed mixed variable declaration and simplified cases by typedefing
wolfssl_RX64_HW_Hash to wc_Sha, wc_Sha224, & wc_Sha256
Added files to include.am so they are built when using make
Add WOLFSSL_RENESAS_RX64_HASH to settings.h and set WOLFSSL_NO_HASH_RAW
in settings.h based on value of WOLFSSL_RENESAS_RX64_HASH
Add and handle return value for rx64_hw_Open
Fix some minor formatting and comments
2023-02-21 15:46:25 -06:00
Rhys Hansen e47633ad83
Add RX64/RX71 SHA hardware support
Adding support for SHA1, SHA224, and SHA256 hardware acceleration on
Renesas RX64 and RX71 microcontrollers.
This follows the a similar pattern as the Renesas TSIP support.

Speed comparison for hashing 64KB of data on a RX64M
| Hash Speed | SHA1 | SHA256 |
|:----------:|:----:|:------:|
| Hardware   | 4ms  | 4ms    |
| Software   | 11ms | 89ms   |

Update define for RX64/RX71 SHA hardware support

This will allow for different hardware acceleration modules to be
enabled individually.

Init & Close for the RX64/RX71 SHA subsystem for WolfCrypt

This ensures that the SHA subsystem is ready for use when WolfCrypt
needs access to it.

Shorten the max line length, clean up comments

This wraps code and comments at 80 characters and adds some  comments
2023-02-21 15:46:17 -06:00
David Garske fc6d693dae Update logging enter, exit, msg to match function names. Fix some typos and improper use of "enter". Fix internal uses of `SSL_SUCCESS` and `SSL_FAILURE`. Add `WOLFSSL_DEBUG_NONBLOCK` option to allow printing iterations without debug enabled. 2023-02-21 12:02:15 -08:00