在gpg中--key-gen
发生了以下错误。
Not enough random bytes available.
Please do some other work to give the OS a chance to collect more
entropy!
(Need 300 more bytes)
怎么了?
我在我的raspberry pis硬件随机数生成器上运行了Dieharder测试套件,它返回如下:
root@raspberrypi:/home/pi# dieharder -a -g 201 -f /dev/hwrng
#=============================================================================#
# dieharder version 3.31.1 Copyright 2003 Robert G. Brown #
#====
由于某些原因,以下代码中的执行时间增加了大约(10:1) (4min vs 40min): def E_site(lattice, i, j):
N = len(lattice)
Nb = lattice[(i+1)%N,j] + lattice[(i-1)%N,j] + lattice[i,(j+1)%N] + lattice[i, (j-1)%N]
return -lattice[i, j]*Nb
def metropolis(lattice, T, Neq):
for n in range(Neq):
N = len(lattice)
苹果的最新安全文件表示,它现在使用CTR_DRBG来生成伪随机数(以前是Yarrow而不是CTR_DRBG),使用“启动时的定时变化”和“启动后中断计时”作为种子。默认情况下,对iOS API SecRandomCopyBytes的调用将从/dev/随机检索随机字节。苹果的随机(4)手册页似乎暗示他们的/dev/随机是非阻塞的,但不知何故,它不需要阻塞来确保新的熵字节:
/dev/urandom与Linux兼容。在Linux上,如果熵池耗尽,/dev/urandom将产生更低质量的输出,而/dev/随机将更倾向于阻塞和等待收集额外的熵。对于Y罗,这种选择和区别是不必要的,这两种设备的行为是相同