summaryrefslogtreecommitdiffstats
path: root/crypto/evp/evp_enc.c
AgeCommit message (Collapse)Author
2011-10-13Make CTR mode behaviour consistent with other modes:Bodo Möller
- clear ctx->num in EVP_CipherInit_ex - adapt e_eas.c changes from http://cvs.openssl.org/chngview?cn=19816 for eng_aesni.c Submitted by: Emilia Kasper
2011-03-21Use a signed value to check return value of do_cipher().Dr. Stephen Henson
2011-02-07Use 0 not -1 (since type is size_t) for finalisation argument to do_cipher:Dr. Stephen Henson
the NULL value for the input buffer is sufficient to notice this case.
2011-02-07New flags EVP_CIPH_FLAG_CUSTOM_CIPHER in cipher structures if an underlyingDr. Stephen Henson
cipher handles all cipher symantics itself.
2010-10-11PR: 2295Dr. Stephen Henson
Submitted by: Alexei Khlebnikov <alexei.khlebnikov@opera.com> Reviewed by: steve OOM checking. Leak in OOM fix. Fall-through comment. Duplicate code elimination.
2010-07-28Fix ctr mode properly this time....Dr. Stephen Henson
2010-07-28Make ctr mode behaviour consistent with other modes.Dr. Stephen Henson
2010-03-01'typo'Dr. Stephen Henson
2010-02-07Add missing function EVP_CIPHER_CTX_copy(). Current code uses memcpy() to copyDr. Stephen Henson
an EVP_CIPHER_CTX structure which may have problems with external ENGINEs who need to duplicate internal handles etc.
2008-11-12Revert the size_t modifications from HEAD that had led to moreGeoff Thorpe
knock-on work than expected - they've been extracted into a patch series that can be completed elsewhere, or in a different branch, before merging back to HEAD.
2008-11-01More size_tification.Ben Laurie
2008-08-14Don't use assertions to check application-provided arguments;Bodo Möller
and don't unnecessarily fail on input size 0.
2007-01-21Constify version strings and some structures.Dr. Stephen Henson
2005-12-02New functions to support opaque EVP_CIPHER_CTX handling.Dr. Stephen Henson
2005-07-20the final byte of a pkcs7 padded plaintext can never be 0Nils Larsch
Submitted by: K S Sreeram <sreeram@tachyontech.net>
2005-05-11Fix more error codes.Bodo Möller
(Also improve util/ck_errf.pl script, and occasionally fix source code formatting.)
2004-04-19Reduce header interdependencies, initially in engine.h (the rest of theGeoff Thorpe
changes are the fallout). As this could break source code that doesn't directly include headers for interfaces it uses, changes to recursive includes are covered by the OPENSSL_NO_DEPRECATED symbol. It's better to define this when building and using openssl, and then adapt code where necessary - this is how to stay current. However the mechanism exists for the lethargic.
2004-03-28Enhance EVP code to generate random symmetric keys of theDr. Stephen Henson
appropriate form, for example correct DES parity. Update S/MIME code and EVP_SealInit to use new functions. PR: 700
2003-12-01It was pointed out to me that if the requested size is 0, we shouldn'tRichard Levitte
ty to allocate anything at all. This will allow eNULL to still work. PR: 751 Notified by: Lutz Jaenicke
2003-12-01Check that OPENSSL_malloc() really returned some memory.Richard Levitte
PR: 751 Notified by: meder@mcs.anl.gov Reviewed by: Lutz Jaenicke, Richard Levitte
2003-10-29A general spring-cleaning (in autumn) to fix up signed/unsigned warnings.Geoff Thorpe
I have tried to convert 'len' type variable declarations to unsigned as a means to address these warnings when appropriate, but when in doubt I have used casts in the comparisons instead. The better solution (that would get us all lynched by API users) would be to go through and convert all the function prototypes and structure definitions to use unsigned variables except when signed is necessary. The proliferation of (signed) "int" for strictly non-negative uses is unfortunate.
2003-01-30Add the possibility to build without the ENGINE framework.Richard Levitte
PR: 287
2003-01-17EVP_DecryptInit() should call EVP_CipherInit() not EVP_CipherInit_ex().Dr. Stephen Henson
2002-11-29A few more memset()s converted to OPENSSL_cleanse().Richard Levitte
I *think* I got them all covered by now, bu please, if you find any more, tell me and I'll correct it. PR: 343
2002-11-13Security fixes brought forward from 0.9.7.Ben Laurie
2002-05-15Zero cipher_data in EVP_CIPHER_CTX_cleanupDr. Stephen Henson
Add cleanup calls to evp_test.c Allow reuse of cipher contexts by removing automatic cleanup in EVP_*Final().
2002-03-16Ensure EVP_CipherInit() uses the correct encode/decode parameter ifDr. Stephen Henson
enc == -1 [Reported by Markus Friedl <markus@openbsd.org>] Fix typo in dh_lib.c (use of DSAerr instead of DHerr).
2002-03-09Make ciphers and digests obtain an ENGINE functional referenceDr. Stephen Henson
if impl is explicitly supplied.
2002-02-23Updates from stable branch.Dr. Stephen Henson
2001-10-17Modify EVP cipher behaviour in a similar wayDr. Stephen Henson
to digests to retain compatibility.
2001-10-08EVP_EncryptInit_ex() and EVP_DecryptInit_ex() had been defined in evp.h butGeoff Thorpe
not implemented. (Bug reported by Martin Szotkowski) This also changes the non-"_ex" versions to defer directly to EVP_CipherInit_ex() rather than EVP_CipherInit() to avoid an unecessary level of indirection.
2001-10-02Make EVP_DecryptUpdate work again.Dr. Stephen Henson
2001-09-25This changes EVP's cipher and digest code to hook via the ENGINE support.Geoff Thorpe
See crypto/engine/README for details. - it also removes openbsd_hw.c from the build (that functionality is going to be available in the openbsd ENGINE in a upcoming commit) - evp_test has had the extra initialisation added so it will use (if possible) any ENGINEs supporting the algorithms required.
2001-08-18Add RC4 support to OpenBSD.Ben Laurie
2001-08-18Add EVP test program.Ben Laurie
2001-08-11Move CIPHER_CTX cleanups to _Final routines instead of _Init, which avoidsBen Laurie
problems with leaks and uninitialised structures.
2001-08-05Fix memory leak.Ben Laurie
2001-07-30Really add the EVP and all of the DES changes.Ben Laurie
2001-07-27Make sure *outl is always initialized in EVP_EncryptUpdate().Dr. Stephen Henson
2001-07-09A better compromise between encrypt and decrypt (but why isn't it as fastBen Laurie
for encrypt?).
2001-07-08Handle the common case first (where input size is a multiple of block size).Ben Laurie
Worth around 5% for encrypt. Slows down decrypt slightly, but I expect to regain that later.
2001-07-08Use & instead of % - worth about 4% for 8 byte blocks.Ben Laurie
2001-02-14Option to disable standard block padding with EVP API.Dr. Stephen Henson
Add -nopad option to enc command. Update docs.
2000-05-30More EVP cipher revision.Dr. Stephen Henson
Change EVP_SealInit() and EVP_OpenInit() to handle cipher parameters. Make it possible to set RC2 and RC5 params. Make RC2 ASN1 code use the effective key bits and not the key length. TODO: document how new API works.
2000-05-30Fourth phase EVP revision.Dr. Stephen Henson
Declare ciphers in terms of macros. This reduces the amount of code and places each block cipher EVP definition in a single file instead of being spread over 4 files.
2000-05-28Third phase of EVP cipher overhaul.Dr. Stephen Henson
Remove duplicated code in EVP.
2000-05-27Second phase of EVP cipher overhaul.Dr. Stephen Henson
Change functions like EVP_EncryptUpdate() so they now return a value. These normally have software only implementations which cannot fail so this was acceptable. However ciphers can be implemented in hardware and these could return errors.
2000-05-26Beginnings of EVP cipher overhaul. This should eventuallyDr. Stephen Henson
enhance and tidy up the EVP interface. This patch adds initial support for variable length ciphers and changes S/MIME code to use this. Some other library functions need modifying to support use of modified cipher parameters. Also need to change all the cipher functions that should return error codes, but currenly don't. And of course it needs extensive testing...
1999-04-23Change #include filenames from <foo.h> to <openssl.h>.Bodo Möller
Submitted by: Reviewed by: PR:
1999-04-19Change functions to ANSI C.Ulf Möller