linux -/dev/random 权限被拒绝

标签 linux random linux-kernel

<分区>

我正在阅读有关随机数及其生成的内容。自从我开始编程以来,我就对随机性很感兴趣。我读到 Linux 内核也使用随机数生成架构。

The structure consists of a two-level cascaded sequence of pools coupled with 
CSPRNGs.
Each pool is a large group of bits which represents the current state of the 
random number generator. The CSPRNGs are currently based on SHA-1, but the 
kernel developers are considering a switch to SHA-3.

The kernel RNG produces two user-space output streams. One of these goes to 
/dev/urandom and also to the kernel itself; the latter is useful because there 
are uses for random numbers within the kernel. The other output stream goes to
/dev/random. The difference between the two is that /dev/random tries to estimate
how much entropy is coming into the system, and will throttle its output if there 
is insufficient entropy. By contrast, the /dev/urandom stream does not throttle
output, and if users consume all of the available entropy, the interface degrades
to a pure CSPRNG.

因此,我满怀兴奋地尝试进入并检查/dev/random 和/dev/urandom 中有什么。但是它说,

root@ubuntu:/home/sunny# /dev/random
bash: /dev/random: Permission denied

root@ubuntu:/home/sunny# /dev/urandom
bash: /dev/urandom: Permission denied

但是,当我使用“ls”命令检查时,我可以在/dev 中看到“random”。 我想详细了解一下。

最佳答案

/dev/random 不是可执行文件。试试 cat/dev/random。或者,如果您不喜欢测试您的 react 能力,dd if=/dev/random bs=128 count=1 将显示有限数量的随机垃圾。

关于linux -/dev/random 权限被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13592855/

相关文章:

linux - 如何用逗号而不是空格分割列表

python - 我如何随机调用三个现有函数中的两个

c - 如何使用自己的函数覆盖系统调用表条目?

java - 使用 cgexec vs cgroup.procs 使用 cgroups 进行内存核算

linux - Linux 上的 DB2 Express

linux - Bash shell 参数传递...?

linux - 我的 linux suse 13.6.2 缺少一个目录

c++ - C++11 PRNG 能否用于产生可重复的结果?

java - JDK 1.7 安全随机生成器播种和不可预测性

linux - 当中断处理程序被另一个中断中断时,中断上下文 "restored"是怎样的?