Commit Graph

8344 Commits

Author SHA1 Message Date
Lealem Amedie
cbc8e98876 Return correct error code in TEMPLATE DecodeECC_DSA_Sig_Ex 2024-01-17 08:49:09 -07:00
David Garske
11029127df Merge pull request #7119 from JacobBarthelmeh/crl
support for RSA-PSS signatures with CRL
2024-01-16 15:23:16 -08:00
David Garske
7a77d64d56 Merge pull request #7059 from bigbrett/cryptocb-oneshot-cmac
Add cryptoCb hook to one-shot CMAC functions
2024-01-16 12:17:05 -08:00
Brett Nicholas
abbf9f2b77 Add cryptoCb hooks to one-shot CMAC functions; add CMAC coverage to cryptoCb tests; add context argument to CMAC generate_ex 2024-01-15 11:52:17 -07:00
JacobBarthelmeh
5fc71161e9 add crl rsa pss for asn=original 2024-01-11 16:50:16 -07:00
Sean Parkinson
8c6de41eb9 Merge pull request #7051 from JacobBarthelmeh/mb
fix and enhancement for AES-GCM use with Xilsecure
2024-01-12 03:44:43 +10:00
Sean Parkinson
5e8fca420e Merge pull request #7127 from dgarske/cryptocb_defhash
Fix for crypto callbacks to allow invalid devId for non _ex single shot hash functions
2024-01-11 11:22:26 +10:00
David Garske
340aed5498 Fix for crypto callbacks to allow invalid devId for non _ex single shot hash functions. 2024-01-10 15:33:10 -08:00
David Garske
06a32d3437 Merge pull request #7097 from lealem47/removeUserCrypto
Remove user-crypto functionality and Intel IPP support
2024-01-09 17:33:28 -08:00
Sean Parkinson
08aa39f538 Merge pull request #7094 from dgarske/armasm_thumb_aes
Fixes for ARM ASM with Thumb
2024-01-07 15:10:16 +10:00
JacobBarthelmeh
74f0625c89 add native asn template RSA-PSS support with CRL 2024-01-05 14:25:12 -08:00
David Garske
9e28d5010c Fixes for ARM ASM with Thumb. Fix for AES ECB build with Thumb. Add alignment to thumb2 AES tables. Refactor alignment macros and expose generic alignment macro XALIGNED. The WOLFSSL_USE_ALIGN still controls alignment enablement in wolfSSL/wolfCrypt. ZD 17225 and ZD 17226 2024-01-05 08:16:02 -08:00
Daniel Pouzzner
7f53bcc4d0 fixes for clang-tidy reported defects and misstylings --with-liboqs:
* readability-named-parameter (style)
* bugprone-sizeof-expression (true bugs)
* clang-analyzer-deadcode.DeadStores (true bugs)
* clang-analyzer-core.NonNullParamChecker (true bug)
* clang-diagnostic-newline-eof (style)
* clang-diagnostic-shorten-64-to-32 (true but benign in practice)

fixes for sanitizer reported defects --with-liboqs: null pointer memcpy()s in TLSX_KeyShare_GenPqcKey() and server_generate_pqc_ciphertext().

fixes for silent crypto-critical failure in wolfSSL_liboqsGetRandomData(): refactor to accommodate oversize numOfBytes, and abort() if wc_RNG_GenerateBlock() returns failure.
2024-01-04 15:57:09 -06:00
Tobias Frauenschläger
3fbbc7c1bb Fix implicit conversion.
Fix implicit type conversion from size_t to word32 in liboqs.c source
file to make it build with clang.

