Date: Sat, 7 Apr 2012 12:29:44 +0530 From: Dhiru Kholia <dhiru.kholia@...il.com> To: john-dev@...ts.openwall.com Subject: Re: OpenSSL AES strange problem (first block is decrypted wrongly) On Sat, Apr 7, 2012 at 12:07 PM, Dhiru Kholia <dhiru.kholia@...il.com> wrote: > Hi, > > I am trying to decrypt two blocks of encrypted data using OpenSSL AES > (in CBC mode). Second block is decrypted correctly but first block is > strangely wrong. Any ideas what is going on?. Can someone give it a > shot? I figured it out. The iv was wrong. Previous call to AES_cbc_encrypt changed the iv to a wrong value. Hence, the first block was decrypted wrongly. Fixed by copying salt into iv every time before calling AES_cbc_encrypt. -- Cheers, Dhiru
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.