Re: [openssl-users] EVP_DecryptUpdate: why is this failing when out == in?

2018-12-20 Thread Paul Smith
I filed https://github.com/openssl/openssl/issues/7941 about this FYI. Cheers! On Wed, 2018-12-19 at 01:56 -0500, Paul Smith wrote: > As I understand it, it's legal to provide the exact same input and > output buffer to EVP_EncryptUpdate and EVP_DecryptUpdate, but it's not &g

[openssl-users] EVP_DecryptUpdate: why is this failing when out == in?

2018-12-18 Thread Paul Smith
As I understand it, it's legal to provide the exact same input and output buffer to EVP_EncryptUpdate and EVP_DecryptUpdate, but it's not legal to provide pointers into different parts of the same buffer. That's a good check. However, my implementation is getting triggered

Re: [openssl-users] Non const input for EVP_EncryptUpdate and EVP_DecryptUpdate

2017-11-22 Thread Edward Diener
On 11/22/2017 10:46 AM, Matt Caswell wrote: This is a bug in the docs. In the header files they are declared as const: int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, const unsigned char *in, int inl); int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx

Re: [openssl-users] Non const input for EVP_EncryptUpdate and EVP_DecryptUpdate

2017-11-22 Thread Matt Caswell
This is a bug in the docs. In the header files they are declared as const: int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, const unsigned char *in, int inl); int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl

[openssl-users] Non const input for EVP_EncryptUpdate and EVP_DecryptUpdate

2017-11-22 Thread Edward Diener
); Similarly when calling EVP_DecryptUpdate with some ciphertext to be decrypted the parameter for the ciphertext is a pointer to a non-const array of unsigned char, as in the function prototype: int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, unsigned char *in

EVP_DecryptUpdate

2013-05-29 Thread PS
Hello, Can I use the same input and output buffer in calls to EVP_DecryptUpdate and the EVP_DecryptUpdate_final_ex functions? The padding is on by default. And my application will always feed 8k chunks in the update and the final calls? Is it safe to then do the decrypt in place?

Re: EVP_DecryptUpdate returns zero length

2004-11-15 Thread Dr. Stephen Henson
On Mon, Nov 15, 2004, Brad Hards wrote: > In a larger application (Qt Cryptographic Architecture), I'm trying to > wrap some OpenSSL crypto primitives in C++. However I'm having > a problem with EVP_DecryptUpdate(). I've done up a quick'n'dirty > test case,

EVP_DecryptUpdate returns zero length

2004-11-15 Thread Brad Hards
In a larger application (Qt Cryptographic Architecture), I'm trying to wrap some OpenSSL crypto primitives in C++. However I'm having a problem with EVP_DecryptUpdate(). I've done up a quick'n'dirty test case, see below. Now for EVP_EncryptUpdate, this gives me 16. But fo

Re: EVP_DecryptUpdate Problem

2004-06-30 Thread Richard Levitte - VMS Whacker
In message <[EMAIL PROTECTED]> on Wed, 30 Jun 2004 17:14:07 +0200, "Gorelik, Slava" <[EMAIL PROTECTED]> said: slava.gorelik> Hi. slava.gorelik> slava.gorelik> I use openSSL (version 0.9.7d) for RC4 algorithm. slava.gorelik> slava.gorelik> I use EVP_DecryptU

RE : EVP_DecryptUpdate Problem

2004-06-30 Thread Frédéric Donnat
de Gorelik, Slava Envoyé : mercredi 30 juin 2004 17:14 À : [EMAIL PROTECTED] Objet : EVP_DecryptUpdate Problem Hi. I use openSSL (version 0.9.7d) for RC4 algorithm. I use EVP_DecryptUpdate function as explained in manual. First call is successful, but the second call for this function in next chunk of

EVP_DecryptUpdate Problem

2004-06-30 Thread Gorelik, Slava
Hi. I use openSSL (version 0.9.7d) for RC4 algorithm. I use EVP_DecryptUpdate function as explained in manual. First call is successful, but the second call for this function in next chunk of the data is return garbage in the encrypted buffer. There is a code: bool rc = false; int

Re: multiple calls of EVP_EncryptUpdate/EVP_DecryptUpdate

2002-01-16 Thread Cristina Nita-Rotaru
> That's expected behaviour. Because of the padding checks the > EVP_Decrypt*() routines need to store up to one block of data > internally. As a result you may get less data from EVP_DecryptUpdate() > (up to one block less) or more data (one byte less than one block

Re: multiple calls of EVP_EncryptUpdate/EVP_DecryptUpdate

2002-01-10 Thread Dr S N Henson
y > an > EVP_EncryptFinal which addes 8 more bytes, so the total size is 40 > bytes. > Decryption is done in a similar manner, EVP_Decrypt update called twice > and then > Decrypt Final. However, the first EVP_DecryptUpdate called on the first > 16 bytes > returns 8 when decr

multiple calls of EVP_EncryptUpdate/EVP_DecryptUpdate

2002-01-10 Thread Cristina Nita-Rotaru
in a similar manner, EVP_Decrypt update called twice and then Decrypt Final. However, the first EVP_DecryptUpdate called on the first 16 bytes returns 8 when decrypting so in the end the EVP_DecryptFinal fails. Any ideas what might be the problem? thanks, -- Cristina