Fixes #7108.

Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com>
2024-01-04 16:55:19 +01:00
JacobBarthelmeh
3f10496757 add weak source of entropy on microblaze to test with 2024-01-03 13:35:00 -08:00
Daniel Pouzzner
bcfaf0372c Merge pull request #7026 from Frauschi/liboqs
Improve liboqs integration
2024-01-03 16:20:26 -05:00
Sean Parkinson
52db533d9b Merge pull request #7106 from bandi13/20231114-codesonar-fixes
20231114 codesonar fixes
2024-01-04 07:16:33 +10:00
Daniel Pouzzner
7e60b029c2 Merge branch 'master' into liboqs 2024-01-03 15:56:05 -05:00
Andras Fekete
b206e074fc Uninitialized Variable
Warning 545067.3236517
2024-01-03 09:59:18 -05:00
Andras Fekete
f5c3fcfec4 Uninitialized variable
Warning 581107.3236416
2024-01-03 09:59:18 -05:00
Andras Fekete
f00c5eb95d Fix double free
Warning 546055.3229451
2024-01-03 09:59:18 -05:00
jordan
e175004f85 Fix Infer Uninitialized Values. 2024-01-02 12:16:20 -06:00
JacobBarthelmeh
3901fa6a96 fix check on non aad use 2024-01-02 08:50:59 -08:00
JacobBarthelmeh
f8dbc7f15c use of device key with AES-GCM and add way to avoid malloc for tag 2024-01-02 08:50:59 -08:00
JacobBarthelmeh
567243d257 touch up autoconf build with xilinx and sp macro guards 2024-01-02 08:50:59 -08:00
Daniel Pouzzner
c8188eaabd Merge pull request #7100 from philljj/zd17237
Fix uninitialized keyUsage in DecodeKeyUsage.
2024-01-02 01:51:45 -05:00
Daniel Pouzzner
b17ec3b4bc cppcheck-2.13.0 mitigations peer review:
* add explanation in DoSessionTicket() re autoVariables.
* re-refactor ECC_KEY_MAX_BITS() in ecc.c to use two separate macros, ECC_KEY_MAX_BITS() with same definition as before, and ECC_KEY_MAX_BITS_NONULLCHECK().
* in rsip_vprintf() use XVSNPRINTF() not vsnprintf().
* in types.h, fix fallthrough definition of WC_INLINE macro in !NO_INLINE cascade to be WC_MAYBE_UNUSED as it is when NO_INLINE.
2023-12-28 16:38:47 -06:00
Daniel Pouzzner
44b18de704 fixes for cppcheck-2.13.0 --force:
* fix null pointer derefs in wc_InitRsaKey_Id() and wc_InitRsaKey_Label() (nullPointerRedundantCheck).
* fix use of wrong printf variant in rsip_vprintf() (wrongPrintfScanfArgNum).
* fix wrong printf format in bench_xmss_sign_verify() (invalidPrintfArgType_sint).
* add missing WOLFSSL_XFREE_NO_NULLNESS_CHECK variants of XFREE() (WOLFSSL_LINUXKM, FREESCALE_MQX, FREESCALE_KSDK_MQX).
* suppress false-positive uninitvar on "limit" in CheckTLS13AEADSendLimit().
* suppress true-but-benign-positive autoVariables in DoClientHello().
* in wolfcrypt/src/ecc.c, refactor ECC_KEY_MAX_BITS() as a local function to resolve true-but-benign-positive identicalInnerCondition.
* refactor flow in wc_ecc_sign_hash_ex() to resolve true-but-benign-positive identicalInnerCondition.
2023-12-28 15:06:21 -06:00
jordan
46bf30ca77 Fix uninitialized keyUsage in DecodeKeyUsage. 2023-12-27 22:58:52 -06:00
Daniel Pouzzner
457188f55e Merge pull request #7070 from dgarske/cryptocb_moreinfo
Fixes for TLS with crypto callbacks
2023-12-27 18:55:56 -05:00
David Garske
1c4d7285d3 Add documentation for HKDF functions. Improve param comments for devId. 2023-12-27 13:56:40 -08:00
lealem47
fc3977fc77 Merge pull request #7098 from dgarske/stm32_pka
Fixes for STM32 PKA
2023-12-27 14:36:53 -07:00
David Garske
c37edb09f7 Fix STM32 PKA V2 (STM32U5) point multiply missing order/coefB. 2023-12-27 11:37:16 -08:00
Lealem Amedie
837452b1ca Remove user-crypto functionality and Intel IPP support 2023-12-27 12:24:19 -07:00
David Garske
0d057099af Fix line lengths. 2023-12-27 10:12:52 -08:00
David Garske
3a798e148b Fix STM32 PKA ECC cast warning. 2023-12-27 09:57:40 -08:00
David Garske
b86dfffdbe Improve the TLS v1.3 expand key label warning for possible use of uninitialized "hash". 2023-12-27 09:52:56 -08:00
Daniel Pouzzner
8a32e7f3f9 fixes for clang -Wunreachable-code-aggressive:
tests/suites.c: in SuiteTest(), swap order of (void)s and return.

