What is the difference between a non-secure random number generator and a secure random number generator?

后端 未结 7 405
北海茫月
北海茫月 2020-12-29 23:45

As the title says: What is the difference between a non-secure random number generator and a secure random number generator?

7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-30 00:28

    A secure random number should not be predictable even given the list of previously generated random numbers. You'd typically use it for a key to an encryption routine, so you wouldn't want it guessable or predictable. Of course, guessable depends on the context, but you should assume the attacker knows all the things you know and might use to produce your random number.

    There are various web sites that generate secure random numbers, one trusted one is hotbits. If you are only doing the random number generation as a one off activity, why not use a lottery draw result, since it's provably random. Of course, don't tell anyone which lottery and which draw, and put those numbers through a suitable mangle to get the range you want.

提交回复
热议问题