toddouska
75d0496f77
Merge pull request #3722 from SparkiDev/sp_clang_fix
...
test.c: don't check key NULL when not small stack
2021-02-09 16:07:04 -08:00
toddouska
157ad65a6e
Merge pull request #3677 from SparkiDev/ecdsa_keep_e
...
ECDSA: don't modify the e mp_int (hash) value
2021-02-09 16:06:05 -08:00
toddouska
47b2e8342b
Merge pull request #3698 from SparkiDev/sp_math_no_asm_fix
...
SP math: fix one word Montgomery Reduction for non-asm
2021-02-09 16:04:38 -08:00
toddouska
32424f715c
Merge pull request #3699 from SparkiDev/sp_ecdsa_vfy_fix
...
SP ECC verify: check point for z=0 and set to infinity
2021-02-09 16:02:51 -08:00
toddouska
27475291b1
Merge pull request #3733 from SparkiDev/sp_int_mont_red_size
...
SP int: mont_red - check size of a relative to m
2021-02-09 16:00:24 -08:00
toddouska
ae3706d5e5
Merge pull request #3734 from SparkiDev/sp_int_8_bit
...
SP int: fixes for 8-bit digits
2021-02-09 15:59:26 -08:00
toddouska
2f47934184
Merge pull request #3735 from SparkiDev/sp_int_32_bit
...
SP int SP_WORD_SIZE=32: cast down explicitly
2021-02-09 15:56:49 -08:00
toddouska
fc30f379ee
Merge pull request #3736 from SparkiDev/sp_int_neg_zero
...
SP int neg: fix handling of negative zero and mp_cond_copy
2021-02-09 15:48:21 -08:00
David Garske
47d5f6f624
Merge pull request #3714 from SparkiDev/sp_int_rsavfy
2021-02-09 07:28:40 -08:00
Sean Parkinson
5818923762
Merge pull request #3723 from douzzer/AesCcmEncrypt-zero-inSz-null-in
...
AES-CCM null payload buffers with inSz zero
2021-02-09 17:22:03 +10:00
Daniel Pouzzner
bdd4ceb445
aes.c: fix overwide code text in wc_AesCcmEncrypt().
2021-02-08 21:50:29 -06:00
Sean Parkinson
539ef512fc
SP int neg: fix handling of negative zero and mp_cond_copy
...
mp_cond_copy: copy sign when available.
Check for zero and ensure sign is MP_ZPOS.
2021-02-09 11:03:06 +10:00
Sean Parkinson
763f388471
SP int: get rsavfy and rsapub working again
2021-02-09 09:58:23 +10:00
toddouska
0d499a28e5
Merge pull request #3725 from elms/build/fix_distcheck
...
build: fix `make distcheck`
2021-02-08 15:57:04 -08:00
Daniel Pouzzner
7a583d5b4b
aesccm_test(): test for (and require) BAD_FUNC_ARG when in or out pointer to wc_AesCcm{En,De}crypt() is null and inSz > 0.
2021-02-08 16:43:38 -06:00
Daniel Pouzzner
b8a019dedd
AES-CCM: allow null payload buffers in wc_AesCcmEncrypt() and wc_AesCcmDecrypt() when inSz is zero, and add to aesccm_test() a test for this, tolerating early BAD_FUNC_ARG (for FIPS and arch-specific 3rd party code), and a test for the zero-length string, that must succeed.
2021-02-08 16:34:09 -06:00
David Garske
dda4c3b3c4
Merge pull request #3724 from embhorn/zd11646
...
Move var declaration to top
2021-02-08 11:09:28 -08:00
Sean Parkinson
36d124ed2f
Merge pull request #3730 from guidovranken/zd11650
...
SP math: Better error propagation
2021-02-08 14:17:43 +10:00
Sean Parkinson
c3cc36c55f
SP int SP_WORD_SIZE=32: cast down explicitly
2021-02-08 13:20:12 +10:00
Sean Parkinson
7986b37aa5
SP int: fixes for 8-bit digits
...
Fix mask type in mp_cond_copy to be at least 16 bits to handle 'used'
being larger than 8-bit but mp_digit being 8-bit.
When large numbers are used with 8-bit words, mul/sqr partial sums will
overflow a word. Fix implementations to handle this.
2021-02-08 12:24:28 +10:00
Sean Parkinson
aefddaf2b8
SP int: mont_red - check size of a relative to m
2021-02-08 10:07:15 +10:00
Guido Vranken
358dbd5090
_sp_exptmod_base_2: Break out of loops on error
2021-02-08 00:09:29 +01:00
Sean Parkinson
2933db8915
Merge pull request #3729 from guidovranken/zd11649
...
SHA 256,512: Only write hash if no error has occurred
2021-02-08 08:47:51 +10:00
Guido Vranken
bc707d67c3
SP math: Better error propagation
...
ZD 11650
2021-02-06 09:09:41 +01:00
Guido Vranken
3fd2647383
SHA 256,512: Only write hash if no error has occurred
...
ZD 11649
2021-02-06 08:15:30 +01:00
Elms
c17597a4fb
build: arbitrary path for make check
...
To support builds in other directories, unit.test and wolfcrypt test
must be aware of the source and build directory.
2021-02-05 12:10:32 -08:00
David Garske
70b382e6cf
Fix for PKCS11 not properly exporting the public key due to a missing key type field. This broke due to changes in PR #3687 . Also resolved mismatch of enum types for the key type check.
2021-02-05 11:49:31 -08:00
Elms
93ea355217
build: fix make distcheck
...
Need to check if `unit.test` was run from make process and set
different path to run unit test executable.
Writing files in the dist is not allowed during distcheck so write
files to subdirectory used build during distmake
2021-02-05 07:25:07 -08:00
Eric Blankenhorn
e4d79bf49e
Move var declaration to top
2021-02-05 08:41:42 -06:00
Sean Parkinson
c4afce76f7
test.c: don't check key NULL when not small stack
2021-02-05 14:57:00 +10:00
Guido Vranken
f833d96ba3
Check the right size before freeing flatSignedAttribs in PKCS7_EncodeSigned
2021-02-02 10:15:00 -08:00
David Garske
5577a2215f
Merge pull request #3708 from JacobBarthelmeh/Testing
2021-02-01 10:11:16 -08:00
Jacob Barthelmeh
a7066a9be2
add stdint to test.c if using non blocking ecc test
2021-02-01 23:07:03 +07:00
Jacob Barthelmeh
fd01f79f86
add guard for rsa public only
2021-01-31 23:43:53 +07:00
Daniel Pouzzner
d14f4f8451
wolfcrypt/test/test.c: smallstack refactor of openssl test routines.
2021-01-30 00:01:15 -06:00
Daniel Pouzzner
d0b20f90d5
wolfcrypt/test/test.c: use HEAP_HINT, not NULL, for XREALLOC() too.
2021-01-29 20:16:51 -06:00
Daniel Pouzzner
8c0100e60e
blake2b.c/blake2s.c: refactor so that smallstack code paths match performance of !smallstack path.
2021-01-29 17:19:42 -06:00
Daniel Pouzzner
a332cf36b5
add DYNAMIC_TYPE_AES and DYNAMIC_TYPE_CMAC to enum in types.h, and use these where appropriate;
...
in test.c: use use HEAP_HINT, not NULL in XMALLOC/XFREE calls;
fix a couple typos in aes_test() re WOLFSSL_ASYNC_CRYPT;
add various missing WOLFSSL_SMALL_STACK_STATIC qualifiers;
and streamline old smallstack refactor on-stack declarations declarations to use the much neater [1] construct.
2021-01-29 17:17:31 -06:00
Daniel Pouzzner
0f6ae330da
wolfcrypt: smallstack refactors of AES code for lkm compatibility with --enable-aesgcm=table.
2021-01-28 22:51:28 -06:00
David Garske
2bd63d27bf
Fixes for PKCS7 with crypto callback (deviceId), where it was not being used for RSA and RNG. ZD 11163.
2021-01-28 09:52:13 -08:00
Sean Parkinson
590597a0e2
SP ECC verify: check point for z=0 and set to infinity
2021-01-28 14:43:51 +10:00
Sean Parkinson
0ccb0d5fce
SP math: fix one word Montgomery Reduction for non-asm
...
Set the word size for x86.
2021-01-28 09:54:58 +10:00
Sean Parkinson
c739b4d474
ECDSA sign: cleanup comments and variables
...
Remove mod at end as mulmod does this.
Change mp_add to mp_addmod_ct to keep the size of numbers to less than
order for mp_mulmod.
2021-01-27 09:39:11 +10:00
toddouska
f91dcb950c
Merge pull request #3670 from dgarske/keil
...
Fix for ARM Keil MDK compiler issue with `DECLARE_VAR_INIT`.
2021-01-25 14:57:05 -08:00
toddouska
f35f57c378
Merge pull request #3683 from SparkiDev/sp_int_mont_red_1
...
SP math all: fix 1 word Montgomery Reduce
2021-01-25 14:47:35 -08:00
toddouska
d201820e3a
Merge pull request #3687 from guidovranken/x963-export-reject-invalid-keys
...
Reject undefined keys (eg. state is ECC_STATE_NONE) from X963 export …
2021-01-25 14:46:59 -08:00
toddouska
cf9e4f0caf
Merge pull request #3518 from julek-wolfssl/openssh-fixes-v2
...
Fixes for openssh
2021-01-25 14:45:56 -08:00
David Garske
05e1ee1694
Cleanup to use fixed sizes from defines for DECLARE_VAR. Resolves issue with Visual Studio and using a variable (even const) to declare an array size.
2021-01-25 09:14:12 -08:00
Guido Vranken
29f7eebef7
Reject undefined keys (eg. state is ECC_STATE_NONE) from X963 export functions
...
Additionally, harmonize the failure conditions of wc_ecc_export_x963 and
wc_ecc_export_x963_compressed.
2021-01-25 16:22:21 +01:00
Sean Parkinson
4f0ed55232
SP math all: fix 1 word Montgomery Reduce
...
May have 3 words in partial result before shifting down.
2021-01-25 10:19:27 +10:00