Commit Graph

1247 Commits (29e20eeadcf5f3023218d0d24d825287d77a1d8a)

Author SHA1 Message Date
JacobBarthelmeh 8d7c61cf10 prep for Async release 2021-02-19 11:51:23 -07:00
Chris Conlon 4da0328e1a fix wolfCrypt PKCS#7 test when PKCS7_OUTPUT_TEST_BUNDLES is defined 2021-02-18 12:14:48 -07:00
David Garske 10be54054e Minor fixes for build errors and bad macro names. 2021-02-18 10:55:47 -08:00
David Garske c62b48f7d0 Fixes for building with RSA public or verify only. Fixes issue with reserved "div" keyword as variable name. ZD11585 2021-02-18 07:47:00 -08:00
Sean Parkinson 64bc4b663d SP fixes: even mod testing, ECC compilation with SP
Even mod inversion will sometimes work with integer.c.
Don't call SP code to perform ECC ops unless WOLFSSL_HAVE_SP_ECC is
defined.
2021-02-10 14:38:58 +10:00
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
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
Sean Parkinson 763f388471 SP int: get rsavfy and rsapub working again 2021-02-09 09:58:23 +10: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
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
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
Sean Parkinson c4afce76f7 test.c: don't check key NULL when not small stack 2021-02-05 14:57:00 +10: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 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
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
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
David Garske 46aee19de3 Fix for Visual Studio issue with non-cost in array declaration. 2021-01-22 10:44:38 -08:00
David Garske 1ee40ad7bd Fix to always init the variable (not just when from heap). Cleanup of the `DECLARE_` uses to make sure all allocations succeeded. 2021-01-21 17:12:29 -08:00
Eric Blankenhorn fd8527c15e Fix FIPS compile errors 2021-01-21 15:27:42 -06:00
David Garske 17f101ef13 Fix for ARM Keil MDK compiler issue with `DECLARE_VAR_INIT`. 2021-01-20 16:57:30 -08:00
toddouska 5b7e6ccc14
Merge pull request #3613 from SparkiDev/sp_rand_prime_len
SP rand_prime: fix length check
2021-01-18 15:23:15 -08:00
toddouska 563e3c6b60
Merge pull request #3628 from SparkiDev/even_mp_test
RSA/DH test: even number error check fixup
2021-01-18 13:39:54 -08:00
Sean Parkinson cd0670cbd7 RSA: verify only build fixes
configuration: --disable-ecc --disable-dh --disable-aes --disable-aesgcm
--disable-sha512 --disable-sha384 --disable-sha --disable-poly1305
--disable-chacha --disable-md5 --disable-sha3 --enable-cryptonly
--disable-inline --enable-rsavfy --disable-asn --disable-oaep
--disable-rng --disable-filesystem --enable-sp=rsa2048 --enable-sp-math
Fixes to make code build again.
2021-01-06 11:58:15 +10:00
Sean Parkinson 10722fba14 RSA/DH test: even number error check fixup
Configuration: --enable-sp=3072
Test only enabled when SP is used.
Return codes checked are those we expect from SP.
Code, with configuration, is compiled so that 2048-bit operations are
not going to SP and the error returns were not correct.
2021-01-06 09:39:24 +10:00
Sean Parkinson 40ab08be45 SP rand_prime: fix length check
-ve length indicates to use a BBS prime (last two bits set)
2021-01-04 12:31:59 +10:00
Daniel Pouzzner a2dec7ce9c test.c: work around toolchain/ecosystem bug on aarch64 linux 4.14.0-xilinx-v2018.3. 2020-12-30 20:03:13 -06:00
Daniel Pouzzner 3d88676ff1 test.c: add WOLFSSL_TEST_SUBROUTINE macro to qualify all previously global subtest handlers, defaulting to the empty string. this restores the version<=4.5 test.c namespace allowing end users to call the tests directly piecemeal. --enable-linuxkm[-defaults] sets -DWOLFSSL_TEST_SUBROUTINE=static for extra namespace hygiene. 2020-12-30 16:12:08 -06:00
Daniel Pouzzner fbcfc6adbf test.c: rehab fail codes in ecc_test_curve_size(). 2020-12-28 21:56:39 -06:00
Daniel Pouzzner d5dd35c739 add --enable-trackmemory=verbose, and add WOLFSSL_TEST_MAX_RELATIVE_HEAP_{BYTES,ALLOCS} and -m/-a (runtime counterparts) to wolfcrypt_test(). also add -h to wolfcrypt_test() to print available options. 2020-12-23 12:03:06 -06:00
Daniel Pouzzner f06361ddf6 add WOLFSSL_SMALL_STACK_STATIC macro, and use it to conditionally declare const byte vectors in test.c static for stack depth control -- currently only enabled for linuxkm, but should be compatible with any target with a TLB (virtual memory). 2020-12-22 17:12:57 -06:00
Tesfa Mael 56071ac21f Fix for Cryptocell tests 2020-12-22 16:23:16 -06:00
toddouska ea3c385021
Merge pull request #3579 from SparkiDev/sp_math_all_4096
SP math all: enable 4096-bit support by default for x64
2020-12-18 14:14:36 -08:00
Sean Parkinson 7f5a85ae85 Reduce stack usage 2020-12-18 13:15:50 +10:00
David Garske ce0a2f3bc9 Fixes for Cavium Nitrox and Intel QuickAssist. 2020-12-17 15:53:28 -08:00
Chris Conlon 420a040774 fix WOLFSSL_ASYNC_CRYPT usage in test.c, test_wolfSSL_OBJ_ln() in api.c 2020-12-17 11:08:36 -07:00
toddouska b0464c93e2
Merge pull request #3542 from SparkiDev/sp_mod_odd
SP: ensure modulus/prime is odd before performing RSA/DH/ModExp ops
2020-12-16 08:51:10 -08:00
Sean Parkinson 6dc06993bf SP: ensure modulus/prime is odd before performing RSA/DH/ModExp ops 2020-12-16 21:49:09 +10:00
Sean Parkinson 972d6cfefc Base64: Cache attack resistant decode 2020-12-15 17:22:02 +10:00
toddouska bd871280d7
Merge pull request #3497 from elms/erf32/se_acceleration
ERF32: HW acceleration
2020-12-14 15:43:15 -08:00
Daniel Pouzzner 2804cb2521 wolfcrypt/test/test.c: more smallstack refactoring in aes_test(). 2020-12-11 14:17:25 -06:00
Daniel Pouzzner 53c6d33695 test.c:aes_test(): add WOLFSSL_SMALL_STACK codepaths for WOLFSSL_AESNI test. 2020-12-11 14:16:44 -06:00
Daniel Pouzzner 1c0df61247 wolfssl/test.h and wolfcrypt/test/test.c: add STACK_SIZE_CHECKPOINT_WITH_MAX_CHECK(), recognize macro WOLFSSL_TEST_MAX_RELATIVE_STACK_BYTES, and add to wolfcrypt_test() runtime settability of relative cumulative stack depth assert threshold using "-s stacksize". 2020-12-11 14:16:44 -06:00
Daniel Pouzzner 525382fb13 test.c:pkcs7authenveloped_run_vectors(): small stack refactor, and reenable for WOLFSSL_LINUXKM. 2020-12-11 14:16:44 -06:00
Daniel Pouzzner f47cdfcaed wolfcrypt/test/test.c: fix skipped initialization warned by LLVM11 scan-build. 2020-12-10 14:16:21 -06:00
Daniel Pouzzner f49e9bf954 dsa.c, srp.c, wolfcrypt/test/test.c: smallstack refactors: wc_DsaExportKeyRaw(), wc_DsaSign(), wc_SrpSetKey(), ecc_test_cdh_vectors(), ecc_test_custom_curves(). 2020-12-10 14:16:21 -06:00
Daniel Pouzzner f7bf0a78fb test.c:ecc_test_curve_size(): use a macro, not a static const size_t, for size of exportBuf, to make MS Visual Studio happy. 2020-12-10 14:16:21 -06:00
Daniel Pouzzner e6b587772f fix pointer type clash in wolfSSL_BN_mod_word(); restore accidentally removed WOLFSSL_KEY_GEN gate in dsa_test(). 2020-12-10 14:16:21 -06:00
Daniel Pouzzner ad2cb67047 wolfcrypt/test/test.c: _SMALL_STACK refactors of dsa_test(), srp_test(), openssl_pkey1_test(), and ecc_test_curve_size(); add missing FIPS gates. 2020-12-10 14:16:20 -06:00
Elms 93fc37f87b SiLabs: add cleanup and address PR comments 2020-12-09 16:28:39 -08:00
Elms 620fe2da14 SiLabs: Fix tests and wc_ecc_import_private_key 2020-12-08 12:22:35 -08:00
Elms 44243278a5 SiLabs: renable ecc_ssh_test and disable AES non-12Byte IV 2020-12-07 15:04:00 -08:00
Juliusz Sosinowicz 0d87dfa493 EVP_Cipher should return length written. 2020-12-01 18:36:36 +01:00
Elms 099ed25da8 SiLabs: fixing compiler warnings and better error checking 2020-11-30 21:01:49 -08:00
Elms 9f7ef0b3e6 SiLabs: Add ECC hardware acceleration support 2020-11-30 21:01:49 -08:00
Elms 79c31a5f2c SiLbs: SHA and AES-{GCM,CBC} hardware acceleration using se_manager 2020-11-30 21:01:49 -08:00
Elms 165cb443e7 Micrium v5.8 support
* OS error type change from uc OS3 to v5
 * detect if network or TCP is available
 * XMEMCMP change workaround
