タグ

linuxに関するharukasanのブックマーク (2)

  • Install | NGINX

    Site functionality and performance. These cookies are required for NGINX site functionality and are therefore always enabled. They contain no identifiable information. Social media and advertising. Cookies that help connect to social networks, and advertising cookies (of third parties) to help better tailor NGINX advertising to your interests

  • /dev/random の秘密 - あどけない話

    たとえば SSH や PGP の鍵対を生成するときには、当の乱数が必要になる。疑似乱数ではダメだ。Unix 上で乱数を生成してくれるデバイスとしては、/dev/ramdom がある。/dev/ramdom には、真性乱数が蓄えられていて、read システムコールで必要なバイト数だけ読み込むことができる。 /dev/ramdom が真性乱数を生成する方法は、実に単純だ。ハードウェア割り込みの間隔を測るのである。今の間隔が直前の間隔よりも短ければ 1 を、長ければ 0 を真性乱数として蓄える(0 と 1 の割り当ては逆かもしれない)。つまり割り込みが、時刻 t1、t2、t3 に起こったとすると、t2 - t1 と t3 - t2 を比較するということだ。 /dev/ramdom は、ブロックデバイスなので、必要な量の真性乱数がなければ、read システムコールはブロックする。このブロックをで

    /dev/random の秘密 - あどけない話
  • 1