Tech Off Thread

3 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

CD-Key generator for my shareware game?

Back to Forum: Tech Off
  • User profile image
    The​Programmer

    My friend and I are working on a game that will be put on web as a shareware, much like the original Doom. However, how do we generate a CD-key everytime a customer register? Anyone has done this before?


    Thanks

  • User profile image
    PeterF

    You could use the public/private key strategy.

    I would propose something like:

    <registration>
       <firstname>Peter</firstname>
       <lastname>F</lastname>
       <guid>4e4b49a0-1dc5-11d9-9669-0800200c9a66</guid>
    </registration>

    Then encrypt it using your private key, and then presenting the value to the end-user to paste it into the registration screen (or use webservices instead)

    Then on the client side you can decrypt it using the public key stored inside the client and read out the values.

    Good luck,
    Peter

  • User profile image
    Manip

    On the server (your end etc) the keys are generated 100% at random - 64bit keys.

    You then pass all of your random 64bit numbers though a series of tests .. whatever keys are valid by the end can then be used..

    64bit Rand

    Test #1
    Test #2
    Test #3
    Test #4
    Test #5

    In version 1.0 of your game, it *only* checks the first test. This test is not some simple check-sum test, but can be something very complex .. Then as new versions come out you can add new tests.

    If for example someone was able to crack your keygen tests and write a keygen of their own, it would work fine for version 1.0 but not for version 1.1 because the second test would defeat it. They also have no way of knowing what test #2 is because it will not exist in the release software.

    For REAL leaked keys, it is easy enough to add in some kind of hash table to ID and block them for later versions.

    If you want, make test #1 version easy to crack. Then your game will be pirated all over the place .. keygen and all ... but as people try it out they will want to continue their enjoyment by getting the latest version with the new features and levels(?) and as the keygen for test #1 will not beat test #2 or the hash table containing all public CD-Keys they will have to either crack the next version or buy a fully copy.


    PGP is open-source software. You can use PGP in 2048 mode .. Just make sure it is not easy to crack (patch).  

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.