AES encryption / decryption using Java 1.5 and ActionScript as3crypto

On my website, I use 128 bit AES string encryption / decryption. I am encrypting a string in Java, and I want to decrypt it in a flash application that I run on the same web page to which I pass the encrypted string as a JavaScript variable.

I generate a 128 bit key using Java. I can successfully perform encryption / decryption in Java. Java outputs a byte array (byte []) for the key, an encrypted and decrypted result. I am using Base64 encoding / decoding to successfully get the string equivalent.

On the flash side, I use a Java-generated key (Base64) to decrypt the string, and I noticed that it is incorrectly decrypted. The cryptography library that I use in flash, as3crypto . When I test this on the as3crypto project demo page using my Java key (Base64), I noticed that I am not getting the same result using all possible modes (CBC, CFB, etc.).

What is the possible cause of this error? Am I doing something wrong?

Hi

0
source share
1 answer

It's hard to say without looking at your code, but ...

A few notes.

AES , , .

  • (duh!)
  • (128/192/256)
  • (ECB/CBC/CTS ..)
  • ( CTS)

, Java ActionScript?

+2

All Articles