Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Posts: 105
Registered: ‎05-22-2008
My Device: Not Specified

Crypto Keys :- Server and Device

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 ?