Bug #60705 [Com]: rijndael iv problem

From: Date: Tue, 02 Oct 2012 12:28:11 +0000
Subject: Bug #60705 [Com]: rijndael iv problem
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-173864@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=60705&edit=1

 ID:                 60705
 Comment by:         miha dot vrhovnik at domenca dot com
 Reported by:        erno dot kovacs at freemail dot hu
 Summary:            rijndael iv problem
 Status:             Open
 Type:               Bug
 Package:            mcrypt related
 Operating System:   linux/windows
 PHP Version:        5.3.8
 Block user comment: N
 Private report:     N

 New Comment:

Or maybe just the docs are foobar.
http://www.chilkatsoft.com/p/php_aes.txt


Previous Comments:
------------------------------------------------------------------------
[2012-10-02 10:01:56] miha dot vrhovnik at domenca dot com

I have the same problem as the reporter of this bug.
However the library used to decode the data is openssl 1.0.1c and I'd really doubt that they
messed this up.

------------------------------------------------------------------------
[2012-02-26 21:30:37] erno dot kovacs at freemail dot hu

AES blocksize is constant 16 bytes, so is the IV.

------------------------------------------------------------------------
[2012-02-26 21:27:16] erno dot kovacs at freemail dot hu

it seems you dont recognize the difference between the cipher block size and the input plaintext
data...

------------------------------------------------------------------------
[2012-02-26 21:25:24] erno dot kovacs at freemail dot hu

you are absolutly wrong. the iv must have the same size as the ciphers block size.

http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation

------------------------------------------------------------------------
[2012-02-26 20:11:02] ab@php.net

After looking at the mcrypt implementation it turns out, that the way you're doing 
that in perl is non standard. The init vector SHOULD have the same size the block 
does. In your case 32 bytes. Looking at some other libs, for instance 
http://msdn.microsoft.com/en-
us/library/system.security.cryptography.symmetricalgorithm.iv.aspx
the stuff is handled the same way - vi size = block size.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=60705


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=60705&edit=1


Thread (9 messages)

« previous php.bugs (#173864) next »