什么是/dev/arandom? [英] What is /dev/arandom?

查看:116
本文介绍了什么是/dev/arandom?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

手册页表示:

注意:从PHP 5.4.0 session开始.entropy_file默认为/dev/urandom/dev/arandom(如果可用).在PHP 5.3.0中 指令默认为空.

Note: As of PHP 5.4.0 session.entropy_file defaults to /dev/urandom or /dev/arandom if it is available. In PHP 5.3.0 this directive is left empty by default.

那么,/dev/arandom是什么,它与/dev/[u]random有何不同?

So, what's /dev/arandom and how does it differ from /dev/[u]random?

推荐答案

来自这里.看来arandom将保证在返回请求的数据量之前存在足够的熵.它似乎也仅限于OpenBSD实现.不管是否有足够的熵,urandom都将返回请求的数据量-很显然,如果没有足够的熵,这可能会引入漏洞.

From here. It appears as though arandom will guarantee that sufficient entropy is present before returning the amount of data requested. It also appears to be limited to OpenBSD implementations. urandom will return the amount of data requested no matter whether there is enough entropy -- which obviously could introduce a vulnerability if there is not enough.

这篇关于什么是/dev/arandom?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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