c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyNetwork Working Group D. Eastlake, 3rd
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyRequest for Comments: 1750 DEC
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyCategory: Informational S. Crocker
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley December 1994
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Randomness Recommendations for Security
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyStatus of this Memo
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley This memo provides information for the Internet community. This memo
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley does not specify an Internet standard of any kind. Distribution of
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley this memo is unlimited.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Security systems today are built on increasingly strong cryptographic
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley algorithms that foil pattern analysis attempts. However, the security
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley of these systems is dependent on generating secret quantities for
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley passwords, cryptographic keys, and similar quantities. The use of
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley pseudo-random processes to generate secret quantities can result in
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley pseudo-security. The sophisticated attacker of these security
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley systems may find it easier to reproduce the environment that produced
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley the secret quantities, searching the resulting small set of
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley possibilities, than to locate the quantities in the whole of the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley number space.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Choosing random quantities to foil a resourceful and motivated
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley adversary is surprisingly difficult. This paper points out many
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley pitfalls in using traditional pseudo-random number generation
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley techniques for choosing such quantities. It recommends the use of
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley truly random hardware techniques and shows that the existing hardware
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley on many systems can be used for this purpose. It provides
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley suggestions to ameliorate the problem when a hardware solution is not
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley available. And it gives examples of how large such quantities need
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley to be for some particular applications.
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyEastlake, Crocker & Schiller [Page 1]
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyRFC 1750 Randomness Recommendations for Security December 1994
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyAcknowledgements
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Comments on this document that have been incorporated were received
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley from (in alphabetic order) the following:
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley David M. Balenson (TIS)
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Don Coppersmith (IBM)
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Don T. Davis (consultant)
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Carl Ellison (Stratus)
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Marc Horowitz (MIT)
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Christian Huitema (INRIA)
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Charlie Kaufman (IRIS)
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Steve Kent (BBN)
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Hal Murray (DEC)
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Neil Haller (Bellcore)
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Richard Pitkin (DEC)
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Tim Redmond (TIS)
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Doug Tygar (CMU)
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyTable of Contents
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 1. Introduction........................................... 3
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 2. Requirements........................................... 4
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 3. Traditional Pseudo-Random Sequences.................... 5
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 4. Unpredictability....................................... 7
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 4.1 Problems with Clocks and Serial Numbers............... 7
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 4.2 Timing and Content of External Events................ 8
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 4.3 The Fallacy of Complex Manipulation.................. 8
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 4.4 The Fallacy of Selection from a Large Database....... 9
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 5. Hardware for Randomness............................... 10
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 5.1 Volume Required...................................... 10
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 5.2 Sensitivity to Skew.................................. 10
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 5.2.1 Using Stream Parity to De-Skew..................... 11
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 5.2.2 Using Transition Mappings to De-Skew............... 12
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 5.2.3 Using FFT to De-Skew............................... 13
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 5.2.4 Using Compression to De-Skew....................... 13
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 5.3 Existing Hardware Can Be Used For Randomness......... 14
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 5.3.1 Using Existing Sound/Video Input................... 14
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 5.3.2 Using Existing Disk Drives......................... 14
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 6. Recommended Non-Hardware Strategy..................... 14
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 6.1 Mixing Functions..................................... 15
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 6.1.1 A Trivial Mixing Function.......................... 15
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 6.1.2 Stronger Mixing Functions.......................... 16
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 6.1.3 Diff-Hellman as a Mixing Function.................. 17
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 6.1.4 Using a Mixing Function to Stretch Random Bits..... 17
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 6.1.5 Other Factors in Choosing a Mixing Function........ 18
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 6.2 Non-Hardware Sources of Randomness................... 19
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 6.3 Cryptographically Strong Sequences................... 19
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyEastlake, Crocker & Schiller [Page 2]
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyRFC 1750 Randomness Recommendations for Security December 1994
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 6.3.1 Traditional Strong Sequences....................... 20
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 6.3.2 The Blum Blum Shub Sequence Generator.............. 21
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 7. Key Generation Standards.............................. 22
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 7.1 US DoD Recommendations for Password Generation....... 23
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 7.2 X9.17 Key Generation................................. 23
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 8. Examples of Randomness Required....................... 24
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 8.1 Password Generation................................. 24
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 8.2 A Very High Security Cryptographic Key............... 25
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 8.2.1 Effort per Key Trial............................... 25
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 8.2.2 Meet in the Middle Attacks......................... 26
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 8.2.3 Other Considerations............................... 26
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 9. Conclusion............................................ 27
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 10. Security Considerations.............................. 27
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley References............................................... 28
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Authors' Addresses....................................... 30
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley1. Introduction
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Software cryptography is coming into wider use. Systems like
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Kerberos, PEM, PGP, etc. are maturing and becoming a part of the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley network landscape [PEM]. These systems provide substantial
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley protection against snooping and spoofing. However, there is a
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley potential flaw. At the heart of all cryptographic systems is the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley generation of secret, unguessable (i.e., random) numbers.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley For the present, the lack of generally available facilities for
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley generating such unpredictable numbers is an open wound in the design
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley of cryptographic software. For the software developer who wants to
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley build a key or password generation procedure that runs on a wide
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley range of hardware, the only safe strategy so far has been to force
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley the local installation to supply a suitable routine to generate
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley random numbers. To say the least, this is an awkward, error-prone
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley and unpalatable solution.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley It is important to keep in mind that the requirement is for data that
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley an adversary has a very low probability of guessing or determining.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley This will fail if pseudo-random data is used which only meets
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley traditional statistical tests for randomness or which is based on
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley limited range sources, such as clocks. Frequently such random
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley quantities are determinable by an adversary searching through an
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley embarrassingly small space of possibilities.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley This informational document suggests techniques for producing random
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley quantities that will be resistant to such attack. It recommends that
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley future systems include hardware random number generation or provide
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley access to existing hardware that can be used for this purpose. It
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley suggests methods for use if such hardware is not available. And it
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley gives some estimates of the number of random bits required for sample
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyEastlake, Crocker & Schiller [Page 3]
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyRFC 1750 Randomness Recommendations for Security December 1994
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley applications.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley2. Requirements
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Probably the most commonly encountered randomness requirement today
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley is the user password. This is usually a simple character string.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Obviously, if a password can be guessed, it does not provide
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley security. (For re-usable passwords, it is desirable that users be
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley able to remember the password. This may make it advisable to use
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley pronounceable character strings or phrases composed on ordinary
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley words. But this only affects the format of the password information,
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley not the requirement that the password be very hard to guess.)
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Many other requirements come from the cryptographic arena.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Cryptographic techniques can be used to provide a variety of services
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley including confidentiality and authentication. Such services are
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley based on quantities, traditionally called "keys", that are unknown to
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley and unguessable by an adversary.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley In some cases, such as the use of symmetric encryption with the one
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley time pads [CRYPTO*] or the US Data Encryption Standard [DES], the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley parties who wish to communicate confidentially and/or with
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley authentication must all know the same secret key. In other cases,
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley using what are called asymmetric or "public key" cryptographic
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley techniques, keys come in pairs. One key of the pair is private and
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley must be kept secret by one party, the other is public and can be
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley published to the world. It is computationally infeasible to
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley determine the private key from the public key [ASYMMETRIC, CRYPTO*].
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley The frequency and volume of the requirement for random quantities
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley differs greatly for different cryptographic systems. Using pure RSA
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley [CRYPTO*], random quantities are required when the key pair is
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley generated, but thereafter any number of messages can be signed
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley without any further need for randomness. The public key Digital
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Signature Algorithm that has been proposed by the US National
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Institute of Standards and Technology (NIST) requires good random
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley numbers for each signature. And encrypting with a one time pad, in
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley principle the strongest possible encryption technique, requires a
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley volume of randomness equal to all the messages to be processed.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley In most of these cases, an adversary can try to determine the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley "secret" key by trial and error. (This is possible as long as the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley key is enough smaller than the message that the correct key can be
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley uniquely identified.) The probability of an adversary succeeding at
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley this must be made acceptably low, depending on the particular
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley application. The size of the space the adversary must search is
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley related to the amount of key "information" present in the information
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley theoretic sense [SHANNON]. This depends on the number of different
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyEastlake, Crocker & Schiller [Page 4]
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyRFC 1750 Randomness Recommendations for Security December 1994
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley secret values possible and the probability of each value as follows:
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Bits-of-info = \ - p * log ( p )
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley where i varies from 1 to the number of possible secret values and p
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley sub i is the probability of the value numbered i. (Since p sub i is
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley less than one, the log will be negative so each term in the sum will
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley be non-negative.)
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley If there are 2^n different values of equal probability, then n bits
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley of information are present and an adversary would, on the average,
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley have to try half of the values, or 2^(n-1) , before guessing the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley secret quantity. If the probability of different values is unequal,
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley then there is less information present and fewer guesses will, on
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley average, be required by an adversary. In particular, any values that
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley the adversary can know are impossible, or are of low probability, can
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley be initially ignored by an adversary, who will search through the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley more probable values first.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley For example, consider a cryptographic system that uses 56 bit keys.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley If these 56 bit keys are derived by using a fixed pseudo-random
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley number generator that is seeded with an 8 bit seed, then an adversary
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley needs to search through only 256 keys (by running the pseudo-random
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley number generator with every possible seed), not the 2^56 keys that
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley may at first appear to be the case. Only 8 bits of "information" are
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley in these 56 bit keys.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley3. Traditional Pseudo-Random Sequences
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Most traditional sources of random numbers use deterministic sources
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley of "pseudo-random" numbers. These typically start with a "seed"
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley quantity and use numeric or logical operations to produce a sequence
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley [KNUTH] has a classic exposition on pseudo-random numbers.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Applications he mentions are simulation of natural phenomena,
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley sampling, numerical analysis, testing computer programs, decision
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley making, and games. None of these have the same characteristics as
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley the sort of security uses we are talking about. Only in the last two
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley could there be an adversary trying to find the random quantity.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley However, in these cases, the adversary normally has only a single
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley chance to use a guessed value. In guessing passwords or attempting
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley to break an encryption scheme, the adversary normally has many,
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyEastlake, Crocker & Schiller [Page 5]
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyRFC 1750 Randomness Recommendations for Security December 1994
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley perhaps unlimited, chances at guessing the correct value and should
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley be assumed to be aided by a computer.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley For testing the "randomness" of numbers, Knuth suggests a variety of
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley measures including statistical and spectral. These tests check
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley things like autocorrelation between different parts of a "random"
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley sequence or distribution of its values. They could be met by a
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley constant stored random sequence, such as the "random" sequence
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley printed in the CRC Standard Mathematical Tables [CRC].
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley A typical pseudo-random number generation technique, known as a
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley linear congruence pseudo-random number generator, is modular
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley arithmetic where the N+1th value is calculated from the Nth value by
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley V = ( V * a + b )(Mod c)
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley The above technique has a strong relationship to linear shift
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley register pseudo-random number generators, which are well understood
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley cryptographically [SHIFT*]. In such generators bits are introduced
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley at one end of a shift register as the Exclusive Or (binary sum
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley without carry) of bits from selected fixed taps into the register.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley For example:
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley +----+ +----+ +----+ +----+
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley | B | <-- | B | <-- | B | <-- . . . . . . <-- | B | <-+
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley | 0 | | 1 | | 2 | | n | |
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley +----+ +----+ +----+ +----+ |
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley | | V +-----+
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley | V +----------------> | |
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley V +-----------------------------> | XOR |
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley +---------------------------------------------------> | |
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley V = ( ( V * 2 ) + B .xor. B ... )(Mod 2^n)
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley The goodness of traditional pseudo-random number generator algorithms
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley is measured by statistical tests on such sequences. Carefully chosen
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley values of the initial V and a, b, and c or the placement of shift
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley register tap in the above simple processes can produce excellent
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyEastlake, Crocker & Schiller [Page 6]
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyRFC 1750 Randomness Recommendations for Security December 1994
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley These sequences may be adequate in simulations (Monte Carlo
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley experiments) as long as the sequence is orthogonal to the structure
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley of the space being explored. Even there, subtle patterns may cause
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley problems. However, such sequences are clearly bad for use in
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley security applications. They are fully predictable if the initial
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley state is known. Depending on the form of the pseudo-random number
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley generator, the sequence may be determinable from observation of a
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley short portion of the sequence [CRYPTO*, STERN]. For example, with
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley the generators above, one can determine V(n+1) given knowledge of
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley V(n). In fact, it has been shown that with these techniques, even if
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley only one bit of the pseudo-random values is released, the seed can be
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley determined from short sequences.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Not only have linear congruent generators been broken, but techniques
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley are now known for breaking all polynomial congruent generators
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley4. Unpredictability
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Randomness in the traditional sense described in section 3 is NOT the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley same as the unpredictability required for security use.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley For example, use of a widely available constant sequence, such as
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley that from the CRC tables, is very weak against an adversary. Once
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley they learn of or guess it, they can easily break all security, future
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley and past, based on the sequence [CRC]. Yet the statistical
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley properties of these tables are good.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley The following sections describe the limitations of some randomness
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley generation techniques and sources.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley4.1 Problems with Clocks and Serial Numbers
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Computer clocks, or similar operating system or hardware values,
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley provide significantly fewer real bits of unpredictability than might
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley appear from their specifications.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Tests have been done on clocks on numerous systems and it was found
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley that their behavior can vary widely and in unexpected ways. One
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley version of an operating system running on one set of hardware may
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley actually provide, say, microsecond resolution in a clock while a
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley different configuration of the "same" system may always provide the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley same lower bits and only count in the upper bits at much lower
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley resolution. This means that successive reads on the clock may
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley produce identical values even if enough time has passed that the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley value "should" change based on the nominal clock resolution. There
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley are also cases where frequently reading a clock can produce
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley artificial sequential values because of extra code that checks for
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyEastlake, Crocker & Schiller [Page 7]
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyRFC 1750 Randomness Recommendations for Security December 1994
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley the clock being unchanged between two reads and increases it by one!
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Designing portable application code to generate unpredictable numbers
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley based on such system clocks is particularly challenging because the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley system designer does not always know the properties of the system
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley clocks that the code will execute on.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Use of a hardware serial number such as an Ethernet address may also
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley provide fewer bits of uniqueness than one would guess. Such
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley quantities are usually heavily structured and subfields may have only
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley a limited range of possible values or values easily guessable based
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley on approximate date of manufacture or other data. For example, it is
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley likely that most of the Ethernet cards installed on Digital Equipment
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Corporation (DEC) hardware within DEC were manufactured by DEC
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley itself, which significantly limits the range of built in addresses.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Problems such as those described above related to clocks and serial
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley numbers make code to produce unpredictable quantities difficult if
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley the code is to be ported across a variety of computer platforms and
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley4.2 Timing and Content of External Events
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley It is possible to measure the timing and content of mouse movement,
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley key strokes, and similar user events. This is a reasonable source of
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley unguessable data with some qualifications. On some machines, inputs
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley such as key strokes are buffered. Even though the user's inter-
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley keystroke timing may have sufficient variation and unpredictability,
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley there might not be an easy way to access that variation. Another
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley problem is that no standard method exists to sample timing details.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley This makes it hard to build standard software intended for
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley distribution to a large range of machines based on this technique.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley The amount of mouse movement or the keys actually hit are usually
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley easier to access than timings but may yield less unpredictability as
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley the user may provide highly repetitive input.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Other external events, such as network packet arrival times, can also
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley be used with care. In particular, the possibility of manipulation of
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley such times by an adversary must be considered.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley4.3 The Fallacy of Complex Manipulation
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley One strategy which may give a misleading appearance of
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley unpredictability is to take a very complex algorithm (or an excellent
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley traditional pseudo-random number generator with good statistical
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley properties) and calculate a cryptographic key by starting with the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley current value of a computer system clock as the seed. An adversary
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley who knew roughly when the generator was started would have a
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyEastlake, Crocker & Schiller [Page 8]
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyRFC 1750 Randomness Recommendations for Security December 1994
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley relatively small number of seed values to test as they would know
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley likely values of the system clock. Large numbers of pseudo-random
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley bits could be generated but the search space an adversary would need
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley to check could be quite small.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Thus very strong and/or complex manipulation of data will not help if
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley the adversary can learn what the manipulation is and there is not
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley enough unpredictability in the starting seed value. Even if they can
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley not learn what the manipulation is, they may be able to use the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley limited number of results stemming from a limited number of seed
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley values to defeat security.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Another serious strategy error is to assume that a very complex
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley pseudo-random number generation algorithm will produce strong random
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley numbers when there has been no theory behind or analysis of the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley algorithm. There is a excellent example of this fallacy right near
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley the beginning of chapter 3 in [KNUTH] where the author describes a
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley complex algorithm. It was intended that the machine language program
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley corresponding to the algorithm would be so complicated that a person
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley trying to read the code without comments wouldn't know what the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley program was doing. Unfortunately, actual use of this algorithm
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley showed that it almost immediately converged to a single repeated
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley value in one case and a small cycle of values in another case.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Not only does complex manipulation not help you if you have a limited
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley range of seeds but blindly chosen complex manipulation can destroy
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley the randomness in a good seed!
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley4.4 The Fallacy of Selection from a Large Database
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Another strategy that can give a misleading appearance of
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley unpredictability is selection of a quantity randomly from a database
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley and assume that its strength is related to the total number of bits
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley in the database. For example, typical USENET servers as of this date
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley process over 35 megabytes of information per day. Assume a random
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley quantity was selected by fetching 32 bytes of data from a random
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley starting point in this data. This does not yield 32*8 = 256 bits
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley worth of unguessability. Even after allowing that much of the data
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley is human language and probably has more like 2 or 3 bits of
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley information per byte, it doesn't yield 32*2.5 = 80 bits of
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley unguessability. For an adversary with access to the same 35
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley megabytes the unguessability rests only on the starting point of the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley selection. That is, at best, about 25 bits of unguessability in this
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley The same argument applies to selecting sequences from the data on a
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley CD ROM or Audio CD recording or any other large public database. If
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley the adversary has access to the same database, this "selection from a
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyEastlake, Crocker & Schiller [Page 9]
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyRFC 1750 Randomness Recommendations for Security December 1994
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley large volume of data" step buys very little. However, if a selection
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley can be made from data to which the adversary has no access, such as
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley system buffers on an active multi-user system, it may be of some
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley5. Hardware for Randomness
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Is there any hope for strong portable randomness in the future?
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley There might be. All that's needed is a physical source of
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley unpredictable numbers.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley A thermal noise or radioactive decay source and a fast, free-running
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley oscillator would do the trick directly [GIFFORD]. This is a trivial
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley amount of hardware, and could easily be included as a standard part
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley of a computer system's architecture. Furthermore, any system with a
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley spinning disk or the like has an adequate source of randomness
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley [DAVIS]. All that's needed is the common perception among computer
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley vendors that this small additional hardware and the software to
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley access it is necessary and useful.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley5.1 Volume Required
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley How much unpredictability is needed? Is it possible to quantify the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley requirement in, say, number of random bits per second?
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley The answer is not very much is needed. For DES, the key is 56 bits
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley and, as we show in an example in Section 8, even the highest security
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley system is unlikely to require a keying material of over 200 bits. If
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley a series of keys are needed, it can be generated from a strong random
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley seed using a cryptographically strong sequence as explained in
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Section 6.3. A few hundred random bits generated once a day would be
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley enough using such techniques. Even if the random bits are generated
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley as slowly as one per second and it is not possible to overlap the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley generation process, it should be tolerable in high security
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley applications to wait 200 seconds occasionally.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley These numbers are trivial to achieve. It could be done by a person
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley repeatedly tossing a coin. Almost any hardware process is likely to
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley be much faster.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley5.2 Sensitivity to Skew
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Is there any specific requirement on the shape of the distribution of
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley the random numbers? The good news is the distribution need not be
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley uniform. All that is needed is a conservative estimate of how non-
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley uniform it is to bound performance. Two simple techniques to de-skew
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley the bit stream are given below and stronger techniques are mentioned
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley in Section 6.1.2 below.
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyEastlake, Crocker & Schiller [Page 10]
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyRFC 1750 Randomness Recommendations for Security December 1994
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley5.2.1 Using Stream Parity to De-Skew
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Consider taking a sufficiently long string of bits and map the string
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley to "zero" or "one". The mapping will not yield a perfectly uniform
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley distribution, but it can be as close as desired. One mapping that
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley serves the purpose is to take the parity of the string. This has the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley advantages that it is robust across all degrees of skew up to the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley estimated maximum skew and is absolutely trivial to implement in
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley The following analysis gives the number of bits that must be sampled:
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Suppose the ratio of ones to zeros is 0.5 + e : 0.5 - e, where e is
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley between 0 and 0.5 and is a measure of the "eccentricity" of the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley distribution. Consider the distribution of the parity function of N
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley bit samples. The probabilities that the parity will be one or zero
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley will be the sum of the odd or even terms in the binomial expansion of
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley (p + q)^N, where p = 0.5 + e, the probability of a one, and q = 0.5 -
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley e, the probability of a zero.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley These sums can be computed easily as
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 1/2 * ( ( p + q ) + ( p - q ) )
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 1/2 * ( ( p + q ) - ( p - q ) ).
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley (Which one corresponds to the probability the parity will be 1
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley depends on whether N is odd or even.)
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Since p + q = 1 and p - q = 2e, these expressions reduce to
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 1/2 * [1 + (2e) ]
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 1/2 * [1 - (2e) ].
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Neither of these will ever be exactly 0.5 unless e is zero, but we
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley can bring them arbitrarily close to 0.5. If we want the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley probabilities to be within some delta d of 0.5, i.e. then
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley ( 0.5 + ( 0.5 * (2e) ) ) < 0.5 + d.
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyEastlake, Crocker & Schiller [Page 11]
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyRFC 1750 Randomness Recommendations for Security December 1994
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Solving for N yields N > log(2d)/log(2e). (Note that 2e is less than
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 1, so its log is negative. Division by a negative number reverses
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley the sense of an inequality.)
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley The following table gives the length of the string which must be
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley sampled for various degrees of skew in order to come within 0.001 of
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley a 50/50 distribution.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley +---------+--------+-------+
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley | Prob(1) | e | N |
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley +---------+--------+-------+
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley | 0.5 | 0.00 | 1 |
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley | 0.6 | 0.10 | 4 |
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley | 0.7 | 0.20 | 7 |
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley | 0.8 | 0.30 | 13 |
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley | 0.9 | 0.40 | 28 |
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley | 0.95 | 0.45 | 59 |
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley | 0.99 | 0.49 | 308 |
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley +---------+--------+-------+
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley The last entry shows that even if the distribution is skewed 99% in
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley favor of ones, the parity of a string of 308 samples will be within
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 0.001 of a 50/50 distribution.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley5.2.2 Using Transition Mappings to De-Skew
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Another technique, originally due to von Neumann [VON NEUMANN], is to
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley examine a bit stream as a sequence of non-overlapping pairs. You
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley could then discard any 00 or 11 pairs found, interpret 01 as a 0 and
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 10 as a 1. Assume the probability of a 1 is 0.5+e and the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley probability of a 0 is 0.5-e where e is the eccentricity of the source
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley and described in the previous section. Then the probability of each
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley pair is as follows:
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley +------+-----------------------------------------+
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley | pair | probability |
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley +------+-----------------------------------------+
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley | 00 | (0.5 - e)^2 = 0.25 - e + e^2 |
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley | 01 | (0.5 - e)*(0.5 + e) = 0.25 - e^2 |
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley | 10 | (0.5 + e)*(0.5 - e) = 0.25 - e^2 |
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley | 11 | (0.5 + e)^2 = 0.25 + e + e^2 |
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley +------+-----------------------------------------+
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley This technique will completely eliminate any bias but at the expense
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley of taking an indeterminate number of input bits for any particular
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley desired number of output bits. The probability of any particular
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley pair being discarded is 0.5 + 2e^2 so the expected number of input
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley bits to produce X output bits is X/(0.25 - e^2).
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyEastlake, Crocker & Schiller [Page 12]
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyRFC 1750 Randomness Recommendations for Security December 1994
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley This technique assumes that the bits are from a stream where each bit
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley has the same probability of being a 0 or 1 as any other bit in the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley stream and that bits are not correlated, i.e., that the bits are
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley identical independent distributions. If alternate bits were from two
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley correlated sources, for example, the above analysis breaks down.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley The above technique also provides another illustration of how a
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley simple statistical analysis can mislead if one is not always on the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley lookout for patterns that could be exploited by an adversary. If the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley algorithm were mis-read slightly so that overlapping successive bits
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley pairs were used instead of non-overlapping pairs, the statistical
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley analysis given is the same; however, instead of provided an unbiased
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley uncorrelated series of random 1's and 0's, it instead produces a
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley totally predictable sequence of exactly alternating 1's and 0's.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley5.2.3 Using FFT to De-Skew
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley When real world data consists of strongly biased or correlated bits,
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley it may still contain useful amounts of randomness. This randomness
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley can be extracted through use of the discrete Fourier transform or its
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley optimized variant, the FFT.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Using the Fourier transform of the data, strong correlations can be
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley discarded. If adequate data is processed and remaining correlations
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley decay, spectral lines approaching statistical independence and
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley normally distributed randomness can be produced [BRILLINGER].
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley5.2.4 Using Compression to De-Skew
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Reversible compression techniques also provide a crude method of de-
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley skewing a skewed bit stream. This follows directly from the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley definition of reversible compression and the formula in Section 2
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley above for the amount of information in a sequence. Since the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley compression is reversible, the same amount of information must be
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley present in the shorter output than was present in the longer input.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley By the Shannon information equation, this is only possible if, on
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley average, the probabilities of the different shorter sequences are
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley more uniformly distributed than were the probabilities of the longer
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley sequences. Thus the shorter sequences are de-skewed relative to the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley However, many compression techniques add a somewhat predicatable
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley preface to their output stream and may insert such a sequence again
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley periodically in their output or otherwise introduce subtle patterns
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley of their own. They should be considered only a rough technique
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley compared with those described above or in Section 6.1.2. At a
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley minimum, the beginning of the compressed sequence should be skipped
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley and only later bits used for applications requiring random bits.
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyEastlake, Crocker & Schiller [Page 13]
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyRFC 1750 Randomness Recommendations for Security December 1994
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley5.3 Existing Hardware Can Be Used For Randomness
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley As described below, many computers come with hardware that can, with
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley care, be used to generate truly random quantities.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley5.3.1 Using Existing Sound/Video Input
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Increasingly computers are being built with inputs that digitize some
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley real world analog source, such as sound from a microphone or video
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley input from a camera. Under appropriate circumstances, such input can
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley provide reasonably high quality random bits. The "input" from a
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley sound digitizer with no source plugged in or a camera with the lens
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley cap on, if the system has enough gain to detect anything, is
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley essentially thermal noise.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley For example, on a SPARCstation, one can read from the /dev/audio
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley device with nothing plugged into the microphone jack. Such data is
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley essentially random noise although it should not be trusted without
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley some checking in case of hardware failure. It will, in any case,
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley need to be de-skewed as described elsewhere.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Combining this with compression to de-skew one can, in UNIXese,
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley generate a huge amount of medium quality random data by doing
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley cat /dev/audio | compress - >random-bits-file
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley5.3.2 Using Existing Disk Drives
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Disk drives have small random fluctuations in their rotational speed
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley due to chaotic air turbulence [DAVIS]. By adding low level disk seek
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley time instrumentation to a system, a series of measurements can be
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley obtained that include this randomness. Such data is usually highly
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley correlated so that significant processing is needed, including FFT
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley (see section 5.2.3). Nevertheless experimentation has shown that,
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley with such processing, disk drives easily produce 100 bits a minute or
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley more of excellent random data.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Partly offsetting this need for processing is the fact that disk
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley drive failure will normally be rapidly noticed. Thus, problems with
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley this method of random number generation due to hardware failure are
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley very unlikely.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley6. Recommended Non-Hardware Strategy
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley What is the best overall strategy for meeting the requirement for
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley unguessable random numbers in the absence of a reliable hardware
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley source? It is to obtain random input from a large number of
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley uncorrelated sources and to mix them with a strong mixing function.
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyEastlake, Crocker & Schiller [Page 14]
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyRFC 1750 Randomness Recommendations for Security December 1994
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Such a function will preserve the randomness present in any of the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley sources even if other quantities being combined are fixed or easily
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley guessable. This may be advisable even with a good hardware source as
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley hardware can also fail, though this should be weighed against any
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley increase in the chance of overall failure due to added software
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley6.1 Mixing Functions
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley A strong mixing function is one which combines two or more inputs and
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley produces an output where each output bit is a different complex non-
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley linear function of all the input bits. On average, changing any
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley input bit will change about half the output bits. But because the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley relationship is complex and non-linear, no particular output bit is
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley guaranteed to change when any particular input bit is changed.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Consider the problem of converting a stream of bits that is skewed
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley towards 0 or 1 to a shorter stream which is more random, as discussed
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley in Section 5.2 above. This is simply another case where a strong
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley mixing function is desired, mixing the input bits to produce a
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley smaller number of output bits. The technique given in Section 5.2.1
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley of using the parity of a number of bits is simply the result of
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley successively Exclusive Or'ing them which is examined as a trivial
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley mixing function immediately below. Use of stronger mixing functions
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley to extract more of the randomness in a stream of skewed bits is
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley examined in Section 6.1.2.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley6.1.1 A Trivial Mixing Function
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley A trivial example for single bit inputs is the Exclusive Or function,
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley which is equivalent to addition without carry, as show in the table
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley below. This is a degenerate case in which the one output bit always
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley changes for a change in either input bit. But, despite its
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley simplicity, it will still provide a useful illustration.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley +-----------+-----------+----------+
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley | input 1 | input 2 | output |
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley +-----------+-----------+----------+
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley | 0 | 0 | 0 |
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley | 0 | 1 | 1 |
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley | 1 | 0 | 1 |
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley | 1 | 1 | 0 |
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley +-----------+-----------+----------+
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley If inputs 1 and 2 are uncorrelated and combined in this fashion then
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley the output will be an even better (less skewed) random bit than the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley inputs. If we assume an "eccentricity" e as defined in Section 5.2
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley above, then the output eccentricity relates to the input eccentricity
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyEastlake, Crocker & Schiller [Page 15]
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyRFC 1750 Randomness Recommendations for Security December 1994
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley e = 2 * e * e
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley output input 1 input 2
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Since e is never greater than 1/2, the eccentricity is always
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley improved except in the case where at least one input is a totally
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley skewed constant. This is illustrated in the following table where
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley the top and left side values are the two input eccentricities and the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley entries are the output eccentricity:
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley +--------+--------+--------+--------+--------+--------+--------+
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley | e | 0.00 | 0.10 | 0.20 | 0.30 | 0.40 | 0.50 |
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley +--------+--------+--------+--------+--------+--------+--------+
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 |
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley | 0.10 | 0.00 | 0.02 | 0.04 | 0.06 | 0.08 | 0.10 |
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley | 0.20 | 0.00 | 0.04 | 0.08 | 0.12 | 0.16 | 0.20 |
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley | 0.30 | 0.00 | 0.06 | 0.12 | 0.18 | 0.24 | 0.30 |
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley | 0.40 | 0.00 | 0.08 | 0.16 | 0.24 | 0.32 | 0.40 |
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley | 0.50 | 0.00 | 0.10 | 0.20 | 0.30 | 0.40 | 0.50 |
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley +--------+--------+--------+--------+--------+--------+--------+
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley However, keep in mind that the above calculations assume that the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley inputs are not correlated. If the inputs were, say, the parity of
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley the number of minutes from midnight on two clocks accurate to a few
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley seconds, then each might appear random if sampled at random intervals
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley much longer than a minute. Yet if they were both sampled and
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley combined with xor, the result would be zero most of the time.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley6.1.2 Stronger Mixing Functions
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley The US Government Data Encryption Standard [DES] is an example of a
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley strong mixing function for multiple bit quantities. It takes up to
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 120 bits of input (64 bits of "data" and 56 bits of "key") and
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley produces 64 bits of output each of which is dependent on a complex
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley non-linear function of all input bits. Other strong encryption
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley functions with this characteristic can also be used by considering
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley them to mix all of their key and data input bits.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Another good family of mixing functions are the "message digest" or
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley hashing functions such as The US Government Secure Hash Standard
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley [SHS] and the MD2, MD4, MD5 [MD2, MD4, MD5] series. These functions
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley all take an arbitrary amount of input and produce an output mixing
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley all the input bits. The MD* series produce 128 bits of output and SHS
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley produces 160 bits.
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyEastlake, Crocker & Schiller [Page 16]
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyRFC 1750 Randomness Recommendations for Security December 1994
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Although the message digest functions are designed for variable
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley amounts of input, DES and other encryption functions can also be used
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley to combine any number of inputs. If 64 bits of output is adequate,
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley the inputs can be packed into a 64 bit data quantity and successive
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 56 bit keys, padding with zeros if needed, which are then used to
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley successively encrypt using DES in Electronic Codebook Mode [DES
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley MODES]. If more than 64 bits of output are needed, use more complex
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley mixing. For example, if inputs are packed into three quantities, A,
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley B, and C, use DES to encrypt A with B as a key and then with C as a
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley key to produce the 1st part of the output, then encrypt B with C and
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley then A for more output and, if necessary, encrypt C with A and then B
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley for yet more output. Still more output can be produced by reversing
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley the order of the keys given above to stretch things. The same can be
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley done with the hash functions by hashing various subsets of the input
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley data to produce multiple outputs. But keep in mind that it is
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley impossible to get more bits of "randomness" out than are put in.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley An example of using a strong mixing function would be to reconsider
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley the case of a string of 308 bits each of which is biased 99% towards
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley zero. The parity technique given in Section 5.2.1 above reduced this
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley to one bit with only a 1/1000 deviance from being equally likely a
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley zero or one. But, applying the equation for information given in
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Section 2, this 308 bit sequence has 5 bits of information in it.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Thus hashing it with SHS or MD5 and taking the bottom 5 bits of the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley result would yield 5 unbiased random bits as opposed to the single
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley bit given by calculating the parity of the string.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley6.1.3 Diffie-Hellman as a Mixing Function
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Diffie-Hellman exponential key exchange is a technique that yields a
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley shared secret between two parties that can be made computationally
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley infeasible for a third party to determine even if they can observe
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley all the messages between the two communicating parties. This shared
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley secret is a mixture of initial quantities generated by each of them
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley [D-H]. If these initial quantities are random, then the shared
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley secret contains the combined randomness of them both, assuming they
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley are uncorrelated.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley6.1.4 Using a Mixing Function to Stretch Random Bits
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley While it is not necessary for a mixing function to produce the same
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley or fewer bits than its inputs, mixing bits cannot "stretch" the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley amount of random unpredictability present in the inputs. Thus four
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley inputs of 32 bits each where there is 12 bits worth of
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley unpredicatability (such as 4,096 equally probable values) in each
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley input cannot produce more than 48 bits worth of unpredictable output.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley The output can be expanded to hundreds or thousands of bits by, for
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley example, mixing with successive integers, but the clever adversary's
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyEastlake, Crocker & Schiller [Page 17]
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyRFC 1750 Randomness Recommendations for Security December 1994
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley search space is still 2^48 possibilities. Furthermore, mixing to
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley fewer bits than are input will tend to strengthen the randomness of
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley the output the way using Exclusive Or to produce one bit from two did
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley The last table in Section 6.1.1 shows that mixing a random bit with a
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley constant bit with Exclusive Or will produce a random bit. While this
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley is true, it does not provide a way to "stretch" one random bit into
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley more than one. If, for example, a random bit is mixed with a 0 and
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley then with a 1, this produces a two bit sequence but it will always be
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley either 01 or 10. Since there are only two possible values, there is
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley still only the one bit of original randomness.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley6.1.5 Other Factors in Choosing a Mixing Function
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley For local use, DES has the advantages that it has been widely tested
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley for flaws, is widely documented, and is widely implemented with
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley hardware and software implementations available all over the world
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley including source code available by anonymous FTP. The SHS and MD*
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley family are younger algorithms which have been less tested but there
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley is no particular reason to believe they are flawed. Both MD5 and SHS
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley were derived from the earlier MD4 algorithm. They all have source
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley code available by anonymous FTP [SHS, MD2, MD4, MD5].
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley DES and SHS have been vouched for the the US National Security Agency
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley (NSA) on the basis of criteria that primarily remain secret. While
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley this is the cause of much speculation and doubt, investigation of DES
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley over the years has indicated that NSA involvement in modifications to
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley its design, which originated with IBM, was primarily to strengthen
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley it. No concealed or special weakness has been found in DES. It is
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley almost certain that the NSA modification to MD4 to produce the SHS
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley similarly strengthened the algorithm, possibly against threats not
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley yet known in the public cryptographic community.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley DES, SHS, MD4, and MD5 are royalty free for all purposes. MD2 has
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley been freely licensed only for non-profit use in connection with
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Privacy Enhanced Mail [PEM]. Between the MD* algorithms, some people
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley believe that, as with "Goldilocks and the Three Bears", MD2 is strong
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley but too slow, MD4 is fast but too weak, and MD5 is just right.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Another advantage of the MD* or similar hashing algorithms over
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley encryption algorithms is that they are not subject to the same
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley regulations imposed by the US Government prohibiting the unlicensed
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley export or import of encryption/decryption software and hardware. The
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley same should be true of DES rigged to produce an irreversible hash
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley code but most DES packages are oriented to reversible encryption.
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyEastlake, Crocker & Schiller [Page 18]
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyRFC 1750 Randomness Recommendations for Security December 1994
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley6.2 Non-Hardware Sources of Randomness
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley The best source of input for mixing would be a hardware randomness
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley such as disk drive timing affected by air turbulence, audio input
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley with thermal noise, or radioactive decay. However, if that is not
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley available there are other possibilities. These include system
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley clocks, system or input/output buffers, user/system/hardware/network
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley serial numbers and/or addresses and timing, and user input.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Unfortunately, any of these sources can produce limited or
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley predicatable values under some circumstances.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Some of the sources listed above would be quite strong on multi-user
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley systems where, in essence, each user of the system is a source of
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley randomness. However, on a small single user system, such as a
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley typical IBM PC or Apple Macintosh, it might be possible for an
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley adversary to assemble a similar configuration. This could give the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley adversary inputs to the mixing process that were sufficiently
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley correlated to those used originally as to make exhaustive search
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley The use of multiple random inputs with a strong mixing function is
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley recommended and can overcome weakness in any particular input. For
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley example, the timing and content of requested "random" user keystrokes
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley can yield hundreds of random bits but conservative assumptions need
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley to be made. For example, assuming a few bits of randomness if the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley inter-keystroke interval is unique in the sequence up to that point
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley and a similar assumption if the key hit is unique but assuming that
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley no bits of randomness are present in the initial key value or if the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley timing or key value duplicate previous values. The results of mixing
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley these timings and characters typed could be further combined with
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley clock values and other inputs.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley This strategy may make practical portable code to produce good random
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley numbers for security even if some of the inputs are very weak on some
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley of the target systems. However, it may still fail against a high
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley grade attack on small single user systems, especially if the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley adversary has ever been able to observe the generation process in the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley past. A hardware based random source is still preferable.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley6.3 Cryptographically Strong Sequences
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley In cases where a series of random quantities must be generated, an
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley adversary may learn some values in the sequence. In general, they
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley should not be able to predict other values from the ones that they
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyEastlake, Crocker & Schiller [Page 19]
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyRFC 1750 Randomness Recommendations for Security December 1994
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley The correct technique is to start with a strong random seed, take
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley cryptographically strong steps from that seed [CRYPTO2, CRYPTO3], and
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley do not reveal the complete state of the generator in the sequence
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley elements. If each value in the sequence can be calculated in a fixed
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley way from the previous value, then when any value is compromised, all
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley future values can be determined. This would be the case, for
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley example, if each value were a constant function of the previously
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley used values, even if the function were a very strong, non-invertible
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley message digest function.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley It should be noted that if your technique for generating a sequence
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley of key values is fast enough, it can trivially be used as the basis
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley for a confidentiality system. If two parties use the same sequence
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley generating technique and start with the same seed material, they will
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley generate identical sequences. These could, for example, be xor'ed at
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley one end with data being send, encrypting it, and xor'ed with this
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley data as received, decrypting it due to the reversible properties of
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley the xor operation.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley6.3.1 Traditional Strong Sequences
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley A traditional way to achieve a strong sequence has been to have the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley values be produced by hashing the quantities produced by
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley concatenating the seed with successive integers or the like and then
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley mask the values obtained so as to limit the amount of generator state
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley available to the adversary.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley It may also be possible to use an "encryption" algorithm with a
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley random key and seed value to encrypt and feedback some or all of the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley output encrypted value into the value to be encrypted for the next
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley iteration. Appropriate feedback techniques will usually be
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley recommended with the encryption algorithm. An example is shown below
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley where shifting and masking are used to combine the cypher output
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley feedback. This type of feedback is recommended by the US Government
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley in connection with DES [DES MODES].
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyEastlake, Crocker & Schiller [Page 20]
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyRFC 1750 Randomness Recommendations for Security December 1994
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley +---------------+
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley +--+------------+
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley | | +---------+
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley | +---------> | | +-----+
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley +--+ | Encrypt | <--- | Key |
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley | +-------- | | +-----+
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley | | +---------+
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley +------------+--+
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley +---------------+
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Note that if a shift of one is used, this is the same as the shift
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley register technique described in Section 3 above but with the all
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley important difference that the feedback is determined by a complex
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley non-linear function of all bits rather than a simple linear or
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley polynomial combination of output from a few bit position taps.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley It has been shown by Donald W. Davies that this sort of shifted
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley partial output feedback significantly weakens an algorithm compared
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley will feeding all of the output bits back as input. In particular,
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley for DES, repeated encrypting a full 64 bit quantity will give an
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley expected repeat in about 2^63 iterations. Feeding back anything less
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley than 64 (and more than 0) bits will give an expected repeat in
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley between 2**31 and 2**32 iterations!
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley To predict values of a sequence from others when the sequence was
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley generated by these techniques is equivalent to breaking the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley cryptosystem or inverting the "non-invertible" hashing involved with
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley only partial information available. The less information revealed
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley each iteration, the harder it will be for an adversary to predict the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley sequence. Thus it is best to use only one bit from each value. It
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley has been shown that in some cases this makes it impossible to break a
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley system even when the cryptographic system is invertible and can be
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley broken if all of each generated value was revealed.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley6.3.2 The Blum Blum Shub Sequence Generator
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Currently the generator which has the strongest public proof of
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley strength is called the Blum Blum Shub generator after its inventors
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley [BBS]. It is also very simple and is based on quadratic residues.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley It's only disadvantage is that is is computationally intensive
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley compared with the traditional techniques give in 6.3.1 above. This
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley is not a serious draw back if it is used for moderately infrequent
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley purposes, such as generating session keys.
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyEastlake, Crocker & Schiller [Page 21]
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyRFC 1750 Randomness Recommendations for Security December 1994
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Simply choose two large prime numbers, say p and q, which both have
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley the property that you get a remainder of 3 if you divide them by 4.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Let n = p * q. Then you choose a random number x relatively prime to
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley n. The initial seed for the generator and the method for calculating
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley subsequent values are then
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley s = ( x )(Mod n)
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley s = ( s )(Mod n)
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley You must be careful to use only a few bits from the bottom of each s.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley It is always safe to use only the lowest order bit. If you use no
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley more than the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley log ( log ( s ) )
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley low order bits, then predicting any additional bits from a sequence
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley generated in this manner is provable as hard as factoring n. As long
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley as the initial x is secret, you can even make n public if you want.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley An intersting characteristic of this generator is that you can
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley directly calculate any of the s values. In particular
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley ( ( 2 )(Mod (( p - 1 ) * ( q - 1 )) ) )
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley s = ( s )(Mod n)
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley This means that in applications where many keys are generated in this
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley fashion, it is not necessary to save them all. Each key can be
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley effectively indexed and recovered from that small index and the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley initial s and n.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley7. Key Generation Standards
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Several public standards are now in place for the generation of keys.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Two of these are described below. Both use DES but any equally
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley strong or stronger mixing function could be substituted.
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyEastlake, Crocker & Schiller [Page 22]
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyRFC 1750 Randomness Recommendations for Security December 1994
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley7.1 US DoD Recommendations for Password Generation
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley The United States Department of Defense has specific recommendations
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley for password generation [DoD]. They suggest using the US Data
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Encryption Standard [DES] in Output Feedback Mode [DES MODES] as
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley use an initialization vector determined from
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley the system clock,
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley user ID, and
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley date and time;
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley use a key determined from
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley system interrupt registers,
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley system status registers, and
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley system counters; and,
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley as plain text, use an external randomly generated 64 bit
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley quantity such as 8 characters typed in by a system
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley administrator.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley The password can then be calculated from the 64 bit "cipher text"
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley generated in 64-bit Output Feedback Mode. As many bits as are needed
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley can be taken from these 64 bits and expanded into a pronounceable
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley word, phrase, or other format if a human being needs to remember the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley7.2 X9.17 Key Generation
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley The American National Standards Institute has specified a method for
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley generating a sequence of keys as follows:
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley s is the initial 64 bit seed
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley g is the sequence of generated 64 bit key quantities
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley k is a random key reserved for generating this key sequence
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley t is the time at which a key is generated to as fine a resolution
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley as is available (up to 64 bits).
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley DES ( K, Q ) is the DES encryption of quantity Q with key K
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyEastlake, Crocker & Schiller [Page 23]
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyRFC 1750 Randomness Recommendations for Security December 1994
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley g = DES ( k, DES ( k, t ) .xor. s )
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley s = DES ( k, DES ( k, t ) .xor. g )
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley If g sub n is to be used as a DES key, then every eighth bit should
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley be adjusted for parity for that use but the entire 64 bit unmodified
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley g should be used in calculating the next s.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley8. Examples of Randomness Required
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Below are two examples showing rough calculations of needed
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley randomness for security. The first is for moderate security
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley passwords while the second assumes a need for a very high security
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley cryptographic key.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley8.1 Password Generation
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Assume that user passwords change once a year and it is desired that
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley the probability that an adversary could guess the password for a
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley particular account be less than one in a thousand. Further assume
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley that sending a password to the system is the only way to try a
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley password. Then the crucial question is how often an adversary can
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley try possibilities. Assume that delays have been introduced into a
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley system so that, at most, an adversary can make one password try every
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley six seconds. That's 600 per hour or about 15,000 per day or about
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 5,000,000 tries in a year. Assuming any sort of monitoring, it is
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley unlikely someone could actually try continuously for a year. In
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley fact, even if log files are only checked monthly, 500,000 tries is
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley more plausible before the attack is noticed and steps taken to change
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley passwords and make it harder to try more passwords.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley To have a one in a thousand chance of guessing the password in
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 500,000 tries implies a universe of at least 500,000,000 passwords or
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley about 2^29. Thus 29 bits of randomness are needed. This can probably
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley be achieved using the US DoD recommended inputs for password
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley generation as it has 8 inputs which probably average over 5 bits of
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley randomness each (see section 7.1). Using a list of 1000 words, the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley password could be expressed as a three word phrase (1,000,000,000
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley possibilities) or, using case insensitive letters and digits, six
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley would suffice ((26+10)^6 = 2,176,782,336 possibilities).
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley For a higher security password, the number of bits required goes up.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley To decrease the probability by 1,000 requires increasing the universe
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley of passwords by the same factor which adds about 10 bits. Thus to
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley have only a one in a million chance of a password being guessed under
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley the above scenario would require 39 bits of randomness and a password
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyEastlake, Crocker & Schiller [Page 24]
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyRFC 1750 Randomness Recommendations for Security December 1994
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley that was a four word phrase from a 1000 word list or eight
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley letters/digits. To go to a one in 10^9 chance, 49 bits of randomness
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley are needed implying a five word phrase or ten letter/digit password.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley In a real system, of course, there are also other factors. For
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley example, the larger and harder to remember passwords are, the more
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley likely users are to write them down resulting in an additional risk
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley of compromise.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley8.2 A Very High Security Cryptographic Key
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Assume that a very high security key is needed for symmetric
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley encryption / decryption between two parties. Assume an adversary can
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley observe communications and knows the algorithm being used. Within
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley the field of random possibilities, the adversary can try key values
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley in hopes of finding the one in use. Assume further that brute force
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley trial of keys is the best the adversary can do.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley8.2.1 Effort per Key Trial
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley How much effort will it take to try each key? For very high security
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley applications it is best to assume a low value of effort. Even if it
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley would clearly take tens of thousands of computer cycles or more to
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley try a single key, there may be some pattern that enables huge blocks
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley of key values to be tested with much less effort per key. Thus it is
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley probably best to assume no more than a couple hundred cycles per key.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley (There is no clear lower bound on this as computers operate in
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley parallel on a number of bits and a poor encryption algorithm could
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley allow many keys or even groups of keys to be tested in parallel.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley However, we need to assume some value and can hope that a reasonably
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley strong algorithm has been chosen for our hypothetical high security
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley If the adversary can command a highly parallel processor or a large
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley network of work stations, 2*10^10 cycles per second is probably a
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley minimum assumption for availability today. Looking forward just a
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley couple years, there should be at least an order of magnitude
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley improvement. Thus assuming 10^9 keys could be checked per second or
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 3.6*10^11 per hour or 6*10^13 per week or 2.4*10^14 per month is
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley reasonable. This implies a need for a minimum of 51 bits of
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley randomness in keys to be sure they cannot be found in a month. Even
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley then it is possible that, a few years from now, a highly determined
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley and resourceful adversary could break the key in 2 weeks (on average
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley they need try only half the keys).
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyEastlake, Crocker & Schiller [Page 25]
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyRFC 1750 Randomness Recommendations for Security December 1994
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley8.2.2 Meet in the Middle Attacks
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley If chosen or known plain text and the resulting encrypted text are
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley available, a "meet in the middle" attack is possible if the structure
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley of the encryption algorithm allows it. (In a known plain text
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley attack, the adversary knows all or part of the messages being
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley encrypted, possibly some standard header or trailer fields. In a
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley chosen plain text attack, the adversary can force some chosen plain
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley text to be encrypted, possibly by "leaking" an exciting text that
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley would then be sent by the adversary over an encrypted channel.)
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley An oversimplified explanation of the meet in the middle attack is as
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley follows: the adversary can half-encrypt the known or chosen plain
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley text with all possible first half-keys, sort the output, then half-
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley decrypt the encoded text with all the second half-keys. If a match
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley is found, the full key can be assembled from the halves and used to
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley decrypt other parts of the message or other messages. At its best,
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley this type of attack can halve the exponent of the work required by
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley the adversary while adding a large but roughly constant factor of
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley effort. To be assured of safety against this, a doubling of the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley amount of randomness in the key to a minimum of 102 bits is required.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley The meet in the middle attack assumes that the cryptographic
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley algorithm can be decomposed in this way but we can not rule that out
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley without a deep knowledge of the algorithm. Even if a basic algorithm
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley is not subject to a meet in the middle attack, an attempt to produce
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley a stronger algorithm by applying the basic algorithm twice (or two
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley different algorithms sequentially) with different keys may gain less
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley added security than would be expected. Such a composite algorithm
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley would be subject to a meet in the middle attack.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Enormous resources may be required to mount a meet in the middle
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley attack but they are probably within the range of the national
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley security services of a major nation. Essentially all nations spy on
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley other nations government traffic and several nations are believed to
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley spy on commercial traffic for economic advantage.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley8.2.3 Other Considerations
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Since we have not even considered the possibilities of special
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley purpose code breaking hardware or just how much of a safety margin we
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley want beyond our assumptions above, probably a good minimum for a very
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley high security cryptographic key is 128 bits of randomness which
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley implies a minimum key length of 128 bits. If the two parties agree
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley on a key by Diffie-Hellman exchange [D-H], then in principle only
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley half of this randomness would have to be supplied by each party.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley However, there is probably some correlation between their random
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley inputs so it is probably best to assume that each party needs to
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyEastlake, Crocker & Schiller [Page 26]
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyRFC 1750 Randomness Recommendations for Security December 1994
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley provide at least 96 bits worth of randomness for very high security
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley if Diffie-Hellman is used.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley This amount of randomness is beyond the limit of that in the inputs
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley recommended by the US DoD for password generation and could require
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley user typing timing, hardware random number generation, or other
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley It should be noted that key length calculations such at those above
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley are controversial and depend on various assumptions about the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley cryptographic algorithms in use. In some cases, a professional with
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley a deep knowledge of code breaking techniques and of the strength of
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley the algorithm in use could be satisfied with less than half of the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley key size derived above.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley9. Conclusion
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Generation of unguessable "random" secret quantities for security use
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley is an essential but difficult task.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley We have shown that hardware techniques to produce such randomness
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley would be relatively simple. In particular, the volume and quality
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley would not need to be high and existing computer hardware, such as
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley disk drives, can be used. Computational techniques are available to
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley process low quality random quantities from multiple sources or a
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley larger quantity of such low quality input from one source and produce
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley a smaller quantity of higher quality, less predictable key material.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley In the absence of hardware sources of randomness, a variety of user
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley and software sources can frequently be used instead with care;
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley however, most modern systems already have hardware, such as disk
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley drives or audio input, that could be used to produce high quality
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Once a sufficient quantity of high quality seed key material (a few
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley hundred bits) is available, strong computational techniques are
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley available to produce cryptographically strong sequences of
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley unpredicatable quantities from this seed material.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley10. Security Considerations
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley The entirety of this document concerns techniques and recommendations
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley for generating unguessable "random" quantities for use as passwords,
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley cryptographic keys, and similar security uses.
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyEastlake, Crocker & Schiller [Page 27]
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyRFC 1750 Randomness Recommendations for Security December 1994
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley [ASYMMETRIC] - Secure Communications and Asymmetric Cryptosystems,
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley edited by Gustavus J. Simmons, AAAS Selected Symposium 69, Westview
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley [BBS] - A Simple Unpredictable Pseudo-Random Number Generator, SIAM
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Journal on Computing, v. 15, n. 2, 1986, L. Blum, M. Blum, & M. Shub.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley [BRILLINGER] - Time Series: Data Analysis and Theory, Holden-Day,
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 1981, David Brillinger.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley [CRC] - C.R.C. Standard Mathematical Tables, Chemical Rubber
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Publishing Company.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley [CRYPTO1] - Cryptography: A Primer, A Wiley-Interscience Publication,
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley John Wiley & Sons, 1981, Alan G. Konheim.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley [CRYPTO2] - Cryptography: A New Dimension in Computer Data Security,
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley A Wiley-Interscience Publication, John Wiley & Sons, 1982, Carl H.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Meyer & Stephen M. Matyas.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley [CRYPTO3] - Applied Cryptography: Protocols, Algorithms, and Source
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Code in C, John Wiley & Sons, 1994, Bruce Schneier.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley [DAVIS] - Cryptographic Randomness from Air Turbulence in Disk
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Drives, Advances in Cryptology - Crypto '94, Springer-Verlag Lecture
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Notes in Computer Science #839, 1984, Don Davis, Ross Ihaka, and
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Philip Fenstermacher.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley [DES] - Data Encryption Standard, United States of America,
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Department of Commerce, National Institute of Standards and
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Technology, Federal Information Processing Standard (FIPS) 46-1.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley - Data Encryption Algorithm, American National Standards Institute,
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley ANSI X3.92-1981.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley (See also FIPS 112, Password Usage, which includes FORTRAN code for
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley performing DES.)
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley [DES MODES] - DES Modes of Operation, United States of America,
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Department of Commerce, National Institute of Standards and
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Technology, Federal Information Processing Standard (FIPS) 81.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley - Data Encryption Algorithm - Modes of Operation, American National
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Standards Institute, ANSI X3.106-1983.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley [D-H] - New Directions in Cryptography, IEEE Transactions on
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Information Technology, November, 1976, Whitfield Diffie and Martin
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyEastlake, Crocker & Schiller [Page 28]
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyRFC 1750 Randomness Recommendations for Security December 1994
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley [DoD] - Password Management Guideline, United States of America,
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Department of Defense, Computer Security Center, CSC-STD-002-85.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley (See also FIPS 112, Password Usage, which incorporates CSC-STD-002-85
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley as one of its appendices.)
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley [GIFFORD] - Natural Random Number, MIT/LCS/TM-371, September 1988,
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley David K. Gifford
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley [KNUTH] - The Art of Computer Programming, Volume 2: Seminumerical
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Algorithms, Chapter 3: Random Numbers. Addison Wesley Publishing
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Company, Second Edition 1982, Donald E. Knuth.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley [KRAWCZYK] - How to Predict Congruential Generators, Journal of
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Algorithms, V. 13, N. 4, December 1992, H. Krawczyk
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley [MD2] - The MD2 Message-Digest Algorithm, RFC1319, April 1992, B.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley [MD4] - The MD4 Message-Digest Algorithm, RFC1320, April 1992, R.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley [MD5] - The MD5 Message-Digest Algorithm, RFC1321, April 1992, R.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley [PEM] - RFCs 1421 through 1424:
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley - RFC 1424, Privacy Enhancement for Internet Electronic Mail: Part
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley IV: Key Certification and Related Services, 02/10/1993, B. Kaliski
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley - RFC 1423, Privacy Enhancement for Internet Electronic Mail: Part
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley III: Algorithms, Modes, and Identifiers, 02/10/1993, D. Balenson
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley - RFC 1422, Privacy Enhancement for Internet Electronic Mail: Part
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley II: Certificate-Based Key Management, 02/10/1993, S. Kent
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley - RFC 1421, Privacy Enhancement for Internet Electronic Mail: Part I:
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Message Encryption and Authentication Procedures, 02/10/1993, J. Linn
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley [SHANNON] - The Mathematical Theory of Communication, University of
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Illinois Press, 1963, Claude E. Shannon. (originally from: Bell
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley System Technical Journal, July and October 1948)
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley [SHIFT1] - Shift Register Sequences, Aegean Park Press, Revised
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Edition 1982, Solomon W. Golomb.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley [SHIFT2] - Cryptanalysis of Shift-Register Generated Stream Cypher
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Systems, Aegean Park Press, 1984, Wayne G. Barker.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley [SHS] - Secure Hash Standard, United States of American, National
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Institute of Science and Technology, Federal Information Processing
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Standard (FIPS) 180, April 1993.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley [STERN] - Secret Linear Congruential Generators are not
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Cryptograhically Secure, Proceedings of IEEE STOC, 1987, J. Stern.
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyEastlake, Crocker & Schiller [Page 29]
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyRFC 1750 Randomness Recommendations for Security December 1994
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley [VON NEUMANN] - Various techniques used in connection with random
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley digits, von Neumann's Collected Works, Vol. 5, Pergamon Press, 1963,
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley J. von Neumann.
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyAuthors' Addresses
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Donald E. Eastlake 3rd
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Digital Equipment Corporation
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 550 King Street, LKG2-1/BB3
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Littleton, MA 01460
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Phone: +1 508 486 6577(w) +1 508 287 4877(h)
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley EMail: dee@lkg.dec.com
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Stephen D. Crocker
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley CyberCash Inc.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 2086 Hunters Crest Way
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Vienna, VA 22181
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Phone: +1 703-620-1222(w) +1 703-391-2651 (fax)
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley EMail: crocker@cybercash.com
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Jeffrey I. Schiller
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Massachusetts Institute of Technology
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley 77 Massachusetts Avenue
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Cambridge, MA 02139
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley Phone: +1 617 253 0161(w)
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley EMail: jis@mit.edu
c7ddab7655021d96211a26f99d9f694396c53284Bob HalleyEastlake, Crocker & Schiller [Page 30]