AES Encryption / Decryption with Java 1.5 and ActionScript as3crypto

'What is ECB (Electronic CodeBook) Operation Mode?' tutorial was cited in a StackOverflow forum post in 2011.

The What is ECB (Electronic CodeBook) Operation Mode? tutorial was cited in a StackOverflow forum post in 2011.

Subject: AES Encryption / Decryption with Java 1.5 and ActionScript
   as3crypto
Date: Apr 9, 2011
Author: Ranhiru Cooray
Source: http://stackoverflow.com/questions/5578701
   /aes-encryption-decryption-with-java-1-5-and-actionscript-as3crypto

> On my website I am using AES 128bit encryption/decryption of a
> string. I encrypt a string in Java and I want to decrypt it in a
> flash application that I run on the same webpage, to which I pass
> the encrypted string as a JavaScript variable.
>
> I generate a 128bit key using Java. I can do encryption/decryption
> in Java successfully. Java outputs byte-array (byte[]) for the key,
> encrypted and decrypted result. I use Base64 encoding/decoding to
> successfully get the string equivalent.
>
> On the flash side I use the Java generated key (Base64) to do the
> decryption of the string and I noticed that it is not correctly
> decrypted. The cryptography library that I use in flash is
> as3crypto. When I test this on the demo page of the as3crypto
> project using my Java generated key (Base64) I noticed that I am
> not getting the same result using all possible modes (CBC,
> CFB etc.).
>
> What is the possible cause for this error? Am I doing something
> wrong?

I should also tell you that ECB is not a recommended mode of
operation. Patterns in the plain text is not concealed in the
resulting cipher text. Read these web pages. en.wikipedia.org/wiki/…
and herongyang.com/Cryptography/…

Table of Contents

 About This Book

 Reference Citations in 2023

 Reference Citations in 2022

 Reference Citations in 2021

 Reference Citations in 2020

 Reference Citations in 2019

 Reference Citations in 2018

 Reference Citations in 2017

 Reference Citations in 2016

 Reference Citations in 2015

 Reference Citations in 2014

 Reference Citations in 2013

 Reference Citations in 2012

Reference Citations in 2011

 Simplified Chinese Unicode table

 How to Edit a Mobile Registry With Commander

 OpenSSL in Ruby

 Utilisation de la JVisualVM en remote via jstatd

 OpenOffice.org Newsletter - April 2011

AES Encryption / Decryption with Java 1.5 and ActionScript as3crypto

 problem in insert into database

 2X Gateway SSL

 Creating Installer

 Implement statement batch for Connector C++

 Twitter OAuth Library/HUD

 How to connect Oracle data base

 regexParser.cpp

 gloria.tv downloader

 SET IDENTITY_INSERT for table fails

 Winsock TCP buffering behaviour

 Passing Array in Function

 Reference Citations in 2010

 Reference Citations in 2009

 Reference Citations in 2008

 Reference Citations in 2007

 Reference Citations in 2006

 Reference Citations in 2005

 Reference Citations in 2004

 Reference Citations in 2003