Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generating a product key [duplicate]

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.

like image 759
caesay Avatar asked Nov 12 '10 01:11

caesay


People also ask

Can same product key used twice?

you can both use the same product key or clone your disk.

How can I get my Microsoft product key if I lost it?

Generally, if you bought a physical copy of Windows, the product key should be on a label or card inside the box that Windows came in. If Windows came preinstalled on your PC, the product key should appear on a sticker on your device. If you've lost or can't find the product key, contact the manufacturer.

How are product keys generated?

License keys are typically created and delivered via a license generator once a software user has paid for the software and has agreed to the terms and conditions set out in the End-User License Agreement.

Can product key be stolen?

Anyone who uses your computer could do it, and that's not forgetting the sticker that has the product key in the first place – if that's left lying around your home or office it could be copied.


1 Answers

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.

like image 180
winwaed Avatar answered Sep 23 '22 06:09

winwaed