What is the difference between a non-secure random

2020-02-24 12:04发布

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

7条回答
我命由我不由天
2楼-- · 2020-02-24 12:32

A random number would probably mean a pseudo random number returned by an algorithm using a 'seed'.

A secure random number would be a true random number returned from a device such as a caesium based random number generator (which uses the decay rate of the caesium to return numbers). This is naturally occurring and can't be predicted.

查看更多
成全新的幸福
3楼-- · 2020-02-24 12:42

It's like the difference between AES and ROT13.

To be less flippant, there is generally a tradeoff when generating random numbers between how hard it is and how predictable the next one in the sequence is once you've seen a few. A random number returned by your language's built-in rand() will usually be of the cheap, predictable variety.

查看更多
Root(大扎)
4楼-- · 2020-02-24 12:43

No computationally feasible algorithm should:

  • recover the seed, or
  • predict the "next bit"

for a secure random number generator.

Example: a linear feedback shift register produces lots of random numbers out there, but given enough output, the seed can be discovered and all subsequent numbers predicted.

查看更多
forever°为你锁心
5楼-- · 2020-02-24 12:45

With just a "random number" one usually means a pseudo random number. Because it's a pseudo random number it can be (easily) predicted by an attacker.

A secure random number is a random number from a truly random data source, ie. involving an entropy pool of some sorts.

查看更多
再贱就再见
6楼-- · 2020-02-24 12:48

It probably depends on the context, but when you are comparing them like this, I'd say "random number" is a pseduo random number and a "secure random number" is truly random. The former gives you a number based on a seed and an algorithm, the other on some inherintly random function.

查看更多
成全新的幸福
7楼-- · 2020-02-24 12:55

Agree with Purfiedeas. There is also nice article about that, called Cheat Online Poker

查看更多
登录 后发表回答