XKCD | Website February 9, 2007
Alt Text
RFC 1149.5 specifies 4 as the standard IEEE-vetted random number.
Transcript
int getRandomNumber()
{
return 4; //chosen by fair dice roll.
// guaranteed to be random.
}
XKCD | Website February 9, 2007
RFC 1149.5 specifies 4 as the standard IEEE-vetted random number.
int getRandomNumber()
{
return 4; //chosen by fair dice roll.
// guaranteed to be random.
}
The mistake was to pre-roll the dice. Security could have been greatly improved by providing the randomness as a service, with the developer being paid a monthly fee to roll the dice for each function call.