Alex Rivera | Logout

implementation for product keys

Asked 2009-03-14T15:24:26.607
23

I'm implementing a small application in C, which I would like to sell as shareware for a reasonable price later on. It will start of with a 30-day trial, which I am already quite certain of how to implement it.

The problem I have, though, is that I am not quite sure how to implement the product key verification. What I have in mind is that the customer can sign up on my webpage (after trying the product for a while), pay for the product, and get a product key in the form of aaaaa-bbbbb-ccccc-ddddd-eeeee via e-mail (or maybe available via his profile on my website). No problem so far. He/She then drops the key in the appropriate key fields in my app and boom the app is registered.

From what I could gather so far, people either recommend AES or RSA for this. To be honest, I in another direction in college (not cryptography) and the one cryptography class I took was some time ago. But from what I remember, AES is a symmetric encryption algorithm, which would mean that I would only have one key for encryption and decryption, right? How could I then generate thousands of product keys and still validate them in my app (which by the way won't require internet access....so no checking back with a server)?

So I guess RSA would be the way to go? But doesn't RSA produce pretty long keys (at least longer than the required 25 characters from above)?

In another thread I read that some products won't even use encryption for the product key generation/verification, but instead just employ some checks like "add the 2. and the 17. character and that should total to x".

What's the fastest, easiest and most secure way to go here? :-) Code samples would be sugar!

Regards,

Sebastian

P.S.: Oh...and please don't tell me how my key can and will be cracked at some point.....I know about that, which is primarily why

Edit
Report

2 Answers

0

You can check out this Code Project article. It describes an implementation of a a software key based on the MAC address of the machine where the software is executed. The method is not ideal, as the auteur himself admits, and it is a little bit different from what you are looking for, but maybe it can help you.

answered 2009-03-14T18:39:17.527
-1

Life is simpler if you simply purchase a solution.

http://www.kagi.com/kagisolutions/index.php

Kagi allows you to collect payments and they help you manage the keys.

answered 2009-03-14T15:41:05.117

Your Answer