Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Sat, 7 Apr 2012 12:29:44 +0530
From: Dhiru Kholia <>
Subject: Re: OpenSSL AES strange problem (first block is decrypted wrongly)

On Sat, Apr 7, 2012 at 12:07 PM, Dhiru Kholia <> 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


Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