summaryrefslogtreecommitdiff
path: root/lib/libcrypto/evp
AgeCommit message (Collapse)Author
2016-11-08Stricter checks of ASN1_INTEGER to reject ASN1_NEG_INTEGER in places whenMiod Vallat
they don't make sense. ok beck@
2016-11-05No need to duplicate definitions from evp.h locally.Miod Vallat
ok bock@ jsing@
2016-11-04Replace all uses of magic numbers when operating on OPENSSL_ia32_P[] byMiod Vallat
meaningful constants in a private header file, so that reviewers can actually get a chance to figure out what the code is attempting to do without knowing all cpuid bits. While there, turn it from an array of two 32-bit ints into a properly aligned 64-bit int. Use of OPENSSL_ia32_P is now restricted to the assembler parts. C code will now always use OPENSSL_cpu_caps() and check for the proper bits in the whole 64-bit word it returns. i386 tests and ok jsing@
2016-11-04Remove I386_ONLY define. It was only used to prefer aMiod Vallat
faster-on-genuine-80386-but-slower-on-80486-onwards innstruction sequence in the SHA512 code, and had not been enabled in years, if at all. ok tom@ bcook@
2016-09-09back out calls to EVP_CIPHER_CTX_cleanup() in EVP_Cipher/Encrypt/DecryptFinalBrent Cook
Software that refers to ctx after calling Final breaks with these changes. revert parts of 1.31 and 1.32
2016-09-04include <sys/types.h> to get <sys/cdefs.h> instead (for __warn_references)Brent Cook
corrected by deraadt@ / guenther@
2016-09-04include <sys/cdefs.h> for portableBrent Cook
2016-09-02warn on use of deprecated EVP functionsBrent Cook
This adds a linker warning for EVP_EncryptFinal(), EVP_DecryptFinal(), EVP_CipherFinal(), and documents the recent behavior updates. ok beck@
2016-05-30deprecate internal use of EVP_[Cipher|Encrypt|Decrypt]_Final.Bob Beck
14 years ago these were changed in OpenSSL to be the same as the _ex functions. We use the _ex functions only internally to ensure it is obvious the ctx must be cleared. ok bcook@
2016-05-04fix for integer overflow in encode and encrypt update functions.Ted Unangst
additionally, in EncodeUpdate, if the amount written would overflow, return 0 instead to prevent bugs in the caller. CVE-2016-2105 and CVE-2016-2106 from openssl.
2016-05-04fix a padding oracle in aesni cbc mac check. there must be enough dataTed Unangst
for both the mac and padding bytes. CVE-2016-2107 from openssl
2016-05-04revert the big change from yesterday to prepare for smaller commits.Ted Unangst
2016-05-03prefer limits.h over sys/limits.hBrent Cook
2016-05-03patch from openssl for multiple issues:Ted Unangst
missing padding check in aesni functions overflow in evp encode functions use of invalid negative asn.1 types ok beck
2016-04-28Rename EVP_aead_chacha20_poly1305() to EVP_aead_chacha20_poly1305_old()Joel Sing
and replace with EVP_aead_chacha20_poly1305_ietf(). The IETF version will become the standard version. Discussed with many.
2016-04-13Use the correct iv and counter when decrypting the ciphertext forJoel Sing
EVP_aead_chacha20_poly1305_ietf().
2015-12-14initialize md_len to 0 for readability to quell warnings.Bob Beck
ok guenther@
2015-11-02Fix typo in comment of previous commit: "that that".Reyk Floeter
2015-11-02Add EVP_aead_chacha20_poly1305_ietf() - The informational RFC 7539,Reyk Floeter
"ChaCha20 and Poly1305 for IETF Protocols", introduced a modified AEAD construction that is incompatible with the common style that has been already used in TLS with EVP_aead_chacha20_poly1305(). The IETF version also adds a constant (salt) that is prepended to the nonce. OK mikeb@ jsing@
2015-10-12unifdef EVP_CHECK_DES_KEY: Ben Kaduk noticed it has a syntax error; thatPhilip Guenther
error was present in the original 2004 commit, so it hasn't been used in over 11 years, thus exceeding our deprecation requirements by over a decade. OpenSSL has chosen to *fix it*; we'll gladly watch it burn ok jsing@
2015-09-14Temporarily revive MD4 for MS CHAP support.Doug Hogan
2015-09-13Remove MD4 support from LibreSSL.Doug Hogan
MD4 should have been removed a long time ago. Also, RFC 6150 moved it to historic in 2011. Rides the major crank from removing SHA-0. Discussed with many including beck@, millert@, djm@, sthen@ ok jsing@, input + ok bcook@
2015-09-13Remove SHA-0 support.Doug Hogan
SHA-0 was withdrawn shortly after publication 20 years ago and replaced with SHA-1. This will require a major crank. ok bcook@, jsing@
2015-09-10Correct spelling of OPENSSL_cleanse.Joel Sing
ok miod@
2015-06-20Replace remaining CRYPTO_memcmp() calls with timingsafe_memcmp().Joel Sing
ok doug@ deraadt@
2015-06-20Remove obsolete MDC-2DES from libcrypto.Doug Hogan
ok deraadt@ jsing@ miod@
2015-02-15RegenMiod Vallat
2015-02-141.18 would introduce a possible out-of-bounds access in the error path;Miod Vallat
Coverity CID 105346 ok doug@
2015-02-14Remove DEBUG_PKCS5V2 code.Miod Vallat
2015-02-11Enable building with -DOPENSSL_NO_DEPRECATED.Doug Hogan
If you didn't enable deprecated code, there were missing err.h and bn.h includes. This commit allows building with or without deprecated code. This was not derived from an OpenSSL commit. However, they recently enabled OPENSSL_NO_DEPRECATED in git and fixed these header problems in a different way. Verified with clang that this only changes line numbers in the generated asm. ok miod@
2015-02-10unifdef OPENSSL_NO_RC5Joel Sing
2015-02-10Remove RC5 code - this is not currently enabled and is not likely to everJoel Sing
be enabled. Removes one symbol from libcrypto, however there is no ABI change. ok beck@ miod@ tedu@
2015-02-10EVP_BytesToKey(): return through the error path (which cleans things up)Miod Vallat
if EVP_DigestInit_ex() fails.
2015-02-10Replace assert() and OPENSSL_assert() calls with proper error return paths.Miod Vallat
Careful review, feedback & ok doug@ jsing@
2015-02-10Remove unnecessary include of assert.hMiod Vallat
2015-02-08Move a few typedef up in this file in order to be able to use them in env_md_stMiod Vallat
and get rid of a silly FIXME comment. ok doug@ jsing@
2015-02-08Check memory allocation results in EVP_PBE_alg_add_type().Miod Vallat
ok doug@ jsing@
2015-02-07Delete a lot of #if 0 code in libressl.Doug Hogan
There are a few instances where #if 1 is removed but the code remains. Based on the following OpenSSL commits. Some of the commits weren't strictly deletions so they are going to be split up into separate commits. 6f91b017bbb7140f816721141ac156d1b828a6b3 3d47c1d331fdc7574d2275cda1a630ccdb624b08 dfb56425b68314b2b57e17c82c1df42e7a015132 c8fa2356a00cbaada8963f739e5570298311a060 f16a64d11f55c01f56baa62ebf1dec7f8fe718cb 9ccc00ef6ea65567622e40c49aca43f2c6d79cdb 02a938c953b3e1ced71d9a832de1618f907eb96d 75d0ebef2aef7a2c77b27575b8da898e22f3ccd5 d6fbb194095312f4722c81c9362dbd0de66cb656 6f1a93ad111c7dfe36a09a976c4c009079b19ea1 1a5adcfb5edfe23908b350f8757df405b0f5f71f 8de24b792743d11e1d5a0dcd336a49368750c577 a2b18e657ea1a932d125154f4e13ab2258796d90 8e964419603d2478dfb391c66e7ccb2dcc9776b4 32dfde107636ac9bc62a5b3233fe2a54dbc27008 input + ok jsing@, miod@, tedu@
2015-02-07Combine c_allc.c and c_alld.c into c_all.c - there is not much point havingJoel Sing
this split across files, especially when two of them have less code than license text. ok bcook@ beck@ doug@ miod@
2014-11-18More missing error checks I forgot to commit last week, part of the largeMiod Vallat
cleanup diff.
2014-11-09KNF (when not conflicting with other cleanup changes in progress)Miod Vallat
2014-11-09GOST crypto algorithms (well, most of them), ported from the removed GOSTMiod Vallat
engine to regular EVP citizens, contributed by Dmitry Eremin-Solenikov; libcrypto bits only for now. This is a verbatim import of Dmitry's work, and does not compile in this state; the forthcoming commits will address these issues. None of the GOST code is enabled in libcrypto yet, for it still gets compiled with OPENSSL_NO_GOST defined. However, the public header gost.h will be installed.
2014-11-09Introduce EVP_MD_CTX_ctrl(), to allow for fine control of a given digest.Miod Vallat
This functionality was already available (and optional), and used in the bowels of the ASN.1 code. This exposes it as a public interface, which will be used by the upcoming GOST code. Crank libcrypto minor version. From Dmitry Eremin-Solenikov.
2014-10-28Check the result of sk_*_push() operations for failure.Miod Vallat
ok doug@ jsing@
2014-10-22Use arc4random_buf() instead of RAND_bytes() or RAND_pseudo_bytes().Joel Sing
arc4random_buf() is guaranteed to always succeed - it is worth noting that a number of the replaced function calls were already missing return value checks. ok deraadt@
2014-10-18None of these need to include <openssl/rand.h>Joel Sing
2014-08-11Guard RSA / RC4-5 ASM when NO_ASM is not definedBrent Cook
Most assembly blocks remain inactive if OPENSSL_NO_ASM is not defined, only enabling inline assembly, but the RSA / RC4-5 blocks (used only in amd64 systems) turn on implicitly. Guard these two as well. This simplifies enabling just inline ASM in portable, no effective change in OpenBSD.
2014-08-06Allow B64_EOF to follow a base64 padding character. This restores previousJoel Sing
behaviour that allows a PEM block to be fed through the base64 decoder. Reported by Dmitry Eremin-Solenikov on tech@ ok deraadt@ tedu@
2014-08-06Correct error checks in EVP_read_pw_string_min(): UI_add_input_string()Philip Guenther
and UI_add_verify_string() return -1 (and maybe -2?) on failure and >=0 on success, instead of always zero on success problem reported by Mark Patruck (mark (at) wrapped.cx) ok miod@
2014-08-04In chacha_init(), allow for a NULL iv. Reported by znz on github.Miod Vallat
ok guenther@ jsing@