Generating short license keys with OpenSSL
Posted
by Marc Charbonneau
on Stack Overflow
See other posts from Stack Overflow
or by Marc Charbonneau
Published on 2010-05-26T20:00:16Z
Indexed on
2010/05/26
22:01 UTC
Read the original article
Hit count: 304
I'm working on a new licensing scheme for my software, based on OpenSSL public / private key encryption. My past approach, based on this article, was to use a large private key size and encrypt an SHA1 hashed string, which I sent to the customer as a license file (the base64 encoded hash is about a paragraph in length). I know someone could still easily crack my application, but it prevented someone from making a key generator, which I think would hurt more in the long run.
For various reasons I want to move away from license files and simply email a 16 character base32 string the customer can type into the application. Even using small private keys (which I understand are trivial to crack), it's hard to get the encrypted hash this small. Would there be any benefit to using the same strategy to generated an encrypted hash, but simply using the first 16 characters as a license key? If not, is there a better alternative that will create keys in the format I want?
© Stack Overflow or respective owner