Solaris 开发/随机

发布于 2024-09-11 19:55:20 字数 121 浏览 4 评论 0原文

你好,

哪种算法实现了 Solaris 的 dev/random?是 Yarrow-160 还是 Yarrow-256 还是算法与 Linux 中的相同?有文档/链接吗?我已经找了很多了,但还是没找到。提前致谢。

Hallo,

Which algorithm implements dev/random of Solaris? Is taht Yarrow-160 or Yarrow-256 or is the algorithm the same as in Linux? Is there documentation / link ? I have already looked a lot, but I couldn't find it. Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

全部不再 2024-09-18 19:55:20

也许 OpenSolaris 源代码,特别是 /src/uts/common/crypto/io/swrand.c,有一些线索:

/*
 * Software based random number provider for the Kernel Cryptographic
 * Framework (KCF). This provider periodically collects unpredictable input
 * from external sources and processes it into a pool of entropy (randomness)
 * in order to satisfy requests for random bits from kCF. It implements
 * software-based mixing, extraction, and generation algorithms.
 *
 * A history note: The software-based algorithms in this file used to be
 * part of the /dev/random driver.
 */

略读该文件:PRNG 从启动时使用高分辨率时间进行初始化,当前的 TOD 和物理内存状态和值是通过重复的 SHA1 散列和额外的熵池混合(yarrow 规范中的“搅动”)生成的。 SHA1 是 160 位。

该文件也具有相关性:

#define MINEXTRACTBITS      160 /* Min entropy level for extraction */

从该简要分析来看,Solaris 的 /dev/random 看起来像 Yarrow-160 实现。

Perhaps the OpenSolaris source, in particular /src/uts/common/crypto/io/swrand.c, has some clues:

/*
 * Software based random number provider for the Kernel Cryptographic
 * Framework (KCF). This provider periodically collects unpredictable input
 * from external sources and processes it into a pool of entropy (randomness)
 * in order to satisfy requests for random bits from kCF. It implements
 * software-based mixing, extraction, and generation algorithms.
 *
 * A history note: The software-based algorithms in this file used to be
 * part of the /dev/random driver.
 */

Skimming that file: the PRNG is initialized with high-res time from boot, the current TOD and physical memory state and values are generated from repeated SHA1 hashing with additional entropy pool mixing ("churning" in the yarrow specification). SHA1 is 160 bit.

Also of relevance from that file:

#define MINEXTRACTBITS      160 /* Min entropy level for extraction */

From that brief analysis Solaris' /dev/random looks like a Yarrow-160 implementation.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文