2020-11-30 16:32:30 -08:00
Sean Parkinson 91d23d3f5a Implement all relevant mp functions in sp_int 2020-11-19 11:58:14 +10:00
toddouska de6f1c1ae2
Merge pull request #3508 from JacobBarthelmeh/DH
fix for no filesystem build with DH test case
2020-11-18 16:15:42 -08:00
toddouska 9bde34ef5b
Merge pull request #3438 from douzzer/harmonize-CCM8-cipher-names
add "CCM8" variants to cipher_names "CCM-8" ciphers, for OpenSSL compat
2020-11-18 15:52:52 -08:00
Jacob Barthelmeh 9cdbff8ee7 fix for no filesystem build with DH test case 2020-11-17 18:27:32 +07:00
David Garske 710cb7c9f5 Fixes for ECC tests with `WOLFSSL_NO_MALLOC` defined. 2020-11-16 12:17:30 -08:00
David Garske e5a0a264b3 Fix for coverity report with possible use of uninitialized value "err" in `WC_ECC_NONBLOCK` case. More fixes for building with `WOLFSSL_NO_MALLOC`. 2020-11-16 12:17:28 -08:00
David Garske 40387ab0a0 Fixes for building with `WOLFSSL_NO_MALLOC` and/or `NO_ASN_CRYPT` defined. 2020-11-16 12:17:28 -08:00
David Garske c7bb602a30
Merge pull request #3482 from douzzer/scan-build-fixes-20201110
scan-build fixes -- 1 null deref, 34 unused results
2020-11-12 07:45:45 -08:00
Daniel Pouzzner 68ebca8573 wolfcrypt/test/test.c: fix typos in aesgcm_test() malloc checks. 2020-11-11 22:47:47 -06:00
Daniel Pouzzner 5fe1586688 fix 34 deadcode.DeadStores detected by llvm11 scan-build. 2020-11-11 13:04:14 -06:00
David Garske 1d531fe13b Peer review fixes. 2020-11-10 09:47:37 -08:00
David Garske 5de80d8e41 Further refactor the minimum ECC key size. Adds `--with-eccminsz=BITS` option. Fix for FIPSv2 which includes 192-bit support. If `WOLFSSL_MIN_ECC_BITS` is defined that will be used. 2020-11-10 09:47:37 -08:00
David Garske b13848e568 Fix tests to handle ECC < 224 not enabled. 2020-11-10 09:47:37 -08:00
Daniel Pouzzner 4b1a779fcc tests: fix for fips-test -Wunused-variable on "rng" 2020-11-09 11:54:49 -06:00
toddouska b76ac0b842
Merge pull request #3442 from SparkiDev/config_fix_2
Configuration fixes
2020-11-03 14:48:49 -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
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
toddouska 931eea30f5
Merge pull request #3397 from cconlon/rc2
RC2 ECB/CBC and PKCS#12 Integration
2020-10-28 15:06:47 -07: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
Kareem Abuobeid 42583b5270 Fix wolfrand build failure, caused by defining NO_ASN without NO_CERTS. 2020-10-22 14:48:37 -07: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 99b76241bd wolfcrypt/test/test.c: remove debugging printf in XChaCha20Poly1305_test(). 2020-10-21 14:08:41 -05:00
Daniel Pouzzner f65947ae09 rename wc_XChaCha_init() to wc_XChacha_SetKey() for consistency, and add a counter argument to provide for future random access scenarios; refactor wc_Chacha_purge_current_block() to use a dummy wc_Chacha_Process() call for intrinsically correct counter dynamics. 2020-10-21 14:08:41 -05:00
Daniel Pouzzner 6142c22948 add wc_XChaCha_init(), wc_XChaCha20Poly1305_Init(), wc_XChaCha20Poly1305_encrypt_oneshot(), wc_XChaCha20Poly1305_decrypt_oneshot(), and wc_Poly1305_EncodeSizes64(). also, remove redundant arg check (typo) in wc_Poly1305Update(). 2020-10-21 14:08:41 -05:00
toddouska 7c38be407c
Merge pull request #3398 from dgarske/async_test
Fixes for `--enable-asynccrypt` tests
2020-10-20 15:13:51 -07:00
David Garske fbd98be7af Fixes for `--enable-asynccrypt` tests after PR #3244. 2020-10-16 15:55:17 -07:00
John Safranek 4364700c01
DH Fix
These changes fix several fuzz testing reports. (ZD 11088 and ZD 11101)
1. In GetDhPublicKey(), the DH Pubkey is owned by the SSL session. It
   doesn't need to be in the check for weOwnDh before freeing. There
   could be a chance it leaks.
