Licence Key Generator
-
Hi, I have been working on a Licence Server application for my company which now works. The only issue is the generation/validation of the licence keys. I have looked into encryption (using blowfish) but the result was a little ugly. I really need to produce a alphanumeric representation of a known alphanumeric string. Can anyone give me any pointers on ways to do this? James
-
Hi, I have been working on a Licence Server application for my company which now works. The only issue is the generation/validation of the licence keys. I have looked into encryption (using blowfish) but the result was a little ugly. I really need to produce a alphanumeric representation of a known alphanumeric string. Can anyone give me any pointers on ways to do this? James
What exactly is the problem? You want to display/transmit your keys as strings with ASCII chars from range 32..127 to avoid strange block-style characters? Tomasz Sowinski -- http://www.shooltz.com
-
Hi, I have been working on a Licence Server application for my company which now works. The only issue is the generation/validation of the licence keys. I have looked into encryption (using blowfish) but the result was a little ugly. I really need to produce a alphanumeric representation of a known alphanumeric string. Can anyone give me any pointers on ways to do this? James
can you turn the output into hex digits? most encryption algorithms (blowfish, des, rsa, etc.) are going to use all 8 bits of the output bytes, so you're not going to get ASCII data on the output side of the encryptor. -c ------------------------------ Smaller Animals Software, Inc. http://www.smalleranimals.com
-
What exactly is the problem? You want to display/transmit your keys as strings with ASCII chars from range 32..127 to avoid strange block-style characters? Tomasz Sowinski -- http://www.shooltz.com
Yeah that's about it. I create a text string which consists of the application name, the number of licences and a random non-repeatable number split by pipe(|) symbols such as:- "MyApplication|0010|98598749" I need to encypt this so that I can distribute it to the user to enter into a GUI without them realising what it represents. Is that a little clearer? I'm starting to get a headache already.
-
Yeah that's about it. I create a text string which consists of the application name, the number of licences and a random non-repeatable number split by pipe(|) symbols such as:- "MyApplication|0010|98598749" I need to encypt this so that I can distribute it to the user to enter into a GUI without them realising what it represents. Is that a little clearer? I'm starting to get a headache already.
The weak solution is to use base64 encoding for that (RFC 2045 contains the description). Some smart users may realize what are they typing, so I'd recommend encrypting this with RSA, then using base64. You'll need to use encoding, b/c RSA output will contain non-printable characters. Tomasz Sowinski -- http://www.shooltz.com
-
Hi, I have been working on a Licence Server application for my company which now works. The only issue is the generation/validation of the licence keys. I have looked into encryption (using blowfish) but the result was a little ugly. I really need to produce a alphanumeric representation of a known alphanumeric string. Can anyone give me any pointers on ways to do this? James
Can you represent the numbers in hex? ;P
-
Hi, I have been working on a Licence Server application for my company which now works. The only issue is the generation/validation of the licence keys. I have looked into encryption (using blowfish) but the result was a little ugly. I really need to produce a alphanumeric representation of a known alphanumeric string. Can anyone give me any pointers on ways to do this? James
Hi James, I ship a Licence PAK which contains all the fields - Customer Name, Modules Purchased, Special Options etc. and at the end comes a checksum. The checksum is created by concatenating all strings together, taking a 32-bit checksum (I think it's 32 bits) and adding this in hex. So, for example:
Customer: Plonkers R Us Inc.
Modules: Sheep, Rabbits & Beans
Privileges: Naff Off
Checksum: E3F2-1285-CODE-DEADThe customer sees all this, knows what it is all about, and can't mess about otherwise the checksum fails. This idea came from The Digital Equipment Corporation (RIP). Old Simon HB9DRV
-
The weak solution is to use base64 encoding for that (RFC 2045 contains the description). Some smart users may realize what are they typing, so I'd recommend encrypting this with RSA, then using base64. You'll need to use encoding, b/c RSA output will contain non-printable characters. Tomasz Sowinski -- http://www.shooltz.com
I'd suggest creating a message digest from the entered data using secure hashing algorithm such as SHA-1 or MD5. This gives you either a 16-byte (for MD5) or 20-byte (for SHA1) signature that you can then encode in text form using hexadecimal or base64.
-
Hi, I have been working on a Licence Server application for my company which now works. The only issue is the generation/validation of the licence keys. I have looked into encryption (using blowfish) but the result was a little ugly. I really need to produce a alphanumeric representation of a known alphanumeric string. Can anyone give me any pointers on ways to do this? James
James, I highly recomend Crypto++ http://www.eskimo.com/~weidai/cryptlib.html for this. You can use something simple like the DefaultEncryptorWithHMAC and Base64 or Hex. This is a very powerfull and extremelly well designed library. One of the best OO C++ designs I've seen. And simple enough to use once you get the hang of it. Like most/all OS projects better docs would help enormously. If you need any help let me know. Neville Franks, Author of ED for Windows http://www.getsoft.com