Commit Graph

7735 Commits

Author SHA1 Message Date
David Garske
1d7c6c94fe Merge pull request #6780 from SparkiDev/sp_x64_uninit
SP x64 ASM: Initialize pointers in RSA functions
2023-09-18 09:49:22 -07:00
Sean Parkinson
ea8bc82f85 SP ARM64 ASM: fix sp_256_mont_dbl_4
In sp_256_mont_dbl_4, not all used registers were in asm clobber list.
2023-09-18 15:17:39 +10:00
Sean Parkinson
c0edb7b583 SP x64 ASM: Initialize pointers in RSA functions
Windows compiler complains about uninitialized variables in these
functions. Set the pointers to NULL to quiet the compiler.
2023-09-18 14:49:19 +10:00
JacobBarthelmeh
1f2ddb7554 Merge pull request #6778 from danielinux/writeable_pkcs11_tokens
Add compile-time option WOLFSSL_PKCS11_RW_TOKENS
2023-09-15 11:46:03 -06:00
JacobBarthelmeh
5654691f05 Merge pull request #6775 from kareem-wolfssl/zd16652
Add a build flag ASN_TEMPLATE_SKIP_ISCA_CHECK to optionally skip the isCa != false check.
2023-09-15 11:43:04 -06:00
Daniele Lacamera
ca56b79209 Add compile-time option WOLFSSL_PKCS11_RW_TOKENS
By default, wolfcrypt PKCS11 interface accesses tokens in read-only
mode. In some cases, we might want to build the client with write
permissions, i.e. when initializing tokens via C_InitToken().

