I'm currently involved in developing a product (developed in C#) that'll be available for downloading and installing for free but in a very limited version. To get access to all the features the user has to pay a license fee and receive a key. That key will then be entered into the application to 'unlock' the full version. As using a license key like that is kind of usual I'm wondering: • How's that usually solved? • How can I generate the key and how can it be validated by the application? • How can I also avoid having a key getting published on the Internet and used by others that haven't payed the license (a key that basically isn't 'theirs'). How to generate and validate a software license key? Goodbye mr cool subtitles indonesia. What I would do is set up 2 license types. Your application should only have the public key to verify the license key response. So in case there's no internet connection, you can use the previous license key response instead. I guess I should also tie the key to the version of application somehow so it'll be possible to charge for new keys in feature versions. Anything else I should think about in this scenario? Caveat: you can't prevent users from pirating, but only make it easier for honest users to do the right thing. Assuming you don't want to do a special build for each user, then: • Generate yourself a secret key for the product • Take the user's name • Concatentate the users name and the secret key and hash with (for example) SHA1 • Unpack the SHA1 hash as an alphanumeric string. This is the individual user's 'Product Key' • Within the program, do the same hash, and compare with the product key. If equal, OK. But, I repeat: this won't prevent piracy I have recently read that this approach is not cryptographically very sound. But this solution is already weak ( as the software itself has to include the secret key somewhere), so I don't think this discovery invalidates the solution as far as it goes. Just thought I really ought to mention this, though; if you're planning to derive something else from this, beware. I would think that by the time someone is hacking your code (possibly at the assembly level) to find your secret key, they are probably also at the level that they can just bypass your checks entirely. I don't think there's a method of registration so secure that it can survive a good hacker running the program locally. As the original comment said, it's really all about anything that makes it one step harder than simply copying the file. A lot of games these days have given up on copy protection and simply take the game content online, in which case the code is out of the hacker's hands. – Dec 4 '12 at 22:56. There are many ways to generate license keys, but very few of those ways are truly secure. And it's a pity, because for companies, license keys have almost the same value as real cash. Ideally, you would want your license keys to have the following properties: • Only your company should be able to generate license keys for your products, even if someone completely reverse engineers your products (which WILL happen, I speak from experience).
0 Comments
Leave a Reply. |