5

Possible Duplicate:
Secure algorithm for creating license keys?

Im looking for a way to create 25 character keys based on a specific pattern, so that i can check if it is valid without any sort of internet connection, etc.

Ive been trying several possible ways to do this, but with no success.

Community
  • 1
  • 1
caesay
  • 16,932
  • 15
  • 95
  • 160

1 Answers1

6

Yes all such systems can be circumvented, but the pragmatic approach used by most vendors is to make it difficult enough to keep the honest people honest. A popular approach is to key the license with a name, license type, and date. A common way of doing this is with Partial Key Verification:

http://www.brandonstaggs.com/2007/07/26/implementing-a-partial-serial-number-verification-system-in-delphi/

(a quick Google will find other implementations and samples, but Brandon's is well regarded)

With a PKV approach, you can change the tests in new versions of the software without invalidating the old keys. You will want to do this when your system is hacked (and it WILL be hacked!). Similarly it will be a good idea to keep a list of hacked keys so that these can be auto-expired in future versions of your program.

winwaed
  • 7,645
  • 6
  • 36
  • 81