Sean Parkinson
38cfec89e8
ARMv8: fix configurations
...
Poly1305: poly1305_block() is void for ARMv8 ASM
SHA512: explicitly include cryptocb.h.
AES: set keylen for EVP API
AES: Implement streaming AES-GCM.
2021-09-30 10:33:08 +10:00
David Garske
f4be011b91
Merge pull request #4432 from haydenroche5/cmake_user_settings
...
Don't automatically set BUILD_ED25519_SMALL and BUILD_CURVE25519_SMALL in the CMake build when using user_settings.h.
2021-09-28 14:01:39 -07:00
John Safranek
a4f927999f
Merge pull request #4431 from haydenroche5/is_on_curve_fips
...
Don't compile wolfSSL_EC_POINT_is_on_curve for FIPS.
2021-09-28 09:42:08 -07:00
Hayden Roche
a9870d59a3
Don't automatically set BUILD_ED25519_SMALL and BUILD_CURVE25519_SMALL in the
...
CMake build when using user_settings.h.
See https://github.com/wolfSSL/wolfssl/pull/4367 for the same change to the
autotools build.
2021-09-28 09:00:50 -07:00
Hayden Roche
6a0bc995a0
Don't compile wolfSSL_EC_POINT_is_on_curve for FIPS.
...
This function uses wc_ecc_point_is_on_curve, which isn't in the current (v2)
FIPS module.
2021-09-27 16:08:04 -07:00
David Garske
847b8f9a1f
Reduce openssl verbosity in BIO due to PEM_X509_INFO_read_bio reading 1 byte at a time. Remove duplicate PEM_X509_INFO_read_bio macro. ( #4428 )
2021-09-28 08:21:23 +10:00
David Garske
943c98a45e
Fix some PKCS11 warnings and spelling errors. ( #4427 )
2021-09-27 08:23:48 +10:00
David Garske
3bdce348e9
Added NID_pkcs9_contentType and ub_ to compatibility layer ( #4408 )
...
* Added `NID_pkcs9_contentType` and `ub_` values. ZD 11742
* Improve the API unit test. Also only include when `WOLFSSL_CERT_REQ` defined.
2021-09-27 08:21:53 +10:00
Chris Conlon
9e4ab9b638
Add BIO_up_ref(), PEM_read_DHparam(), EVP_MD_nid() ( #4348 )
...
* add BIO_up_ref
* add PEM_read_DHparams()
* add EVP_MD_nid()
* exclude PEM_read_DHparams when NO_FILESYSTEM defined
* review feedback: single threaded, indents, EVP_MD_nid
2021-09-27 08:20:37 +10:00
Juliusz Sosinowicz
32e4d5ad70
Use record size instead of buffer size to validate alert length ( #4425 )
2021-09-27 08:05:13 +10:00
John Safranek
7319627533
Merge pull request #4423 from elms/gcc_makefile_options
...
GCC makefile: allow overriding and provide more flexibility
2021-09-24 14:07:48 -07:00
elms
690b7d9800
GCC makefile: fix warning for hard fault format strings
2021-09-24 10:47:47 -07:00
David Garske
8169e12975
Merge pull request #4424 from SparkiDev/rsa_dec_pkcs15
...
RSA: cast bitwise negate value to byte before converting to int
2021-09-23 21:47:36 -07:00
Hayden Roche
24e2eded1e
Add to the OpenSSL compatibility layer. ( #4404 )
...
- X509_get_extension_flags
- X509_get_key_usage
- X509_get_extended_key_usage
- ASN1_TIME_to_tm
- ASN1_TIME_diff
- PEM_read_X509_REQ
- ERR_load_ERR_strings
- BIO_ssl_shutdown
- BIO_get_ssl
- BIO_new_ssl_connect
- BIO_set_conn_hostname
2021-09-24 12:26:53 +10:00
Sean Parkinson
d5a803d81d
RSA: cast bitwise negate value to byte before converting to int
2021-09-24 09:18:49 +10:00
Anthony Hu
33cb823148
Remove legacy NTRU and OQS ( #4418 )
...
* Remove NTRU and OQS
* Keep the DTLS serialization format backwards compatible.
* Remove n from mygetopt_long() call.
* Fix over-zealous deletion.
* Resolve problems found by @SparkiDev
2021-09-24 08:37:53 +10:00
Elms
23f4aadf27
GCC makefile: allow overriding and provide more flexibility
...
- older GCC and additional platforms
- `NO_EXAMPLES` to exclude building .o files
- add FIPS optional
2021-09-23 14:55:34 -07:00
John Safranek
79787eaaa4
Merge pull request #4419 from anhu/set1_groups_list
...
Make quantum-safe groups available to the compatibility layer.
2021-09-23 10:28:02 -07:00
John Safranek
a4609c612f
Merge pull request #4413 from kabuobeid/wpas_keying
...
Add HAVE_KEYING_MATERIAL requirement to WPAS, to use wolfSSL_export_keying_material
2021-09-23 10:20:34 -07:00
John Safranek
8818df2d34
Merge pull request #4415 from elms/ppc/define_gates_64bit_literals
...
Define gate fixes and sha3 64bit literal definitions
2021-09-23 10:18:03 -07:00
Anthony Hu
58a02495fe
Make the quantum-safe groups available to the OpenSSL compatibility layer.
2021-09-22 15:28:44 -04:00
Eric Blankenhorn
e6e7795140
Make subj alt name order match openSSL ( #4406 )
2021-09-22 10:29:57 +10:00
John Safranek
df30a88dc6
Merge pull request #4414 from JacobBarthelmeh/devcrypto
...
update macro guard on SHA256 transform call
2021-09-21 10:03:51 -07:00
John Safranek
63a3eef97a
Merge pull request #4403 from dgarske/zd12852_sniffer
...
Sniffer improvements for handling TCP ack unseen and retransmission issues
2021-09-21 09:53:27 -07:00
John Safranek
7ec7faddef
Merge pull request #4405 from anhu/truncating_last_char
...
Fix for `set1_curves_list` ignoring last character
2021-09-21 08:49:53 -07:00
David Garske
34c6e8f975
Merge pull request #4407 from douzzer/linuxkm-SIMD-IRQ
...
linuxkm-SIMD-IRQ
2021-09-20 14:57:38 -07:00
Elms
ef33445316
Define gate fixes and sha3 64bit literal definitions
...
Found when supporting PPC750
2021-09-20 13:48:34 -07:00
Daniel Pouzzner
6d715130a2
linuxkm: cleanups and smallstack refactors related to WOLFSSL_LINUXKM_SIMD_X86_IRQ_ALLOWED, associated linuxkm-SIMD-IRQ PR, and associated peer review:
...
smallstack refactors for wolfcrypt/src/rsa.c:wc_CheckProbablePrime_ex() and wolfcrypt/src/pwdbased.c:wc_PKCS12_PBKDF_ex();
add WARN_UNUSED_RESULT macro to types.h;
text format cleanup;
fix internal.c:LowResTimer() implementation.
refactor tls13.c:TimeNowInMilliseconds() for kernel 4.9 and 3.16 compat.
use ktime_get_coarse_real_ts64() only for kernel 5.x+. in kernel 4.x, use its older form, current_kernel_time64(), and in 3.x, use getnstimeofday().
linuxkm/module_hooks.c: fix wolfssl_init() pie code to be compatible with kernel 4.4-;
fix allocate_wolfcrypt_irq_fpu_states() return codes to all be wolfcrypt codes, and in calling code, pass up that code (suggested by dgarske peer review).
2021-09-20 13:46:51 -05:00
Daniel Pouzzner
ec21dd6d13
miscellaneous buildability fixes:
...
configure.ac: fix ed25519/sha512 dependency test to not misfire when ENABLED_32BIT;
wolfssl/wolfcrypt/curve{25519,448}.h: fix redundant typedefs of curve{25519,448}_key (fixes -Wpedantic warnings);
configure.ac: fix for "ISO C forbids an empty translation unit [-Werror=pedantic]", re wolfcrypt/src/sp_c{32,64}.c;
configure.ac: fixes for --enable-32bit versus pedantic "ISO C forbids an empty translation unit", including explicit exclusion of 32bit-incompatible algorithms from enable-all and enable-all-crypto sets;
tests/api.c: fixes for a couple inadequately gated SHA2 dependencies;
tests/api.c:test_wolfSSL_set_alpn_protos(): fix prototype missing (void);
wolfcrypt/src/misc.c and wolfssl/wolfcrypt/misc.h: fix ForceZero() definition and NO_INLINE prototype to not counterfactually constify the mem ptr, to avoid -Wmaybe-uninitialized from gcc11;
wolfcrypt/src/des3.c: drop obsolete register qualifier from declaration in DesSetKey(), for c++17 compatibility;
src/ssl.c:wolfSSL_BN_mod_word(): fix cast of arg2 to mp_mod_d().
2021-09-20 13:38:52 -05:00
David Garske
753a931196
Merge pull request #4416 from SparkiDev/mp_submod_addmod_ct
...
SP math, TFM: constant time addmod, submod
2021-09-20 11:37:45 -07:00
David Garske
a62f103899
Merge pull request #4412 from anhu/level
...
Convert post-quantum algorithm group names
2021-09-20 11:27:20 -07:00
Daniel Pouzzner
83e0e19e03
linuxkm feature additions:
...
add build-time support for module signing using native Linux facility;
add support for alternative licenses using WOLFSSL_LICENSE macro;
improve load-time kernel log messages;
add support for sp-math-all asm/AVX2 acceleration;
add error-checking and return in SAVE_VECTOR_REGISTERS();
implement support for x86 accelerated crypto from interrupt handlers, gated on WOLFSSL_LINUXKM_SIMD_X86_IRQ_ALLOWED:
* wolfcrypt_irq_fpu_states
* am_in_hard_interrupt_handler()
* allocate_wolfcrypt_irq_fpu_states()
* free_wolfcrypt_irq_fpu_states()
* save_vector_registers_x86()
* restore_vector_registers_x86()
add WOLFSSL_LINUXKM_SIMD, WOLFSSL_LINUXKM_SIMD_X86, and WOLFSSL_LINUXKM_SIMD_ARM macros for more readable gating.
2021-09-20 10:27:13 -05:00
Daniel Pouzzner
2629b8b1fb
wolfcrypt/src/wc_port.c LINUXKM time(): use ktime_get_coarse_real_ts64 instead of ktime_get_real_seconds, to avoid GPL-only function, and fix the calculation in the kernel 3.x codepath.
2021-09-20 10:27:13 -05:00
Daniel Pouzzner
1209908468
tests/api.c: fix key size in test_wc_ecc_shared_secret().
2021-09-20 10:27:13 -05:00
Daniel Pouzzner
45e9872714
wolfcrypt/benchmark: fix output buffer size in bench_eccEncrypt().
2021-09-20 10:27:13 -05:00
Anthony Hu
ebf1168240
Documenting the level meanings
2021-09-20 10:11:49 -04:00
Anthony Hu
c733be728f
Trivial change to re-trigger jenkins.
2021-09-20 08:37:56 -04:00
Sean Parkinson
f63fac82cd
SP math, TFM: constant time addmod, submod
...
Improve performance of fp_submod_ct() and fp_addmod_ct().
Improve performance of sp_submod_ct() and sp_addmod_ct().
2021-09-20 10:12:21 +10:00
Kaleb Himes
9bd300e07d
AESNI in FIPS mode does not support zero length inputs ( #4411 )
...
* AESNI in FIPS mode does not support zero length inputs
* Update note to specifically note AESNI
2021-09-20 08:29:15 +10:00
JacobBarthelmeh
f447e4c1fa
update macro guard on SHA256 transform call
2021-09-17 15:06:13 -07:00
Kareem Abuobeid
5c3c2dd1bf
Add HAVE_KEYING_MATERIAL requirement to WPAS, to use wolfSSL_export_keying_material
2021-09-17 14:53:01 -07:00
David Garske
b14e9c1134
Sniffer improvements for handling TCP out of order, ack unseen and retransmission issues.
2021-09-17 13:16:39 -07:00
Anthony Hu
79cc6be806
Make jenkins happy
2021-09-17 15:50:06 -04:00
Anthony Hu
13d4722678
Convert post-quantum algorithm group names
...
... from using parameter set names from the papers to NIST levels.
2021-09-17 13:28:34 -04:00
John Safranek
ffa13f314b
Merge pull request #4409 from SparkiDev/tfm_submod_ct
...
TFM: fp_submod_ct fix check for greater
2021-09-17 08:41:20 -07:00
John Safranek
bb70fee1ec
Merge pull request #4390 from anhu/hybridizing
...
Hybridizing NIST ECC groups with the OQS groups.
2021-09-16 22:01:39 -07:00
Sean Parkinson
9623797064
TFM: fp_submod_ct fix check for greater
...
a can be greater than modulus.
Update fp_montgomery_reduce_mulx() to reflect the updates to
fp_montgomery_reduce_ex().
2021-09-17 10:12:07 +10:00
Anthony Hu
5151cc289e
Make clang happy.
2021-09-16 14:41:19 -04:00
John Safranek
4380e8b94a
Merge pull request #4391 from JacobBarthelmeh/Sniffer
...
add sanity check on buffer size
2021-09-16 09:36:48 -07:00
John Safranek
3503be2c13
Merge pull request #4362 from JacobBarthelmeh/wolfCLU
...
add wolfclu enable option and remove test macro guard
2021-09-15 13:57:50 -07:00