2. In GeneratePublicDh() and GeneratePrivateDh(), the size of the
   destination buffer should be stored at the location pointed to by the
   size pointer. Check that before writing into the destination buffer.
3. Ensure the size of the private and public key values are in the size
   value before generating or getting the DH keys.
2020-10-16 15:35:23 -07:00
Chris Conlon d4bbe529fb switch RC2 struct name to Rc2 for consistent camel case across algorithms 2020-10-16 15:19:47 -06:00
Chris Conlon a6923ff100 initial implementation of RC2-CBC 2020-10-16 12:02:16 -06:00
Chris Conlon 4c75037bdb initial implementation of RC2-ECB 2020-10-16 12:00:56 -06:00
John Safranek aeeeb666a7
Maintenance Fixes
1. The test_wolfSSL_X509V3_EXT_print() test was using stderr for output,
   changed to stdout.
2. A call to XFREAD wasn't typecasting its output to the size of the
   variable getting the output in decodedCertCache_test().
2020-10-09 15:01:32 -07:00
Daniel Pouzzner 29d4de6307 fix pkcs7compressed_test() (test gated on HAVE_LIBZ), broken by PR#3244. 2020-10-09 12:42:14 -05:00
toddouska c69e9927fa
Merge pull request #3354 from SparkiDev/mac_arm_asm_2
ARM ASM ChaCha20: Fix calc of left over bytes
2020-10-08 14:49:33 -07:00
kaleb-himes d9eaeb4a3b Fix NTRU + QSH build 2020-10-08 09:13:00 -06:00
Sean Parkinson f76165a3fa ARM ASM ChaCha20: Fix calc of left over bytes 2020-09-30 15:57:33 +10:00
John Safranek dbf18b8532
Test ECC-521 Only
Update benchmark and wolfcrypt test to support using only ECC-521 in a custom curve list.
2020-09-28 09:22:24 -07:00
Sean Parkinson c798c7f396 DH EXTRA test: Disable DH test unless not FIPS or FIPS > 2
statickeys/dh-ffdhe2048.der is an alternate format that is supported
when WOLFSSL_DH_EXTRA is defined.
The decoding is not supported when FIPS and FIPS version is less than 3.
Fix test to not use file unless not FIPS or FIPS > 2.
2020-09-25 11:41:59 +10:00
Daniel Pouzzner 62bbef2f2e wolfcrypt/test/test.c: add missing gating for -DBENCH_EMBEDDED. 2020-09-23 18:32:16 -05:00
Daniel Pouzzner 2609fa9aeb test.c:rsa_test(): fix cpp gating for clearing of keypub buffer. 2020-09-23 18:32:16 -05:00
Daniel Pouzzner 5f972d2ae6 test.c: now that sp math is fixed and working in linuxkm, reenable prime_test() for WOLFSSL_LINUXKM, and add a small stack refactor for it. 2020-09-23 18:32:16 -05:00
Daniel Pouzzner 8f130f3642 test.c: tweaks to accommodate clang's belligerent -Wparentheses-equality. 2020-09-23 18:32:16 -05:00
Daniel Pouzzner 447a238e8e test.c: missed a _SMALL_STACK spot in rsa_ecc_certgen_test(). 2020-09-23 18:32:16 -05:00
Daniel Pouzzner 5bfb5a3a83 test.c: fix missed spot in rsa_certgen_test(), and do another _SMALL_STACK refactor of a missed object in rsa_ecc_certgen_test(). 2020-09-23 18:32:16 -05:00
Daniel Pouzzner fdf87fe152 test.c: another missed spot. 2020-09-23 18:32:16 -05:00
Daniel Pouzzner ebca451c93 test.c: missed a spot -- inadvertently unused return value. 2020-09-23 18:32:16 -05:00
Daniel Pouzzner 80961ea913 test.c:ecc_decode_test(): WOLFSSL_SMALL_STACK refactor 2020-09-23 18:32:16 -05:00
Daniel Pouzzner dbe0273bf4 test.c: additional WOLFSSL_SMALL_STACK refactoring, covering --enable-sp-math and various missed spots. 2020-09-23 18:32:16 -05:00
Daniel Pouzzner cd88a2c7df wolfcrypt/test/test.c: when WOLFSSL_LINUXKM, don't do the large-malloc-incurring wc_scrypt()s in scrypt_test(). 2020-09-23 18:32:16 -05:00
Daniel Pouzzner dc4b15a265 test.c: fix gating on heap deallocation in hc128_test() to match earlier tweak to gating on allocation. 2020-09-23 18:32:16 -05:00
Daniel Pouzzner b52d50d903 test.c: various improvements and fixes pursuant to dgarske's comments on PR #3244 2020-09-23 18:32:16 -05:00
Daniel Pouzzner a80b0c1982 test.c: don't exclude prime_test when -DOLD_PRIME_CHECK, but to exclude it when -DWOLFSSL_LINUXKM. 2020-09-23 18:32:16 -05:00
Daniel Pouzzner e8b69f8a6a dh_test(): fix missing casts for XMALLOC(). 2020-09-23 18:32:16 -05:00
Daniel Pouzzner f440089e92 dh_test(): fix typo (undersized dynamic buffers). 2020-09-23 18:32:16 -05:00
Daniel Pouzzner f106fea0d8 rsa_no_pad_test(): fix uninited pointer. 2020-09-23 18:32:16 -05:00
Daniel Pouzzner 4ea8b46177 dh_test(): refactor remaining bare returns to ERROR_OUT(). 2020-09-23 18:32:16 -05:00
Daniel Pouzzner 2ee218761e dh_test(): missed a spot in last commit. 2020-09-23 18:32:16 -05:00
Daniel Pouzzner ca1a991de5 wolfcrypt/test/test.c: fix an error-path leak in dh_test(), and deal with possible -Wdeclaration-after-statement for `XFILE file`. 2020-09-23 18:32:16 -05:00
Daniel Pouzzner a7381f8a48 test.c:rsa_test(): fix uninited pointer 2020-09-23 18:32:16 -05:00
Daniel Pouzzner 426de2101a more work on DECLARE_VAR -- proper handling of failed allocations. WIP. 2020-09-23 18:32:16 -05:00
Daniel Pouzzner 9b7c753165 wolfssl/wolfcrypt/types.h: make DECLARE_VAR() et al use heap allocation not only when WOLFSSL_ASYNC_CRYPT but also when WOLFSSL_SMALL_STACK. 2020-09-23 18:32:15 -05:00
Daniel Pouzzner 571bf897c4 wolfcrypt/test/test.c: stack->heap refactor for dh_test(). 2020-09-23 18:32:15 -05:00
David Garske 66b59bda9b Fix for expected fail test in `openssl_test` for partial block. Fix for `mp_test` with ECC disabled, which uses `mp_init_copy`. 2020-09-23 18:32:15 -05:00
David Garske 0f8cf32122 Fix for possible leak in `openssl_test` because EVP free not called with `WOLFSSL_SMALL_STACK_CACHE` (SHA256/SHA512). Added return code checking to the openssl_test in wolfCrypt test. 2020-09-23 18:32:15 -05:00
Daniel Pouzzner 32e30d23c6 wolfcrypt/test/test.c: fix uninitialized values in aesofb_test(). 2020-09-23 18:32:15 -05:00
Daniel Pouzzner f56c6d1d8f wolfcrypt/test/test.c and wolfssl/test.h: implement DEBUG_STACK_SIZE_VERBOSE, measuring and reporting stack usage separately for each test. to use, ./configure --enable-stacksize && make CFLAGS+=-DDEBUG_STACK_SIZE_VERBOSE; also, remove a throwaway dev pragma that snuck into an earlier commit. 2020-09-23 18:32:15 -05:00
Daniel Pouzzner 925afe3b74 cast XMALLOC() return values assiduously, for Visual Studio compatibility. 2020-09-23 18:32:15 -05:00
Daniel Pouzzner 535822f4df wolfcrypt/test/test.c: refactor for stack size and namespace control, allowing embedding of wolfcrypt_test() in kernel module. 2020-09-23 18:32:15 -05:00
toddouska 8753b5b947
Merge pull request #3257 from kojo1/user-mutex
fix guard, user define mutex
2020-09-03 15:21:53 -07:00
toddouska a626ac39f2
Merge pull request #3253 from SparkiDev/chacha20_stream_fix
ChaCha20: Enable streaming with Intel x86_64 asm
2020-09-03 15:18:00 -07:00
Sean Parkinson 54c8774103 ChaCha20: Enable streaming with Intel x86_64 asm 2020-08-31 09:06:51 +10:00
David Garske 21d17b17d0 Fix typo in code comment for ECC curve cache. Fix for valgrind report of possible use of uninitialized value with ChaCha/Poly AEAD test. 2020-08-27 12:01:24 -07:00
David Garske 6d5731b8e9 Fixes for HMAC_CTX cleanup not being called to free SHA2 resources with `WOLFSSL_SMALL_STACK_CACHE`. Added return code checking and cleanup for `openssl_test`. 2020-08-26 09:45:26 -07:00
David Garske 083f143c89 Fixes for warnings with minimum ECC build. 2020-08-21 15:47:02 -07:00
David Garske 79c0fd3f29 Fix for ECC make key test not waiting for async completion. 2020-08-20 14:25:05 -07:00
David Garske 0011b7b376 Fix possible ECC curve cache leak for custom curves. Fix possible memory leak with `wc_DhKeyDecode` and `WOLFSSL_DH_EXTRA`. Fix leak in `dh_test` with new call to DH key import. 2020-08-20 14:25:05 -07:00
John Safranek 3f6861ee82
FIPS Ready Fix with ECC Timing Resistance
Commit 6467de5 added some timing resistance to ECC shared secret
agreement. It involved adding an RNG object to the ecc keys so
a random z value can be added to the mix. The older FIPS release
has ECC outside the boundary, so it uses the new ECC code. FIPSv2
has ECC inside the boundary, but all the TLS code checks for that
version of FIPS and leaves out the calls to the new functions as
it is using an older version of ecc.c. FIPS Ready uses the latest
version of ecc.c but compiles as FIPSv2. So, the code outside of
the crypto layer is treating ECC as FIPSv2 and not calling the new
functions, but the crypto layer assumes the RNG should be present,
and errs out on testing.
1. Added a separate option for FIPS Ready to the enable-fips
   configure option. `--enable-fips=ready`. It will treat FIPS
   Ready as the next kind of FIPS release. FIPS Ready will be
   treated like FIPS v3 in the build.
