i am developing an application in which the server (.php file) will generate a license key based on user info and send it back to the mobile device(Symbian OS c++ application).The license key will be generated using some form of encoding algorithm.On the client side the encoded license key is used to validated with the user information stored in the client.For that matter there has to be decryption of the license key on the symbian os client.
Pls suggest me some encryption algorithm (say RSA etc.) which can be supported by both symbian os and php running on a linux server.So that a homogenity can be maintained between the .php file which is generating the license key on the server side and the client side application running on a symbian device which is decrypting the encoded license key (for validation with the info stored on the client side) everytime the client wants to connect to the server.
The problem is the memory constraint of symbian OS so that a heavy encoding algorithm cant be supported on the mobile client.
I am new to Symbian, but for one project I used RSA as the asymmetric encryption and the memory constraints was NOT a problem...it's dog slow in the device (j2me - BigInt manipulation...) but other than that it's brilliant.
On the client side:
Don't make a library yourself, there are too many pitfalls, you can use one of these:
Pay attention to the license and choose from there.
I must admit that i made some profiling, but I didn't gain very much....mostly a waste of time (bit-shifting).
I belive that there already are the "security module" which you can use!??
From the "http://www.symbian.com/technology/symbos-v6x-det.html" -document:
The cryptography module includes the following significant components:
* raw cryptography algorithms allowing data to be encrypted and decrypted, and supporting symmetric ciphers: DES, 3DES, RC2, RC4, RC5, and asymmetric ciphers: RSA, DSA, DH
* hash functions, supporting message digests: MD5, SHA (SHA1), HMAC
* random number generator (RNG), the basis for the cryptographic key generation