06-16-2009 10:20 AM
I want to encrypt a file using AES on a server, download the encrypted byte stream onto the device, and then
decrypt the file on the device.
However, as I do not want the overhead of having a key exchange, I want to have the same static keys on both the server and device.
On the device, thre are API's to generate keys (eg. in the AESKey) using a byte.
However, how do I generate the same key on the server assuming that I am using Java JCE ?
I could derive a key in Java from SecretKeySpec / PEBKey.
However, I am pretty sure that the resulting key will not match one that I create on the device....
Any ideas on how I can use a "static" shared key between a java server process and the Bb device ?