高熵随机数据创建功能? [英] High entropy random data creating functions?

查看:88
本文介绍了高熵随机数据创建功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否存在产生无限"数量的高熵数据的函数?而且,是否存在可以一次又一次地产生相同随机数据的函数?

Are there functions which produce "infinite" amounts of high entropy data? Moreover, do functions exist which produce the same random data (sequentially) time after time?

我有点知道它们存在,但是它们有一个特定的名称吗?

I kind of know that they exist, but do they have a specific name?

用例示例:

  • 使用该函数生成100位随机数据​​. (太好了!)但是要保持较高的熵值.
  • 使用相同的函数来生成10000位随机数据​​. (生成的前100位与之前生成的100位随机数据​​相同).而且仍然保持较高的熵值

此外,我将如何自己构建这些功能?

Further, how would I go about building these functions myself?

推荐答案

您最有可能在寻找伪-随机数生成器.

  • 它们是由种子初始化的,因此吸收了有限的熵.
  • 好的生成器具有不错的熵,假设您仅从其输出中进行判断(因此您忽略了种子和/或生成数字的算法,否则熵显然为0).

  • They are initialized by a seed, thus taking in a finite amount of entropy.
  • Good generators have a decent entropy coming out, supposing you judge it only from its output (thus you ignore the seed and/or the algorithm to generate the numbers, otherwise the entropy is obviously 0).

大多数PRNG算法产生的序列可以通过多个测试中的任何一个均匀地分布.对于密码学的理论和实践,这是一个悬而未决的问题,也是一个中心问题,在不知道所使用的算法和状态的情况下,是否有任何方法可以将高质量PRNG的输出与真正的随机序列区分开来.它已初始化.

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都有一个句点,在此之后,生成的序列将重新启动.

  • All PRNGs have a period, after which a generated sequence will restart.

    PRNG的周期定义为:在所有起始状态下,序列的无重复前缀长度的最大值.周期受状态数的限制,通常以位为单位.但是,由于周期的长度可能会随着状态"的每一位而加倍,因此很容易构建具有足够许多实际应用的周期的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.

    Thus, to have two sequences of different lengths where one is the prefix of the other, you just have to run a PRNG with the same seed both times.

    自己构建它们会很棘手,但是一个很好而简单的方法是 Merenne Twister ,最早可以追溯到1998年,并在由Matsumoto和Nishimura撰写的论文中[1] .

    Building them yourself would be pretty tricky, but a rather good and simple one is the Mersenne Twister, which dates back to only 1998 and defined in a paper by Matsumoto and Nishimura [1].

    一个简单的例子是线性同余生成器.

    [1] M. Matsumoto; Nishimura,T.(1998). 梅森捻线器:一个623维均匀分布的均匀伪随机数生成器".关于建模和计算机仿真的ACM事务8(1):3–30. doi: 10.1145/272991.272995 .

    [1] Matsumoto, M.; Nishimura, T. (1998). "Mersenne twister: a 623-dimensionally equidistributed uniform pseudo-random number generator". ACM Transactions on Modeling and Computer Simulation 8 (1): 3–30. doi:10.1145/272991.272995.

    这篇关于高熵随机数据创建功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