Thanks for this. Very interesting.
I assume that without the RSA key I cannot generate these codes myself then, even if I was to guess at the range?
Re:Ask HN: Would you like to play a game?
by sklivvz1971 on Thursday July 31, 2014 @09:56AM
(#8114087)
Yes, that's the idea :-)
Ok, thus, if a similar scheme is being used for the FIFA stickers, the person that put this together (http://fifapaninicode7.appspot.com/) must know the RSA key!
Re:Ask HN: Would you like to play a game?
by sklivvz1971 on Saturday August 09, 2014 @05:11AM
(#8156558)
Or they simply have a list of codes...
Did you check that these codes work and are not just a ruse?
The basic algorithm goes like this. To generate the codes
and then, to verify a code where of course RSA is an implementation of http://en.wikipedia.org/wiki/RSA_(cryptosystem) and base32 refers to http://en.wikipedia.org/wiki/Base32.On top of that, we needed codes to be of a specified maximum length and with a specified alphabet. Thus, instead of base32 we used a different base with different letters, but the same algorithm. To fix the length of the codes, we needed the output of RSA encode to be less than a specific value. In RSA this can be controlled by choosing the modulus part of the key.
There are more subtleties to this, but the gist is there.