An AS3 Cryptography Library

ActionScript 3 has several new features such as ByteArray and uint, that make number crunching on the web less slow than you’re used to.

So it seemed like having a crypto library for as3 would make a lot of sense.

For as2, there was Meychi’s ASCrypt library, and while it would be easy to port them to AS3 (it’s been partially done, at least for MD5 and SHA-1), it wouldn’t take advantage of most of the speed increase AS3 provides.

Still, I’m way too lazy to rewrite a bunch of cryptography algorithms myself, so I pilfered and ported existing code to AS3 as much as possible.

So far, there’s support for RSA, AES, RC4, SHA-256 and HMAC, among other things.
Anyway, there’s a little page for the AS3 Crypto Library.
Play with it and let me know what you think.

Explore posts in the same categories: Security, flash, actionscript

3 Comments on “An AS3 Cryptography Library”

  1. Jeffry Houser Says:

    I ported the whole ASCrypt library to ActionScript 3:

    https://ascrypt3.riaforge.org/index.cfm

    It all works, as best I can tell, but I had issues passing encrypted values between languages, at least in AES where I spent most of my time.

    I look forward to taking a look at your code. ;)

  2. Metal Hurlant Says:

    Hi Jeffry,

    I had started going down that path too, but the lack of a clear license worried me a bit.
    I still ended up mostly porting other people’s code, but the licenses are clear, and the original sources usually lent themselves well to strong typing.

    I’ve been careful to make sure the algorithms pass whatever test vectors I can dig online, so that it may have a shot at working with other languages.

    That said, I’ve yet to use it for anything, so it may well have bugs.

  3. Anonymous Says:

Comment: