4 ms·
Someone posted a challenge on Reddit a while back for people to crack his license key generator. He gave them the source code to a test program which would ver
by dietrichepp 14y ago
Someone posted a challenge on Reddit a while back for people to crack his license key generator. He gave them the source code to a test program which would verify keys and gave people a sample key that worked. He seemed to think it was uncrackable.
1. People quickly figured out that the key generator just verified RSA signatures.
2. Since he implemented RSA by hand (I guess calling OpenSSL's RSA_INIT() would be too "obvious") it had bugs. Specifically, it didn't check that the signature in the key was strictly below the key modulus, meaning that given signature X, you could add the modulus to get a new valid signature.
3. Since the license keys can't be ridiculous long pieces of text, the key was not long enough. Someone went to a website online and pasted the key into a Java prime factorization applet and cracked it, posting a key generator.
There is always a tradeoff between security and usability. Unfortunately, the tradeoff here is prohibitive: if you use a 1024 bit key and base 32 encoding, your users will have to type in a minimum of 205 characters to enter the product key. Base 32 is the densest reasonable encoding for human input, or close to it.
So the lesson is that even the simple requirement "can't create a keygenerator" is an open problem.
- MichaelGG 14y agoWell with ECC-192 you could get a 77 character code, right? At least it's a well defined problem space and has known tradeoffs.
- marshray 14y agoWell, when you go to ship an actual product and the product people say "no way, that's too long to even fit on the sticker let alone for any user to type correctly" then it doesn't matter how well-defined your tradeoffs are. It's not a solution to the real problem.