⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 warning.rng

📁 OpenSSL Source code for SFTP, SSH, and many others
💻 RNG
字号:
This document contains a description of portable OpenSSH's randomnumber collection code. An alternate reading of this text couldwell be titled "Why I should pressure my system vendor to supply/dev/random in their OS".Why is this important? OpenSSH depends on good, unpredictable numbersfor generating keys, performing digital signatures and formingcryptographic challenges. If the random numbers that it uses arepredictable, then the strength of the whole system is compromised.A particularly pernicious problem arises with DSA keys (used by thessh2 protocol). Performing a DSA signature (which is required forauthentication), entails the use of a 160 bit random number.  If anattacker can predict this number, then they can deduce your *private*key and impersonate you or your hosts.If you are using the builtin random number support (configure willtell you if this is the case), then read this document in its entirety.Alternately, you can use Lutz Jaenicke's PRNGd - a small daemon whichcollects random numbers and makes them available by a socket.Please also request that your OS vendor provides a kernel-based randomnumber collector (/dev/random) in future versions of your operatingsystems by default.On to the description...The portable OpenSSH contains random number collection support forsystems which lack a kernel entropy pool (/dev/random).This collector (as of 3.1 and beyond) comes as an external applicationthat allows the local admin to decide on how to implement entropycollection.The default entropy collector operates by executing the programs listedin ($etcdir)/ssh_prng_cmds, reading their output and adding it to thePRNG supplied by OpenSSL (which is hash-based). It also stirs in theoutput of several system calls and timings from the execution of theprograms that it runs.The ssh_prng_cmds file also specifies a 'rate' for each program. Thisrepresents the number of bits of randomness per byte of output fromthe specified program.The random number code will also read and save a seed file to~/.ssh/prng_seed. This contents of this file are added to the randomnumber generator at startup. The goal here is to maintain as much randomness between sessions as possible.The default entropy collection code has two main problems:1. It is slow.Executing each program in the list can take a large amount of time,   especially on slower machines. Additionally some program can take a   disproportionate time to execute.                                     Tuning the default entropy collection code is difficult at this point.It requires doing 'times ./ssh-rand-helper'  and modifying the($etcdir)/ssh_prng_cmds until you have found the issue.  In the nextrelease we will be looking at support '-v' for verbose output to alloweasier debugging.The default entropy collector will timeout programs which take too longto execute, the actual timeout used can be adjusted with the--with-entropy-timeout configure option. OpenSSH will not try tore-execute programs which have not been found, have had a non-zeroexit status or have timed out more than a couple of times.2. Estimating the real 'rate' of program outputs is non-trivialThe shear volume of the task is problematic: there are currentlyaround 50 commands in the ssh_prng_cmds list, portable OpenSSHsupports at least 12 different OSs. That is already 600 sets of datato be analysed, without taking into account the numerous differencesbetween versions of each OS.On top of this, the different commands can produce varying amounts ofusable data depending on how busy the machine is, how long it has beenup and various other factors.To make matters even more complex, some of the commands are reportinglargely the same data as other commands (eg. the various "ps" calls).How to avoid the default entropy code?The best way is to read the OpenSSL documentation and recompile OpenSSLto use prngd or egd.  Some platforms (like earily solaris) have 3rdparty /dev/random devices that can be also used for this task.If you are forced to use ssh-rand-helper consider still downloadingprngd/egd and configure OpenSSH using --with-prngd-port=xx or--with-prngd-socket=xx (refer to INSTALL for more information).$Id: WARNING.RNG,v 1.5 2002/04/14 13:16:05 djm Exp $

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -