Forum Discussion

Kevin_Stewart's avatar
Mar 14, 2008

AES functions

Hello Devcentral gurus,

 

 

Does anyone know the specifics of the AES functions and how they work. Specifically, look at the following code snippet:

 

 

set testkey "test"

 

set testdata "blah"

 

log local0. "aes output -> [AES::encrypt $testkey $testdata]"

 

 

I've searched and searched through the forum and perhaps I just don't understand it. The above code delivers a different result every time a new browser window is opened. I have to assume that internally AES is pulling some additional information to "seed" the result, but then why the key? I would have thought that since the AES::key function delivers a random key, everything else would be static, and entering a static key would give the same result every time. What am I missing? Say for example I am strongly encrypting something that is being sent to the user in a file-based cookie. When they come back to the site later, I would like to be able to decrypt that data. Again, am I missing something? As it stands, the AES functions don't allow that.

 

 

Thank you for your help.

 

Kevin

24 Replies