Daniel Pouzzner
ed5d8f8e6b
update several files in wolfcrypt/src/port/arm to include libwolfssl_sources.h;
...
update wolfcrypt/src/port/af_alg, wolfcrypt/src/port/devcrypto, and wolfcrypt/src/port/kcapi to include libwolfssl_sources.h;
remove a slew of includes across lib sources made redundant by libwolfssl_sources.h.
2025-04-11 13:57:23 -05:00
Daniel Pouzzner
c401f5caf2
move the newly added wolfcrypt/src/wolfssl_sources.h to wolfssl/wolfcrypt/libwolfssl_sources.h, and likewise for wolfssl_sources_asm.h; revert changes to IDE/ project files.
2025-04-04 18:44:12 -05:00
Daniel Pouzzner
217440c885
Add wolfcrypt/src/wolfssl_sources.h and wolfcrypt/src/wolfssl_sources_asm.h,
...
which force on BUILDING_WOLFSSL and do boilerplate includes, and update library
sources to include them at the top.
wolfssl_sources.h includes types.h, error-crypt.h, and logging.h, and
conditionally, config.h. settings.h and wc_port.h are unconditionally
included at the top of types.h.
wolfssl_sources_asm.h includes settings.h, and conditionally, config.h.
Add wolfssl_sources*.h to wolfcrypt/src/include.am, and to several IDE/ project
files.
Also added a TEST_WOLFSSL_SOURCES_INCLUSION_SEQUENCE clause in
wolfssl/wolfcrypt/settings.h to allow coverage testing.
In wolfcrypt/src/misc.c, retain existing ad hoc boilerplate includes, and use
them if WOLFSSL_VIS_FOR_TESTS, otherwise include the new wolfssl_sources.h.
Define WOLFSSL_VIS_FOR_TESTS at top of wolfcrypt/test/test.c.
Also renamed WOLFSSL_NEED_LINUX_CURRENT to WOLFSSL_LINUXKM_NEED_LINUX_CURRENT,
for clarity.
2025-04-04 16:51:04 -05:00
JacobBarthelmeh
2c24291ed5
update copyright date
2025-01-21 09:55:03 -07:00
ZackLabPC
9881edfabe
Crypto Callback Support for ARM ASM: AES-ECB/CBC, SHA-1/256/384/512 + Fix SP SHA CB Bug
2024-09-20 09:42:53 -06:00
night1rider
d714e55a2b
Addressing PR comments typos and cleanup and support HAVE_AES_ECB, Sha1, and Sha224
2024-09-20 09:42:52 -06:00
Andras Fekete
f419e2351b
Remove NULL test with 'ptr = NULL' at the end
2024-08-06 10:55:37 -04:00
JacobBarthelmeh
31a6a2bf59
update copyright to 2024
2024-07-19 13:15:05 -06:00
kaleb-himes
c333fdf545
Check-in Nucleus Plus 2.3 port work
2024-07-09 15:53:00 -06:00
Daniel Pouzzner
b3e8f0ad24
add --enable-debug-trace-errcodes, WOLFSSL_DEBUG_TRACE_ERROR_CODES, WC_ERR_TRACE(), WC_NO_ERR_TRACE(), support/gen-debug-trace-error-codes.sh. also add numerous deployments of WC_NO_ERR_TRACE() to inhibit frivolous/misleading errcode traces when -DWOLFSSL_DEBUG_TRACE_ERROR_CODES.
2024-06-08 16:39:53 -05:00
kaleb-himes
e45867bbc3
WIN fips section refactor / wolfEntropy API syntax adjustment
2024-04-09 09:48:33 -06:00
kaleb_himes
81f5ac7f6c
SRTP-KDF FS Preview
2024-04-09 09:48:33 -06:00
jordan
83169f91e9
Fix ShaFinal overrun.
2024-02-03 17:36:26 -06:00
gojimmypi
07a5566c52
Add wolfcrypt SHA support for ESP32-C2, other minor updates
2023-12-18 17:35:43 -08:00
gojimmypi
9227020f8e
code review updates for ESP32 C3/C6/S2 HW Acceleration
2023-11-21 16:22:49 -08:00
gojimmypi
7e69030df1
Espressif ESP32-C3 ESP32-C6 ESP32-S2 Hardware Acceleration
2023-11-20 18:05:18 -08:00
Hideki Miyazaki
e092c57675
change sha h/w acceleration implementation
2023-09-29 16:22:16 +09:00
Chris Conlon
5bc5b8a99b
Merge pull request #6768 from miyazakh/renesas_rz
...
Renesas RZN2L support
2023-09-19 14:38:03 -06:00
gojimmypi
9398fa0736
Espressif HW Improvements ( #6624 )
...
* Espressif HW Improvements
* revised AES HW/SW fallback logic for ESP32
2023-09-19 08:21:13 -07:00
Hideki Miyazaki
1c9afb8b12
initial commit for RZN2L board Support
2023-09-13 09:22:55 +09:00
JacobBarthelmeh
7f0cfcb27d
Merge pull request #6667 from bandi13/byebyeCyaSSL
...
Byebye cya ssl
2023-08-03 15:43:01 -06:00
Andras Fekete
b31e485dc9
Remove 'HAVE_FIPS_VERSION < 2' blocks
2023-08-02 17:08:03 -04:00
Hideki Miyazaki
02ec92a3b9
Support TSIP crypt only
...
- Aes, sha,
- rsa
MakeRsaKey, sign/verify
fix compile error when not enabled TSIP
2023-07-27 06:23:34 +09:00
gojimmypi
57546405c0
refactor WROOM32 ESP32
2023-07-07 15:47:00 -07:00
David Garske
fc153ff273
Support for Silicon Labs Gecko SDK v4. Changes SE Hash to use multipart API's. Gecko SDK v3 auto-detected or manually forced using WOLFSSL_SILABS_SE_ACCEL_3.
2023-06-23 14:22:44 -07:00
Sean Parkinson
1a8f09d013
Merge pull request #6320 from JacobBarthelmeh/curl
...
smaller sized build with curl
2023-05-03 07:46:29 +10:00
Daniel Pouzzner
2a00b67056
revert change in wc_ShaFinal() capturing InitSha() retval, introduced in 510038022f, to (void)ed result.
2023-04-19 17:25:33 -05:00
JacobBarthelmeh
dc8f348bdf
smaller sized build with curl
2023-04-19 15:12:15 -07:00
Daniel Pouzzner
8f610bb156
fix for retval overwrite (warned by clang-analyzer-deadcode.DeadStores) in sha.c:wc_ShaFinal();
...
fix for benign clang-analyzer-deadcode.DeadStores in aes.c:wc_AesFeedbackEncrypt();
fix for cppcheck:selfAssignment in chacha.c:wc_Chacha_wordtobyte().
2023-04-19 15:53:48 -05:00
gojimmypi
510038022f
Various Espressif HW crypto, SHA2, AES, MP updates. ( #6287 )
...
* various Espressif HW crypto, SHA2, AES, MP updates.
* code review updates & cleanup
* clean trailing whitespace
* cleanup per code review
* removed additional unused WOLFSSL_USE_ESP32C3_CRYPT_HASH_HW
* Code review updates; pack & order WC_ESP32SHA
* clean up TAG text for Espressif ESP_LOG()
2023-04-19 06:10:22 -07:00
David Garske
35b68fb23d
Merge pull request #5597 from Tathorack/add-renesas-rx64-rx72-sha-support
...
Add RX64/RX71 SHA hardware support
2023-03-03 13:14:32 -08:00
JacobBarthelmeh
b801a96f8c
Port to RT1170 and expand CAAM driver
2023-02-22 08:26:25 -08: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
Jacob Barthelmeh
9dcc48c8f7
update copyright to 2023
2022-12-30 17:12:11 -07:00
Chris Conlon
45bf793b5a
SE050 expansion: add RSA support, allow for larger key IDs, get/set key ID from ecc_key/RsaKey, fixes for SE050 hashing, remove XREALLOC dependency, API to store/get binary object, API to erase object, test.c compatibility
2022-11-11 12:14:14 -07:00
gojimmypi
9da0ff0f31
Merge branch 'master' of https://github.com/wolfSSL/wolfssl into ESP32_HW_Update_PR
2022-07-21 08:21:17 +02:00
Jacob Barthelmeh
8eaa85e412
update copyright year to 2022
2022-07-19 10:44:31 -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
gojimmypi
8bb6ff8dbb
Espressif HW acceleration update & cleanup
2022-07-06 09:30:49 -07:00
David Garske
502cbc3847
Fix for STM32U5 hash/crypto support. ZD 14305.
2022-06-14 11:48:51 +02:00
David Garske
e91f0f173b
Fixes for async disables around the DevCopy calls. ZD13824
2022-03-03 16:33:18 -08:00
Marco Oliverio
9ccfc81f26
psa: support PSA SHA1/SHA256/SHA224
2022-02-04 21:45:38 +01:00
Daniel Pouzzner
6a56d3e131
jumbo patch of fixes for clang-tidy gripes (with some bug fixes).
...
defect/gripe statistics:
configured --enable-all --enable-sp-math-all --enable-intelasm
with LLVM 13 clang-tidy -checks=readability-*,bugprone-*,misc-no-recursion,misc-misplaced-const,misc-redundant-expression,misc-unused-parameters,misc-unused-using-decls,-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,-clang-analyzer-optin.performance.Padding,-readability-braces-around-statements,-readability-function-size,-readability-function-cognitive-complexity,-bugprone-suspicious-include,-bugprone-easily-swappable-parameters,-readability-isolate-declaration,-readability-magic-numbers,-readability-else-after-return,-bugprone-reserved-identifier,-readability-suspicious-call-argument,-bugprone-suspicious-string-compare,-bugprone-branch-clone,-misc-redundant-expression,-readability-non-const-parameter,-readability-redundant-control-flow,-readability-misleading-indentation,-bugprone-narrowing-conversions,-bugprone-implicit-widening-of-multiplication-result
[note these figures don't reflect additional defects fixed in this commit for --enable-smallstack, --enable-fips, --enable-async, --enable-asn=template, and --enable-fastmath, and --disable-fastmath]
pre-patch warning count per file, with suppressions:
clang-analyzer-security.insecureAPI.strcpy 6 wolfssl/tests/suites.c
clang-analyzer-security.insecureAPI.strcpy 2 wolfssl/testsuite/testsuite.c
bugprone-suspicious-missing-comma 3 wolfssl/examples/server/server.c
bugprone-suspicious-missing-comma 3 wolfssl/examples/client/client.c
readability-redundant-preprocessor 2 wolfssl/wolfcrypt/src/asn.c
readability-redundant-preprocessor 1 wolfssl/wolfcrypt/src/rsa.c
readability-redundant-preprocessor 9 wolfssl/src/ssl.c
readability-redundant-preprocessor 2 wolfssl/src/tls13.c
readability-redundant-preprocessor 18 wolfssl/tests/api.c
readability-redundant-preprocessor 3 wolfssl/src/internal.c
readability-redundant-preprocessor 10 wolfssl/wolfcrypt/test/test.c
readability-named-parameter 1 wolfssl/wolfcrypt/benchmark/benchmark.c
readability-named-parameter 7 wolfssl/src/internal.c
readability-named-parameter 1 wolfssl/wolfcrypt/src/ecc.c
readability-named-parameter 1 wolfssl/testsuite/testsuite.c
readability-named-parameter 11 wolfssl/wolfcrypt/src/ge_operations.c
misc-no-recursion 3 wolfssl/src/ssl.c
readability-uppercase-literal-suffix 4 wolfssl/wolfcrypt/src/asn.c
readability-uppercase-literal-suffix 1 wolfssl/src/ssl.c
readability-uppercase-literal-suffix 13 wolfssl/wolfcrypt/benchmark/benchmark.c
bugprone-too-small-loop-variable 1 wolfssl/wolfcrypt/src/rsa.c
bugprone-too-small-loop-variable 2 wolfssl/wolfcrypt/src/sha3.c
bugprone-too-small-loop-variable 4 wolfssl/wolfcrypt/src/idea.c
bugprone-signed-char-misuse 2 wolfssl/src/ssl.c
bugprone-signed-char-misuse 3 wolfssl/wolfcrypt/src/sp_int.c
bugprone-signed-char-misuse 3 wolfssl/examples/client/client.c
bugprone-macro-parentheses 19 wolfssl/wolfcrypt/src/aes.c
bugprone-macro-parentheses 109 wolfssl/wolfcrypt/src/camellia.c
bugprone-macro-parentheses 1 wolfssl/src/tls.c
bugprone-macro-parentheses 3 wolfssl/wolfcrypt/src/md4.c
bugprone-macro-parentheses 2 wolfssl/wolfcrypt/src/asn.c
bugprone-macro-parentheses 26 wolfssl/wolfcrypt/src/blake2b.c
bugprone-macro-parentheses 257 wolfssl/wolfcrypt/src/sha3.c
bugprone-macro-parentheses 15 wolfssl/src/ssl.c
bugprone-macro-parentheses 1 wolfssl/wolfcrypt/src/sha.c
bugprone-macro-parentheses 8 wolfssl/tests/api.c
bugprone-macro-parentheses 4 wolfssl/wolfcrypt/src/sp_int.c
bugprone-macro-parentheses 6 wolfssl/wolfcrypt/benchmark/benchmark.c
bugprone-macro-parentheses 38 wolfssl/wolfcrypt/src/hc128.c
bugprone-macro-parentheses 12 wolfssl/wolfcrypt/src/md5.c
bugprone-macro-parentheses 10 wolfssl/wolfcrypt/src/sha256.c
bugprone-macro-parentheses 4 wolfssl/wolfcrypt/test/test.c
bugprone-macro-parentheses 3 wolfssl/wolfcrypt/src/ecc.c
bugprone-macro-parentheses 2 wolfssl/tests/suites.c
bugprone-macro-parentheses 4 wolfssl/wolfcrypt/src/cpuid.c
bugprone-macro-parentheses 26 wolfssl/wolfcrypt/src/blake2s.c
bugprone-macro-parentheses 24 wolfssl/wolfcrypt/src/sha512.c
bugprone-macro-parentheses 3 wolfssl/wolfcrypt/src/poly1305.c
bugprone-macro-parentheses 24 wolfssl/wolfcrypt/src/ripemd.c
readability-inconsistent-declaration-parameter-name 1 wolfssl/src/internal.c
readability-inconsistent-declaration-parameter-name 1 wolfssl/testsuite/testsuite.c
pre-patch warning count summaries, with suppressions:
clang-analyzer-security.insecureAPI.strcpy 8
bugprone-suspicious-missing-comma 6
readability-redundant-preprocessor 45
readability-named-parameter 21
misc-no-recursion 3
readability-uppercase-literal-suffix 18
bugprone-too-small-loop-variable 7
bugprone-signed-char-misuse 8
bugprone-macro-parentheses 601
readability-inconsistent-declaration-parameter-name 2
pre-patch warning count summaries, without suppressions:
clang-analyzer-security.insecureAPI.strcpy 8
bugprone-branch-clone 152
readability-non-const-parameter 118
bugprone-suspicious-missing-comma 6
bugprone-suspicious-include 52
readability-magic-numbers 22423
readability-redundant-preprocessor 45
readability-named-parameter 21
readability-function-cognitive-complexity 845
readability-else-after-return 398
bugprone-implicit-widening-of-multiplication-result 595
readability-function-size 21
readability-isolate-declaration 1090
misc-redundant-expression 2
bugprone-narrowing-conversions 994
misc-no-recursion 3
readability-uppercase-literal-suffix 18
bugprone-reserved-identifier 56
readability-suspicious-call-argument 74
bugprone-too-small-loop-variable 7
bugprone-easily-swappable-parameters 437
bugprone-signed-char-misuse 8
readability-misleading-indentation 94
bugprone-macro-parentheses 601
readability-inconsistent-declaration-parameter-name 2
bugprone-suspicious-string-compare 495
readability-redundant-control-flow 20
readability-braces-around-statements 11483
clang-analyzer-valist.Uninitialized 1
clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling 3502
2022-01-21 01:25:48 -06:00
Daniel Pouzzner
6e763825ed
wolfcrypt/src/sha.c: fixes for cppcheck complaints: bufferAccessOutOfBounds
2022-01-08 00:32:14 -06:00
Daniel Pouzzner
0b4f34d62a
typographic cleanup: fix whitespace, remove unneeded UTF-8, convert C++ comment constructs to C.
2021-11-08 17:35:05 -06:00
David Garske
2abb2eae7d
Changed NXP SE050 to not use symmetric offloading by default. If desired use WOLFSSL_SE050_HASH and WOLFSSL_SE050_CRYPT.
2021-11-02 12:00:24 -07:00
David Garske
a03ed32380
Support for Android KeyStore compatibility API's:
...
* Adds `EVP_PKCS82PKEY` and `d2i_PKCS8_PRIV_KEY_INFO`.
* Adds `EVP_PKEY2PKCS8` and `i2d_PKCS8_PRIV_KEY_INFO`.
* Adds `ECDSA_verify`.
* Fix to allow `SHA256()` and `MD5()` with FIPSv2.
* Decouple crypto callbacks and hash flags
* Fix for possible use of uninitialized when building TLS bench without TLS v1.3.
* Fix for building with `NO_CHECK_PRIVATE_KEY`. Test `./configure --disable-pkcs12 --enable-opensslextra CFLAGS="-DNO_CHECK_PRIVATE_KEY"`.
* Fix to support `RSA_public_decrypt` for PKCSv15 only with FIPS.
* Cleanup `RSA_public_encrypt`, `RSA_public_decrypt` and `RSA_private_decrypt`.
* Added instructions for building wolfSSL with Android kernel.
2021-10-19 17:04:18 -07:00
David Garske
29f051e585
Fixes and cleanups for NXP SE050 support.
2021-10-11 11:53:19 -07:00
Ethan
3f76a76c46
SE050 port with support for RNG, SHA, AES, ECC (sign/verify/shared secret) and ED25519
2021-10-11 11:52:12 -07:00