Hi, I have a question about encryption and decryption. Suppose I have a file "hello" which contains six bytes content of "hello". Then I do "openssl enc -e -des-ede -a -salt -in hello -out hello.enc". I am asked to give a password. Then I decrypt it, by "openssl enc -d -des-ede -a -salt -in hello.enc -out hellonew". I am asked to give the password. If I give a wrong password, the decryption will fail and send out error message of "1432:error:06065064:digital envelope reoutines:EVP_DecryptFinal:bad decrypt:evp_enc.c:450:".
I am wondering why the decryption routine knows if a decryption is correct or not without comparing with the original plaintext file? Is there something inside the encrypted file "hello.enc" contains some data which do the magic? David ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]