The WOLFSSL_PKCS11_RW_TOKENS option, if present, allows write access to
PKCS11 tokens.
2023-09-15 15:18:11 +02:00
Sean Parkinson
e9f1489997 SP ECC: x64 minor speed improvement
ARM32/Thumb2: for safer code, do two reductions in mont triple after doing double part.
2023-09-15 09:48:32 +10:00
Kareem
8e40130003 Add a build flag ASN_TEMPLATE_SKIP_ISCA_CHECK to optionally skip the isCa != false check. 2023-09-14 15:44:47 -07:00
JacobBarthelmeh
7d85e390a9 Merge pull request #6769 from cconlon/pkcs7ContentType
Support PKCS#7 definition for ContentType content ANY
2023-09-14 15:44:35 -06:00
Sean Parkinson
6a25cdeb28 SP: WOLFSSL_SP_ARM_ARCH to WOLFSSL_ARM_ARCH and fix SAKKE on Thumb2/ARM32
WOLFSSL_SP_ARM_ARCH no longer used.
Using WOLFSSL_ARM_ARCH instead.
Change umaal check to only available with WOLFSSL_ARM_ARCH > 6.
SAKKE mont_reduce with umaal not using correct registers at end.
2023-09-14 13:04:49 +10:00
JacobBarthelmeh
ba03677569 Merge pull request #6770 from SparkiDev/sp_asm_improvements_1
SP ASM: improve performance
2023-09-13 16:01:03 -06:00
JacobBarthelmeh
624cb5e2bb Merge pull request #6744 from res0nance/windows-benchmark-config
windows: fix x64 benchmark release builds
2023-09-13 15:52:27 -06:00
Sean Parkinson
f5b96e7bde Merge pull request #6735 from anhu/lteq_0
Propose to convert a less than 0 to less than or equal to 0
2023-09-14 07:08:22 +10:00
Sean Parkinson
114c8cc681 SP ASM: improve performance
Thumb2/ARM32: use umaal instruction to speed up mulitplication, squaring
and reduction. umaal not always available so use umlal instead.
Implementations for architectures less than 4 still kept - no umull.
Cleanup point arithmetic to not take shortcuts.
Make masking for constant time faster.
Add alternate asm for different compilers.
Get ARMv4 and ARMv6 compiling.
Remove whitespace at end of lines.
2023-09-13 21:13:53 +10:00
Sean Parkinson
40c5048e38 AES GMULT: add table implementation using 32-bit types
32-bit ARM didn't load 64-bit pointers without alignment issues.
2023-09-13 13:44:17 +10:00
David Garske
e4b211bee9 Merge pull request #6764 from bandi13/zd16449_async
Zd16449 async
2023-09-12 08:38:16 -07:00
Andras Fekete
42985ebdfa Revert "Add in ASYNC_CRYPTO_SW checks"
This reverts commit f5ef7b40db.
2023-09-11 15:10:32 -04:00
Andras Fekete
f5ef7b40db Add in ASYNC_CRYPTO_SW checks 2023-09-11 13:12:09 -04:00
Dimitri Papadopoulos
d532833af9 Fix residual typos found by codespell 2023-09-11 11:34:28 +02:00
Chris Conlon
0bb9b85cd4 PKCS7: support PKCS#7 definition for ContentType eContent ANY, in addition to CMS OCTET_STRING definition 2023-09-08 16:32:15 -06:00
Andras Fekete
23ebace6b1 Fix event handling 2023-09-08 16:34:04 -04:00
JacobBarthelmeh
f8f66191e3 Merge pull request #6750 from SparkiDev/curve25519_thumb2_2
Curve25519/Ed25519: align buffers
2023-09-08 10:36:25 -06:00
Sean Parkinson
90467aa578 Curve25519/Ed25519: align buffers
Make data structures align buffers.
Align buffers in functions.
Add versions that don't use umaal
2023-09-08 15:23:15 +10:00
Sean Parkinson
00a08374df Merge pull request #6707 from JacobBarthelmeh/xilinx
use flush instead of invalidate
2023-09-08 07:07:08 +10:00
David Garske
7ca6c129e5 Merge pull request #6755 from anhu/GetASNInt
Expose GetASNInt as part of WOLFSSL_ASN_API
2023-09-07 11:30:46 -07:00
Anthony Hu
fddda8f582 Expose GetASNHeader in both template and original. 2023-09-07 09:52:27 -04:00
Anthony Hu
6665f240e0 Expose GetASNInt as part of WOLFSSL_ASN_API 2023-09-06 18:17:42 -04:00
Daniel Pouzzner
344e1661e1 wolfcrypt/src/{hmac.c,sha256.c,sha512.c,kdf.c}: ForceZero() smallstack buffers before freeing them, and ForceZero() the Hmac, wc_Sha512, wc_Sha384, wc_Sha256, and wc_Sha224 structures at the end of their respective freeing routines. also, remove superseded ForceZero() calls in wc_HKDF_Expand(), wc_SSH_KDF(), and wc_HKDF_Extract(). 2023-09-06 14:53:19 -05:00
Daniel Pouzzner
5540449315 wolfcrypt/src/port/arm/armv8-aes.c: add missing implementations of wc_AesCtrSetKey(), and add (void)dir in implementation to silence -Wunused. 2023-09-06 08:20:25 -07:00
John Safranek
fb91f1c1fd Update the ARM asm files with a missing initialization for SHA2-256 and
the AesCtrSetKey function for AES-CTR.
2023-09-05 17:07:08 -07:00
John Safranek
d866144fb1 Merge branch 'master' into merge-fips-builds 2023-09-05 16:52:36 -07:00
John Safranek
db858fd052 Merge tag 'v5.2.1-stable' into merge-fips-builds
Check-in FIPS 140-3 PILOT
2023-09-05 13:50:29 -07:00
JacobBarthelmeh
0352b384a5 Merge pull request #6731 from SparkiDev/aes_arm32_thumb2
AES ARM32 and Thumb2 ASM: fixup ARM32 and add Thumb2
2023-09-01 15:56:12 -06:00
JacobBarthelmeh
cd02d5140f Merge pull request #6738 from philljj/wolfcrypt_lms_verify_only
Wolfcrypt LMS verify-only support
2023-09-01 13:25:31 -06:00
Daniel Pouzzner
196f154c51 wolfcrypt/src/curve25519.c: use endian-conditional initializer for kCurve25519BasePoint. 2023-09-01 11:36:18 -05:00
jordan
b36c312ef3 LMS verify-only support: fix clang warning, rename define. 2023-08-31 21:46:00 -05:00
David Garske
136cb98412 Force 32-bit alignment on kCurve25519BasePoint 2023-09-01 12:14:55 +10:00
res0nance
3dec8279a0 windows: fix x64 benchmark release builds
The linker should use the x64 option for 64-bit builds
2023-08-31 20:02:37 +08:00
JacobBarthelmeh
927930c86e Merge pull request #6740 from SparkiDev/ecies_kdf
ECIES: add support for other KDFs
2023-08-30 16:27:39 -06:00
Sean Parkinson
0638ec234b AES ARM32 and Thumb2 ASM: fixup ARM32 and add Thumb2
Fix which functions and data are compiled in depending on defines.
Better handing of constants.
Also fix Aarch64 ed25519 inline assembly.
2023-08-30 20:34:51 +10:00
Sean Parkinson
41d6afcfa1 ECIES: add support for other KDFs 2023-08-30 10:37:57 +10:00
JacobBarthelmeh
1ada2e6a43 additional sanity check with GetIntPositive 2023-08-29 15:43:01 -07:00
jordan
8662312ecf LMS verify only support. 2023-08-29 15:46:18 -05:00
John Safranek
2380086209 FIPS Update
1. Rename the error code for degraded mode so it matches what's in the
   fips repo.
2. Update the tag used for linuxv5 builds in the fips-check script.
2023-08-28 15:11:13 -07:00
Anthony Hu
354b28eea0 Propose to convert a less than 0 to less than or equal to 0 2023-08-28 17:16:34 -04:00
Juliusz Sosinowicz
57ce894393 CRL refactor
- CheckCertCRLList: check all entries in case a single issuer has multiple CRL's loaded
- test_multiple_crls_same_issuer: testing two different certificates forcing the client to check both CRL's from the same issuer
- CRL_Entry
  - use a lock instead of a mutex to allow multiple threads to access the same list simultaneously
  - add a verifyMutex when doing verification so that we don't have to release the crlLock
- Add allocation and free functions for CRL_Entry
- DupCRL_Entry: simplify copying by copying all static fields in one memcpy
2023-08-28 10:52:36 +02:00
Juliusz Sosinowicz
abfcda8750 Decode the key usage extension as LE not BE 2023-08-28 10:52:36 +02:00
JacobBarthelmeh
5b5e66b55f Merge pull request #6732 from billphipps/correct_cryptocb_debug
Correct cryptocb cmd debug message
2023-08-25 13:57:32 -06:00
billphipps
7a6e851a82 Corrected print format string. 2023-08-25 13:59:23 -04:00
JacobBarthelmeh
2a5ed11f34 Merge pull request #6730 from gojimmypi/aria-no-openssl
ARIA no longer needs OpenSSL enabled
2023-08-25 11:48:11 -06:00