Jump to content
  • Advertisement
Sign in to follow this  
AcidZombie24

Unity generate serial key

This topic is 3795 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I wanted to revive this thread, but it was 'retired' http://www.gamedev.net/community/forums/topic.asp?topic_id=367563&forum_id=21&gforum_id=0 So how do i create a serial key from a username? I was thinking of using SHA 512 or something similar but how do i set my own seed values instead of use the default? is this what is meant by salt? I actually dont need this for protection. I am giving away a private app and i want to tie their emails to the key so if it was leaked i'd know who did it Now what if i only want a serial and no username, how would i reverse the key to get the email? i was thinking of seeding a random number generator and doing an xor on the array. But, is the windows (or c) rand safe? i would need my own RNG? or at least the source to a RNG lib so i can ensure it wont change on me?

Share this post


Link to post
Share on other sites
Advertisement
Quote:
how would i reverse the key to get the email?
You'd look in your spreadsheet and see what the email address was that you generated that key for.

Share this post


Link to post
Share on other sites
I rather not record keep when i dont need to.

What lib can i use to create a hash value and set my own seed value?
Is setting the seed value called salting?

Share this post


Link to post
Share on other sites
Quote:
Original post by AcidZombie24
I rather not record keep when i dont need to.


Do you need to generate a serial? No. Just bake their e-mail unencrypted into the EXE itself. Nobody will find it because nobody will look for it.

By the way, how do you intend on discovering leaks? Does your program connect to a central server and report its key/IP address? What if the person using a leaked copy has an anal retentive firewall program and they decide to deny the connection?

Share this post


Link to post
Share on other sites
If you're looking to track leaks then you probably want something closer to watermarking then a serial number. Especially if you intend to do minimal record keeping. If you use a hash you'll need to do record keeping so you can associate the hash/serial number with a name or email.

Nypyren's suggestion would work just fine, append there email and/or name to the end of the executable. If you wanted to make it harder to spot in case someone opens your executable in a hex editor you can use a simple encryption algorithm. When you find a copy distributed in an unauthorized manner, you get a copy and retrieve the information from the end of the executable. Of course this all depends on your finding the leaked copy if it happens.

Quote:
Original post by AcidZombie24
What lib can i use to create a hash value and set my own seed value?
Is setting the seed value called salting?


OpenSSL has several has cryptographic hash functions.

Depends on what you mean by seeding a hash. I guess you could call giving a key to an HMAC hash algorithm seeding.
Salting a hash usually involves appending extra data (such as random bytes) to the data to be hashed to help ensure uniqueness. The salt bytes are usually stored for computing hashes for comparison etc. For example, passwords are commonly stored as salted hashes because it makes for good protection against dictionary attacks.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!