Possible encrypt/decrypt bug

Dar Scott dsc at swcp.com
Fri Dec 10 17:46:10 EST 2004


On Dec 10, 2004, at 2:54 PM, David Kwinter wrote:

> I've checked bugzilla and haven't found this, I thought I'd run it by 
> this list before posting a new bug.
...
>    encrypt originalData using "aes256" with key tKey at 256 bit
>    put it into encryptedData
>    decrypt encryptedData using "aes256" with key tKey at 256 bit
>    put it into restoredData

See bug 2405.  A salt prefix is added for encryption using the key 
method when it should not be.  The decryption does not have this 
problem.

One workaround is to delete the first 16 bytes after ecrypt with key.

This bug might get fixed, so you might consider doing that only if the 
first 8 bytes are "Salted__" or if the engine is in some range.

The key method also does not allow an IV to be specified (or at least I 
haven't figured out how).  This does not apply in some cases and can be 
scripted around in some, if you know your way around block modes.

Dar

****************************************
     Dar Scott Consulting
     http://www.swcp.com/dsc/
     Programming Services
****************************************



More information about the use-livecode mailing list