高熵随机数据创建函数?
High entropy random data creating functions?
是否有产生 "infinite" 大量高熵数据的函数?此外,是否存在一次又一次地(顺序地)产生相同随机数据的函数?
我有点知道它们的存在,但它们有具体的名称吗?
用例示例:
- 使用函数生成100位随机数据。 (太棒了!)但同时保持高熵值。
- 使用相同的函数生成10000位随机数据。 (生成的前100位与之前生成的随机数据的100位相同)。同时仍然保持高熵值
此外,我将如何自己构建这些功能?
您最有可能在寻找 Pseudo-Random Number Generators。
- 它们由种子初始化,因此吸收的熵是有限的。
好的生成器有一个不错的熵出来,假设你只从它的输出来判断它(因此你忽略种子 and/or 算法来生成数字,否则熵很明显0).
Most PRNG algorithms produce sequences which are uniformly distributed by any of several tests. It is an open question, and one central to the theory and practice of cryptography, whether there is any way to distinguish the output of a high-quality PRNG from a truly random sequence without knowing the algorithm(s) used and the state with which it was initialized.
所有 PRNG 都有一个句点,之后生成的序列将重新开始。
The period of a PRNG is defined thus: the maximum, over all starting states, of the length of the repetition-free prefix of the sequence. The period is bounded by the number of the states, usually measured in bits. However, since the length of the period potentially doubles with each bit of "state" added, it is easy to build PRNGs with periods long enough for many practical applications.
因此,要有两个不同长度的序列,其中一个是另一个的前缀,您只需要 运行 两次具有相同种子的 PRNG。
自己构建它们会非常棘手,但是 Mersenne Twister, which dates back to only 1998 and defined in a paper by Matsumoto and Nishimura [1].
一个简单的例子是 linear congruential generator。
[1] 松本,M.; Nishimura, T. (1998)。 "Mersenne twister: a 623-dimensionally equidistributed uniform pseudo-random number generator"。 ACM 建模和计算机仿真交易 8 (1):3–30。 doi:10.1145/272991.272995.
是否有产生 "infinite" 大量高熵数据的函数?此外,是否存在一次又一次地(顺序地)产生相同随机数据的函数?
我有点知道它们的存在,但它们有具体的名称吗?
用例示例:
- 使用函数生成100位随机数据。 (太棒了!)但同时保持高熵值。
- 使用相同的函数生成10000位随机数据。 (生成的前100位与之前生成的随机数据的100位相同)。同时仍然保持高熵值
此外,我将如何自己构建这些功能?
您最有可能在寻找 Pseudo-Random Number Generators。
- 它们由种子初始化,因此吸收的熵是有限的。
好的生成器有一个不错的熵出来,假设你只从它的输出来判断它(因此你忽略种子 and/or 算法来生成数字,否则熵很明显0).
Most PRNG algorithms produce sequences which are uniformly distributed by any of several tests. It is an open question, and one central to the theory and practice of cryptography, whether there is any way to distinguish the output of a high-quality PRNG from a truly random sequence without knowing the algorithm(s) used and the state with which it was initialized.
所有 PRNG 都有一个句点,之后生成的序列将重新开始。
The period of a PRNG is defined thus: the maximum, over all starting states, of the length of the repetition-free prefix of the sequence. The period is bounded by the number of the states, usually measured in bits. However, since the length of the period potentially doubles with each bit of "state" added, it is easy to build PRNGs with periods long enough for many practical applications.
因此,要有两个不同长度的序列,其中一个是另一个的前缀,您只需要 运行 两次具有相同种子的 PRNG。
自己构建它们会非常棘手,但是 Mersenne Twister, which dates back to only 1998 and defined in a paper by Matsumoto and Nishimura [1].
一个简单的例子是 linear congruential generator。
[1] 松本,M.; Nishimura, T. (1998)。 "Mersenne twister: a 623-dimensionally equidistributed uniform pseudo-random number generator"。 ACM 建模和计算机仿真交易 8 (1):3–30。 doi:10.1145/272991.272995.