Building an 'Activation Key' Generator in JAVA
Posted
by jax
on Stack Overflow
See other posts from Stack Overflow
or by jax
Published on 2010-05-24T07:39:20Z
Indexed on
2010/05/24
7:40 UTC
Read the original article
Hit count: 220
I want to develop a Key generator for my phone applications. Currently I am using an external service to do the job but I am a little concerned that the service might go offline one day hence I will be in a bit of a pickle.
How authentication works now.
- Public key stored on the phone.
- When the user requests a key the 'phone ID' is sent to the "Key Generation Service" and the encrypted key key is returned and stored inside a license file.
- On the phone I can check if the key is for the current phone by using a method getPhoneId() which I can check with the the current phone and grant or not grant access to features.
I like this and it works well, however, I want to create my own "Key Generation Service" from my own website.
Requirements:
- Public and Private Key
- Encryption:(Bouncy Castle)
- Written in JAVA
- Must support getApplicationId() (so that many applications can use the same key generator) and getPhoneId() (to get the phone id out of the encrypted license file)
- I want to be able to send the ApplicationId and PhoneId to the service for license key generation.
Can someone give me some pointers on how to accomplish this? I have dabbled around with some java encryption but am definitely no expert and can't find anything that will help me.
A list of the Java classes I would need to instantiate would be helpful.
© Stack Overflow or respective owner