Encrypted By Ezcrypto but cannot decrypt with PHP mcrypt


#1

Hello, I’m a Ruby newbie.

Our site is developed with Ruby On Rails mainly, but some parts use PHP
5.
So, in Ruby, it encrypt username with EzCrypto aes-128-cbc with a key
and save it to browser cookie.
But cannot decrypt the cookie with PHP5’s mcrypt RIJNDAEL128 CBC
algorithm with the same key.
(AFAIK RIJNDAEL128 == AES, am I right??)
How can I decrypt the value which is encrypted with EzCrypto?
I don’t have to use aes-128-cbc.

Would you recomend any algorithm good for this kind problem?

Regards,


#2

I solved the problem with aes-128-ecb in EzCrypto, and
MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB in PHP.

Kwonnam Son wrote:

Hello, I’m a Ruby newbie.

Our site is developed with Ruby On Rails mainly, but some parts use PHP
5.
So, in Ruby, it encrypt username with EzCrypto aes-128-cbc with a key
and save it to browser cookie.
But cannot decrypt the cookie with PHP5’s mcrypt RIJNDAEL128 CBC
algorithm with the same key.
(AFAIK RIJNDAEL128 == AES, am I right??)
How can I decrypt the value which is encrypted with EzCrypto?
I don’t have to use aes-128-cbc.

Would you recomend any algorithm good for this kind problem?

Regards,