6700 Commits

Author SHA1 Message Date
gojimmypi
9da0ff0f31 Merge branch 'master' of https://github.com/wolfSSL/wolfssl into ESP32_HW_Update_PR 2022-07-21 08:21:17 +02:00
David Garske
9450fa1412
Merge pull request #5375 from LinuxJedi/se050-private-key-add
Add ECC private key insertion for SE050
2022-07-20 12:42:13 -07:00
David Garske
b46a308544
Merge pull request #5361 from embhorn/zd14491
Fix for build with NO_TLS
2022-07-20 09:28:23 -07:00
Andrew Hutchings
07d2940757 Fix issue caused by undo in IDE 2022-07-20 16:42:09 +01:00
Andrew Hutchings
d7b4abfa0b Fixups to the SE050 ECC pkey insert function 2022-07-20 16:25:39 +01:00
David Garske
f4191a102b
Merge pull request #5304 from SKlimaRA/SKlimaRA/cert-pathlen
drafted pathlen for cert struct
2022-07-20 07:54:13 -07:00
David Garske
aab2459d1f
Merge pull request #5372 from JacobBarthelmeh/copyright
update copyright year to 2022
2022-07-20 07:52:05 -07:00
David Garske
c029b23043
Merge pull request #5308 from SparkiDev/ecies_gen_iv
ECIES: Google Pay generates IV and places it before msg
2022-07-20 06:46:14 -07:00
Andrew Hutchings
ea34fb1643 Add ECC private key insertion for SE050
This adds a utility function which allows an ECC private key to be
inserted into the SE050's permanent storage.
2022-07-20 10:45:26 +01:00
Stanislav Klima
66c5a947fd XSTRNCPY, fixed typos 2022-07-20 08:56:59 +02:00
Sean Parkinson
09bba3510f ECIES: Google Pay ECIES
Generates IV and places it before msg
Uses 12 byte IV with AES-CTR
Add API to explicitly set KDF salt.
2022-07-20 09:30:47 +10:00
Jacob Barthelmeh
8eaa85e412 update copyright year to 2022 2022-07-19 10:44:31 -06:00
Eric Blankenhorn
8b904e9082 Fix for build with NO_TLS 2022-07-19 11:12:18 -05:00
Stanislav Klima
3d721bd533 more WOLFSSL_CERT_EXT 2022-07-19 11:00:36 +02:00
Stanislav Klima
6ce5f645f3 added ASN template code and WOLFSSL_CERT_EXT, still missing testcase 2022-07-19 10:38:47 +02:00
David Garske
feb3f889af
Merge pull request #5369 from embhorn/zd14522
Fix var init in wc_ecc_shared_secret
2022-07-18 14:17:53 -07:00
Chris Conlon
c63abe398f
Merge pull request #5321 from miyazakh/tsip_add_usecase 2022-07-18 09:35:43 -06:00
Eric Blankenhorn
f55fe7fccd Fix var init in wc_ecc_shared_secret 2022-07-18 09:13:07 -05:00
Andrew Hutchings
8a757ef7cf
Merge pull request #5363 from dgarske/se050_curve25519
Fixes for SE050 Curve25519 endianness
2022-07-15 08:49:27 +01:00
Hideki Miyazaki
15725400a7
addressed review comments 5 2022-07-15 13:46:30 +09:00
David Garske
dec8a7fd93 Fixes for SE050 Curve25519 endianness (SDK assumes little endian). Fix for ECC se050_ecc_shared_secret use of wrong pointer on error handle free. 2022-07-14 15:34:50 -07:00
David Garske
6cc2665a81
Merge pull request #5358 from SparkiDev/sp_int_armv6
SP int ARM32: replace clz instruction when not supported
2022-07-14 15:32:00 -07:00
JacobBarthelmeh
abba59f735 order of array of names for asn template build 2022-07-14 13:15:59 -07:00
JacobBarthelmeh
8862e1f8cf resolve name conflict 2022-07-14 09:41:36 -07:00
Hideki Miyazaki
fd885d89eb
Added multi thread use case
Improve not to use forward declaration struct definition

 - include ssl.h rather than forward declaration struct to resolve struct name
 - to include ssl.h, it needs to avoid cyclic reference for crypt structure. therefore, Sha and Aes definitions are moved to another header file
