Daniele Lacamera
a07f9ded63
Added support for NXP DCP (i.MX-RT series)
2020-10-01 11:36:03 -07:00
toddouska
9bfe4f1fb2
Merge pull request #3341 from SparkiDev/fp_sqr_size
...
TFM mp_sqr: error on number overflow
2020-09-30 10:35:01 -07:00
Sean Parkinson
a1991da458
TFM mp_sqr: error on number overflow
...
Change mp_sqr to return an error if the result won't fit into the fixed
length dp.
2020-09-30 08:54:20 +10:00
toddouska
fc988ad3e7
Merge pull request #3325 from julek-wolfssl/openssl-compat-aes-gcm-2-part-aad
...
Buffer AAD in wolfSSL_EVP_CipherUpdate_GCM so that whole value is hashed
2020-09-29 13:46:44 -07:00
Sean Parkinson
66ed9b1522
ARM asm: fixes for compiling on Mac and ChaCha20 streaming
...
Don't set the CPU to generic on Mac.
Implement streaming for ChaCha20.
2020-09-29 13:38:02 +10:00
Juliusz Sosinowicz
07f6c19156
Update EVP_CIPHER to handle multi-part AAD
2020-09-28 20:42:23 +02:00
David Garske
a85c93e44a
Fix spelling error and sync with latest scripts.
2020-09-28 10:41:31 -07:00
Sean Parkinson
b61b3e34dd
SP ARM64: Fix assembly for clang
...
clang doesn't auto correct size of register (declared byte n but 64-bit
usage)
clang doesn't always handle use of x29 (FP or Frame Pointer) in inline
assembly code correctly - reworked sp_2048_sqr_8 to not use x29.
2020-09-28 12:35:58 +10:00
toddouska
6f1d626671
Merge pull request #3337 from SparkiDev/evp_xts_3
...
EVP AES XTS: check correct define
2020-09-25 12:42:09 -07:00
toddouska
2d97acadc9
Merge pull request #3331 from dgarske/armasm
...
Fixes for ARM ASM and API unit test bad build macros
2020-09-25 12:41:30 -07:00
Juliusz Sosinowicz
7e38b6bee6
Test 2 part GCM data and EVP context re-use
2020-09-25 11:03:58 +02:00
Sean Parkinson
d514189710
EVP AES XTS: check correct define
...
HAVE_AES_CTX -> WOLFSSL_AES_XTS
2020-09-25 11:17:04 +10:00
toddouska
1668f6f626
Merge pull request #3244 from douzzer/20200820-linuxkm
...
Linux Kernel Module support
2020-09-24 12:57:22 -07:00
toddouska
1eed409bdf
Merge pull request #3332 from SparkiDev/sp_cortexm_fix_1
...
SP Cortex-M4 assembly: Fix for GCC compile
2020-09-24 12:55:21 -07:00
toddouska
1e293e4be4
Merge pull request #3321 from SparkiDev/evp_xts_2
...
EVP CIPHER: fix block size, mode and table
2020-09-24 12:49:38 -07:00
toddouska
d75d3108b0
Merge pull request #3314 from SparkiDev/evp_hmac_sha3
...
Test wolfSSL_HMAC with SHA-3
2020-09-24 12:48:40 -07:00
Hideki Miyazaki
a22b2085b1
add settings for pkcs7
...
add wrapper to check the return value of snprintf
fixed unit test
fixed uninitialized variable
2020-09-24 17:20:45 +09:00
David Garske
3adb64b196
Merge pull request #3330 from ejohnstown/tfm-no-64bit
...
TFM NO 64-BIT
2020-09-23 18:47:48 -07:00
Sean Parkinson
ec59acbae0
SP Cortex-M4 assembly: Fix for GCC compile
...
b<cond>.n not allowed with GCC.
Fix sizeof to use tmp_arr not tmp which is now a pointer.
2020-09-24 11:03:50 +10:00
Daniel Pouzzner
09b9ac8b86
add AM_CONDITIONAL([BUILD_DEBUG],...) to configure.ac, and use it to gate inclusion of wolfcrypt/src/debug.c in src/include.am; remove superfluous includes from wolfcrypt/src/debug.c.
2020-09-23 18:32:17 -05:00
Daniel Pouzzner
6a3da9477e
fix --enable-stacksize[-verbose] (HAVE_STACK_SIZE[_VERBOSE]) to work correctly in testsuite.c.
2020-09-23 18:32:17 -05:00
Daniel Pouzzner
38cb4a2d69
blake2{b,s}.c: return and propagate meaningful error codes.
2020-09-23 18:32:17 -05:00
Daniel Pouzzner
fda22f851a
random.c: use "DRBG_internal", not "__DRBG", for typedef struct DRBG_internal, to avoid possible conflict with reserved-label restrictions with some compilers.
2020-09-23 18:32:17 -05:00
Daniel Pouzzner
6a7a87545a
wc_MakeRsaKey(): add missing allocation failure checks for WOLFSSL_SMALL_STACK.
2020-09-23 18:32:17 -05:00
Daniel Pouzzner
0f3283ce7b
add wc_curve25519_generic().
2020-09-23 18:32:17 -05:00
Daniel Pouzzner
8a6216363d
ecc.c: add (void)rng to wc_ecc_mulmod_ex2() to cover WOLFSSL_SP_MATH case.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
a571378b5f
blake2.h/blake2b.c: fix typos.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
0c9ba76a93
fix rebase error on aes.c
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
60506af5f5
add WOLFSSL_API wrappers wc_InitBlake2b_WithKey(), wc_InitBlake2s_WithKey(), and wc_curve25519_make_priv().
2020-09-23 18:32:16 -05:00
David Garske
c0823c8a7e
Refactor of AES wc_AesSetKeyLocal and wc_AesSetKey for software only use. Added missing aes argument check on wc_AesSetKeyDirect.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
453698ba27
add explanatory comments for do_div(), used when WOLFSSL_LINUXKM.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
7c2aefcfdd
linuxkm: enable the rest of the _asm implementations for x86, wrapped in {SAVE,RESTORE}_VECTOR_REGISTERS().
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
60a686f48c
tidying suggested by Sean in review.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
a9cad51b65
sp_mod_word(): add unoptimized alternative if -U__GNUC__.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
fdbd6addd0
sp_int.c: add sp_mod_word() gated on WOLFSSL_SP_MOD_WORD_RP for runtimes lacking intrinsic support for int128 % int64; for linuxkm, use WOLFSSL_SP_DIV_WORD_HALF and the new WOLFSSL_SP_MOD_WORD_RP.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
43c12ede50
ge448_double_scalarmult_vartime(): streamline WOLFSSL_SMALL_STACK refactor.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
5801719ac3
wolfcrypt/src/asn.c:wc_GetKeyOID(): stack->heap refactor.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
4f5bbbdca8
rsa.c:wc_CheckProbablePrime(): WOLFSSL_SMALL_STACK refactor
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
76cba38971
wolfcrypt/src/ge_448.c: redo small stack refactor of ge448_double_scalarmult_vartime(), so that when -UWOLFSSL_SMALL_STACK, code is effectively unchanged.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
767f1972e3
aes.{c,h}: move SIMD includes from aes.h to aes.c, to avoid compiler errors on other .c's compiled -mno-sse for linuxkm.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
cd14cfb092
linuxkm: override-disable SIMD instructions for all .c.o's, with exceptions enumerated in Kbuild (currently only aes.c), and couple -msse with -fno-builtin-functions; export ENABLED_ASM for use as a pivot in Kbuild; use asm/i387.h, not asm/simd.h, for kernel_fpu_{begin,end}() protos.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
3626332334
wolfcrypt/src/aes.c for linuxkm: add missing vector register push/pops.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
360c749703
add {SAVE,RESTORE}_VECTOR_REGISTERS() macros for kernel_fpu_{begin,end} when WOLFSSL_LINUXKM, to allow safe use of AESNI and SIMD instructions in the kernel.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
3c91ce9342
wolfcrypt/src/sp_int.c: undo 8efb1142f1f2744ff128033df8a3a2d43e42fd93 to take dgarske's better wc_bigint_init()-based take on it (aa870861921a317cca9a978a75a7de127809e100).
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
c5d28c16b5
wolfcrypt/src/sp_int.c: clear whole struct in sp_init() and sp_init_multi(), to fix uninited pointer free()s in sp_free() when --enable-sp-math -DHAVE_WOLF_BIGINT.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
ce8f2e65de
wolfcrypt/src/sha256.c: undo c801de9d23c2f3348b84fdb8d893f81e6c3c2849 (dgarske has better&correct fix in 76e1760f915934bdc4911f3ae41abe6803ae094a).
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
e09487de1f
sha256.c: add missing _SMALL_STACK_CACHE initialization in InitSha256().
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
922b023aea
wolfcrypt/src/random.c: rename the DRBG internal type __DRBG, because some customer is compiling libwolfssl with a "g++" override, which precludes typedefs and structs with different types but equal labels.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
9ca94d6ca7
wolfcrypt/src/ge_448.c: refactor ge448_double_scalarmult_vartime() to use heap for workspace unless WOLFSSL_NO_MALLOC.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
92df5692b1
wolfcrypt/src/ecc.c: revert to commit g0fa5af9, which has all the necessary fixes.
2020-09-23 18:32:15 -05:00