Link to home
Start Free TrialLog in
Avatar of funvill
funvillFlag for Canada

asked on

How to create a "registration key" for my application

Hello

I am trying to create simple a registration key (CD KEY) system for my applications,
I want a the ability to create a private key and lots and lots of public keys from the private key

For example
I would have a dialog box where my users could enter the public key I have generated for them that would get compared to the private key that is embedded in side of my application, if the public key is valid then the program will unlock its self.

I am looking for a tutorial in C/C++ or MFC on creating private/public keys and validating them.
A link will do,

I know close to nothing about encryption
I’m experienced in C\C++\MFC

Thank you for your time and effort
http://www.funvill.com 
Avatar of InteractiveMind
InteractiveMind
Flag of United Kingdom of Great Britain and Northern Ireland image

Well, the RSA algorithm is not highly difficult to implement yourself...

Once you have implemented such an algorithm though, when the user provides the public key, to ensure that it is suited to the embedded private key, you simply encrypt something with the public key, decrypt the ciphertext with the private key, and then return the decrypted result to the original data... if they match, then it's a valid pair.

Wikipedia has info regarding the RSA algorithm (how it works exactly), check it out !
Avatar of funvill

ASKER

Hello
Thanks for your replay

Will I be able to generate lots of different public keys with a signle private key?
Do you have a C/C++/MFC tutorial online about RSA that I could look over?

Is there a public/free for commercial use class or library I could use to create and validate RSA keys?
ASKER CERTIFIED SOLUTION
Avatar of InteractiveMind
InteractiveMind
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of funvill

ASKER

Thanks,
Workes great