EVP_DecryptFinal

2011-05-26 Thread Chenchu, Rakesh R
787 cout << "Rakesh buf:" << x << endl; 788 } 789 790 if (!EVP_DecryptFinal(&cipherCtx, *plain + *plainLen, &finalBlkLen)) { . Tables returning decrypt error: == OID: .1.3.6

RE: EVP_DecryptFinal Fails

2010-07-22 Thread Dave Thompson
m. I can encrypt and decrypt > the password in the file sucessfully using the command line utility but when decrypting > with the C program EVP_DecryptFinal fails with 0. The documentation indicates > that this will happen if the last block is not correct. My questions are: Yes

EVP_DecryptFinal Fails

2010-07-22 Thread ronald braswell
I want to encrypt a password on disk using 'openssl enc -e -des-ede3-cbc' and decrypt it using the openssl libcrypto in a C program. I can encrypt and decrypt the password in the file sucessfully using the command line utility but when decrypting with the C program EVP_DecryptFinal fa

RE: EVP_DecryptFinal succeeds but fails.

2009-09-03 Thread Dave Thompson
> From: owner-openssl-us...@openssl.org On Behalf Of roxaz > Sent: Thursday, 03 September, 2009 06:46 > Hey, EVP_DecryptFinal returns 0 for me, but no data is returned > to supplied output buffer, and returned data length is set to 0. > What could be the issue?

Re: EVP_DecryptFinal succeeds but fails.

2009-09-03 Thread Goetz Babin-Ebell
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 roxaz wrote: | Hey, EVP_DecryptFinal returns 0 for me, but no data is returned to | supplied output buffer, and returned data length is set to 0. What could | be the issue? bdec receives some correct data tho. | | u32 szbdec = 0

EVP_DecryptFinal succeeds but fails.

2009-09-03 Thread roxaz
Hey, EVP_DecryptFinal returns 0 for me, but no data is returned to supplied output buffer, and returned data length is set to 0. What could be the issue? bdec  receives some correct data tho.         u32 szbdec = 0;         u8* bdec = new u8[resp.rSize + halfKey];    // half rSize = half of

strange problem decrypting a file -- EVP_DecryptFinal

2007-05-17 Thread Chris Rex
Greetings, users. I am having a strange problem decrypting a file that I used openssl to encrypt via the following: openssl enc -bf -in nfoz.tar.gz -out nfoz.tar.gz.bf If I attempt to decrypt with the following: openssl enc -d -bf -in nfoz.tar.gz.bf -out nfoz.tar.gz I get the following message

Re: EVP_DecryptFinal doesn't work if -O2

2007-04-29 Thread Dr. Stephen Henson
On Sun, Apr 29, 2007, Michal wrote: > EVP_DecryptInit (& ctx, EVP_bf_cbc (), key, (unsigned char*)iv); > In the main() I have key: > unsigned char key[]={'a','b','c','\0'}; > If I use this key and compile with -O2 option EVP_DecryptFianal fails. > But if I define key as: > static unsigned char

EVP_DecryptFinal doesn't work if -O2

2007-04-29 Thread Michal
Hi, I'm doing decryption with function: int decrypt (unsigned const char *input, size_t inputSize, char *&output, size_t &outputSize, unsigned char *key) { int outlen=0, tlen=0; EVP_CIPHER_CTX ctx; EVP_CIPHER_CTX_init (& ctx); EVP_DecryptInit (& ctx, EVP_bf_cbc (), key, (unsigned c

EVP_DecryptFinal

2006-11-22 Thread k b
Hi, I'm decrypting using the EVP api and I'm encountering the following error when i do a EVP_DecryptFinal hashVerify:: ERROR error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt I have 2 questions 1) what's hashVerify got to do in the decryption process

Re: How to find out why EVP_DecryptFinal failed?

2006-10-02 Thread Erik Leunissen
Boris wrote: ... Maybe it would be a good idea to add this link to the "return values" section of http://www.openssl.org/docs/crypto/EVP_EncryptInit.html which explains only that 0 means failure. I too find that some inter-related aspects of the OpenSSL libraries are not linked/referred a

Re: How to find out why EVP_DecryptFinal failed?

2006-10-01 Thread Boris
Erik Leunissen wrote: > Boris wrote: > >> Are there any functions I can call to understand what went wrong if >> EVP_DecryptFinal failed and returned 0? >> > > From: > > http://www.openssl.org/docs/crypto/err.html# > > "When a call to the OpenSS

Re: How to find out why EVP_DecryptFinal failed?

2006-10-01 Thread Erik Leunissen
Boris wrote: Are there any functions I can call to understand what went wrong if EVP_DecryptFinal failed and returned 0? From: http://www.openssl.org/docs/crypto/err.html# "When a call to the OpenSSL library fails, this is usually signalled by the return value, and an error co

How to find out why EVP_DecryptFinal failed?

2006-10-01 Thread Boris
Are there any functions I can call to understand what went wrong if EVP_DecryptFinal failed and returned 0? Boris __ OpenSSL Project http://www.openssl.org User Support Mailing List

Re: Problems with EVP_DecryptFinal

2005-03-29 Thread Nils Larsch
decipheredDataLength += decipheredNum; } again, the while-loop is unneccesary. One invocation of EVP_DecryptUpdate + EVP_DecryptFinal is enough Nils __ OpenSSL Project http://ww

Problems with EVP_DecryptFinal

2005-03-29 Thread Tyler Durden
tf( "The deciphered Data is: %s \nand the size is: %d\n\n", decipheredDataAux, decipheredDataLength ); decipheredNum = 0; if( EVP_DecryptFinal( &ctx, &decipheredDataAux[decipheredDataLength], &decipheredNum ) == 0 ) // ERR_print_erro

Re: EVP_DecryptFinal(...) for AES 128 error leads?

2005-02-19 Thread Richard Levitte - VMS Whacker
sk and reverse the process. phong_co> phong_co> I started out with a blowfish example program and am phong_co> attempting to change it to use AES. It works fine phong_co> during the encryption phase but am running into either phong_co> a EVP_DecryptFinal error or segmentation fault.

EVP_DecryptFinal(...) for AES 128 error leads?

2005-02-18 Thread Phong
ption phase but am running into either a EVP_DecryptFinal error or segmentation fault. If anyone can provide some suggestion on how to find more info to understand and fix this problem I would appreciate it. I have searched the openssl-user list with nothing has been directly applicable (to my