Sean Parkinson
78309cd7aa
SP C32/64 mul_d: large div needs mul_d to propagate carry
...
Change implementation to pre-calc products to allow for reordering of
operations.
2020-11-05 12:50:33 +10:00
toddouska
b76ac0b842
Merge pull request #3442 from SparkiDev/config_fix_2
...
Configuration fixes
2020-11-03 14:48:49 -08:00
toddouska
e52efc7a8a
Merge pull request #3441 from SparkiDev/ecdsa_vfy_safe
...
ECDSA verification: handle doubling of infinity
2020-11-03 14:47:45 -08:00
toddouska
2acef1c114
Merge pull request #3436 from haydenroche5/chacha_msvc_fix
...
Fix MSVC compile issue in chacha.c.
2020-11-03 14:44:43 -08:00
toddouska
63bf5dc56c
Merge pull request #3426 from SparkiDev/rsa_pss_fix
...
RSA-PSS: Handle edge case with encoding message to hash
2020-11-03 14:43:56 -08:00
toddouska
3cce86d7a8
Merge pull request #3420 from dgarske/small_pk
...
ECC memory reductions with key and signature parsing
2020-11-03 14:42:43 -08:00
toddouska
9f9901e10e
Merge pull request #3417 from douzzer/fix-ipv6-ocsp-tests
...
Fix ipv6 ocsp tests
2020-11-03 14:38:32 -08:00
Sean Parkinson
b3f6c483bf
SP C64/32: Fix define check
...
WOLFSSL_SP_DH -> WOLFSSL_HAVE_SP_DH
2020-11-03 08:42:55 +10:00
John Safranek
29c7351fe0
Merge pull request #3383 from kaleb-himes/ACVP_TESTING_UPDATE
...
In ACVP testing NIST needs to see failed decryption output
2020-11-02 10:42:28 -08:00
JacobBarthelmeh
a411dab74f
Merge pull request #3410 from cconlon/zd11001
...
PKCS#7: Reset variables correctly in VerifySignedData
2020-11-02 11:33:52 +08:00
David Garske
e4f3f8b80a
Further tuning of the zero trim / is leading set logic for new ECC signature encoding/decoding API's.
2020-10-29 15:59:51 -07:00
David Garske
95c8a48285
Trim leading zero's first, then check for MSB being set.
2020-10-29 08:38:55 -07:00
Juliusz Sosinowicz
aff14091e0
AAD should be reset on Init call
2020-10-29 12:13:35 +01:00
Sean Parkinson
320afab227
Configuration fixes
...
--enable-sp --enable-sp-asm --disable-fastmath:
cpuid.h - check for WOLFSSL_SP_ASM as well
-enable-curve448 --enable-ed448 --disable-rsa --disable-dh
--enable-tls13 --disable-ecc --enable-certgen --enable-keygen:
api.c - certificate loaded that was RSA but RSA disabled
--enable-sp --enable-sp-asm --enable-sp-math:
cpuid.c - check for WOLFSSL_SP_ASM as well
--disable-shared --disable-ecc --disable-dh --enable-cryptonly
--enable-rsavfy --disable-asn --disable-rng --disable-filesystem:
test.c - rsa_test()
'CC=clang -fsanitize=address' '-enable-distro' '--enable-stacksize':
testsuit.c - echoclient_test_wrapper needs to free ECC FP cache when
it is in a separate thread
2020-10-29 16:21:06 +10:00
Sean Parkinson
32ea0910de
ECDSA verification: handle doubling of infinity
2020-10-29 12:12:01 +10:00
David Garske
ef7a987759
Peer review fixes.
2020-10-28 17:09:15 -07:00
Daniel Pouzzner
7d177e78d7
don't include wolfssl/options.h in logging.c, use AM_CFLAGS (not wolfssl/options.h) to communicate HAVE_WC_INTROSPECTION to the compiler, and use config.h (not wolfssl/options.h) to communicate LIBWOLFSSL_CONFIGURE_ARGS and LIBWOLFSSL_GLOBAL_CFLAGS to the compiler (for logging.c).
2020-10-28 17:28:05 -05:00
Daniel Pouzzner
fda84576b0
name the new introspection routines wolfSSL_configure_args() and wolfSSL_global_cflags() for consistency, and move the prototypes to logging.h.
2020-10-28 17:28:05 -05:00
Daniel Pouzzner
a5d96721ac
wolfcrypt/src: remove wc_debug.c and move its contents to logging.c.
2020-10-28 17:28:05 -05:00
Daniel Pouzzner
1ba0883f4c
introspection tweaks: rename wolfcrypt/src/debug.c to wolfcrypt/src/wc_debug.c; restore BUILD_WC_DEBUG gating for autotools inclusion of wc_debug.o and disable opportunistically when ENABLED_LEANTLS, ENABLED_LEANPSK, or ENABLED_LOWRESOURCE; add HAVE_WC_INTROSPECTION gate for libwolfssl_configure_args() and libwolfssl_global_cflags().
2020-10-28 17:28:05 -05:00
Daniel Pouzzner
f37c25f9c0
wc_XChaCha20Poly1305_crypt_oneshot(): use ForceZero, not XMEMSET(), to safely clear the AEAD state before return.
2020-10-28 17:28:05 -05:00
Daniel Pouzzner
b918e1fd4c
examples/: add -@ and -# flags to client and server, printing libwolfssl_configure_args() and libwolfssl_global_cflags() respectively.
2020-10-28 17:28:05 -05:00
Daniel Pouzzner
8be2d7690a
add API functions libwolfssl_configure_args() and libwolfssl_global_cflags() to retrieve build parameters at runtime.
2020-10-28 17:28:01 -05:00
toddouska
931eea30f5
Merge pull request #3397 from cconlon/rc2
...
RC2 ECB/CBC and PKCS#12 Integration
2020-10-28 15:06:47 -07:00
Hayden Roche
90258b6f34
Fix MSVC compile issue in chacha.c.
...
Use XMEMSET instead of initializing with {}.
2020-10-28 14:57:59 -05:00
toddouska
112cce8cf2
Merge pull request #3407 from SparkiDev/pkcs11_sign_vfy
...
PKCS #11 : changes for signing and loading RSA public key from private
2020-10-28 12:53:58 -07:00
toddouska
6a98601895
Merge pull request #3427 from SparkiDev/ecdsa_shamir_precomp
...
ECC Shamir's Trick: infinity in precomp
2020-10-28 12:08:40 -07:00
Hayden Roche
91f0d8bfef
Fix MSVC compile issue in chacha.c.
...
MSVC generates a syntax error when you initialize
an array with {}. {0} has the same effect and compiles.
2020-10-27 21:14:15 -05:00
David Garske
76e84e0830
Merge pull request #3423 from ejohnstown/nightly-test-fix
...
Nightly Scan-Build Test Fixes
2020-10-27 08:31:19 -07:00
Sean Parkinson
fb2288c46d
RSA-PSS: Handle edge case with encoding message to hash
...
When the key is small relative to the digest (1024-bit key, 64-byte
hash, 61-byte salt length), the internal message to hash is larger than
the output size.
Allocate a buffer for the message when this happens.
2020-10-27 12:39:06 +10:00
John Safranek
f5f883597e
RSA PSS Fix
...
1. Change the utility function in wc_encrypt that returns the size of a
hash to initialize the size to HASH_TYPE_E, like the other utility
functions.
2. When getting the hash size returns an error, RSA-PSS verify inline
should return a BAD_FUNC_ARG error.
2020-10-24 13:06:42 -07:00
John Safranek
3f5620089e
PKCS7: In EncodeEncryptedData, free the attribs and flattenedAttribs if
...
they were allocated, not based on if they should be allocated.
2020-10-24 12:41:10 -07:00
John Safranek
bfccf35eaf
Tautological Name Fix
...
Depending on the build option WOLFSSL_ECC_CURVE_STATIC, the name in the
ecc_set may be a pointer (default) or an array. With the above set with
the CFLAG -Wtautological-pointer-compare you'll get a build error.
Changed the comparison in the for loop with this problem to check the
name's pointer only if appropriate.
2020-10-23 15:23:16 -07:00
Chris Conlon
e24ac4211d
Merge pull request #3405 from kojo1/EVP-gcm-zero
...
set tag including if(inl == 0) case
2020-10-23 14:35:47 -06:00
David Garske
589057245f
Improvement to ECC wc_ecc_rs_raw_to_sig to reduce memory use (avoid the mp_int). Additional test cases. Fixes for previous function changes.
2020-10-23 11:00:46 -07:00
John Safranek
a7b325f542
Merge pull request #3414 from kabuobeid/wolfrand_build_fix
...
Fix wolfrand build failure.
2020-10-22 22:54:05 -07:00
Sean Parkinson
24af0497b5
PKCS #11 : changes for signing and loading RSA public key from private
2020-10-23 14:02:59 +10:00
David Garske
ff092c02d2
Merge pull request #3396 from SparkiDev/fips_armasm
...
FIPS ARMASM: get build working
2020-10-22 15:26:24 -07:00
David Garske
05094460b2
Merge pull request #3353 from douzzer/XChaCha
...
XChaCha
2020-10-22 15:25:56 -07:00
Kareem Abuobeid
42583b5270
Fix wolfrand build failure, caused by defining NO_ASN without NO_CERTS.
2020-10-22 14:48:37 -07:00
David Garske
0065756efc
Improvement to ECC wc_ecc_sig_to_rs to reduce memory use (avoid the mp_int).
2020-10-22 13:34:19 -07:00
David Garske
cb8e625e32
Fix to allow import of private key with ATECC. Its okay to load private key material into ecc_key struct.
2020-10-22 13:26:00 -07:00
tmael
6265006553
Merge pull request #3403 from elms/cppcheck/cleaup_fixes
...
Address some cppcheck issues
2020-10-22 12:56:19 -07:00
David Garske
be8e4d1949
Fix to reduce memory use with small stack on ECC key import.
2020-10-22 12:41:49 -07:00
Chris Conlon
df382f382f
fix case in PKCS7_VerifySignedData where pkiMsgSz may not be set correctly
2020-10-22 09:23:32 -07:00
Chris Conlon
5e78a0107d
check Rc2EcbEncrypt/Decrypt returns during CBC ops
2020-10-22 09:57:34 -06:00
Daniel Pouzzner
c910c94824
rename API wc_XChaCha20Poly1305_{encrypt,decrypt}_oneshot to wc_XChaCha20Poly1305_{Encrypt,Decrypt} for consistency; remove stray debugging printf in XChaCha20Poly1305_test().
2020-10-21 14:36:46 -05:00
Daniel Pouzzner
299e88a993
minor fixes and commentary.
2020-10-21 14:08:41 -05:00
Daniel Pouzzner
99b76241bd
wolfcrypt/test/test.c: remove debugging printf in XChaCha20Poly1305_test().
2020-10-21 14:08:41 -05:00
Daniel Pouzzner
e1d3f2c7b4
chacha20_poly1305.c: add _SMALL_STACK code in wc_XChaCha20Poly1305_crypt_oneshot().
2020-10-21 14:08:41 -05:00