2. Changed the C preprocessor checks for FIPS version 2 to be
   checks for not version 2, with respect to ECC Timing Resistance
   and FIPS builds.
2020-08-14 10:54:55 -07:00
Sean Parkinson 6467de5a88 Randomize z ordinates in scalar mult when timing resistant
An RNG is required for shared secret calculation now.
Use wc_ecc_set_rng() to set an RNG against the ECC object.
ECC verification does not need timing resistance and does not randomize
z ordinates.
2020-08-11 16:12:47 +10:00
toddouska 462f4f9e45
Merge pull request #3196 from cconlon/cavpmarvell
Add fips-check.sh target for marvell-linux-selftest, selftest v2 support
2020-08-06 10:45:03 -07:00
David Garske 4a167c0f2c
Merge pull request #3119 from tmael/do178-fix
DO-178 fix
2020-08-05 16:30:00 -07:00
toddouska a536e8acd6
Merge pull request #3187 from SparkiDev/config_fix_1
Fixes for different configurations
2020-08-03 16:41:50 -07:00
toddouska bfb4b2079b
Merge pull request #3163 from dgarske/nrf52
Fixes for building against latest nRF52 SDK
2020-08-03 16:33:49 -07:00
Sean Parkinson d0969ea1ce Fixes for different configurations
Fix SkipInt() to work with DSA.
Fix protection around SetBitString16Bit() - when WOLFSSL_CERT_GEN and
WOLFSSL_CERT_EXT defined is only use.
WOLFSSL_RSA_VERIFY_ONLY and PSS means testing of PSS won't work.
Fix g++ build around ASN1_SEQUENCE - const variable required to be
initialized.
2020-08-03 14:55:09 +10:00
David Garske 776b1a2d17 Fix for ED25519 with user_settings.h. Fixes for build warnings. Fix spelling error. Added template for wolfBoot key/sign tools. 2020-07-31 15:17:53 -07:00
Tesfa Mael 4cc7f9e4a9 Check correct returned value 2020-07-30 09:18:45 -07:00
Chris Conlon c6b4fa3be3 add selftest version for newer 4.1.0 validation 2020-07-29 15:10:47 -06:00
David Garske 9160a126e4 Fixes for running wolfCrypt test/benchmark with SECP256R1 disabled. Improved detection of ECC key generation size. 2020-07-28 11:43:48 -07:00
David Garske 25fcd082d7 Improve the `mutex_test` test with pthreads. Fixes #3109 2020-07-28 08:19:32 -07:00
David Garske 8417e0b725 Fixes for building against latest nRF52 SDK. Allow nRF5x AES GCM to be enabled (uses software, but ECB is accelerated). Fix in wolfCrypt test for building AES GSM only with `NO_AES_DECRYPT`. 2020-07-24 15:46:17 -07:00
toddouska e84defb268
Merge pull request #3044 from dgarske/sniffer_tls13
TLS v1.3 sniffer support
2020-07-24 11:46:38 -07:00
David Garske 9268ae1397 Fix line length issues. Add debug msg in test to show number of non-blocking iterations.
```
$ ./configure --enable-ecc=nonblock --enable-sp=yes,nonblock CFLAGS="-DWOLFSSL_PUBLIC_MP" --enable-debug && make
$ ./wolfcrypt/test/testwolfcrypt
...
ECC non-block sign: 18063 times
ECC non-block verify: 35759 times
ECC      test passed!
```
2020-07-21 10:41:25 -07:00
David Garske 1b051d9c5b TLS v1.3 sniffer support:
* Added TLS v1.3 sniffer support using static ephemeral key.
* Add support for using a static ephemeral DH and ECC keys with TLS v1.3 using `WOLFSSL_STATIC_EPHEMERAL`.
* Adds new API's `wolfSSL_CTX_set_ephemeral_key` and `wolfSSL_set_ephemeral_key`.
* Expanded TLS extension support in sniffer.
* Refactor of the handshake hashing code.
* Added parameter checking to the TLS v1.3 key derivations (protects use of "DoTls13Finished" if handshake resources have been free'd).
* Added support for loading DH keys via `wc_DhImportKeyPair` and `wc_DhExportKeyPair`, enabled with `WOLFSSL_DH_EXTRA`.
* Added sniffer documentation `sslSniffer/README.md`.
2020-07-17 15:22:35 -07:00
David Garske 90ee12f51a Added test case for ECC non-blocking. `./configure --enable-ecc=nonblock --enable-sp=yes,nonblock CFLAGS="-DWOLFSSL_PUBLIC_MP" && make`. 2020-07-17 15:13:50 -07:00
Tesfa Mael 890500c1b1 Fix Coverity 2020-07-08 08:20:43 -07:00
Takashi Kojo fd257ee8b9 fix guard 2020-07-03 05:42:44 +09:00
David Garske 6b1a6309ce Fixes for CryptoCell. Fix for signature wrapper signing to allow larger signing input buffer. Cleanup of some duplicate code. Fix for bad cryptocell ECC make key result check (-9628). Fixes #3059. Thanks Sylwester. 2020-06-18 13:40:30 -07:00
toddouska 248b8c9b62
Merge pull request #3057 from kaleb-himes/FIPSv2_plus_OPENSSLALL
Resolve issues with FIPSv2 when opensslall set
2020-06-18 10:12:06 -07:00
kaleb-himes e2fb4c55b8 Resolve issues with FIPSv2 when opensslall set 2020-06-17 14:03:02 -06:00
Sean Parkinson 6bb73fb25d Fix ED448 calls to use context and correct variable name
Added basic test of OpenSSL compatability APIs:
  - wolfSSL_ED25519_generate_key
  - wolfSSL_ED25519_sign
  - wolfSSL_ED25519_verify
  - wolfSSL_ED2448_generate_key
  - wolfSSL_ED448_sign
  - wolfSSL_ED448_verify
2020-06-17 10:05:50 +10:00
toddouska 29bdc7d8b5
Merge pull request #3015 from tmael/cov-fix
Coverity fix in wolfSSL 4.4.0
2020-06-10 17:07:47 -07:00
toddouska e993cb6cc0
Merge pull request #2942 from dgarske/tls13_on
Enable TLS v1.3 by default
2020-06-09 13:30:02 -07:00
Sean Parkinson d543e305f1 Fix optimized AES-CCM - counter
AES-NI optimized 4 block at a time was not incrementing counter
poprerly.
2020-06-08 10:48:19 +10:00
David Garske 4d8cf5b571 Fixes for building TLSv1.3 with FIPS v1 (no RSA PSS or HKDF). 2020-06-04 15:31:18 -07:00
Tesfa Mael 6176f8537f Typecast to fix conversion loses 2020-06-02 22:06:14 -07:00
Tesfa Mael d5241bbcc6 Coverity fix 2020-06-02 15:35:27 -07:00
toddouska dc1472692a
Merge pull request #3011 from dgarske/nomalloc
Fixes for using static memory with no malloc
2020-06-02 11:46:29 -07:00
David Garske 7ce7d244f8 Fix for using static memory AES GCM test. 2020-05-28 15:12:01 -07:00
Chris Conlon 896fcd9aec add WOLFSSL_ATECC6088A, Trust&GO support, PIC32 HAL compatibility, 608A expansions 2020-05-27 16:49:29 -06:00
JacobBarthelmeh d09b947478 update for test case and sha3 2020-05-19 19:27:38 -06:00
JacobBarthelmeh 6a7a8fa5b7 updated RSA calls to Xilsecure 2020-05-19 19:27:21 -06:00
Chris Conlon 9efd9afdfb fix minor IAR warnings in test.c 2020-05-19 14:12:13 -06:00
Tesfa Mael f894d4c0d2 FIPS on Solaris 2020-05-14 10:11:54 -07:00
Juliusz Sosinowicz 9e68de0fb7 Add test certs for ASN_IP_TYPE 2020-05-07 11:52:49 +02:00
toddouska a1489d981c
Merge pull request #2930 from JacobBarthelmeh/SanityChecks
check on tag length for AES-CCM
2020-04-30 14:51:20 -07:00
Jacob Barthelmeh c85a53c631 add macro guard for fips and selftest builds 2020-04-27 15:36:53 -06:00
David Garske 1e726e19a4 Fix for XMALLOC cast. 2020-04-27 06:48:41 -07:00
David Garske cfc0aeb857 Fix for RSA and KeyGen only in test.c. 2020-04-24 08:56:31 -07:00
David Garske 5fa7bb5b9f Fix possible unused args. 2020-04-24 07:48:41 -07:00
David Garske 28b686a8ca * Exposed useful sizes `MAX_X509_HEADER_SZ` and `PEM_LINE_SZ`
* Refactor the PEM saving code in `test.c`, so its not using large 4K buffer and calculates based on DER.
* Enable ECC key generation test even without `WOLFSSL_KEY_GEN`.
* Added `ECC_KEYGEN_SIZE` macro for ECC key generation testing.
* Refactor ECC DER key generation to use `ECC_BUFSIZE`.
2020-04-23 16:11:54 -07:00
David Garske 81f959336b Added support for important private key DER using `wc_EccPublicKeyDecode`. Added ECC key generation and decode test case. 2020-04-23 16:07:43 -07:00
toddouska 7318121d3a
Merge pull request #2915 from dgarske/async_v4.4.0
Fixes for async release v4.4.0
2020-04-23 09:26:08 -07:00
John Safranek a064cb3943 Fix a couple of wolfCrypt test issues found during the long release build test. 2020-04-22 11:30:57 -07:00
David Garske 36a556f927 Resolve issues with the openssl compatibility `CRYPTO_malloc` and `CRYPTO_free`. 2020-04-22 10:15:16 -07:00
John Safranek 61f3783111
Fixes to test.c for the following build configurations:
1. ./configure --disable-rsa --enable-certgen --enable-certreq
2. ./configure --disable-ecc --enable-pkcs7
2020-04-21 10:21:59 -07:00
Jacob Barthelmeh 231c488ddf check on tag length for AES-CCM 2020-04-20 13:44:41 -06:00
JacobBarthelmeh 0cfde0794b
Merge pull request #2848 from julek-wolfssl/wpa-supplicant-openssl-compat
Added partial support for wpa_supplicant, hostapd, and cjose:
2020-04-20 12:17:55 -06:00
Eric Blankenhorn 6b3642db36 Fix forbidden iv length 0 with AES-GCM 2020-04-16 13:48:56 -05:00
Juliusz Sosinowicz 36403c1dad Merge remote-tracking branch 'wolfSSL/master' into wpa-supplicant-openssl-compat 2020-04-15 16:55:03 +02:00
toddouska 9c1b90170a
Merge pull request #2903 from SparkiDev/test_4096
Fix testing using 4096 bits keys and parameters
2020-04-14 09:25:00 -07:00
toddouska 06c6e583c8
Merge pull request #2891 from julek-wolfssl/refactor-evp-functions
Move EVP functions to evp.c
2020-04-14 09:22:51 -07:00
Juliusz Sosinowicz 20e669a65a New API
Add `wc_ecc_import_point_der_ex` for correct importing DER ECC point and keep `wc_ecc_import_point_der` old functionality
2020-04-14 11:48:14 +02:00
Juliusz Sosinowicz 9ced70edc1 Test fixes
Free `x509->key.pkey` in `FreeX509
Fix type conversions
Fix memory leaks and use of uninitialized memory
2020-04-14 11:45:32 +02:00
Sean Parkinson ba401c9bde Fix testing using 4096 bits keys and parameters
RSA PKCS #1.5 padding for signing is not reliant on a random.
2020-04-14 12:03:51 +10:00
Sean Parkinson 416f0775d3
Merge pull request #2900 from dgarske/sp_no_malloc
Added option to build SP small without malloc
2020-04-14 09:40:11 +10:00
David Garske 1f5a7bffaa Build fixes for `WOLFSSL_NO_MALLOC` in wolfCrypt test. 2020-04-13 07:39:06 -07:00
toddouska cf8459e518
Merge pull request #2892 from SparkiDev/cppcheck_fixes_4
Fixes from cppcheck
2020-04-09 16:01:11 -07:00
Sean Parkinson 411aee6e05 Fixes from cppcheck
Added PRIVATE_D version of rsa private key operation for SP
implementation for specific platforms.
WC_NO_RNG results in warnings when RNG calls don't do anything.
Added ifdef checks for variables not used otherwise.
Remove superfluous if statements like when checking ret == 0.
Change names of globals that are generic and are used locally before
global definition.
Remove definition of variable len that isn't used except as a
replacement for sz which is parameter.
Don't subtract two variables when one has just been assigned the value
of the other.
Fix shifting of signed value.
Fix parameter checking in aes.c and des3.c for platform specific code.
2020-04-08 09:46:22 +10:00
Juliusz Sosinowicz 4c0ea10e45 Move EVP functions to evp.c 2020-04-07 22:36:50 +02:00
David Garske 1831193c20 * Fixes for building ECC without ASN.
* Fix to expose `wc_ecc_import_private_key_ex` and its ability to import a private key even when `NO_ASN` is defined.
* Remove execute bit on CSharp files.
2020-04-03 10:55:31 -07:00
Sean Parkinson 62a593e72e Recognise Netscape Certificate Type extension
Checks the bit string is valid but doesn't store or use value.
(Some certificates have this extension as critical)
2020-03-19 12:43:03 +10:00
Sean Parkinson 2c6eb7cb39 Add Curve448, X448, Ed448 implementations 2020-02-28 09:30:45 +10:00
toddouska b7d0b81443
Merge pull request #2818 from dgarske/rsa_sha3only
RSA with SHA-3 only and RSA 4096-bit tests
2020-02-27 12:44:29 -08:00
David Garske da882f3912 Added wolfCrypt RSA 4096-bit test support using `USE_CERT_BUFFERS_4096` build option (`./configure CFLAGS="-DUSE_CERT_BUFFERS_4096"`). 2020-02-23 18:40:13 -08:00
Eric Blankenhorn b74dac6171 Fix WIN test 2020-02-20 17:28:34 -06:00
Eric Blankenhorn b4563e6af3 Fix CFB and OFB 2020-02-20 17:28:34 -06:00
Eric Blankenhorn a64e1540ba Adding EVP support for SHA3 2020-02-20 17:28:34 -06:00
Jacob Barthelmeh a0ddb05a07 change evp with cfb1 expect input size in bytes 2020-02-20 17:28:33 -06:00
Jacob Barthelmeh b67ade5164 account for cavp build 2020-02-20 17:28:33 -06:00
Eric Blankenhorn 258382048d Fix test failures 2020-02-20 17:28:33 -06:00
Eric Blankenhorn 64dcf5740a Fix for AES_XTS 2020-02-20 17:28:33 -06:00
Jacob Barthelmeh d7c1b9561f fix for cfb1 mode and add EVP tests 2020-02-20 17:28:33 -06:00
Jacob Barthelmeh d6be24c4f7 add 192/256 key size tests of EVP cfb8 2020-02-20 17:28:33 -06:00
Jacob Barthelmeh d4428ebc0c add EVP cfb1 test and update some EVP code 2020-02-20 17:28:32 -06:00
Jacob Barthelmeh 887eeb3c47 add EVP tests for cfb128 2020-02-20 17:28:32 -06:00
Jacob Barthelmeh 9d61ba6c62 initial cfb1/cfb8 support added 2020-02-20 17:28:32 -06:00
Eric Blankenhorn 9c4e0807e2 Adding EVP_aes_###_xts tests (not complete) 2020-02-20 17:28:32 -06:00
Eric Blankenhorn 16ce670897 Revert "Testing aes_*_xts"
This reverts commit 776eeb756c70b052849323d7645622a3f1d2b76a.
2020-02-20 17:28:32 -06:00
Eric Blankenhorn 3197d67e62 Testing aes_*_xts 2020-02-20 17:28:32 -06:00
Jacob Barthelmeh df0d5f3b08 add EVP_aes_*_ofb implementation and tests, add support for inline with OFB 2020-02-20 17:28:32 -06:00
Jacob Barthelmeh e837894578 add AES-OFB mode 2020-02-20 17:28:32 -06:00
Juliusz Sosinowicz fbedabe601 OpenSSH changes
- increase FP_MAX_BITS for OpenSSH
- Add helpful loggin API (names are self-explanatory)
-- wolfSSL_GetLoggingCb
-- WOLFSSL_IS_DEBUG_ON
- Define WOLFSSL_EC_METHOD as an alias of WOLFSSL_EC_GROUP
- Add wolfSSL_EC_GROUP_method_of which really just returns the group itself
- Add wolfSSL_EC_METHOD_get_field_type which gets the curve type of the WOLFSSL_EC_GROUP(remember that WOLFSSL_EC_METHOD is an alias of WOLFSSL_EC_GROUP for now)
- Modify Base64_Decode so that it accepts arbitrary PEM line length
- Modify PemToDer so that it accepts private keys with a custom -----BEGIN * PRIVATE KEY----- header
2020-02-18 21:37:06 +01:00
Chris Conlon b29fe41a35
Merge pull request #2738 from SparkiDev/cppcheck_fixes_3
Changes to clear issues raised by cppcheck
2020-02-03 17:02:40 -07:00
Sean Parkinson 55ea2facdd Changes to clear issues raised by cppcheck 2020-01-30 14:24:32 +10:00
David Garske 5677a96c80 Fixes to resolve `openssl_pkey1_test` with updated test buffer sizes. 2020-01-29 06:51:47 -08:00
David Garske 5aabebddd8 Fix more 3072-bit cert buffer edge case builds (certext/certgen). 2020-01-29 06:43:35 -08:00
David Garske 3f1c3392e5 Fixes for build with opensslextra and 3072-bit cert buffers. Adds 3072-bit RSA public key der. Eliminates duplicate 3072-bit client cert/key. 2020-01-29 06:37:06 -08:00
toddouska 945d34533c
Merge pull request #2727 from JacobBarthelmeh/Windows
update to ECC key parsing custom curves for Windows
2020-01-23 13:57:06 -08:00
David Garske b022b651b3 wolfCrypt test fixes for hard coded "256" byte buffers to support 3072-bit RSA. Requires PR #2755 2020-01-22 10:04:53 -08:00
David Garske e3e862c8b6 Test case fixes for sig wrapper test and DH. 2020-01-21 22:25:11 -08:00
David Garske 4d9dbc9ec3 Adds 3072-bit RSA tests using `USE_CERT_BUFFERS_3072`. 2020-01-21 22:16:54 -08:00
toddouska 66daac4c94
Merge pull request #2709 from JacobBarthelmeh/Testing
set chacha20 similar to aes-ctr when handling leftover stream and add…
2020-01-17 15:05:24 -08:00
David Garske 989f3d3684 Fix for FREE_VAR call on `sharedA`. 2020-01-14 14:35:20 -08:00
David Garske 22f49d8597 Fixes for building with ECC sign/verify only. 2020-01-13 15:35:08 -08:00
David Garske 8974827fbe Added `WOLFSSL_ECC_CURVE_STATIC` build option to allow using fixed arrays for ECC parameters. This is enabled by default on Windows. Fixed several compiler warnings. Fixed build macro for `key->deallocSet`. 2020-01-13 07:15:17 -08:00
JacobBarthelmeh 6b4551c012
Merge pull request #2654 from cariepointer/qt-512-513
Add Qt 5.12 and 5.13 support
2020-01-10 17:34:23 -07:00
Jacob Barthelmeh 99d657af4f adjust test cases 2020-01-10 10:31:56 -07:00
Jacob Barthelmeh 0c25588ad1 adjust TEST_SMALL_CHACHA_CHUNKS size and add more tests 2020-01-09 17:13:57 -07:00
toddouska 51f44cb09b
Merge pull request #2719 from dgarske/nxp_k64_mmcau
Fixes for NXP K64
2020-01-09 14:57:11 -08:00
toddouska 99045a2fea
Merge pull request #2723 from SparkiDev/rsa_vfy_only_fix
Rsa vfy only fix
2020-01-09 14:55:10 -08:00
toddouska 11a0b117f8
Merge pull request #2706 from dgarske/chapoly_aead_iuf
New API's for ChaCha20/Poly1305 AEAD init/update/final
2020-01-09 14:49:26 -08:00
Sean Parkinson b27ec58d20 Fix RSA verify only build 2020-01-08 10:18:37 +10:00
David Garske acfe9717f8 Fix for K64 MMCAU with `WOLFSSL_SMALL_STACK_CACHE`. Moved random test prior to cipher tests (was getting called first time in GMAC test). 2020-01-07 05:39:17 -08:00
David Garske d68d5229e1 Refactor `wc_ChaCha20Poly1305_Encrypt` and `wc_ChaCha20Poly1305_Decrypt` to use the new `ChaChaPoly_Aead` context and init/update/final functions. 2020-01-06 17:07:09 -08:00
Chris Conlon 45c5a2d39c update copyright to 2020 2020-01-03 15:06:03 -08:00
David Garske bff6dcec24 Added support for AAD calc only. Allows Init, UpdateAad and Final sequence. Verfied again with customer test cases. 2019-12-31 08:25:23 -08:00
David Garske f01999b322 Peer review feedback. 2019-12-31 08:08:33 -08:00
David Garske b901a2cd35 Use `byte` for bit-field. Line length cleanup. 2019-12-30 18:05:25 -08:00