idnits 2.17.00 (12 Aug 2021) /tmp/idnits47175/draft-eastlake-randomness2-06.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** It looks like you're using RFC 3978 boilerplate. You should update this to the boilerplate described in the IETF Trust License Policy document (see https://trustee.ietf.org/license-info), which is required now. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 1557. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 1564. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 1570. ** The document claims conformance with section 10 of RFC 2026, but uses some RFC 3978/3979 boilerplate. As RFC 3978/3979 replaces section 10 of RFC 2026, you should not claim conformance with it if you have changed to using RFC 3978/3979 boilerplate. ** The document seems to lack an RFC 3978 Section 5.1 IPR Disclosure Acknowledgement. ** The document seems to lack an RFC 3978 Section 5.4 (updated by RFC 4748) Copyright Line. ** The document seems to lack an RFC 3978 Section 5.4 Reference to BCP 78. ** The document seems to lack an RFC 3978 Section 5.5 (updated by RFC 4748) Disclaimer. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** Missing document type: Expected "INTERNET-DRAFT" in the upper left hand corner of the first page ** The document seems to lack a 1id_guidelines paragraph about Internet-Drafts being working documents. == No 'Intended status' indicated for this document; assuming Proposed Standard Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) ** There is 1 instance of too long lines in the document, the longest one being 1 character in excess of 72. Miscellaneous warnings: ---------------------------------------------------------------------------- == The "Author's Address" (or "Authors' Addresses") section title is misspelled. == Line 794 has weird spacing: '...ity, it provi...' -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (April 2004) is 6609 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'SHA1' is mentioned on line 1317, but not defined == Unused Reference: 'DNSSEC' is defined on line 1631, but no explicit reference was found in the text == Unused Reference: 'IPSEC' is defined on line 1655, but no explicit reference was found in the text == Unused Reference: 'MAIL PGP' is defined on line 1687, but no explicit reference was found in the text == Unused Reference: 'SBOX1' is defined on line 1734, but no explicit reference was found in the text == Unused Reference: 'SBOX2' is defined on line 1737, but no explicit reference was found in the text == Unused Reference: 'SHIFT1' is defined on line 1747, but no explicit reference was found in the text == Unused Reference: 'SHIFT2' is defined on line 1750, but no explicit reference was found in the text == Unused Reference: 'SHA-2' is defined on line 1758, but no explicit reference was found in the text == Unused Reference: 'SSH' is defined on line 1762, but no explicit reference was found in the text == Unused Reference: 'TLS' is defined on line 1767, but no explicit reference was found in the text -- Obsolete informational reference (is this intentional?): RFC 2535 (ref. 'DNSSEC') (Obsoleted by RFC 4033, RFC 4034, RFC 4035) -- Obsolete informational reference (is this intentional?): RFC 2401 (ref. 'IPSEC') (Obsoleted by RFC 4301) -- Obsolete informational reference (is this intentional?): RFC 1320 (ref. 'MD4') (Obsoleted by RFC 6150) -- No information found for draft-orman-public-key-lengths- - is the name correct? -- Obsolete informational reference (is this intentional?): RFC 1750 (Obsoleted by RFC 4086) -- No information found for draft-ietf-secsh- - is the name correct? -- Obsolete informational reference (is this intentional?): RFC 2246 (ref. 'TLS') (Obsoleted by RFC 4346) Summary: 10 errors (**), 0 flaws (~~), 14 warnings (==), 12 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group Donald E. Eastlake, 3rd 3 OBSOLETES RFC 1750 Jeffrey I. Schiller 4 Steve Crocker 5 Expires October 2004 April 2004 7 Randomness Requirements for Security 8 ---------- ------------ --- -------- 9 11 Status of This Document 13 This document is intended to become a Best Current Practice. 14 Comments should be sent to the authors. Distribution is unlimited. 16 This document is an Internet-Draft and is in full conformance with 17 all provisions of Section 10 of RFC 2026. Internet-Drafts are 18 working documents of the Internet Engineering Task Force (IETF), its 19 areas, and its working groups. Note that other groups may also 20 distribute working documents as Internet-Drafts. 22 Internet-Drafts are draft documents valid for a maximum of six months 23 and may be updated, replaced, or obsoleted by other documents at any 24 time. It is inappropriate to use Internet-Drafts as reference 25 material or to cite them other than as "work in progress." The list 26 of current Internet-Drafts can be accessed at 27 http://www.ietf.org/ietf/1id-abstracts.txt The list of Internet-Draft 28 Shadow Directories can be accessed at 29 http://www.ietf.org/shadow.html. 31 Abstract 33 Security systems are built on strong cryptographic algorithms that 34 foil pattern analysis attempts. However, the security of these 35 systems is dependent on generating secret quantities for passwords, 36 cryptographic keys, and similar quantities. The use of pseudo-random 37 processes to generate secret quantities can result in pseudo- 38 security. The sophisticated attacker of these security systems may 39 find it easier to reproduce the environment that produced the secret 40 quantities, searching the resulting small set of possibilities, than 41 to locate the quantities in the whole of the potential number space. 43 Choosing random quantities to foil a resourceful and motivated 44 adversary is surprisingly difficult. This document points out many 45 pitfalls in using traditional pseudo-random number generation 46 techniques for choosing such quantities. It recommends the use of 47 truly random hardware techniques and shows that the existing hardware 48 on many systems can be used for this purpose. It provides suggestions 49 to ameliorate the problem when a hardware solution is not available. 50 And it gives examples of how large such quantities need to be for 51 some applications. 53 Acknowledgements 55 Special thanks to Peter Gutmann who has permitted the incorporation 56 of material from his paper "Software Generation of Practically Strong 57 Random Numbers". 59 The following other persons (in alphabetic order) contributed 60 substantially to this document: 62 Tony Hansen, Sandy Harris, Paul Hoffman, Russ Housley 64 The following persons (in alphabetic order) contributed to RFC 1750, 65 the predecessor of this document: 67 David M. Balenson, Don T. Davis, Carl Ellison, Marc Horowitz, 68 Christian Huitema, Charlie Kaufman, Steve Kent, Hal Murray, Neil 69 Haller, Richard Pitkin, Tim Redmond, and Doug Tygar. 71 Table of Contents 73 Status of This Document....................................1 74 Abstract...................................................1 76 Acknowledgements...........................................2 78 Table of Contents..........................................3 80 1. Introduction............................................5 82 2. General Requirements....................................6 84 3. Traditional Pseudo-Random Sequences.....................8 86 4. Unpredictability.......................................10 87 4.1 Problems with Clocks and Serial Numbers...............10 88 4.2 Timing and Content of External Events.................11 89 4.3 The Fallacy of Complex Manipulation...................11 90 4.4 The Fallacy of Selection from a Large Database........12 92 5. Hardware for Randomness................................13 93 5.1 Volume Required.......................................13 94 5.2 Sensitivity to Skew...................................13 95 5.2.1 Using Stream Parity to De-Skew......................14 96 5.2.2 Using Transition Mappings to De-Skew................15 97 5.2.3 Using FFT to De-Skew................................16 98 5.2.4 Using Compression to De-Skew........................16 99 5.3 Existing Hardware Can Be Used For Randomness..........17 100 5.3.1 Using Existing Sound/Video Input....................17 101 5.3.2 Using Existing Disk Drives..........................17 102 5.4 Ring Oscillator Sources...............................18 104 6. Recommended Software Strategy..........................19 105 6.1 Mixing Functions......................................19 106 6.1.1 A Trivial Mixing Function...........................19 107 6.1.2 Stronger Mixing Functions...........................20 108 6.1.3 Diffie-Hellman as a Mixing Function.................22 109 6.1.4 Using a Mixing Function to Stretch Random Bits......22 110 6.1.5 Other Factors in Choosing a Mixing Function.........23 111 6.2 Non-Hardware Sources of Randomness....................23 112 6.3 Cryptographically Strong Sequences....................24 113 6.3.1 Traditional Strong Sequences........................25 114 6.3.2 The Blum Blum Shub Sequence Generator...............26 115 6.3.3 Entropy Pool Techniques.............................27 117 7. Key Generation Standards and Examples..................28 118 7.1 US DoD Recommendations for Password Generation........28 119 7.2 X9.17 Key Generation..................................28 120 7.3 DSS Pseudo-Random Number Generation...................29 121 7.4 X9.82 Pseudo-Random Number Generation.................30 122 7.5 The /dev/random Device................................30 124 8. Examples of Randomness Required........................32 125 8.1 Password Generation..................................32 126 8.2 A Very High Security Cryptographic Key................33 127 8.2.1 Effort per Key Trial................................33 128 8.2.2 Meet in the Middle Attacks..........................34 129 8.2.3 Other Considerations................................35 131 9. Conclusion.............................................36 133 10. Security Considerations...............................37 134 11. Intellectual Property Considerations..................37 136 12. Appendix A: Changes from RFC 1750.....................38 138 13. Informative References................................39 140 Authors Addresses.........................................43 141 File Name and Expiration..................................43 143 1. Introduction 145 Software cryptography is coming into wider use and is continuing to 146 spread, although there is a long way to go until it becomes 147 pervasive. 149 Systems like SSH, IPSEC, TLS, S/MIME, PGP, DNSSEC, Kerberos, etc. are 150 maturing and becoming a part of the network landscape [SSH, IPSEC, 151 MAIL*, TLS, DNSSEC]. By comparison, when the previous version of this 152 document [RFC 1750] was issued in 1994, about the only Internet 153 cryptographic security specification in the IETF was the Privacy 154 Enhanced Mail protocol [MAIL PEM]. 156 These systems provide substantial protection against snooping and 157 spoofing. However, there is a potential flaw. At the heart of all 158 cryptographic systems is the generation of secret, unguessable (i.e., 159 random) numbers. 161 The lack of generally available facilities for generating such 162 unpredictable numbers is an open wound in the design of cryptographic 163 software. For the software developer who wants to build a key or 164 password generation procedure that runs on a wide range of hardware, 165 the only safe strategy so far has been to force the local 166 installation to supply a suitable routine to generate random numbers. 167 This is an awkward, error-prone and unpalatable solution. 169 It is important to keep in mind that the requirement is for data that 170 an adversary has a very low probability of guessing or determining. 171 This can easily fail if pseudo-random data is used which only meets 172 traditional statistical tests for randomness or which is based on 173 limited range sources, such as clocks. Frequently such random 174 quantities are determinable by an adversary searching through an 175 embarrassingly small space of possibilities. 177 This Best Current Practice describes techniques for producing random 178 quantities that will be resistant to such attack. It recommends that 179 future systems include hardware random number generation or provide 180 access to existing hardware that can be used for this purpose. It 181 suggests methods for use if such hardware is not available. And it 182 gives some estimates of the number of random bits required for sample 183 applications. 185 2. General Requirements 187 A commonly encountered randomness requirement today is the user 188 password. This is usually a simple character string. Obviously, if a 189 password can be guessed, it does not provide security. (For re-usable 190 passwords, it is desirable that users be able to remember the 191 password. This may make it advisable to use pronounceable character 192 strings or phrases composed on ordinary words. But this only affects 193 the format of the password information, not the requirement that the 194 password be very hard to guess.) 196 Many other requirements come from the cryptographic arena. 197 Cryptographic techniques can be used to provide a variety of services 198 including confidentiality and authentication. Such services are based 199 on quantities, traditionally called "keys", that are unknown to and 200 unguessable by an adversary. 202 In some cases, such as the use of symmetric encryption with the one 203 time pads or the US Data Encryption Standard [DES] or Advanced 204 Encryption Standard [AES], the parties who wish to communicate 205 confidentially and/or with authentication must all know the same 206 secret key. In other cases, using what are called asymmetric or 207 "public key" cryptographic techniques, keys come in pairs. One key of 208 the pair is private and must be kept secret by one party, the other 209 is public and can be published to the world. It is computationally 210 infeasible to determine the private key from the public key and 211 knowledge of the public is of no help to an adversary [ASYMMETRIC]. 212 [SCHNEIER, FERGUSON, KAUFMAN] 214 The frequency and volume of the requirement for random quantities 215 differs greatly for different cryptographic systems. Using pure RSA, 216 random quantities are required only when a new key pair is generated; 217 thereafter any number of messages can be signed without a further 218 need for randomness. The public key Digital Signature Algorithm 219 devised by the US National Institute of Standards and Technology 220 (NIST) requires good random numbers for each signature [DSS]. And 221 encrypting with a one time pad, in principle the strongest possible 222 encryption technique, requires a volume of randomness equal to all 223 the messages to be processed. [SCHNEIER, FERGUSON, KAUFMAN] 225 In most of these cases, an adversary can try to determine the 226 "secret" key by trial and error. (This is possible as long as the key 227 is enough smaller than the message that the correct key can be 228 uniquely identified.) The probability of an adversary succeeding at 229 this must be made acceptably low, depending on the particular 230 application. The size of the space the adversary must search is 231 related to the amount of key "information" present in the information 232 theoretic sense [SHANNON]. This depends on the number of different 233 secret values possible and the probability of each value as follows: 235 ----- 236 \ 237 Bits-of-information = \ - p * log ( p ) 238 / i 2 i 239 / 240 ----- 242 where i counts from 1 to the number of possible secret values and p 243 sub i is the probability of the value numbered i. (Since p sub i is 244 less than one, the log will be negative so each term in the sum will 245 be non-negative.) 247 If there are 2^n different values of equal probability, then n bits 248 of information are present and an adversary would, on the average, 249 have to try half of the values, or 2^(n-1) , before guessing the 250 secret quantity. If the probability of different values is unequal, 251 then there is less information present and fewer guesses will, on 252 average, be required by an adversary. In particular, any values that 253 the adversary can know are impossible, or are of low probability, can 254 be initially ignored by an adversary, who will search through the 255 more probable values first. 257 For example, consider a cryptographic system that uses 128 bit keys. 258 If these 128 bit keys are derived by using a fixed pseudo-random 259 number generator that is seeded with an 8 bit seed, then an adversary 260 needs to search through only 256 keys (by running the pseudo-random 261 number generator with every possible seed), not the 2^128 keys that 262 may at first appear to be the case. Only 8 bits of "information" are 263 in these 128 bit keys. 265 3. Traditional Pseudo-Random Sequences 267 Most traditional sources of random numbers use deterministic sources 268 of "pseudo-random" numbers. These typically start with a "seed" 269 quantity and use numeric or logical operations to produce a sequence 270 of values. 272 [KNUTH] has a classic exposition on pseudo-random numbers. 273 Applications he mentions are simulation of natural phenomena, 274 sampling, numerical analysis, testing computer programs, decision 275 making, and games. None of these have the same characteristics as the 276 sort of security uses we are talking about. Only in the last two 277 could there be an adversary trying to find the random quantity. 278 However, in these cases, the adversary normally has only a single 279 chance to use a guessed value. In guessing passwords or attempting to 280 break an encryption scheme, the adversary normally has many, perhaps 281 unlimited, chances at guessing the correct value. They can store the 282 message they are trying to break and repeatedly attack it. They are 283 also be assumed to be aided by a computer. 285 For testing the "randomness" of numbers, Knuth suggests a variety of 286 measures including statistical and spectral. These tests check things 287 like autocorrelation between different parts of a "random" sequence 288 or distribution of its values. But they could be met by a constant 289 stored random sequence, such as the "random" sequence printed in the 290 CRC Standard Mathematical Tables [CRC]. Despite meeting all the tests 291 suggested by Knuth, that sequence is unsuitable for cryptographic use 292 as adversaries must be assumed to have copies of all common published 293 "random" sequences and will able to spot the source and predict 294 future values. 296 A typical pseudo-random number generation technique, known as a 297 linear congruence pseudo-random number generator, is modular 298 arithmetic where the value numbered N+1 is calculated from the value 299 numbered N by 301 V = ( V * a + b )(Mod c) 302 N+1 N 304 The above technique has a strong relationship to linear shift 305 register pseudo-random number generators, which are well understood 306 cryptographically [SHIFT*]. In such generators bits are introduced at 307 one end of a shift register as the Exclusive Or (binary sum without 308 carry) of bits from selected fixed taps into the register. For 309 example: 311 +----+ +----+ +----+ +----+ 312 | B | <-- | B | <-- | B | <-- . . . . . . <-- | B | <-+ 313 | 0 | | 1 | | 2 | | n | | 314 +----+ +----+ +----+ +----+ | 315 | | | | 316 | | V +-----+ 317 | V +----------------> | | 318 V +-----------------------------> | XOR | 319 +---------------------------------------------------> | | 320 +-----+ 322 V = ( ( V * 2 ) + B .xor. B ... )(Mod 2^n) 323 N+1 N 0 2 325 The goodness of traditional pseudo-random number generator algorithms 326 is measured by statistical tests on such sequences. Carefully chosen 327 values a, b, c, and initial V or the placement of shift register tap 328 in the above simple processes can produce excellent statistics. 330 These sequences may be adequate in simulations (Monte Carlo 331 experiments) as long as the sequence is orthogonal to the structure 332 of the space being explored. Even there, subtle patterns may cause 333 problems. However, such sequences are clearly bad for use in security 334 applications. They are fully predictable if the initial state is 335 known. Depending on the form of the pseudo-random number generator, 336 the sequence may be determinable from observation of a short portion 337 of the sequence [SCHNEIER, STERN]. For example, with the generators 338 above, one can determine V(n+1) given knowledge of V(n). In fact, it 339 has been shown that with these techniques, even if only one bit of 340 the pseudo-random values are released, the seed can be determined 341 from short sequences. 343 Not only have linear congruent generators been broken, but techniques 344 are now known for breaking all polynomial congruent generators. 345 [KRAWCZYK] 347 4. Unpredictability 349 Statistically tested randomness in the traditional sense described in 350 section 3 is NOT the same as the unpredictability required for 351 security use. 353 For example, use of a widely available constant sequence, such as 354 that from the CRC tables, is very weak against an adversary. Once 355 they learn of or guess it, they can easily break all security, future 356 and past, based on the sequence. [CRC] Yet the statistical properties 357 of these tables are good. 359 The following sections describe the limitations of some randomness 360 generation techniques and sources. 362 4.1 Problems with Clocks and Serial Numbers 364 Computer clocks, or similar operating system or hardware values, 365 provide significantly fewer real bits of unpredictability than might 366 appear from their specifications. 368 Tests have been done on clocks on numerous systems and it was found 369 that their behavior can vary widely and in unexpected ways. One 370 version of an operating system running on one set of hardware may 371 actually provide, say, microsecond resolution in a clock while a 372 different configuration of the "same" system may always provide the 373 same lower bits and only count in the upper bits at much lower 374 resolution. This means that successive reads on the clock may produce 375 identical values even if enough time has passed that the value 376 "should" change based on the nominal clock resolution. There are also 377 cases where frequently reading a clock can produce artificial 378 sequential values because of extra code that checks for the clock 379 being unchanged between two reads and increases it by one! Designing 380 portable application code to generate unpredictable numbers based on 381 such system clocks is particularly challenging because the system 382 designer does not always know the properties of the system clocks 383 that the code will execute on. 385 Use of hardware serial numbers such as an Ethernet addresses may also 386 provide fewer bits of uniqueness than one would guess. Such 387 quantities are usually heavily structured and subfields may have only 388 a limited range of possible values or values easily guessable based 389 on approximate date of manufacture or other data. For example, it is 390 likely that a company that manufactures both computers and Ethernet 391 adapters will, at least internally, use its own adapters, which 392 significantly limits the range of built-in addresses. 394 Problems such as those described above related to clocks and serial 395 numbers make code to produce unpredictable quantities difficult if 396 the code is to be ported across a variety of computer platforms and 397 systems. 399 4.2 Timing and Content of External Events 401 It is possible to measure the timing and content of mouse movement, 402 key strokes, and similar user events. This is a reasonable source of 403 unguessable data with some qualifications. On some machines, inputs 404 such as key strokes are buffered. Even though the user's inter- 405 keystroke timing may have sufficient variation and unpredictability, 406 there might not be an easy way to access that variation. Another 407 problem is that no standard method exists to sample timing details. 408 This makes it hard to build standard software intended for 409 distribution to a large range of machines based on this technique. 411 The amount of mouse movement or the keys actually hit are usually 412 easier to access than timings but may yield less unpredictability as 413 the user may provide highly repetitive input. 415 Other external events, such as network packet arrival times, can also 416 be used, with care. In particular, the possibility of manipulation of 417 such times by an adversary and the lack of history at system start up 418 must be considered. 420 4.3 The Fallacy of Complex Manipulation 422 One strategy which may give a misleading appearance of 423 unpredictability is to take a very complex algorithm (or an excellent 424 traditional pseudo-random number generator with good statistical 425 properties) and calculate a cryptographic key by starting with 426 limited data such as the computer system clock value as the seed. An 427 adversary who knew roughly when the generator was started would have 428 a relatively small number of seed values to test as they would know 429 likely values of the system clock. Large numbers of pseudo-random 430 bits could be generated but the search space an adversary would need 431 to check could be quite small. 433 Thus very strong and/or complex manipulation of data will not help if 434 the adversary can learn what the manipulation is and there is not 435 enough unpredictability in the starting seed value. They can usually 436 use the limited number of results stemming from a limited number of 437 seed values to defeat security. 439 Another serious strategy error is to assume that a very complex 440 pseudo-random number generation algorithm will produce strong random 441 numbers when there has been no theory behind or analysis of the 442 algorithm. There is a excellent example of this fallacy right near 443 the beginning of Chapter 3 in [KNUTH] where the author describes a 444 complex algorithm. It was intended that the machine language program 445 corresponding to the algorithm would be so complicated that a person 446 trying to read the code without comments wouldn't know what the 447 program was doing. Unfortunately, actual use of this algorithm showed 448 that it almost immediately converged to a single repeated value in 449 one case and a small cycle of values in another case. 451 Not only does complex manipulation not help you if you have a limited 452 range of seeds but blindly chosen complex manipulation can destroy 453 the randomness in a good seed! 455 4.4 The Fallacy of Selection from a Large Database 457 Another strategy that can give a misleading appearance of 458 unpredictability is selection of a quantity randomly from a database 459 and assume that its strength is related to the total number of bits 460 in the database. For example, typical USENET servers process many 461 megabytes of information per day [USENET]. Assume a random quantity 462 was selected by fetching 32 bytes of data from a random starting 463 point in this data. This does not yield 32*8 = 256 bits worth of 464 unguessability. Even after allowing that much of the data is human 465 language and probably has no more than 2 or 3 bits of information per 466 byte, it doesn't yield 32*2 = 64 bits of unguessability. For an 467 adversary with access to the same usenet database the unguessability 468 rests only on the starting point of the selection. That is perhaps a 469 little over a couple of dozen bits of unguessability. 471 The same argument applies to selecting sequences from the data on a 472 publicly available CD/DVD recording or any other large public 473 database. If the adversary has access to the same database, this 474 "selection from a large volume of data" step buys little. However, 475 if a selection can be made from data to which the adversary has no 476 access, such as system buffers on an active multi-user system, it may 477 be of help. 479 5. Hardware for Randomness 481 Is there any hope for true strong portable randomness in the future? 482 There might be. All that's needed is a physical source of 483 unpredictable numbers. 485 A thermal noise (sometimes called Johnson noise in integrated 486 circuits) or radioactive decay source and a fast, free-running 487 oscillator would do the trick directly [GIFFORD]. This is a trivial 488 amount of hardware, and could easily be included as a standard part 489 of a computer system's architecture. Furthermore, any system with a 490 spinning disk or ring oscillator and a stable (crystal) time source 491 or the like has an adequate source of randomness ([DAVIS] and Section 492 5.4). All that's needed is the common perception among computer 493 vendors that this small additional hardware and the software to 494 access it is necessary and useful. 496 5.1 Volume Required 498 How much unpredictability is needed? Is it possible to quantify the 499 requirement in, say, number of random bits per second? 501 The answer is not very much is needed. For AES, the key can be 128 502 bits and, as we show in an example in Section 8, even the highest 503 security system is unlikely to require strong keying material of much 504 over 200 bits. If a series of keys are needed, they can be generated 505 from a strong random seed (starting value) using a cryptographically 506 strong sequence as explained in Section 6.3. A few hundred random 507 bits generated at start up or once a day would be enough using such 508 techniques. Even if the random bits are generated as slowly as one 509 per second and it is not possible to overlap the generation process, 510 it should be tolerable in most high security applications to wait 200 511 seconds occasionally. 513 These numbers are trivial to achieve. It could be done by a person 514 repeatedly tossing a coin. Almost any hardware based process is 515 likely to be much faster. 517 5.2 Sensitivity to Skew 519 Is there any specific requirement on the shape of the distribution of 520 the random numbers? The good news is the distribution need not be 521 uniform. All that is needed is a conservative estimate of how non- 522 uniform it is to bound performance. Simple techniques to de-skew the 523 bit stream are given below and stronger cryptographic techniques are 524 described in Section 6.1.2 below. 526 5.2.1 Using Stream Parity to De-Skew 528 Consider taking a sufficiently long string of bits and map the string 529 to "zero" or "one". The mapping will not yield a perfectly uniform 530 distribution, but it can be as close as desired. One mapping that 531 serves the purpose is to take the parity of the string. This has the 532 advantages that it is robust across all degrees of skew up to the 533 estimated maximum skew and is absolutely trivial to implement in 534 hardware. 536 The following analysis gives the number of bits that must be sampled: 538 Suppose the ratio of ones to zeros is ( 0.5 + e ) to ( 0.5 - e ), 539 where e is between 0 and 0.5 and is a measure of the "eccentricity" 540 of the distribution. Consider the distribution of the parity function 541 of N bit samples. The probabilities that the parity will be one or 542 zero will be the sum of the odd or even terms in the binomial 543 expansion of (p + q)^N, where p = 0.5 + e, the probability of a one, 544 and q = 0.5 - e, the probability of a zero. 546 These sums can be computed easily as 548 N N 549 1/2 * ( ( p + q ) + ( p - q ) ) 550 and 551 N N 552 1/2 * ( ( p + q ) - ( p - q ) ). 554 (Which one corresponds to the probability the parity will be 1 555 depends on whether N is odd or even.) 557 Since p + q = 1 and p - q = 2e, these expressions reduce to 559 N 560 1/2 * [1 + (2e) ] 561 and 562 N 563 1/2 * [1 - (2e) ]. 565 Neither of these will ever be exactly 0.5 unless e is zero, but we 566 can bring them arbitrarily close to 0.5. If we want the probabilities 567 to be within some delta d of 0.5, i.e. then 569 N 570 ( 0.5 + ( 0.5 * (2e) ) ) < 0.5 + d. 572 Solving for N yields N > log(2d)/log(2e). (Note that 2e is less than 573 1, so its log is negative. Division by a negative number reverses the 574 sense of an inequality.) 575 The following table gives the length of the string which must be 576 sampled for various degrees of skew in order to come within 0.001 of 577 a 50/50 distribution. 579 +---------+--------+-------+ 580 | Prob(1) | e | N | 581 +---------+--------+-------+ 582 | 0.5 | 0.00 | 1 | 583 | 0.6 | 0.10 | 4 | 584 | 0.7 | 0.20 | 7 | 585 | 0.8 | 0.30 | 13 | 586 | 0.9 | 0.40 | 28 | 587 | 0.95 | 0.45 | 59 | 588 | 0.99 | 0.49 | 308 | 589 +---------+--------+-------+ 591 The last entry shows that even if the distribution is skewed 99% in 592 favor of ones, the parity of a string of 308 samples will be within 593 0.001 of a 50/50 distribution. 595 5.2.2 Using Transition Mappings to De-Skew 597 Another technique, originally due to von Neumann [VON NEUMANN], is to 598 examine a bit stream as a sequence of non-overlapping pairs. You 599 could then discard any 00 or 11 pairs found, interpret 01 as a 0 and 600 10 as a 1. Assume the probability of a 1 is 0.5+e and the probability 601 of a 0 is 0.5-e where e is the eccentricity of the source and 602 described in the previous section. Then the probability of each pair 603 is as follows: 605 +------+-----------------------------------------+ 606 | pair | probability | 607 +------+-----------------------------------------+ 608 | 00 | (0.5 - e)^2 = 0.25 - e + e^2 | 609 | 01 | (0.5 - e)*(0.5 + e) = 0.25 - e^2 | 610 | 10 | (0.5 + e)*(0.5 - e) = 0.25 - e^2 | 611 | 11 | (0.5 + e)^2 = 0.25 + e + e^2 | 612 +------+-----------------------------------------+ 614 This technique will completely eliminate any bias but at the expense 615 of taking an indeterminate number of input bits for any particular 616 desired number of output bits. The probability of any particular pair 617 being discarded is 0.5 + 2e^2 so the expected number of input bits to 618 produce X output bits is X/(0.25 - e^2). 620 This technique assumes that the bits are from a stream where each bit 621 has the same probability of being a 0 or 1 as any other bit in the 622 stream and that bits are not correlated, i.e., that the bits are 623 identical independent distributions. If alternate bits were from two 624 correlated sources, for example, the above analysis breaks down. 626 The above technique also provides another illustration of how a 627 simple statistical analysis can mislead if one is not always on the 628 lookout for patterns that could be exploited by an adversary. If the 629 algorithm were mis-read slightly so that overlapping successive bits 630 pairs were used instead of non-overlapping pairs, the statistical 631 analysis given is the same; however, instead of providing an unbiased 632 uncorrelated series of random 1's and 0's, it instead produces a 633 totally predictable sequence of exactly alternating 1's and 0's. 635 5.2.3 Using FFT to De-Skew 637 When real world data consists of strongly biased or correlated bits, 638 it may still contain useful amounts of randomness. This randomness 639 can be extracted through use of the discrete Fourier transform or its 640 optimized variant, the FFT. 642 Using the Fourier transform of the data, strong correlations can be 643 discarded. If adequate data is processed and remaining correlations 644 decay, spectral lines approaching statistical independence and 645 normally distributed randomness can be produced [BRILLINGER]. 647 5.2.4 Using Compression to De-Skew 649 Reversible compression techniques also provide a crude method of de- 650 skewing a skewed bit stream. This follows directly from the 651 definition of reversible compression and the formula in Section 2 652 above for the amount of information in a sequence. Since the 653 compression is reversible, the same amount of information must be 654 present in the shorter output than was present in the longer input. 655 By the Shannon information equation, this is only possible if, on 656 average, the probabilities of the different shorter sequences are 657 more uniformly distributed than were the probabilities of the longer 658 sequences. Therefore the shorter sequences must be de-skewed relative 659 to the input. 661 However, many compression techniques add a somewhat predictable 662 preface to their output stream and may insert such a sequence again 663 periodically in their output or otherwise introduce subtle patterns 664 of their own. They should be considered only a rough technique 665 compared with those described above or in Section 6.1.2. At a 666 minimum, the beginning of the compressed sequence should be skipped 667 and only later bits used for applications requiring random bits. 669 5.3 Existing Hardware Can Be Used For Randomness 671 As described below, many computers come with hardware that can, with 672 care, be used to generate truly random quantities. 674 5.3.1 Using Existing Sound/Video Input 676 Many computers are built with inputs that digitize some real world 677 analog source, such as sound from a microphone or video input from a 678 camera. Under appropriate circumstances, such input can provide 679 reasonably high quality random bits. The "input" from a sound 680 digitizer with no source plugged in or a camera with the lens cap on, 681 if the system has enough gain to detect anything, is essentially 682 thermal noise. 684 For example, on some UNIX based systems, one can read from the 685 /dev/audio device with nothing plugged into the microphone jack or 686 the microphone receiving only low level background noise. Such data 687 is essentially random noise although it should not be trusted without 688 some checking in case of hardware failure. It will, in any case, need 689 to be de-skewed as described elsewhere. 691 Combining this with compression to de-skew one can, in UNIXese, 692 generate a huge amount of medium quality random data by doing 694 cat /dev/audio | compress - >random-bits-file 696 5.3.2 Using Existing Disk Drives 698 Disk drives have small random fluctuations in their rotational speed 699 due to chaotic air turbulence [DAVIS]. By adding low level disk seek 700 time instrumentation to a system, a series of measurements can be 701 obtained that include this randomness. Such data is usually highly 702 correlated so that significant processing is needed, such as FFT (see 703 section 5.2.3). Nevertheless experimentation has shown that, with 704 such processing, most disk drives easily produce 100 bits a minute or 705 more of excellent random data. 707 Partly offsetting this need for processing is the fact that disk 708 drive failure will normally be rapidly noticed. Thus, problems with 709 this method of random number generation due to hardware failure are 710 unlikely. 712 5.4 Ring Oscillator Sources 714 If an integrated circuit is being designed or field programmed, an 715 odd number of gates can be connected in series to produce a free- 716 running ring oscillator. By sampling a point in the ring at a fixed 717 frequency, say one determined by a stable crystal oscillator, some 718 amount of entropy can be extracted due to slight variations in the 719 free-running oscillator timing. It is possible to increase the rate 720 of entropy by xor'ing sampled values from a few ring oscillators with 721 relatively prime lengths. Another possibility is to sample the output 722 of a noisy diode. 724 Bits from such sources will have to be heavily de-skewed, as disk 725 rotation timings must be (Section 5.3.2). An engineering study would 726 be needed to determine the amount of entropy being produced depending 727 on the particular design. In any case, these can be good sources 728 whose cost is a trivial amount of hardware by modern standards. 730 As an example, IEEE 802.11 suggests that circuit below be considered 731 with due attention in the design to isolation of the rings from each 732 other and from clocked circuits to avoid undesired synchronization, 733 etc., and extensive post processing. [IEEE 802.11i] 735 |\ |\ |\ 736 +-->| >0-->| >0-- 19 total --| >0--+-------+ 737 | |/ |/ |/ | | 738 | | | 739 +----------------------------------+ V 740 +-----+ 741 |\ |\ |\ | | output 742 +-->| >0-->| >0-- 23 total --| >0--+--->| XOR |------> 743 | |/ |/ |/ | | | 744 | | +-----+ 745 +----------------------------------+ ^ ^ 746 | | 747 |\ |\ |\ | | 748 +-->| >0-->| >0-- 29 total --| >0--+------+ | 749 | |/ |/ |/ | | 750 | | | 751 +----------------------------------+ | 752 | 753 other randomness if available--------------+ 755 6. Recommended Software Strategy 757 What is the best overall strategy for meeting the requirement for 758 unguessable random numbers in the absence of a reliable hardware 759 source? It is to obtain random input from a number of uncorrelated 760 sources and to mix them with a strong mixing function. Such a 761 function will preserve the randomness present in any of the sources 762 even if other quantities being combined happen to be fixed or easily 763 guessable. This may be advisable even with a good hardware source, as 764 hardware can also fail, though this should be weighed against any 765 increase in the chance of overall failure due to added software 766 complexity. 768 6.1 Mixing Functions 770 A strong mixing function is one which combines two or more inputs and 771 produces an output where each output bit is a different complex non- 772 linear function of all the input bits. On average, changing any input 773 bit will change about half the output bits. But because the 774 relationship is complex and non-linear, no particular output bit is 775 guaranteed to change when any particular input bit is changed. 777 Consider the problem of converting a stream of bits that is skewed 778 towards 0 or 1 or which has a somewhat predictable pattern to a 779 shorter stream which is more random, as discussed in Section 5.2 780 above. This is simply another case where a strong mixing function is 781 desired, mixing the input bits to produce a smaller number of output 782 bits. The technique given in Section 5.2.1 of using the parity of a 783 number of bits is simply the result of successively Exclusive Or'ing 784 them which is examined as a trivial mixing function immediately 785 below. Use of stronger mixing functions to extract more of the 786 randomness in a stream of skewed bits is examined in Section 6.1.2. 788 6.1.1 A Trivial Mixing Function 790 A trivial example for single bit inputs is the Exclusive Or function, 791 which is equivalent to addition without carry, as show in the table 792 below. This is a degenerate case in which the one output bit always 793 changes for a change in either input bit. But, despite its 794 simplicity, it provides a useful illustration. 796 +-----------+-----------+----------+ 797 | input 1 | input 2 | output | 798 +-----------+-----------+----------+ 799 | 0 | 0 | 0 | 800 | 0 | 1 | 1 | 801 | 1 | 0 | 1 | 802 | 1 | 1 | 0 | 803 +-----------+-----------+----------+ 805 If inputs 1 and 2 are uncorrelated and combined in this fashion then 806 the output will be an even better (less skewed) random bit than the 807 inputs. If we assume an "eccentricity" e as defined in Section 5.2 808 above, then the output eccentricity relates to the input eccentricity 809 as follows: 811 e = 2 * e * e 812 output input 1 input 2 814 Since e is never greater than 1/2, the eccentricity is always 815 improved except in the case where at least one input is a totally 816 skewed constant. This is illustrated in the following table where the 817 top and left side values are the two input eccentricities and the 818 entries are the output eccentricity: 820 +--------+--------+--------+--------+--------+--------+--------+ 821 | e | 0.00 | 0.10 | 0.20 | 0.30 | 0.40 | 0.50 | 822 +--------+--------+--------+--------+--------+--------+--------+ 823 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 824 | 0.10 | 0.00 | 0.02 | 0.04 | 0.06 | 0.08 | 0.10 | 825 | 0.20 | 0.00 | 0.04 | 0.08 | 0.12 | 0.16 | 0.20 | 826 | 0.30 | 0.00 | 0.06 | 0.12 | 0.18 | 0.24 | 0.30 | 827 | 0.40 | 0.00 | 0.08 | 0.16 | 0.24 | 0.32 | 0.40 | 828 | 0.50 | 0.00 | 0.10 | 0.20 | 0.30 | 0.40 | 0.50 | 829 +--------+--------+--------+--------+--------+--------+--------+ 831 However, keep in mind that the above calculations assume that the 832 inputs are not correlated. If the inputs were, say, the parity of the 833 number of minutes from midnight on two clocks accurate to a few 834 seconds, then each might appear random if sampled at random intervals 835 much longer than a minute. Yet if they were both sampled and combined 836 with xor, the result would be zero most of the time. 838 6.1.2 Stronger Mixing Functions 840 The US Government Advanced Encryption Standard [AES] is an example of 841 a strong mixing function for multiple bit quantities. It takes up to 842 384 bits of input (128 bits of "data" and 256 bits of "key") and 843 produces 128 bits of output each of which is dependent on a complex 844 non-linear function of all input bits. Other encryption functions 845 with this characteristic, such as [DES], can also be used by 846 considering them to mix all of their key and data input bits. 848 Another good family of mixing functions are the "message digest" or 849 hashing functions such as The US Government Secure Hash Standards 850 [SHA*] and the MD4, MD5 [MD4, MD5] series. These functions all take a 851 practically unlimited amount of input and produce a relatively short 852 fixed length output mixing all the input bits. The MD* series produce 853 128 bits of output, SHA-1 produces 160 bits, and other SHA functions 854 produce up to 512 bits. 856 Although the message digest functions are designed for variable 857 amounts of input, AES and other encryption functions can also be used 858 to combine any number of inputs. If 128 bits of output is adequate, 859 the inputs can be packed into a 128-bit data quantity and successive 860 AES keys, padding with zeros if needed, which are then used to 861 successively encrypt using AES in Electronic Codebook Mode. Or the 862 input could be packed into one 128-bit key and multiple data blocks 863 and a CBC-MAC calculated [MODES]. 865 If more than 128 bits of output are needed, use more complex mixing. 866 But keep in mind that it is absolutely impossible to get more bits of 867 "randomness" out than are put in. For example, if inputs are packed 868 into three quantities, A, B, and C, use AES to encrypt A with B as a 869 key and then with C as a key to produce the 1st part of the output, 870 then encrypt B with C and then A for more output and, if necessary, 871 encrypt C with A and then B for yet more output. Still more output 872 can be produced by reversing the order of the keys given above to 873 stretch things. The same can be done with the hash functions by 874 hashing various subsets of the input data or different copies of the 875 input data with different prefixes and/or suffixes to produce 876 multiple outputs. 878 Many modern block encryption functions, including DES and AES, 879 incorporate modules known as S-Boxes (substitution boxes). These 880 produce a smaller number of outputs from a larger number of inputs 881 through a complex non-linear mixing function which would have the 882 effect of concentrating limited entropy in the inputs into the 883 output. 885 S-Boxes sometimes incorporate bent boolean functions (functions of an 886 even number of bits producing one output bit with maximum non- 887 linearity). Looking at the output for all input pairs differing in 888 any particular bit position, exactly half the outputs are different. 889 An S-Box in which each output bit is produced by a bent function such 890 that any linear combination of these functions is also a bent 891 function is called a "perfect S-Box". 893 S-boxes and various repeated application or cascades of such boxes 894 can be used for mixing. [SBOX*] 896 An example of using a strong mixing function would be to reconsider 897 the case of a string of 308 bits each of which is biased 99% towards 898 zero. The parity technique given in Section 5.2.1 above reduced this 899 to one bit with only a 1/1000 deviance from being equally likely a 900 zero or one. But, applying the equation for information given in 901 Section 2, this 308 bit skewed sequence has over 5 bits of 902 information in it. Thus hashing it with SHA-1 and taking the bottom 5 903 bits of the result would yield 5 unbiased random bits as opposed to 904 the single bit given by calculating the parity of the string. 906 6.1.3 Diffie-Hellman as a Mixing Function 908 Diffie-Hellman exponential key exchange is a technique that yields a 909 shared secret between two parties that can be made computationally 910 infeasible for a third party to determine even if they can observe 911 all the messages between the two communicating parties. This shared 912 secret is a mixture of initial quantities generated by each of them 913 [D-H]. If these initial quantities are random, then the shared secret 914 contains the combined randomness of them both, assuming they are 915 uncorrelated. 917 6.1.4 Using a Mixing Function to Stretch Random Bits 919 While it is not necessary for a mixing function to produce the same 920 or fewer bits than its inputs, mixing bits cannot "stretch" the 921 amount of random unpredictability present in the inputs. Thus four 922 inputs of 32 bits each where there is 12 bits worth of 923 unpredictability (such as 4,096 equally probable values) in each 924 input cannot produce more than 48 bits worth of unpredictable output. 925 The output can be expanded to hundreds or thousands of bits by, for 926 example, mixing with successive integers, but the clever adversary's 927 search space is still 2^48 possibilities. Furthermore, mixing to 928 fewer bits than are input will tend to strengthen the randomness of 929 the output the way using Exclusive Or to produce one bit from two did 930 above. 932 The last table in Section 6.1.1 shows that mixing a random bit with a 933 constant bit with Exclusive Or will produce a random bit. While this 934 is true, it does not provide a way to "stretch" one random bit into 935 more than one. If, for example, a random bit is mixed with a 0 and 936 then with a 1, this produces a two bit sequence but it will always be 937 either 01 or 10. Since there are only two possible values, there is 938 still only the one bit of original randomness. 940 6.1.5 Other Factors in Choosing a Mixing Function 942 For local use, AES has the advantages that it has been widely tested 943 for flaws, is reasonably efficient in software, and is widely 944 documented and implemented with hardware and software implementations 945 available all over the world including open source code. The SHA* 946 family have had a little less study and tend to require more CPU 947 cycles than AES but there is no reason to believe they are flawed. 948 Both SHA* and MD5 were derived from the earlier MD4 algorithm. They 949 all have source code available [SHA*, MD*]. Some signs of weakness 950 have been found in MD4 and MD5. In particular, MD4 has only three 951 rounds and there are several independent breaks of the first two or 952 last two rounds. And some collisions have been found in MD5 output. 954 AES was selected by a robust, public, and international process. It 955 and SHA* have been vouched for by the US National Security Agency 956 (NSA) on the basis of criteria that mostly remain secret, as was DES. 957 While this has been the cause of much speculation and doubt, 958 investigation of DES over the years has indicated that NSA 959 involvement in modifications to its design, which originated with 960 IBM, was primarily to strengthen it. No concealed or special weakness 961 has been found in DES. It is likely that the NSA modifications to MD4 962 to produce the SHA algorithms similarly strengthened these 963 algorithms, possibly against threats not yet known in the public 964 cryptographic community. 966 Where input lengths are unpredictable, hash algorithms are a little 967 more convenient to use than block encryption algorithms since they 968 are generally designed to accept variable length inputs. Block 969 encryption algorithms generally require an additional padding 970 algorithm to accomodate inputs that are not an even multiple of the 971 block size. 973 As of the time of this document, the authors know of no patent claims 974 to the basic AES, DES, SHA*, MD4, and MD5 algorithms other than 975 patents for which an irrevocable royalty free license has been 976 granted to the world. There may, of course, be basic patents of which 977 the authors are unaware or patents on implementations or uses or 978 other relevant patents issued or to be issued. 980 6.2 Non-Hardware Sources of Randomness 982 The best source of input for mixing would be a hardware randomness 983 such as ring oscillators, disk drive timing, thermal noise, or 984 radioactive decay. However, if that is not available there are other 985 possibilities. These include system clocks, system or input/output 986 buffers, user/system/hardware/network serial numbers and/or addresses 987 and timing, and user input. Unfortunately, each of these sources can 988 produce very limited or predictable values under some circumstances. 990 Some of the sources listed above would be quite strong on multi-user 991 systems where, in essence, each user of the system is a source of 992 randomness. However, on a small single user or embedded system, 993 especially at start up, it might be possible for an adversary to 994 assemble a similar configuration. This could give the adversary 995 inputs to the mixing process that were sufficiently correlated to 996 those used originally as to make exhaustive search practical. 998 The use of multiple random inputs with a strong mixing function is 999 recommended and can overcome weakness in any particular input. The 1000 timing and content of requested "random" user keystrokes can yield 1001 hundreds of random bits but conservative assumptions need to be made. 1002 For example, assuming at most a few bits of randomness if the inter- 1003 keystroke interval is unique in the sequence up to that point and a 1004 similar assumption if the key hit is unique but assuming that no bits 1005 of randomness are present in the initial key value or if the timing 1006 or key value duplicate previous values. The results of mixing these 1007 timings and characters typed could be further combined with clock 1008 values and other inputs. 1010 This strategy may make practical portable code to produce good random 1011 numbers for security even if some of the inputs are very weak on some 1012 of the target systems. However, it may still fail against a high 1013 grade attack on small, single user or embedded systems, especially if 1014 the adversary has ever been able to observe the generation process in 1015 the past. A hardware based random source is still preferable. 1017 6.3 Cryptographically Strong Sequences 1019 In cases where a series of random quantities must be generated, an 1020 adversary may learn some values in the sequence. In general, they 1021 should not be able to predict other values from the ones that they 1022 know. 1024 The correct technique is to start with a strong random seed, take 1025 cryptographically strong steps from that seed [FERGUSON, SCHNEIER], 1026 and do not reveal the complete state of the generator in the sequence 1027 elements. If each value in the sequence can be calculated in a fixed 1028 way from the previous value, then when any value is compromised, all 1029 future values can be determined. This would be the case, for example, 1030 if each value were a constant function of the previously used values, 1031 even if the function were a very strong, non-invertible message 1032 digest function. 1034 (It should be noted that if your technique for generating a sequence 1035 of key values is fast enough, it can trivially be used as the basis 1036 for a confidentiality system. If two parties use the same sequence 1037 generating technique and start with the same seed material, they will 1038 generate identical sequences. These could, for example, be xor'ed at 1039 one end with data being send, encrypting it, and xor'ed with this 1040 data as received, decrypting it due to the reversible properties of 1041 the xor operation. This is commonly referred to as a simple stream 1042 cipher.) 1044 6.3.1 Traditional Strong Sequences 1046 A traditional way to achieve a strong sequence has been to have the 1047 values be produced by hashing the quantities produced by 1048 concatenating the seed with successive integers or the like and then 1049 mask the values obtained so as to limit the amount of generator state 1050 available to the adversary. 1052 It may also be possible to use an "encryption" algorithm with a 1053 random key and seed value to encrypt and feedback some or all of the 1054 output encrypted value into the value to be encrypted for the next 1055 iteration. Appropriate feedback techniques will usually be 1056 recommended with the encryption algorithm. An example is shown below 1057 where shifting and masking are used to combine the cypher output 1058 feedback. This type of feedback is defined by the US Government in 1059 connection with AES and DES [MODES] as Output Feedback Mode (OFM) but 1060 should be avoided for reasons described below. 1062 +---------------+ 1063 | V | 1064 | | n |--+ 1065 +--+------------+ | 1066 | | +---------+ 1067 shift| +---> | | +-----+ 1068 +--+ | Encrypt | <--- | Key | 1069 | +-------- | | +-----+ 1070 | | +---------+ 1071 V V 1072 +------------+--+ 1073 | V | | 1074 | n+1 | 1075 +---------------+ 1077 Note that if a shift of one is used, this is the same as the shift 1078 register technique described in Section 3 above but with the all 1079 important difference that the feedback is determined by a complex 1080 non-linear function of all bits rather than a simple linear or 1081 polynomial combination of output from a few bit position taps. 1083 It has been shown by Donald W. Davies that this sort of shifted 1084 partial output feedback significantly weakens an algorithm compared 1085 with feeding all of the output bits back as input. In particular, for 1086 DES, repeated encrypting a full 64 bit quantity will give an expected 1087 repeat in about 2^63 iterations. Feeding back anything less than 64 1088 (and more than 0) bits will give an expected repeat in between 2^31 1089 and 2^32 iterations! 1091 To predict values of a sequence from others when the sequence was 1092 generated by these techniques is equivalent to breaking the 1093 cryptosystem or inverting the "non-invertible" hashing involved with 1094 only partial information available. The less information revealed 1095 each iteration, the harder it will be for an adversary to predict the 1096 sequence. Thus it is best to use only one bit from each value. It has 1097 been shown that in some cases this makes it impossible to break a 1098 system even when the cryptographic system is invertible and can be 1099 broken if all of each generated value was revealed. 1101 6.3.2 The Blum Blum Shub Sequence Generator 1103 Currently the generator which has the strongest public proof of 1104 strength is called the Blum Blum Shub generator after its inventors 1105 [BBS]. It is also very simple and is based on quadratic residues. 1106 It's only disadvantage is that it is computationally intensive 1107 compared with the traditional techniques give in 6.3.1 above. This is 1108 not a major draw back if it is used for moderately infrequent 1109 purposes, such as generating session keys. 1111 Simply choose two large prime numbers, say p and q, which both have 1112 the property that you get a remainder of 3 if you divide them by 4. 1113 Let n = p * q. Then you choose a random number x relatively prime to 1114 n. The initial seed for the generator and the method for calculating 1115 subsequent values are then 1117 2 1118 s = ( x )(Mod n) 1119 0 1121 2 1122 s = ( s )(Mod n) 1123 i+1 i 1125 You must be careful to use only a few bits from the bottom of each s. 1126 It is always safe to use only the lowest order bit. If you use no 1127 more than the 1128 log ( log ( s ) ) 1129 2 2 i 1130 low order bits, then predicting any additional bits from a sequence 1131 generated in this manner is provable as hard as factoring n. As long 1132 as the initial x is secret, you can even make n public if you want. 1134 An interesting characteristic of this generator is that you can 1135 directly calculate any of the s values. In particular 1137 i 1138 ( ( 2 )(Mod (( p - 1 ) * ( q - 1 )) ) ) 1139 s = ( s )(Mod n) 1140 i 0 1142 This means that in applications where many keys are generated in this 1143 fashion, it is not necessary to save them all. Each key can be 1144 effectively indexed and recovered from that small index and the 1145 initial s and n. 1147 6.3.3 Entropy Pool Techniques 1149 Many modern pseudo-random number sources utilize the technique of 1150 maintaining a "pool" of bits and providing operations for strongly 1151 mixing input with some randomness into the pool and extracting psuedo 1152 random bits from the pool. This is illustrated in the figure below. 1154 +--------+ +------+ +---------+ 1155 --->| Mix In |--->| POOL |--->| Extract |---> 1156 | Bits | | | | Bits | 1157 +--------+ +------+ +---------+ 1158 ^ V 1159 | | 1160 +-----------+ 1162 Bits to be feed into the pool can be any of the various hardware, 1163 environmental, or user input sources discussed above. It is also 1164 common to save the state of the pool on system shut down and restore 1165 it on re-starting, if stable storage is available. 1167 Care must be taken that enough entropy has been added to the pool to 1168 support particular output uses desired. See Section 7.5 for more 1169 details on an example implementation and [RSA BULL1] for similar 1170 suggestions. 1172 7. Key Generation Standards and Examples 1174 Several public standards and widely deployed examples are now in 1175 place for the generation of keys without special hardware. Three 1176 standards are described below. The two older standards use DES, with 1177 its 64-bit block and key size limit, but any equally strong or 1178 stronger mixing function could be substituted. The third is a more 1179 modern and stronger standard based on SHA-1. Finally the widely 1180 deployed modern UNIX random number generators are described. 1182 7.1 US DoD Recommendations for Password Generation 1184 The United States Department of Defense has specific recommendations 1185 for password generation [DoD]. They suggest using the US Data 1186 Encryption Standard [DES] in Output Feedback Mode [MODES] as follows: 1188 use an initialization vector determined from 1189 the system clock, 1190 system ID, 1191 user ID, and 1192 date and time; 1193 use a key determined from 1194 system interrupt registers, 1195 system status registers, and 1196 system counters; and, 1197 as plain text, use an external randomly generated 64 bit 1198 quantity such as 8 characters typed in by a system 1199 administrator. 1201 The password can then be calculated from the 64 bit "cipher text" 1202 generated by DES in 64-bit Output Feedback Mode. As many bits as are 1203 needed can be taken from these 64 bits and expanded into a 1204 pronounceable word, phrase, or other format if a human being needs to 1205 remember the password. 1207 7.2 X9.17 Key Generation 1209 The American National Standards Institute has specified a method for 1210 generating a sequence of keys as follows [X9.17]: 1212 s is the initial 64 bit seed 1213 0 1215 g is the sequence of generated 64 bit key quantities 1216 n 1218 k is a random key reserved for generating this key sequence 1220 t is the time at which a key is generated to as fine a resolution 1221 as is available (up to 64 bits). 1223 DES ( K, Q ) is the DES encryption of quantity Q with key K 1225 g = DES ( k, DES ( k, t ) .xor. s ) 1226 n n 1228 s = DES ( k, DES ( k, t ) .xor. g ) 1229 n+1 n 1231 If g sub n is to be used as a DES key, then every eighth bit should 1232 be adjusted for parity for that use but the entire 64 bit unmodified 1233 g should be used in calculating the next s. 1235 7.3 DSS Pseudo-Random Number Generation 1237 Appendix 3 of the NIST Digital Signature Standard [DSS] provides an 1238 approved method of producing a sequence of pseudo-random 160 bit 1239 quantities for use as private keys or the like. A subset of that 1240 algorithm is as follows: 1242 t = 0x 67452301 EFCDAB89 98BADCFE 10325476 C3D2E1F0 1244 q = a 160-bit prime number 1246 XKEY = initial seed 1247 0 1249 For j = 0 to ... 1251 XVAL = ( XKEY + optional user input ) (Mod 2^512) 1252 j 1254 X = G( t, XVAL ) (Mod q) 1255 j 1257 XKEY = ( 1 + XKEY + X ) (Mod 2^512) 1258 j+1 j j 1260 The quantities X thus produced are the pseudo-random sequence of 1261 values in the rang 0 to q. Two functions can be used for "G" above. 1262 Each produces a 160-bit value and takes two arguments, the first a 1263 160-bit value and the second a 512 bit value. 1265 The first is based on SHA-1 and works by setting the 5 linking 1266 variables, denoted H with subscripts in the SHA-1 specification, to 1267 the first argument divided into fifths. Then steps (a) through (e) of 1268 section 7 of the SHA-1 specification are run over the second argument 1269 as if it were a 512-bit data block. The values of the linking 1270 variable after those steps are then concatenated to produce the 1271 output of G. [SHA-1] 1273 As an alternative, NIST also defined an alternate G function based on 1274 multiple applications of the DES encryption function [DSS]. 1276 7.4 X9.82 Pseudo-Random Number Generation 1278 The National Institute for Standards and Technology (NIST) and the 1279 American National Standards Institutes (ANSI) X9F1 committee are in 1280 the final stages of creating a standard for random number generation. 1281 This standard includes a number of random number generators for use 1282 with AES and other block ciphers. It also includes random number 1283 generators based on hash functions and the arithmetic of elliptic 1284 curves [X9.82]. 1286 7.5 The /dev/random Device 1288 Several versions of the UNIX operating system provides a kernel- 1289 resident random number generator. In some cases, these generators 1290 makes use of events captured by the Kernel during normal system 1291 operation. 1293 For example, on some versions of Linux, the generator consists of a 1294 random pool of 512 bytes represented as 128 words of 4-bytes each. 1295 When an event occurs, such as a disk drive interrupt, the time of the 1296 event is xor'ed into the pool and the pool is stirred via a primitive 1297 polynomial of degree 128. The pool itself is treated as a ring 1298 buffer, with new data being XORed (after stirring with the 1299 polynomial) across the entire pool. 1301 Each call that adds entropy to the pool estimates the amount of 1302 likely true entropy the input contains. The pool itself contains a 1303 accumulator that estimates the total over all entropy of the pool. 1305 Input events come from several sources: 1307 1. Keyboard interrupts. The time of the interrupt as well as the scan 1308 code are added to the pool. This in effect adds entropy from the 1309 human operator by measuring inter-keystroke arrival times. 1311 2. Disk completion and other interrupts. A system being used by a 1312 person will likely have a hard to predict pattern of disk 1313 accesses. 1315 3. Mouse motion. The timing as well as mouse position is added in. 1317 When random bytes are required, the pool is hashed with SHA-1 [SHA1] 1318 to yield the returned bytes of randomness. If more bytes are required 1319 than the output of SHA-1 (20 bytes), then the hashed output is 1320 stirred back into the pool and a new hash performed to obtain the 1321 next 20 bytes. As bytes are removed from the pool, the estimate of 1322 entropy is similarly decremented. 1324 To ensure a reasonable random pool upon system startup, the standard 1325 startup scripts (and shutdown scripts) save the pool to a disk file 1326 at shutdown and read this file at system startup. 1328 There are two user exported interfaces. /dev/random returns bytes 1329 from the pool, but blocks when the estimated entropy drops to zero. 1330 As entropy is added to the pool from events, more data becomes 1331 available via /dev/random. Random data obtained from such a 1332 /dev/random device is suitable for key generation for long term keys. 1334 /dev/urandom works like /dev/random, however it provides data even 1335 when the entropy estimate for the random pool drops to zero. This may 1336 be adequate for session keys. The risk of continuing to take data 1337 even when the pool's entropy estimate is small in that past output 1338 may be computable from current output provided an attacker can 1339 reverse SHA-1. Given that SHA-1 is designed to be non-invertible, 1340 this is a reasonable risk. 1342 To obtain random numbers under Linux, Solaris, or other UNIX systems 1343 equiped with code as described above, all an application needs to do 1344 is open either /dev/random or /dev/urandom and read the desired 1345 number of bytes. 1347 (The Linux Random device was written by Theodore Ts'o. It was based 1348 loosely on the random number generator in PGP 2.X and PGP 3.0 (aka 1349 PGP 5.0).) 1351 8. Examples of Randomness Required 1353 Below are two examples showing rough calculations of needed 1354 randomness for security. The first is for moderate security passwords 1355 while the second assumes a need for a very high security 1356 cryptographic key. 1358 In addition [ORMAN] and [RSA BULL13] provide information on the 1359 public key lengths that should be used for exchanging symmetric keys. 1361 8.1 Password Generation 1363 Assume that user passwords change once a year and it is desired that 1364 the probability that an adversary could guess the password for a 1365 particular account be less than one in a thousand. Further assume 1366 that sending a password to the system is the only way to try a 1367 password. Then the crucial question is how often an adversary can try 1368 possibilities. Assume that delays have been introduced into a system 1369 so that, at most, an adversary can make one password try every six 1370 seconds. That's 600 per hour or about 15,000 per day or about 1371 5,000,000 tries in a year. Assuming any sort of monitoring, it is 1372 unlikely someone could actually try continuously for a year. In fact, 1373 even if log files are only checked monthly, 500,000 tries is more 1374 plausible before the attack is noticed and steps taken to change 1375 passwords and make it harder to try more passwords. 1377 To have a one in a thousand chance of guessing the password in 1378 500,000 tries implies a universe of at least 500,000,000 passwords or 1379 about 2^29. Thus 29 bits of randomness are needed. This can probably 1380 be achieved using the US DoD recommended inputs for password 1381 generation as it has 8 inputs which probably average over 5 bits of 1382 randomness each (see section 7.1). Using a list of 1000 words, the 1383 password could be expressed as a three word phrase (1,000,000,000 1384 possibilities) or, using case insensitive letters and digits, six 1385 would suffice ((26+10)^6 = 2,176,782,336 possibilities). 1387 For a higher security password, the number of bits required goes up. 1388 To decrease the probability by 1,000 requires increasing the universe 1389 of passwords by the same factor which adds about 10 bits. Thus to 1390 have only a one in a million chance of a password being guessed under 1391 the above scenario would require 39 bits of randomness and a password 1392 that was a four word phrase from a 1000 word list or eight 1393 letters/digits. To go to a one in 10^9 chance, 49 bits of randomness 1394 are needed implying a five word phrase or ten letter/digit password. 1396 In a real system, of course, there are also other factors. For 1397 example, the larger and harder to remember passwords are, the more 1398 likely users are to write them down resulting in an additional risk 1399 of compromise. 1401 8.2 A Very High Security Cryptographic Key 1403 Assume that a very high security key is needed for symmetric 1404 encryption / decryption between two parties. Assume an adversary can 1405 observe communications and knows the algorithm being used. Within the 1406 field of random possibilities, the adversary can try key values in 1407 hopes of finding the one in use. Assume further that brute force 1408 trial of keys is the best the adversary can do. 1410 8.2.1 Effort per Key Trial 1412 How much effort will it take to try each key? For very high security 1413 applications it is best to assume a low value of effort. Even if it 1414 would clearly take tens of thousands of computer cycles or more to 1415 try a single key, there may be some pattern that enables huge blocks 1416 of key values to be tested with much less effort per key. Thus it is 1417 probably best to assume no more than a couple hundred cycles per key. 1418 (There is no clear lower bound on this as computers operate in 1419 parallel on a number of bits and a poor encryption algorithm could 1420 allow many keys or even groups of keys to be tested in parallel. 1421 However, we need to assume some value and can hope that a reasonably 1422 strong algorithm has been chosen for our hypothetical high security 1423 task.) 1425 If the adversary can command a highly parallel processor or a large 1426 network of work stations, 10^11 cycles per second is probably a 1427 minimum assumption for availability today. Looking forward a few 1428 years, there should be at least an order of magnitude improvement. 1429 Thus assuming 10^10 keys could be checked per second or 3.6*10^12 per 1430 hour or 6*10^14 per week or 2.4*10^15 per month is reasonable. This 1431 implies a need for a minimum of 63 bits of randomness in keys to be 1432 sure they cannot be found in a month. Even then it is possible that, 1433 a few years from now, a highly determined and resourceful adversary 1434 could break the key in 2 weeks (on average they need try only half 1435 the keys). 1437 These questions are considered in detail in "Minimal Key Lengths for 1438 Symmetric Ciphers to Provide Adequate Commercial Security: A Report 1439 by an Ad Hoc Group of Cryptographers and Computer Scientists" 1440 [KeyStudy] which was sponsored by the Business Software Alliance. It 1441 concluded that a reasonable key length in 1995 for very high security 1442 is in the range of 75 to 90 bits and, since the cost of cryptography 1443 does not vary much with they key size, recommends 90 bits. To update 1444 these recommendations, just add 2/3 of a bit per year for Moore's law 1446 [MOORE]. Thus, in the year 2004, this translates to a determination 1447 that a reasonable key length is in the 81 to 96 bit range. In fact, 1448 today, it is increasingly common to use keys longer than 96 bits, 1449 such as 128-bit (or longer) keys with AES and keys with effective 1450 lengths of 112-bits using triple-DES. 1452 8.2.2 Meet in the Middle Attacks 1454 If chosen or known plain text and the resulting encrypted text are 1455 available, a "meet in the middle" attack is possible if the structure 1456 of the encryption algorithm allows it. (In a known plain text attack, 1457 the adversary knows all or part of the messages being encrypted, 1458 possibly some standard header or trailer fields. In a chosen plain 1459 text attack, the adversary can force some chosen plain text to be 1460 encrypted, possibly by "leaking" an exciting text that would then be 1461 sent by the adversary over an encrypted channel.) 1463 An oversimplified explanation of the meet in the middle attack is as 1464 follows: the adversary can half-encrypt the known or chosen plain 1465 text with all possible first half-keys, sort the output, then half- 1466 decrypt the encoded text with all the second half-keys. If a match is 1467 found, the full key can be assembled from the halves and used to 1468 decrypt other parts of the message or other messages. At its best, 1469 this type of attack can halve the exponent of the work required by 1470 the adversary while adding a very large but roughly constant factor 1471 of effort. Thus, if this attack can be mounted, a doubling of the 1472 amount of randomness in the very strong key to a minimum of 192 bits 1473 (96*2) is required for the year 2004 based on the [KeyStudy] 1474 analysis. 1476 This amount of randomness is well beyond the limit of that in the 1477 inputs recommended by the US DoD for password generation and could 1478 require user typing timing, hardware random number generation, or 1479 other sources. 1481 The meet in the middle attack assumes that the cryptographic 1482 algorithm can be decomposed in this way but we can not rule that out 1483 without a deep knowledge of the algorithm. Even if a basic algorithm 1484 is not subject to a meet in the middle attack, an attempt to produce 1485 a stronger algorithm by applying the basic algorithm twice (or two 1486 different algorithms sequentially) with different keys may gain less 1487 added security than would be expected. Such a composite algorithm 1488 would be subject to a meet in the middle attack. 1490 Enormous resources may be required to mount a meet in the middle 1491 attack but they are probably within the range of the national 1492 security services of a major nation. Essentially all nations spy on 1493 other nations traffic. 1495 8.2.3 Other Considerations 1497 [KeyStudy] also considers the possibilities of special purpose code 1498 breaking hardware and having an adequate safety margin. 1500 If the two parties agree on a key by Diffie-Hellman exchange [D-H], 1501 then in principle only half of this randomness would have to be 1502 supplied by each party. However, there is probably some correlation 1503 between their random inputs so it is probably best to assume you end 1504 up with more like one and a half times the bits of randomness each 1505 provides for very high security if Diffie-Hellman is used. 1507 It should be noted that key length calculations such at those above 1508 are controversial and depend on various assumptions about the 1509 cryptographic algorithms in use. In some cases, a professional with a 1510 deep knowledge of code breaking techniques and of the strength of the 1511 algorithm in use could be satisfied with less than half of the 192 1512 bit key size derived above. 1514 For further examples of conservative design principles see 1515 [FERGUSON]. 1517 9. Conclusion 1519 Generation of unguessable "random" secret quantities for security use 1520 is an essential but difficult task. 1522 Hardware techniques to produce such randomness would be relatively 1523 simple. In particular, the volume and quality would not need to be 1524 high and existing computer hardware, such as disk drives, can be 1525 used. 1527 Computational techniques are available to process low quality random 1528 quantities from multiple sources or a larger quantity of such low 1529 quality input from one source and produce a smaller quantity of 1530 higher quality keying material. In the absence of hardware sources of 1531 randomness, a variety of user and software sources can frequently, 1532 with care, be used instead; however, most modern systems already have 1533 hardware, such as disk drives or audio input, that could be used to 1534 produce high quality randomness. 1536 Once a sufficient quantity of high quality seed key material (a 1537 couple of hundred bits) is available, computational techniques are 1538 available to produce cryptographically strong sequences of 1539 unpredictable quantities from this seed material. 1541 10. Security Considerations 1543 The entirety of this document concerns techniques and recommendations 1544 for generating unguessable "random" quantities for use as passwords, 1545 cryptographic keys, initialization vectors, sequence numbers, and 1546 similar security uses. 1548 11. Intellectual Property Considerations 1550 The IETF takes no position regarding the validity or scope of any 1551 Intellectual Property Rights or other rights that might be claimed to 1552 pertain to the implementation or use of the technology described in 1553 this document or the extent to which any license under such rights 1554 might or might not be available; nor does it represent that it has 1555 made any independent effort to identify any such rights. Information 1556 on the procedures with respect to rights in RFC documents can be 1557 found in BCP 78 and BCP 79. 1559 Copies of IPR disclosures made to the IETF Secretariat and any 1560 assurances of licenses to be made available, or the result of an 1561 attempt made to obtain a general license or permission for the use of 1562 such proprietary rights by implementers or users of this 1563 specification can be obtained from the IETF on-line IPR repository at 1564 http://www.ietf.org/ipr. 1566 The IETF invites any interested party to bring to its attention any 1567 copyrights, patents or patent applications, or other proprietary 1568 rights that may cover technology that may be required to implement 1569 this standard. Please address the information to the IETF at ietf- 1570 ipr@ietf.org. 1572 12. Appendix A: Changes from RFC 1750 1574 1. Additional acknowledgements have been added. 1576 2. Insertion of section 5.2.4 on de-skewing with S-boxes. 1578 3. Addition of section 5.4 on Ring Oscillator randomness sources. 1580 4. AES and the members of the SHA series producing more than 160 1581 bits have been added. Use of AES has been emphasized and the use 1582 of DES minimized. 1584 5. Addition of section 6.3.3 on entropy pool techniques. 1586 6. Addition of section 7.3 on the pseudo-random number generation 1587 techniques given in FIPS 186-2, 7.4 on those given in X9.82, and 1588 section 7.5 on the random number generation techniques of the 1589 /dev/random device in Linux and other UNIX systems. 1591 7. Addition of references to the "Minimal Key Lengths for Symmetric 1592 Ciphers to Provide Adequate Commercial Security" study published 1593 in January 1996 [KeyStudy]. 1595 8. Minor wording changes and reference updates. 1597 13. Informative References 1599 [AES] - "Specification of the Advanced Encryption Standard (AES)", 1600 United States of America, US National Institute of Standards and 1601 Technology, FIPS 197, November 2001. 1603 [ASYMMETRIC] - "Secure Communications and Asymmetric Cryptosystems", 1604 edited by Gustavus J. Simmons, AAAS Selected Symposium 69, Westview 1605 Press, Inc. 1607 [BBS] - "A Simple Unpredictable Pseudo-Random Number Generator", SIAM 1608 Journal on Computing, v. 15, n. 2, 1986, L. Blum, M. Blum, & M. Shub. 1610 [BRILLINGER] - "Time Series: Data Analysis and Theory", Holden-Day, 1611 1981, David Brillinger. 1613 [CRC] - "C.R.C. Standard Mathematical Tables", Chemical Rubber 1614 Publishing Company. 1616 [DAVIS] - "Cryptographic Randomness from Air Turbulence in Disk 1617 Drives", Advances in Cryptology - Crypto '94, Springer-Verlag Lecture 1618 Notes in Computer Science #839, 1984, Don Davis, Ross Ihaka, and 1619 Philip Fenstermacher. 1621 [DES] - "Data Encryption Standard", US National Institute of 1622 Standards and Technology, FIPS 46-3, October 1999. 1623 - "Data Encryption Algorithm", American National Standards 1624 Institute, ANSI X3.92-1981. 1625 (See also FIPS 112, Password Usage, which includes FORTRAN 1626 code for performing DES.) 1628 [D-H] - RFC 2631, "Diffie-Hellman Key Agreement Method", Eric 1629 Rescrola, June 1999. 1631 [DNSSEC] - RFC 2535, "Domain Name System Security Extensions", D. 1632 Eastlake, March 1999. 1634 [DoD] - "Password Management Guideline", United States of America, 1635 Department of Defense, Computer Security Center, CSC-STD-002-85. 1636 (See also FIPS 112, Password Usage, which incorporates CSC-STD-002-85 1637 as one of its appendices.) 1639 [DSS] - "Digital Signature Standard (DSS)", US National Institute of 1640 Standards and Technology, FIPS 186-2, January 2000. 1642 [FERGUSON] - "Practical Cryptography", Niels Ferguson and Bruce 1643 Schneier, Wiley Publishing Inc., ISBN 047122894X, April 2003. 1645 [GIFFORD] - "Natural Random Number", MIT/LCS/TM-371, David K. 1646 Gifford, September 1988. 1648 [IEEE 802.11i] - "Draft Amendment to Standard for Telecommunications 1649 and Information Exchange Between Systems - LAN/MAN Specific 1650 Requirements - Part 11: Wireless Medium Access Control (MAC) and 1651 physical layer (PHY) specifications: Medium Access Control (MAC) 1652 Security Enhancements", The Institute for Electrical and Electronics 1653 Engineers, January 2004. 1655 [IPSEC] - RFC 2401, "Security Architecture for the Internet 1656 Protocol", S. Kent, R. Atkinson, November 1998. 1658 [KAUFMAN] - "Network Security: Private Communication in a Public 1659 World", Charlie Kaufman, Radia Perlman, and Mike Speciner, Prentis 1660 Hall PTR, ISBN 0-13-046019-2, 2nd Edition 2002. 1662 [KeyStudy] - "Minimal Key Lengths for Symmetric Ciphers to Provide 1663 Adequate Commercial Security: A Report by an Ad Hoc Group of 1664 Cryptographers and Computer Scientists", M. Blaze, W. Diffie, R. 1665 Rivest, B. Schneier, T. Shimomura, E. Thompson, and M. Weiner, 1666 January 1996, . 1668 [KNUTH] - "The Art of Computer Programming", Volume 2: Seminumerical 1669 Algorithms, Chapter 3: Random Numbers. Addison Wesley Publishing 1670 Company, 3rd Edition November 1997, Donald E. Knuth. 1672 [KRAWCZYK] - "How to Predict Congruential Generators", Journal of 1673 Algorithms, V. 13, N. 4, December 1992, H. Krawczyk 1675 [MAIL PEM] - RFCs 1421 through 1424: 1676 - RFC 1421, Privacy Enhancement for Internet Electronic Mail: 1677 Part I: Message Encryption and Authentication Procedures, 02/10/1993, 1678 J. Linn 1679 - RFC 1422, Privacy Enhancement for Internet Electronic Mail: 1680 Part II: Certificate-Based Key Management, 02/10/1993, S. Kent 1681 - RFC 1423, Privacy Enhancement for Internet Electronic Mail: 1682 Part III: Algorithms, Modes, and Identifiers, 02/10/1993, D. Balenson 1683 - RFC 1424, Privacy Enhancement for Internet Electronic Mail: 1684 Part IV: Key Certification and Related Services, 02/10/1993, B. 1685 Kaliski 1687 [MAIL PGP] 1688 - RFC 2440, "OpenPGP Message Format", J. Callas, L. 1689 Donnerhacke, H. Finney, R. Thayer", November 1998. 1690 - RFC 3156, "MIME Security with OpenPGP" M. Elkins, D. Del 1691 Torto, R. Levien, T. Roessler, August 2001. 1693 [MAIL S/MIME] - RFCs 2632 through 2634: 1694 - RFC 2632, "S/MIME Version 3 Certificate Handling", B. 1695 Ramsdell, Ed., June 1999. 1696 - RFC 2633, "S/MIME Version 3 Message Specification", B. 1697 Ramsdell, Ed., June 1999. 1699 - RFC 2634, "Enhanced Security Services for S/MIME" P. 1700 Hoffman, Ed., June 1999. 1702 [MD4] - "The MD4 Message-Digest Algorithm", RFC1320, April 1992, R. 1703 Rivest 1705 [MD5] - "The MD5 Message-Digest Algorithm", RFC1321, April 1992, R. 1706 Rivest 1708 [MODES] - "DES Modes of Operation", US National Institute of 1709 Standards and Technology, FIPS 81, December 1980. 1710 - "Data Encryption Algorithm - Modes of Operation", American 1711 National Standards Institute, ANSI X3.106-1983. 1713 [MOORE] - Moore's Law: the exponential increase in the logic density 1714 of silicon circuits. Originally formulated by Gordon Moore in 1964 as 1715 a doubling every year starting in 1962, in the late 1970s the rate 1716 fell to a doubling every 18 months and has remained there through the 1717 date of this document. See "The New Hacker's Dictionary", Third 1718 Edition, MIT Press, ISBN 0-262-18178-9, Eric S. Raymond, 1996. 1720 [ORMAN] - "Determining Strengths For Public Keys Used For Exchanging 1721 Symmetric Keys", draft-orman-public-key-lengths-*.txt, Hilarie Orman, 1722 Paul Hoffman, work in progress. 1724 [RFC 1750] - "Randomness Requirements for Security", D. Eastlake, S. 1725 Crocker, J. Schiller, December 1994. 1727 [RSA BULL1] - "Suggestions for Random Number Generation in Software", 1728 RSA Laboratories Bulletin #1, January 1996. 1730 [RSA BULL13] - "A Cost-Based Security Analysis of Symmetric and 1731 Asymmetric Key Lengths", RSA Laboratories Bulletin #13, Robert 1732 Silverman, April 2000 (revised November 2001). 1734 [SBOX1] - "Practical s-box design", S. Mister, C. Adams, Selected 1735 Areas in Cryptography, 1996. 1737 [SBOX2] - "Perfect Non-linear S-boxes", K. Nyberg, Advances in 1738 Cryptography - Eurocrypt '91 Proceedings, Springer-Verland, 1991. 1740 [SCHNEIER] - "Applied Cryptography: Protocols, Algorithms, and Source 1741 Code in C", 2nd Edition, John Wiley & Sons, 1996, Bruce Schneier. 1743 [SHANNON] - "The Mathematical Theory of Communication", University of 1744 Illinois Press, 1963, Claude E. Shannon. (originally from: Bell 1745 System Technical Journal, July and October 1948) 1747 [SHIFT1] - "Shift Register Sequences", Aegean Park Press, Revised 1748 Edition 1982, Solomon W. Golomb. 1750 [SHIFT2] - "Cryptanalysis of Shift-Register Generated Stream Cypher 1751 Systems", Aegean Park Press, 1984, Wayne G. Barker. 1753 [SHA-1] - "Secure Hash Standard (SHA-1)", US National Institute of 1754 Science and Technology, FIPS 180-1, April 1993. 1755 - RFC 3174, "US Secure Hash Algorithm 1 (SHA1)", D. Eastlake, 1756 P. Jones, September 2001. 1758 [SHA-2] - "Secure Hash Standard", Draft (SHA-2156/384/512), US 1759 National Institute of Science and Technology, FIPS 180-2, not yet 1760 issued. 1762 [SSH] - draft-ietf-secsh-*, work in progress. 1764 [STERN] - "Secret Linear Congruential Generators are not 1765 Cryptographically Secure", Proceedings of IEEE STOC, 1987, J. Stern. 1767 [TLS] - RFC 2246, "The TLS Protocol Version 1.0", T. Dierks, C. 1768 Allen, January 1999. 1770 [USENET] - RFC 977, "Network News Transfer Protocol", B. Kantor, P. 1771 Lapsley, February 1986. 1772 - RFC 2980, "Common NNTP Extensions", S. Barber, October 1773 2000. 1775 [VON NEUMANN] - "Various techniques used in connection with random 1776 digits", von Neumann's Collected Works, Vol. 5, Pergamon Press, 1963, 1777 J. von Neumann. 1779 [X9.17] - "American National Standard for Financial Institution Key 1780 Management (Wholesale)", American Bankers Association, 1985. 1782 [X9.82] - "Random Number Generation", ANSI X9F1, work in progress. 1784 Authors Addresses 1786 Donald E. Eastlake 3rd 1787 Motorola Laboratories 1788 155 Beaver Street 1789 Milford, MA 01757 USA 1791 Telephone: +1 508-786-7554 (w) 1792 +1 508-634-2066 (h) 1793 EMail: Donald.Eastlake@motorola.com 1795 Jeffrey I. Schiller 1796 MIT, Room E40-311 1797 77 Massachusetts Avenue 1798 Cambridge, MA 02139-4307 USA 1800 Telephone: +1 617-253-0161 1801 E-mail: jis@mit.edu 1803 Steve Crocker 1805 EMail: steve@stevecrocker.com 1807 File Name and Expiration 1809 This is file draft-eastlake-randomness2-06.txt. 1811 It expires October 2004.