2022-07-14 17:25:21 +09:00
Andrew Hutchings
3f390efb24 Missed a small part of my original SE050 sign fix
Empty keyId handling now exists so we shouldn't return `BAD_FUNC_ARG`.
2022-07-14 07:47:33 +01:00
Andrew Hutchings
c211b90aab
Merge pull request #5357 from dgarske/se050_fixes
Fixes for SE050 ED25519 private key loading and Curve25519/ECC handle leak
2022-07-14 07:14:54 +01:00
Jacob Barthelmeh
f6c4e295b1 add more subject name support and expande REQ attributes creation support 2022-07-13 22:02:49 -07:00
Sean Parkinson
b69af856de Ed ASN template: change for IMPLICIT public key in private key
Fix KATs in test.c to match new expected format.
2022-07-14 10:19:43 +10:00
Sean Parkinson
33b3ebb1e9 SP int ARM32: replace clz instruction when not supported 2022-07-14 09:37:28 +10:00
David Garske
2d5bc72c9b Fixes for ED25519/ED448 private key with public key export (RFC8410). Added length only support. 2022-07-13 16:17:08 -07:00
David Garske
586ae71dac Fixes for SE050 ECC and Curve25519 with TLS. 2022-07-13 10:50:10 -07:00
Stanislav Klima
1b6ce6150e unsigned pathlen 2022-07-13 09:07:02 +02:00
Sean Parkinson
96fe356dd8 SP math
Enable ForceZero for SP math and all RSA.
Disable use of 128-bit type in SP unless WOLFSSL_UINT128_T_DEFINED is
defined.
2022-07-13 14:54:34 +10:00
Daniel Pouzzner
dc231dc099 peer review: add explanatory comment for printf() macro in test.c; rearrange test.h to avoid awkward forward declaration and add some topical grouping. 2022-07-12 18:19:52 -05:00
Daniel Pouzzner
b64949d564 wolfcrypt/benchmark/benchmark.c: fix gating for #include <errno.h>, and add #include <unistd.h> for _exit(). 2022-07-11 23:15:43 -05:00
Daniel Pouzzner
ccc5952369 global fixup to check or explicitly ignore return values from failable library/system calls that weren't already being checked;
add wolfCrypt error codes IO_FAILED_E "Input/output failure" and SYSLIB_FAILED_E "System/library call failed";

tests/api.c and tests/unit.c: flush stdout for error message in Fail() macro, add fflush(stdout) after printf()s, print success message at end of unit_test(), and send several error messages to stderr instead of stdout;

wolfcrypt/test/test.c: add fallthrough macro definition of printf() that pairs it with fflush(stdout);

unit.h: in definition of macro AssertPtr(), add PRAGMA_GCC("GCC diagnostic ignored \"-Wpedantic\"");

sp_int.c: refactor several lingering instances of "if (0) { ... }" code pattern to #if 0 ... #endif.
2022-07-11 22:28:09 -05:00
David Garske
e30899b676
Merge pull request #5334 from LinuxJedi/se050-fixes
Fixes to SE050 port
2022-07-11 16:15:08 -07:00
JacobBarthelmeh
983b9fc5fb
Merge pull request #5343 from dgarske/ecc_oid_coding
Fixes for ECC OID encoding/decoding
2022-07-08 15:38:47 -06:00
David Garske
4892435004 Fix for wc_ecc_get_curve_id_from_oid with combinations of HAVE_OID_ENCODING and HAVE_OID_DECODING. Fix in SetCurve for unused outSz with HAVE_OID_ENCODING. 2022-07-08 13:00:09 -07:00
David Garske
03a32250da Fix for KCAPI HMAC forcing use of software for HKDF. 2022-07-08 09:06:30 -07:00
David Garske
3d124c093e Fix PK function name in log. Remove the ECC logging (spams benchmark with --enable-debug). 2022-07-08 09:06:08 -07:00
David Garske
c9e9a421e9
Merge pull request #5336 from SparkiDev/aes_ctr_opt
AES-CTR: improve performance when multiple blocks
2022-07-07 21:51:08 -07:00
Sean Parkinson
2bfac42d65 AES-CTR: improve performance when multiple blocks
When in and out aren't the same pointer, for multiples of block size
input:
  - generate the counters into the output buffer
  - encrypt output buffer
  - XOR in the input
Faster than encrypting a block at a time.
2022-07-08 09:56:20 +10:00
Sean Parkinson
70b9833e98 ECC import and export fixes
On raw import, don't import ordinates that are larger than the curve
size.
On export of compressed point, don't export ordinate if it is larger
than the curve size.
2022-07-08 08:54:53 +10:00
Chris Conlon
5e453ad932
Merge pull request #5323 from SparkiDev/sha512_arm32_asm_align 2022-07-07 09:47:37 -06:00
Andrew Hutchings
34d897e433 Fixes to SE050 port
This fixes the following things:

* Memory leaks in SE050 SHA messages
* Add key to SE050 for ECC sign hash function
* Remove circular include
* Correct prototype for `se050_hash_final`
* A few defined check fixes
2022-07-07 16:11:54 +01:00
David Garske
a771baf551
Merge pull request #5332 from SparkiDev/memusage_fix_2
SP math: fix configure.ac to allow its use
2022-07-07 07:40:13 -07:00
Daniel Pouzzner
2111d6b179
Merge pull request #5322 from SparkiDev/sp_math_all_arm32_div_word_fix
SP math all: fix div word for ARM32
2022-07-06 22:18:07 -05:00
Sean Parkinson
74baa0dafa SP math: fix configure.ac to allow its use
Choosing SP and SP math was resulting in only integer.c being used.
Fixed now.
Reorder realloc calls for memory logging to ensure scripts can match
allocate and free calls.
2022-07-07 12:16:12 +10:00