什么是/dev/arandom? [英] What is /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屋!