/dev/random を調べる機会が発生。
むかーし FreeBSD で rndcontrol なぞ設定したなと思いつつ。
FreeBSD だと Yarrow, その後の Fortuna(しばらく使ってなかったから Fortuna 知らなかったよ・・・)なんだけども、Linux だとこのへんどうなっているのかさっぱりわからず。
で冒頭の wikipedia です
https://en.wikipedia.org/wiki//dev/random
この辺見てればいいと思う。
It is also possible to write to /dev/random. This allows any user to mix random data into the pool. Non-random data is harmless, because only a privileged user can issue the ioctl needed to increase the entropy estimate. The current amount of entropy and the size of the Linux kernel entropy pool, both measured in bits, are available in /proc/sys/kernel/random/ and can be displayed by the command cat /proc/sys/kernel/random/entropy_avail and cat /proc/sys/kernel/random/poolsize respectively.
(snip)
The Linux kernel provides support for several hardware random number generators, should they be installed. The raw output of such a device may be obtained from /dev/hwrng.[8]
With Linux kernel 3.16 and newer,[9] the kernel itself mixes data from hardware random number generators into /dev/random on a sliding scale based on the definable entropy estimation quality of the HWRNG. This means that no userspace daemon, such as rngd from rng-tools, is needed to do that job. With Linux kernel 3.17+, the VirtIO RNG was modified to have a default quality defined above 0,[10] and as such, is currently the only HWRNG mixed into /dev/random by default.
The entropy pool can be improved by programs like timer_entropyd, haveged, randomsound etc. With rng-tools, hardware random number generators like Entropy Key, etc. can write to /dev/random. The programs dieharder, diehard and ent can test these random number generators.
(snip)
In October 2016 with the release of Linux kernel version 4.8 and newer, /dev/urandom was switched over to a ChaCha20-based implementation[16] by Theodore Ts'o, based on Bernstein's well-regarded stream cipher ChaCha20.
ChaCha20 とやらが出てきて DJB 先生の名を再び目にする、と。
ところで 暗号周り、それなりに「あっあれね」と理解できるにはなにが必要なんだろうな。
「40からはじめる暗号」とか「暗号の前に!この数学」みたいな何かあるといいのだけど。
0 件のコメント:
コメントを投稿