FIPS PUB 181 - Announcing the Standard for Automated Password Generator
Federal Information Processing Standards Publication 181
1993 October 5
Federal Information Processing Standards Publications (FIPS PUBS) are issued by the National Institute of Standards and Technology (NIST) after approval by the Secretary of Commerce pursuant to Section 111(d) of the Federal Property and Administrative Services Act of 1949 as amended by the Computer Security Act of 1987, Public Law 100-235.
Agency heads may act upon a written waiver request containing the information detailed above. Agency heads may also act without a written waiver request when they determine that conditions for meeting the standard cannot be met. Agency heads may approve waivers only by a written decision which explains the basis on which the agency head made the required finding(s). A copy of each such decision, with procurement sensitive or classified portions clearly identified, shall be sent to: National Institute of Standards and Technology; ATTN: FIPS Waiver Decisions; Technology Building, Room B-154; Gaithersburg, MD 20899.
In addition, notice of each waiver granted and each delegation of authority to approve waivers shall be sent promptly to the Committee on Government Operations of the House of Representatives and the Committee on Government Affairs of the Senate and shall be published promptly in the Federal Register.
When the determination on a waiver applies to the procurement of equipment and/or services, a notice of the waiver determination must be published in the Commerce Business Daily as a part of the notice of solicitation for offers of an acquisition or, if the waiver determination is made after that notice is published, by amendment to such notice.
A copy of the waiver, any supporting documents, the document approving the waiver, and any supporting and accompanying documents, with such deletions as the agency is authorized and decides to make under 5 U.S.C Sec. 552(b), shall be part of the procurement documentation and retained by the agency.
1993 October 5
Announcing the Standard for
Automated Password Generator
Appendix A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
The Automated Password Generator standard is derived from a C-code version of the program described in "A Random Word Generator For Pronounceable Passwords," National Technical Information Service (NTIS) AD A 017676. The original program used Unix system functions to produce the random numbers needed by the password generator. These functions were replaced with a DES-based random number subroutine that uses DES in the Electronic Code Book (ECB) mode. As input, DES uses the old password or user supplied character string, and a pseudorandom key created in accordance with the procedure described in Appendix C of ANSI X9.17. Any change to either the key or input data string causes DES to generate an entirely different random number. Every time this occurs the password generator creates a new random password.
2.0 TECHNICAL EXPLANATION
The Automated Password Generator standard is organized as a main procedure that references three major components: (1) the "unit table"; (2) the "digram table"; and (3) the "random number subroutine." The random password generator works by forming pronounceable syllables and concatenating them to form a word. Rules of pronounceability are stored in a table for every unit and every pair of units (digram). The rules are used to determine whether a given unit is legal or illegal, based on its position within the syllable and adjacent units. Most rules and checks are syllable oriented and do not depend on anything outside the current syllable. The main procedure (algorithm) defines the internal rules used to generate random words. The three components and the algorithm are described below.
Appendix A is the code for the NIST implementation of the Automated Password Generator standard. This code consists of the C-code version of the program described in "A Random Word Generator For Pronounceable Passwords," the code that comprises the DES random number subroutine, the actual DES subroutine, and the code for generating the pseudorandom key. Implementations in other programming languages are acceptable, however, the results obtained must be logically equivalent to those produced by this standard.
In the NIST implementation of the password generator, the values selected for the two DES keys and the seed for the random number generator are readable in the code (Appendix A). In an actual vendor or user developed implementation the values of the keys and the seed would be secret, randomly generated values set by the application.
2.1 Unit Table
The unit table defines the units (alphabetic characters) and specifies rules pertaining to the individual units used in a randomly generated word. For example, the location of vowels in the words generated is determined by these rules. The unit table used in the Automated Password Generator standard is identical to that furnished in the report "A Random Word Generator For Pronounceable Passwords" (item i in Cross Index).
2.2 Digram Table
The digram table specifies rules about all possible pairs of units and the juxtaposition of units. The table contains one entry for every pair of units (digram), whether that pair is allowed or not. The random word generator ensures that the rules specified in the digram table are satisfied for every two consecutive units in the word being formed. The digram table is also from the original report.
2.3 Random Number Generator Subroutine
The random number generator uses a DES subroutine to produce double precision floating point values between 0 and (excluding) 1. These numbers are multiplied by a program variable n which is an integer value. This operation yields a random integer between 0 and (n-1) inclusive. The random numbers created by the DES routine serve as input to the random word generator. The subroutine to generate these numbers is called by the word generator each time a character (unit) is needed.
Not all characters generated will be acceptable to the word generator in every position of the word. Each character is checked for appropriateness using the rules defined by the unit and digram tables. Therefore the random number generator subroutine will be repeatedly called until an acceptable character is returned. An upper limit of 100 calls is placed on generating any particular character. If that number is reached the whole word is discarded and the program starts over.
The actual distribution of legal units is different for every position in a particular word which, for any unit, depends on the units that precede it as well as the units and digram tables. The random number subroutine itself makes no tests for legal units.
As its input DES accepts two 64 bit data blocks. One consists of the old password or a data string; the other is a 64 bit (56 bits + 8 parity bits) pseudorandom key derived using the procedure described in Appendix C of ANSI X9.17. The old password is entered manually from the keyboard. An input array is created from the first eight bytes of the password or input string. The program will accept a null string (carriage return). All characters past the eighth are disregarded. If the input block is less than eight characters long the extra elements in the input array are filled with ASCII 0. The Electronic Codebook (ECB) mode of DES described in FIPS 81 ("DES Modes of Operation," December 2, 1980) is then used to encrypt the input data. The output is a 64-bit random number which is the encrypted form of the input. The first function in the DES structure is setkey(), which converts the pseudorandom key to a format used by DES for the encryption. The command-line options sent to setkey are (0, 0, key). The first 0 is set so that setkey() does not generate parity; the second 0 tells setkey() that encryption (rather than decryption) is required. Key is a pointer to the beginning of the key array. After setkey(), the des() function is called. For input it uses the addresses of the input and output arrays. Both input and output are defined as unsigned character arrays of length 8 bytes.
The output array, out, is sent to a function, answer(), which returns the final required number. The function answer() takes in the address of the output array as an unsigned char pointer and the integer n for which a value of 0 to (n-1) is needed by the random word program. This function creates a variable sum, defined as an unsigned integer. To obtain a numerical value from the output character array, it adds the ASCII values of the first three elements in the out array and stores the sum in the variable sum. Thus, sum = out + out + out, which is an integer. To obtain a number with the required range of 0 to n-1 from sum, the function takes the modulus of sum and n, (sum%n). This value is then returned to the calling function within the random word program.
2.4 Random Word Algorithm
The algorithm used to generate random words is fixed and cannot be modified without changing the logic of the program. The function of the algorithm is to determine whether a given unit, generated by the random unit subroutine, can be appended to the end of the partial word formed so far. Rules of pronounceability are stored in the unit and digram tables discussed above. The rules are used to check if a given unit is legal or illegal. If illegal, the unit is discarded and the random unit subroutine is called again. Once a unit is accepted, various state variables are updated and a unit for the next position in the word is tried. Most rules and checks are syllable oriented and do not depend on anything outside the current syllables. When the end of the word is reached, additional checks are made before the algorithm terminates.
Passwords created by this automated password generator are composed of the 26 characters of the English alphabet. Although numbers and special characters are not permitted, the password space, which is a function of the number of characters in the password, is very large. Approximately 18 million 6-character, 5.7 billion 8- character, and 1.6 trillion 10-character passwords can be created by the program. Users should select a password space commensurate with the level of security required for the information being protected.
The password algorithm does not preclude the generation of words found in a standard English dictionary. If required, a computerized dictionary could be used to check for English words, and the implementation could include software tests to prevent them from being offered to users as passwords.
2.5 NIST Implementation
Figure 1 is a block diagram of the NIST implementation of the automated password generation algorithm. Appendix A contains the C-code for the DES, random key generation, and random word generation routines that were used in the implementation (see shaded boxes in Fig. 1). The personal computer used by NIST to demonstrate the standard is implementation dependent. NIST replaced the Unix random number routine in the original version of the program with the "DES Randomizer" and "Generate Random Key" function. The DES randomizer accepts an old password and a pseudorandom key created in accordance with Appendix C of ANSI X9.17 ( FIPSPUB 171) and generates a random number. This number is used by the Random Word Generator to develop a password. As the password is being generated each group of letters is subjected to tests of grammar and semantics to determine if an acceptable word has been created. If all tests are passed, the new password is output to the PC.
In the NIST implementation, the values for minlen and maxlen, which define the minimun and maximum size of the password, were set at 5 and 8 respectively. A user needing a fixed length password word could set these variables to a specific value.
This section contained a listing of the source code referenced in the Automated Password Generator Standard. This section is not available in electronic form.
Complete copies of FIPS 181, including this appendix, may be purchased in hardcopy from the National Technical Information Service (NTIS) via mail or telephone.
National Technical Information Service U.S. Department of Commerce 5285 Port Royal Road Springfield, VA 22161 (703) 487-4650
Order by FIPSPUB181 Price: $22.50
(Same address and phone number for discount prices on quantity orders.)