wolfcrypt/src/chacha.c: gate out unreachable C wc_Chacha_encrypt_bytes() call in wc_Chacha_Process, and gate out unused implementations of wc_Chacha_wordtobyte() and wc_Chacha_encrypt_bytes(), when defined(USE_INTEL_CHACHA_SPEEDUP).

wolfcrypt/src/sha256.c and wolfcrypt/src/sha512.c: fix logic in Sha256_SetTransform() and Sha512_SetTransform() to make the AVX1_RORX implementations accessible.  also add a missing Transform_Sha512_Len_p = NULL in the C path of Sha512_SetTransform().

wolfssl/internal.h: for the fallback definition of wolfSSL_curve_is_disabled, use an inline function instead of a compound-clause macro, because clang isn't smart enough to treat the compound expression as a bare constant zero, producing a lame-positive -Wunreachable-code.
2023-12-25 00:23:37 -06:00
David Garske
d9ac8b5422 Peer review fixes. Fix issues with Tls13HKDFExpandKeyLabel. Fix crypto callback line lengths. 2023-12-22 14:16:59 -08:00
Daniel Pouzzner
59cdd5c70f Merge pull request #7082 from bandi13/ARIA_Sign_fix
Aria sign fix
2023-12-21 19:01:54 -05:00
Sean Parkinson
f77f7c70d3 Merge pull request #7018 from dgarske/ti_aes
Fixes for TI AES and SHA
2023-12-22 07:55:00 +10:00
Andras Fekete
b5592c4571 Addressing PR comments 2023-12-21 16:48:15 -05:00
Sean Parkinson
00c9625ab8 Merge pull request #7081 from gojimmypi/PR-Espressif-ESP32-C2
Add wolfcrypt SHA support for ESP32-C2/ESP8684, other minor updates
2023-12-22 07:23:51 +10:00
Sean Parkinson
a5a2b3752d Merge pull request #7077 from gojimmypi/PR-Espressif-threads
wolfSSL_NewThread() type update for Espressif FreeRTOS
2023-12-22 07:22:33 +10:00
David Garske
00f196d497 Fix for invalid dh_ffdhe_test test with even P when using Intel QuickAssist. 2023-12-20 11:30:17 -08:00
Andras Fekete
77e8a66ca3 Not cryptocb's job to sanity check input
Don't need to check parameters at every level
2023-12-19 15:55:38 -05:00
Andras Fekete
12192b7683 Set result to invalid as first step 2023-12-19 15:54:25 -05:00
Andras Fekete
f45ffd8802 Rename variable to keep the names similar across functions 2023-12-19 15:37:58 -05:00
Andras Fekete
9e974027a8 Fix ARIA signing
Used the wrong function to extract key
2023-12-19 15:33:28 -05:00
David Garske
fb5eab8f79 Fix one shot hash routines to attempt offloading to crypto callbacks. Fix random.c health test to use devId. Fix FIPS unused "ssl". 2023-12-19 11:20:56 -08:00