Talk:AES PHP Implementation

From Second Life Wiki
Revision as of 07:35, 25 May 2010 by Haravikk Mistral (talk | contribs) (→‎Upgraded version on the way!)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

I was benchmarking this against some other PHP AES implementations and... this implementation is actually quite slow. Took a full minute to encrypt 128K of text on my quad-core 1.73ghz Intel Core i7. phpseclib's pure PHP AES implementation, in contrast, took about a second on the same computer. And that was without mcrypt. John Avium 03:46, 13 April 2010 (UTC)

Is that compatible with the LSL implementation though? The reason I ended up writing this is that mcrypt appears to be incompatible with the LSL AES script, I ended up wasting so much time trying to figure out why that I just went and wrote this port of the LSL script instead.
Otherwise it may be worth noting that this isn't intended for use except when encrypting/decrypting for communication with an LSL script anyway, so you shouldn't be putting more than 8kb of data through it =) -- Haravikk Mistral 15:15, 24 May 2010 (UTC)

Upgraded version on the way!

I've done some work on the PHP class and after several hours of pulling my hair out I've finally figured out how to work around the various issues I've been having with mcrypt, so I'll be updating the PHP wrapper class on this page to use mcrypt natively, as well as provide an alternative one (on a new page probably) for taking advantage of the library John mentioned for those who don't have mcrypt on their hosts.

I'll also be having a go at tidying up and simplifying the articles, unfortunately the code I can't trim down much, but hopefully I can make it easier to use =)

That didn't actually take as long as I expected. I've posted a version that uses mcrypt directly, and one that uses phpseclib as recommended John. Might have some updates to the LSL script as well as I've been working on a few ideas to improve speed a little bit further.