summaryrefslogtreecommitdiffstats
path: root/crypto/evp/e_aes.c
AgeCommit message (Collapse)Author
2018-02-06crypto/evp/e_aes.c: add comments to s390x aes gcm implementationPatrick Steuer
Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com> Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5230)
2018-02-06s390x assembly pack: add KMAC code path for aes-ccmPatrick Steuer
Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com> Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5230)
2018-01-09Update copyright years on all files merged since Jan 1st 2018Richard Levitte
Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5038)
2018-01-07s390x assembly pack: add KMA code path for aes-gcm.Patrick Steuer
Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com> Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4634)
2017-05-11Fix gcc-7 warnings.Bernd Edlinger
- Mostly missing fall thru comments - And uninitialized value used in sslapitest.c Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3440)
2017-02-08Make EVP_*Final work for CCM ciphersDr. Stephen Henson
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2550)
2017-02-07Fix a crash in EVP_CIPHER_CTX_cleanup due to cipher_data may be NULLBernd Edlinger
or EVP_CTRL_INIT/EVP_CTRL_COPY was not called or failed. If that happens in EVP_CipherInit_ex/EVP_CIPHER_CTX_copy set cipher = NULL, aes_gcm_cleanup should check that gctx != NULL before calling OPENSSL_cleanse. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2562)
2017-01-26crypto/evp: harden AEAD ciphers.Andy Polyakov
Originally a crash in 32-bit build was reported CHACHA20-POLY1305 cipher. The crash is triggered by truncated packet and is result of excessive hashing to the edge of accessible memory. Since hash operation is read-only it is not considered to be exploitable beyond a DoS condition. Other ciphers were hardened. Thanks to Robert Święcki for report. CVE-2017-3731 Reviewed-by: Rich Salz <rsalz@openssl.org>
2017-01-25Fix the overlapping check for fragmented "Update" operationsMatt Caswell
When doing in place encryption the overlapping buffer check can fail incorrectly where we have done a partial block "Update" operation. This fixes things to take account of any pending partial blocks. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2275)
2017-01-25Properly handle a partial block in OCB modeMatt Caswell
If we have previously been passed a partial block in an "Update" call then make sure we properly increment the output buffer when we use it. Fixes #2273 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2275)
2017-01-25Don't use magic numbers in aes_ocb_cipher()Matt Caswell
Lots of references to 16 replaced by AES_BLOCK_SIZE. Also a few other style tweaks in that function Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2275)
2016-10-18Fix strict-warnings buildPatrick Steuer
crypto/evp/e_aes.c: Types of inp and out parameters of AES_xts_en/decrypt functions need to be changed from char to unsigned char to avoid build error due to '-Werror=incompatible-pointer-types'. crypto/aes/asm/aes-s390x.pl: Comments need to reflect the above change. Signed-off-by: Patrick Steuer <psteuer@mail.de> Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> CLA: trivial
2016-07-16evp/e_aes.c: wire new CBC and CTR subroutines from aesfx-sparcv9.Andy Polyakov
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-06-14evp/e_aes.c: wire hardware-assisted XTS subroutines.Andy Polyakov
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-24Fix braces in e_aes.c: aes_init_keyTodd Short
This compiles correctly, but depending on what may be defined, it's possible that this could fail compilation. The braces are mismatched, and it's possible to end up with an else followed by another else. This presumes the indentation is mostly correct and indicative of intent. Found via static analysis. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1118)
2016-05-17Copyright consolidation 05/10Rich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-02Remove obsolete defined(__INTEL__) condition.Andy Polyakov
This macro was defined by no-longer-supported __MWERKS__ compiler. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-20evp/aes_aes.c: engage Fujitsu SPARC64 X AES support.Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-13Remove OPENSSL_NO_AES guardsMatt Caswell
no-aes is no longer a Configure option and therefore the OPENSSL_NO_AES guards can be removed. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-20Remove #error from include files.Rich Salz
Don't have #error statements in header files, but instead wrap the contents of that file in #ifndef OPENSSL_NO_xxx This means it is now always safe to include the header file. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-18Mark OCB as an AEAD cipherMatt Caswell
OCB is AEAD capable but was not marked as such with the EVP_CIPH_FLAG_AEAD_CIPHER flag. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-02-05GH601: Various spelling fixes.FdaSilvaYY
Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-01-12Adapt builtin cipher implementations to opaque EVP_CIPHERRichard Levitte
They all stop including evp_locl.h, so we also take care of their adaptation to opaque EVP_CIPHER_CTX, as was promised in an earlier commit. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-10evp/e_aes.c: wire hardware-assisted block function to OCB.Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-10x86[_64] assembly pack: add optimized AES-NI OCB subroutines.Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-11-09Continue standardising malloc style for libcryptoMatt Caswell
Continuing from previous commit ensure our style is consistent for malloc return checks. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-08-14CCM support.Dr. Stephen Henson
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-07-06Relax CCM tag check.Dr. Stephen Henson
In CCM mode don't require a tag before initialising decrypt: this allows the tag length to be set without requiring the tag. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-06-08Use CRYPTO_memcmp when comparing authenticatorsEmilia Kasper
Pointed out by Victor Vasiliev (vasilvv@mit.edu) via Adam Langley (Google). Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-04-30Sanity check EVP_CTRL_AEAD_TLS_AADMatt Caswell
The various implementations of EVP_CTRL_AEAD_TLS_AAD expect a buffer of at least 13 bytes long. Add sanity checks to ensure that the length is at least that. Also add a new constant (EVP_AEAD_TLS1_AAD_LEN) to evp.h to represent this length. Thanks to Kevin Wojtysiak (Int3 Solutions) and Paramjot Oberoi (Int3 Solutions) for reporting this issue. Reviewed-by: Andy Polyakov <appro@openssl.org>
2015-03-28Engage vpaes-armv8 module.Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-02-09evp/e_aes.c: fix pair of SPARC T4-specific problems:Andy Polyakov
- SIGSEGV/ILL in CCM (RT#3688); - SIGBUS in OCB; Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-02-02Dead code: if 0 removal from crypto/evp and an unused file.Rich Salz
Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-01-28Harmonise use of EVP_CTRL_GET_TAG/EVP_CTRL_SET_TAG/EVP_CTRL_SET_IVLENMatt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-28Replace EVP_CTRL_OCB_SET_TAGLEN with EVP_CTRL_SET_TAG for consistency withMatt Caswell
CCM Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22Run util/openssl-format-source -v -c .Matt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-04Remove inconsistency in ARM support.Andy Polyakov
This facilitates "universal" builds, ones that target multiple architectures, e.g. ARMv5 through ARMv7. See commentary in Configure for details. Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2014-12-08remove OPENSSL_FIPSAPIDr. Stephen Henson
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-12-08remove FIPS module code from crypto/evpDr. Stephen Henson
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-12-08Added OPENSSL_NO_OCB guardsMatt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-12-08Add EVP support for OCB modeMatt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-08-21Fix build when BSAES_ASM is defined but VPAES_ASM is notEmilia Kasper
Reviewed-by: Andy Polyakov <appro@openssl.org>
2014-07-20Engage GHASH for PowerISA 2.0.7.Andy Polyakov
[and split ppccap.c to ppccap.c and ppc_arch.h] Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-07-18RFC 5649 support.Dr. Stephen Henson
Add support for RFC5649 key wrapping with padding. Add RFC5649 tests to evptests.txt Based on PR#3434 contribution by Petr Spacek <pspacek@redhat.com>. EVP support and minor changes added by Stephen Henson. Doxygen comment block updates by Tim Hudson. Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-07-17Make *Final work for key wrap again.Dr. Stephen Henson
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-07-17Sanity check lengths for AES wrap algorithm.Dr. Stephen Henson
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-06-30Fix copy for CCM, GCM and XTS.Dr. Stephen Henson
Internal pointers in CCM, GCM and XTS contexts should either be NULL or set to point to the appropriate key schedule. This needs to be adjusted when copying contexts.
2014-06-29Make EVP_CIPHER_CTX_copy work in GCM mode.ZNV
PR#3272
2014-06-16aesp8-ppc.pl: add CTR mode.Andy Polyakov
2014-06-04evp/e_aes.c: add erroneously omitted break;Andy Polyakov