c 13.5a: jsi «f S. DEPARTMENT OF COMMERCE echnology Administration National Institute of Standards and Technology FIPSPUB 181 l&S FEDERAL INFORMATION PROCESSING STANDARDS PUBLICATION AUTOMATED PASSWORD GEN Category: Computer Security NSYUMWA STATE ERSfTYLMHARIF 1993 October 5 oo T- m Q. (/) Q. PENNSYLVANIA STATl UNIVERSITY JAN 3 01994 DOCUMENTS COUECTIOft U.S. Depository Copy FIPS PUB 181 FEDERAL INFORMATION PROCESSING STANDARDS PUBLICATION AUTOMATED PASSWORD GENERATOR (APG) CATEGORY: COMPUTER SECURITY Computer Systems Laboratory National Institute of Standards and Technology Gaithersburg, MD 20899 Issued October 5, 1993 U.S. Department of Commerce Ronald H. Brown, Secretary Technology Administration Mary L. Good, Under Secretary for Technology Jational Institute of Standards and Technology Arati Prabhakar, Director Foreword The Federal Information Processing Standards Publication Series of the National Institute of Standards and Technology (NIST) is the official publication relating to standards and guidelines adopted and promulgated under the provisions of Section 1 1 1 (d) of the Federal Property and Administrative Services Act of 1949 as amended by the Computer Security Act of 1 987, Public Law 1 00-235. These mandates have given the Secretary of Commerce and NIST important responsibilities for improving the utilization and management of computer and related telecommunications systems in the Federal Government. The NIST, through its Computer Systems Laboratory, provides leadership, technical guidance, and coordination of Government efforts in the development of standards and guidelines in these areas. Comments concerning Federal Information Processing Standards Publications are welcomed and should be addressed to the Director, Computer Systems Laboratory, National Institute of Standards and Technology, Gaithersburg, MD 20899. James H. Burrows, Director Computer Systems Laboratory Abstract This publication specifies a standard to be used by Federal organizations that require computer generated pronounceable passwords to authenticate the personal identity of an automated data processing (ADP) system user, and to authorize access to system resources. The standard describes an automated password generation algorithm that randomly creates simple pronounceable syllables as passwords. The password generator accepts input from a random number generator based on the Data Encryption Standard (DES) cryptographic algorithm defined in Federal Informa- tion Processing Standard 46-1 (FIPS PUB 46-1). Key words: access control; authentication; Data Encryption Standard (DES); Federal Information Processing Standard (FIPS); identification; passwords; security. National Institute of Standards U.S. Government Printing Office For sale by the National and Technology Washington: 1993 Technical Information FIPS PUB 181 Service 56 pages (Oct. 5, 1993) U.S. Department of Commerce CODEN: FIPPAT Springfield, VA 22161 FIPS PUB 181 Federal Information Processing Standards Publication 181 1993 October 5 Announcing the Standard for Automated Password Generator 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. 1. Name of Standard. Automated Password Generator. 2. Category of Standard. Computer Security. 3. Explanation. A password is a protected character string used to authenticate the identity of a computer system user or to authorize access to system resources. When users are allowed to select their own passwords they often select passwords that are easily compromised. An automated password generator creates random passwords that have no association with a particular user. This Automated Password Generator Standard specifies an algorithm to generate passwords for the protection of computer resources. This standard is for use in conjunction with FIPS PUB 112, Password Usage Standard, which provides basic security criteria for the design, implementation, and use of passwords. The algorithm uses random numbers to select the characters that form the random pronounceable passwords. The random numbers are generated by a random number subroutine based on the Electronic Codebook mode of the Data Encryption Standard (DES) (FIPS PUB 46-1). The random number subroutine uses a pseudorandom DES key generated in accordance with the procedure described in Appendix C of ANSI X9.17. Similar to DES, the FIPS for Automated Password Generator is an interoperability standard. Interoperability standards specify functions and formats so that data transmitted can be properly acted upon when received by another computer. This type of standard is independent of physical implementation. Implementors are required to use the algorithm defined in the FIPS, however, they are not constrained in how they package it. For discussion purposes a NIST implementation of the Automated Password Generator is provided. It is expected that commercial implementations will be based on the latest technologies and differ from NIST's, however the results should be logically equivalent to that of this FIPS. 4. Approving Authority. Secretary of Commerce. ±i FIPS PUB 181 5. Maintenance Agency. U.S. Department of Commerce, National Institute of Standards and Technology (NIST), Computer Systems Laboratory (CSL). 6. Cross Index. a. American National Standards Institute (ANSI) X9.28, Financial Institution Multiple Center Key Management (Wholesale) Draft. b. Department of Defense CSC-STD-002-85, Password Management Guideline. c. Federal Information Processing Standards Publication (FIPS PUB) 48, Guidelines on Evaluation of Techniques for Automated Personal Identification. d. Federal Information Processing Standards Publication (FIPS PUB) 46-1, Data Encryption Standard. e. Federal Information Processing Standards Publication (FIPS PUB) 81, DES Modes of Operation. f. Federal Information Processing Standards Publication (FIPS PUB) 83, Guideline on User Authentication Techniques for Computer Network Access Control. g. Federal Information Processing Standards Publication (FTPS PUB) 112, Password Usage. h. Federal Information Processing Standards Publication (FIPS PUB) 171, Key Management Using ANSI X9.J7. i. National Technical Information Service (NTIS) AD A 017676, A Random Word Generator for Pronounceable Passwords. 7. Objectives. The objectives of this standard are to: a. improve the administration of password systems that are used for authenticating the identity of individuals accessing computer resources or files; b. provide a standard automated method for producing pronounceable passwords that have no association with a particular user; c. produce passwords that are easily remembered, stored, and entered into computer systems, yet not readily susceptible to automated techniques that have been developed to search for and disclose passwords. 8. Applicability. This standard is applicable to the development of procurement or design specifications for implementing an automatic password generation algorithm within a computer system. It shall be used by all Federal departments and agencies when there is a requirement for computer generated pronounceable passwords for authenticating users of computer systems, or for authorizing access to resources in those systems. This standard does not require the use of passwords in a computer system, but establishes an automatic password generation algorithm for use in systems where an agency's computer security policy requires computer generated pronounceable passwords. It should be used in conjunction with FTPS PUB 112, Password Usage Standard, which specifies basic security criteria for the design, implementation, and use of passwords. FIPS PUB 181 9. Export Control. The Bureau of Export Administration, U.S. Department of Commerce, is responsible for administering export controls on cryptographic products used for authentication and access control, which categories would include implementations of the Automated Password Generator. Vendors should contact the following for a product classification: Bureau of Export Administration U.S. Department of Commerce P.O. Box 273 Washington, DC 20044 Telephone: (202) 482-0708 Following this determination, the vendor will be informed whether an export license is required and will be provided further information as appropriate. 10. Specifications. Federal Information Processing Standard (FIPS) 181, Automated Password Generator (affixed); 11. Qualifications. The Automated Password Generator uses the Electronic Codebook (ECB) mode of the Data Encryption Standard (DES), Federal Information Processing Standard 46-1 (FIPS PUB 46-1), as the random number generator. This mode of operation is specified in FIPS 81, DES Modes of Operation. The protection provided by the DES algorithm against potential threats has been reviewed every 5 years since its adoption in 1977 and has been reaffirmed during each of those reviews. The DES, and the possible threats reducing the security provided by the use of DES, will undergo continual review by NIST and other cognizant Federal organizations. The new technology available at review time will be evaluated to determine its impact on the DES. In addition, the awareness of any breakthrough in technology or any mathematical weakness of the algorithm will cause NIST to reevaluate the DES and provide necessary revisions. 12. Implementation Schedule. This Standard becomes effective March 25, 1994. 13. Waivers. Under certain exceptional circumstances, the heads of Federal departments and agencies may approve waivers to Federal Information Processing Standards (FIPS). The head of such agency may redelegate such authority only to a senior official designated pursuant to section 3506(b) of Title 44, U.S. Code. Waivers shall be granted only when compliance with a standard would: a. adversely affect the accomplishment of the mission of an operator of a Federal computer system, or b. cause a major adverse financial impact on the operator which is not offset by Government-wide savings. FIPS PUB 181 f 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. Jfc 14. Where to Obtain Copies. Copies of this publication are available for sale by the National Technical Information Service, U.S. Department of Commerce, Springfield, VA 22161. When ordering, refer to Federal Information Processing Standards Publication 181 (FIPSPUB181), and identify the title. When microfiche is desired, this should be specified. Payment may be made by check, money order, credit card, or deposit account. 4 FIPS PUB 181 Federal Information Processing Standards Publication 181 1993 October 5 Announcing the Standard for Automated Password Generator Contents 1.0 INTRODUCTION 6 2.0 TECHNICAL EXPLANATION 6 2.1 Unit Table 6 2.2 Digram Table 7 2.3 Random Number Generator Subroutine 7 2.4 Random Word Algorithm 8 2.5 N1ST Implementation 9 Appendix A 10 • FIPS PUB 181 1.0 INTRODUCTION 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 • FIPS PUB 181 • 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 and (excluding) 1. These numbers are multiplied by a program variable n which is an integer value. This operation yields a random integer between 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. • FIPS PUB 181 The first function in the DES structure is setkeyQ, 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 is set so that setkeyQ does not generate parity; the second tells setkeyQ that encryption (rather than decryption) is required. Key is a pointer to the beginning of the key array. After setkeyQ, the desQ 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, answerQ, which returns the final required number. The function answerQ takes in the address of the output array as an unsigned char pointer and the integer n for which a value of 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[0] + out[lI + out[2], which is an integer. To obtain a number with the required range of 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. # FIPS PUB 181 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. rtandom/Key; wyy./y./y./J AUTOMATED PASSWORD GENERATOR NIST IMPLEMENTATION (ANSI X9.17) Old Password Random Nun "" r , Wffifih Implementation Dependent Yes /'//'/l\ /.- No I Figure 1 FIPS PUB 181 Appendix A The following is a listing of the source code referenced in the Automated Password Generator Standard. I* * randomword (word, hyphenated_word, minlen, maxlen, restrict, seed) */ #include #include #include #define RAN_DEBUG #define Bl #define TRUE 1 #define FALSE #define RULE_SIZE (sizeof( rules )/sizeof (struct unit)) #define ALLOWED(flag) (digram[units_in_syllable(current_unit - l]][unit] & (flag)) #define MAXJ.JNACCEPTABLE 20 #define MAX_RETRIES (4 * (int) pwlen + RULE_SIZE) #define NOT_BEGIN_SYLLABLE 010 #define NO_FINAL_SPLIT 04 #define VOWEL 02 #define ALTERNATE_VOWEL 01 #define NO SPECIAL RULE #define BEGIN 0200 #define NOT BEGIN 0100 #define BREAK 040 #define PREFIX 020 #define ILLEGAL PAIR 010 #define SUFFIX 04 #define END 02 #define NOT END 01 #define ANY_COMBINATION typedef unsigned int uint; typedef int boolean: static int get_word(); static boolean have_initial_y0; static boolean illegal_placementO; static boolean unproper_word( ); static boolean have_final_split(); static char *get_syllableQ; static unsigned short int random_unit(); static unsigned int randinU); static unsigned short int get_random( ); static void set_seed(); extern char *calloc (); extern char *malloc 0; extern char *strcpy (); extern char 'strcat (); extern long time (); extern long atol (); extern double drand48(); extern int fscanfQ; extern int fpnntfQ; 10 FIPS PUB 181 struct unit char unit_code[5]; unsigned short int flags; static struct unit rules[] = ( "a", VOWEL, "b", NO_SPECIAL_RULE, "c", NO_SPEOAL RULE, "d", NO_SPECIAL_RULE, "e", NO_HNAL_SPLIT I VOWEL, "f ', NO_SPECIAL_RULE, "g", NO_SPECIAL_RULE, "h", NO_SPEOAL_RULE, "i", VOWEL, "j", NO_SPECIALJlULE, "k", NO_SPECIAL_RI JLE, "1", NO_SPECIAL_RULE, "m", NO_SPECIAL_RULE, "n". NO_SPECIAL_RULE, "o", VOWEL, "p", N0_SPE(1AL_RULE, "r", N0_SPE(1AL_RULE, "s". N0_SPEC1AL_RULE, "t", NO_SPEC , IAL_RULE, "u", VOWEL, "v", NOJSPECIAL_RULE, "w", NO_SPECIAL_RULE, "x", NOT_BEGIN_SYLLABLE, "y", ALTERNATE_VOWEL I VOWEL, "z", NO_SPECIAL_RULE, "ch", NO_SPECIAL_RULE, "gh", NO_SPECIAL_RULE, "ph", NO_SPECIAL_RULE, "rh", NOJSPECIALJUILE, "sh", NO_SPE('lAL_RULE, "th", NOJSPECIALJUILE, "wh", NO_SPECIAL_RULE, "qu", NO_SPECIAL_RULE, "ck", NOT BEGIN SYLLABLE static int digram[][RULE_SIZE) = ( I* aa */ ILLEGAL_PAIR, /* ab */ ANYJX)MBINATION, /* ac */ ANYJ'OMBINATION, /* ad */ ANYJ'OMBINATION, /* ae */ ILLEGAL_PAIR, /* af */ ANYJ'OMBINATION, /* ag */ ANYJ'OMBINATION, /* ah */ NOTJJEGIN I BREAK I NOT_ENI), I* ai */ ANYJ'OMBINATION, I* aj */ ANYJ'OMBINATION, /* ak */ ANYJ'OMBINATION, I* al */ ANYJ'OMBINATION, /* am */ ANYJ'OMBINATION, /* an */ ANYJ'OMBINATION, /* ao */ ILLEGAL JJAIR, /* ap */ ANYJ'OMBINATION, I* ar */ ANYJX)MBINATION, /* as */ ANYJ'OMBINATION, I* at */ ANYJ'OMBINATION, /* au */ ANYJ'OMBINATION, I* av */ ANYJX)MBINATION, /* aw */ ANYJX)MBINATION, /* ax */ ANYJ'OMBINATION, /* ay */ ANYJ'OMBINATION, 11 FIPS PUB 181 /* az */ ANYJ'OMBINATION, /* ach */ ANYJ'OMBINATION, /* agh */ ILLEGALJ'AIR, /* aph */ ANYJ'OMBINATION, /* arh */ ILLEGALJ'AIR, /* ash */ ANYJ'OMBINATION, /* ath */ ANYJ'OMBINATION, /* awh */ ILLEGALJ'AIR, /* aqu */ BREAK I NOT.END, /* ack */ ANYJ'OMBINATION, /* ba */ ANYJ'OMBINATION, /* bb */ NOT BEGIN I BREAK I NOTJiND, /* be */ NOT.BEGIN I BREAK I NOTJiND, I* bd */ NOTJBEGIN I BREAK I NOTJiND, /* be */ ANYJ'OMBINATION, /* bf */ NOT BEGIN I BREAK I NOTJiND, /* bg */ NOT BEGIN I BREAK I NOTJiND, /* bh */ NOT.BEGIN I BREAK I NOTJiND, /* bi */ ANYJ'OMBINATION, /* bj */ NOT.BEGIN I BREAK I NOTJiND, /* bk */ NOT BEGIN I BREAK I NOTJiND, /* bl */ BEGIN I SUFFIX I NOTJiND, /* bin */ NOT.BEGIN I BREAK I NOTJiND, /* bn */ NOT_BEGIN I BREAK I NOTJiND, /* bo */ ANYJ'OMBINATION, /* bp */ NOT.BEGIN I BREAK I NOTJiND, /* br */ BEGIN I END, /* bs */ NOT.BEGIN, /* hi */ NOT.BEGIN I BREAK I NOT.ENI), /* bu */ ANYJ'OMBINATION, I* bv */ NOT.BEGIN I BREAK I NOT.ENI), /* bw */ NOT.BEGIN I BREAK I NOT.ENI), /* bx */ ILLEGALJ'AIR, /* by */ ANY.COMBINATION, /* bz */ NOT.BEGIN I BREAK I NOT.ENI), /* bch */ NOT.BEGIN I BREAK I NOT.ENI), /* bgh */ ILLEGALJ'AIR, /* bph */ NOT.BEGIN I BREAK I NOT.ENI), /* brh */ ILLEGALJ'AIR, /* bsh */ NOT.BEGIN I BREAK I NOT.ENI), /* bth */ NOT.BEGIN I BREAK I NOT.ENI), /* bwh */ ILLEGALJ'AIR, /* bqu */ NOT.BEGIN I BREAK I NOT.ENI), /* bck */ ILLEGALJ'AIR, /* ca */ ANYJ'OMBINATION, /* cb */ NOT BEGIN I BREAK I NOT.ENI), /* cc */ NOT.BEGIN I BREAK I NOT.ENI), /* cd */ NOT.BEGIN I BREAK I NOT.ENI), /* ce */ ANY.COMBINATION, /* cf */ NOT.BEGIN I BREAK I NOT.ENI), /* eg */ NOT.BEGIN I BREAK I NOT.ENI), /* ch */ NOT.BEGIN I BREAK I NOT.ENI), /* a */ ANYJ'OMBINATION, /* cj */ NOT BEGIN I BREAK I NOT.ENI), /* ck */ NOT.BEGIN I BREAK I NOT.ENI), /* cl */ SUFFIX I NOT.ENI), /* cm */ NOT.BEGIN I BREAK I NOT.ENI), /* en */ NOT.BEGIN I BREAK I NOT.ENI), /* co */ ANYJ'OMBINATION, /* cp */ NOT.BEGIN I BREAK I NOT.ENI), /* cr */ NOT.ENI), /* cs */ NOT.BEGIN I END, /* ct */ NOT.BEGIN I PREFIX, /* cu */ ANYJ'OMBINATION, /* cv */ NOT.BEGIN I BREAK I NOT.ENI), /* cw */ NOT.BEGIN I BREAK I NOT.ENI), /* ex */ ILLEGALJ'AIR, /* cy */ ANYJ'OMBINATION, /* cz */ NOT.BEGIN I BREAK I NOT.ENI), /* cch */ ILLEGALJ'AIR, /* cgh */ ILLEGALJ'AIR, /* cph */ NOT.BEGIN I BREAK I NOT.ENI), i 12 FIPS PUB 181 I* cm */ ILLEGAL.PAIR, I* csh */ NOT_BEGIN I BREAK I NOT.ENI), I* cth */ NOT.BEGIN I BREAK I NOT_END, I* cwh */ ILLEGAL.PAIR, I* cqu */ NOT_BEGIN I SUFFIX I NOT_END, /* cck */ ILLEGAL.PAIR, /* da */ ANY_COMBINATION. I* db */ NOT_BEGIN I BREAK I NOT_ENI), I* dc */ NOT_BEGIN I BREAK I NOTEND, /* dd */ NOT_BEGIN, /* de */ ANY.COMBINATION, /* df */ NOT_BEGIN I BREAK I NOT_ENI), I* dg */ NOT.BEGIN I BREAK I NOT_ENI), /* dh */ NOT_BEGIN I BREAK I NOTEND, /* di */ ANY.COMBINATION, /* dj */ NOT_BEGIN I BREAK I NOT_ENI), /* dk */ NOT_BE(iIN I BREAK I NOT END, /* dl */ NOT_BEGIN I BREAK I NOT.ENI), /* dm */ NOT_BEGIN I BREAK I NOT END, I* dn */ NOT_BEGIN I BREAK I NOT_END, /* do */ ANY_COMBINATION, I* dp */ NOT_BEGIN I BREAK I NOT_END, I* dr */ BEGIN I NOT_END, /* ds */ NOT_BEGIN I END, I* dt */ NOT_BEGIN I BREAK I NOT.ENI), /* du */ ANY.COMBINATION, I* dv */ NOT.BEGIN I BREAK I NOT_END, /* dw */ NOT_BEGIN I BREAK I NOT.END, /* dx */ ILLEGAL.PAIR, /* dy */ ANY.COMBINATION, I* dz */ NOT.BEGIN I BREAK I NOT.ENI), I* dch */ NOT.BEGIN I BREAK I NOT.ENI), /* dgh */ NOT.BEGIN I BREAK I NOT.ENI), /* dph */ NOT.BEGIN I BREAK I NOT.ENI), /* dm */ ILLEGAL.PAIR, /* dsh */ NOT.BEGIN I NOT.ENI), /* dth */ NOT.BEGIN I PREFIX, /* dwh */ ILLEGAL.PAIR, /* dqu */ NOT.BEGIN I BREAK I NOT.ENI), /* dck */ ILLEGAL.PAIR, /* ea */ ANY.COMBINATION, /* eb */ ANY.COMBINATION, /* ec */ ANY.COMBINATION, /* ed */ ANY.COMBINATION, /* ee */ ANY.COMBINATION, /* ef */ ANY.COMBINATION, I* eg */ ANY.COMBINATION, /* eh */ NOT.BEGIN I BREAK I NOT.ENI), /* ei */ NOT.ENI), /* ej */ ANY.COMBINATION, /* ek */ ANY.COMBINATION, /* el */ ANY.COMBINATION, /* em */ ANY.COMBINATION, /* en */ ANY.COMBINATION, /* eo */ BREAK, /* ep */ ANY.COMBINATION, /* er */ ANY.COMBINATION, /* es */ ANY.COMBINATION, /* et */ ANY.COMBINATION, /* eu */ ANY.COMBINATION, /* ev */ ANY.COMBINATION, /* ew */ ANY.COMBINATION, /* ex */ ANY.COMBINATION, /* ey */ ANY.COMBINATION, /* ez */ ANY.COMBINATION, /* ech */ ANY.COMBINATION, /* egh */ NOT.BEGIN I BREAK I NOT.ENI), /* eph */ ANY.COMBINATION, /* erh */ ILLEGAL.PAIR, /* esh */ ANY.COMBINATION, I* eth */ ANY.COMBINATION, /* ewh */ ILLEGAL.PAIR, 13 FIPS PUB 181 /* equ */ BREAK I NOT END, /* eck */ ANY_COMBINATION, /* fa */ ANY.COMBINATION, /* fb */ NOT_BEGIN I BREAK I NOT_END, /* fc */ NOT.BEGIN I BREAK I NOT.ENI), /* fd */ NOT_BEGIN I BREAK I N()T_ENI), /* fe */ ANY_COMBINATION, /* ff */ NOT.BEGIN, /* fg */ NOT.BEGIN I BREAK I NOT_END, /* fli */ NOT_BEGIN I BREAK I NOT_ENI), /* fi */ ANY.COMBINATION, /* fj */ NOT_BEGIN I BREAK I NOT_ENI), /* fk */ NOT_BEGIN I BREAK I NOT_END, /* fl */ BEGIN I SUFFIX I NOT.ENI), /* fm */ NOT_BEGIN I BREAK I NOT_ENI), I* fn */ NOT_BEGIN I BREAK I NOT_ENI), /* fo */ ANY.COMBINATION, /* fp */ NOT_BEGIN I BREAK I NOT_ENI), /* fr */ BECilN I NOT END, /* fs */ NOT.BEGIN, /* ft */ NOT.BEGIN, /* fu */ ANYJ'OMBINATION, /* fv */ NOT.BEGIN I BREAK I NOT END, /* fw */ NOT.BEGIN I BREAK I NOT.ENI), /* fx */ ILLEGAL.PAIR, /* fy */ NOT.BEGIN, /* fz */ NOT.BEGIN I BREAK I NOT END, /* fch */ NOT.BEGIN I BREAK I NOT.ENI), /* fgh */ NOT.BEGIN I BREAK I NOT.ENI), I* fph */ NOT.BEGIN I BREAK I NOT.ENI), /* fit */ ILLEGAL.PAIR, /* fsh */ NOT.BEGIN I BREAK I NOT.ENI), /* fth */ NOT.BEGIN I BREAK I NOT.ENI), /* fwh */ ILLEGAL.PAIR, /* fqu */ NOT.BEGIN I BREAK I NOT.ENI), /* fck */ ILLEGAL.PAIR, /* ga */ ANY.COMBINATION, /* gb */ NOT.BEGIN I BREAK I NOT.ENI), /* gc */ NOT.BEGIN I BREAK I NOT.ENI), /* gd */ NOT.BEGIN I BREAK I NOT.ENI), /* ge */ ANY.COMBINATION, /* gf */ NOT.BEGIN I BREAK I NOT.ENI), /* gg */ NOT.BEGIN, /* gh */ NOT.BEGIN I BREAK I NOT.ENI), /* gi */ ANY.COMBINATION, /* gj */ NOT.BEGIN I BREAK I NOT.ENI), /* gk */ ILLEGAL.PAIR, /* gl */ BEGIN I SUFFIX I NOT.ENI), /* gm */ NOT.BEGIN I BREAK I NOT.ENI), /* gn */ NOT.BEGIN I BREAK I NOT.ENI), /* go */ ANY.COMBINATION, /* gp */ NOT BEGIN I BREAK I NOT.ENI), /* gr */ BEGIN I NOT.ENI), /* gs */ NOT.BEGIN I END, /* gt */ NOT.BEGIN I BREAK I NOT.ENI), /* gu */ ANY.COMBINATION, /* gv */ NOT.BEGIN I BREAK I NOT.ENI), I* gw */ NOT.BEGIN I BREAK I NOT.ENI), /* gx */ ILLEGAL.PAIR, /* gy */ NOT BEGIN, /* gz */ NOT.BEGIN I BREAK I NOT.ENI), /* gch */ NOT.BEGIN I BREAK I NOT.ENI), /* ggh */ ILLEGAL.PAIR, /* gph */ NOT.BEGIN I BREAK I NOT.ENI), /* grh */ ILLEGAL.PAIR, /* gsh */ NOT.BEGIN, /* gth */ NOT.BEGIN, /* gwh */ ILLEGAL.PAIR, /* gqu */ NOT.BEGIN I BREAK I NOT.ENI), /* gck */ ILLEGAL.PAIR, /* ha */ ANY.COMBINATION, /* hb */ NOT.BEGIN I BREAK I NOT.ENI), 14 FIPS PUB 181 /* he */ NOT.BEGIN I BREAK I /* hd */ NOT.BEGIN I BREAK I /* he */ ANY.COMBINATION. I* hf */ NOT.BEGIN I BREAK I I* hg */ NOT_BEGIN I BREAK I I* hh */ ILLEGAL_PAIR, I* hi */ ANY.COMBINATION, /* hj */ NOT.BEGIN I BREAK I /* hk */ NOT.BEGIN I BREAK I I* hi */ NOT.BEGIN I BREAK I /* hm */ NOT.BEGIN I BREAK I* tin */ NOT.BEGIN I BREAK I /* ho */ ANY.COMBINATION, I* hp */ NOT.BEGIN I BREAK I I* hr */ NOT.BEGIN I BREAK I I* hs */ NOT.BEGIN I BREAK I I* ht */ NOT.BEGIN I BREAK I I* hu */ ANY.COMBINATION, I* hv */ NOT.BEGIN I BREAK I I* hw */ NOT.BEGIN I BREAK /* hx */ ILLEGAL.PAIR, I* hy */ ANY.COMBINATION, I* hz */ NOT.BEGIN I BREAK I I* hch */ NOT.BEGIN I BREAK /* hgh */ NOT.BEGIN I BREAK /* hph */ NOT.BEGIN I BREAK /* hrh */ ILLEGAL.PAIR, I* hsh */ NOT.BEGIN I BREAK I* I* I* I* I* I* I* I* I* I* /* I* I* I* I* I* I* I* I* /* I* I* I* I* I* I* I* I* I* I* /* I* /* /* /* I* I* I* I* I* I* /* /* /* NOT.END, NOT.ENI), NOT.END, NOT END, NOT.END, NOT.END, NOT.END, I NOT.END, NOT.END, NOT.END, NOT.END, NOT.END, NOT.END, NOT.END, I NOT END, NOT.END, I NOT.END, I NOT.END, I NOT.END, I NOT.END, I NOT.END, I NOT END, hth */ NOT.BEGIN I BREAK hwh */ ILLEGAL.PAIR, hqu */ NOT.BEGIN I BREAK hck */ ILLEGAL.PAIR, 1a */ ANY.COMBINATION, b */ ANY.COMBINATION, c */ ANY.COMBINATION, d */ ANY.COMBINATION, e */ NOT.BEGIN, if */ ANY.COMBINATION, g */ ANY.COMBINATION, h */ NOT.BEGIN I BREAK I NOT.END */ ILLEGAL.PAIR, ij */ ANY.COMBINATION, ik */ ANY.COMBINATION, 1 */ ANY.COMBINATION, m */ ANY.COMBINATION, in */ ANY.COMBINATION, o */ BREAK, p */ ANY.COMBINATION, r */ ANY.COMBINATION, s */ ANY.COMBINATION, t */ ANY.COMBINATION, u */ NOT.BEGIN I BREAK I iv */ ANY.COMBINATION, w */ NOT.BEGIN I BREAK 7 ANY.COMBINATION, y */ NOT.BEGIN I BREAK NOT.END, NOT.END, NOT.ENI), */ ANY.COMBINATION ch */ ANY.COMBINATION, gh */ NOT.BEGIN, ph */ ANY.COMBINATION, rti */ ILLEGAL.PAIR, sh */ ANY.COMBINATION, ith */ ANY.COMBINATION, wh */ ILLEGAL.PAIR, qu */ BREAK I NOT.END, ck */ ANY.COMBINATION, ja */ ANY.COMBINATION, jb */ NOT.BEGIN I BREAK I NOT.END, jc */ NOT.BEGIN I BREAK I NOT.END, jd */ NOT.BEGIN I BREAK I NOT.END, le */ ANY.COMBINATION, jf */ NOT.BEGIN I BREAK I NOT.ENI), 15 FIPS PUB 181 # g */ ILLEGAL_PAIR, h */ NOT_BECiIN I BREAK I NOT_ENI), li */ ANY COMBINATION, ij */ ILLECiALJ'AIR, k */ NOT.BEGIN I BREAK I NOT END, 1 */ NOT_BEGIN I BREAK I NOT_ENI), m */ NOT_BEGIN I BREAK I NOT_ENI), n */ NOT.BEGIN I BREAK I NOT.END, o */ ANY_COMBINATION, p */ NOT.BEGIN I BREAK I NOT_ENI), r */ NOT_BEGIN I BREAK I NOT_ENI), s */ NOT_BEGIN I BREAK I NOT_ENI), t */ NOT.BEGIN I BREAK I NOT_ENI), u */ ANY.COMBINATION, v */ NOT_BEGIN I BREAK I NOT_END, w */ NOT_BEGIN I BREAK I NOT_END, x */ ILLECiALJ'AIR, y */ NOT.BEGIN, z */ NOTJ3EGIN I BREAK I NOT.END, ch */ NOT.BEGIN I BREAK I NOT END, gh */ NOT.BEGIN I BREAK I NOT.END, ph */ NOT.BEGIN I BREAK I NOT.END, rh */ ILLECiALJ'AIR, sh */ NOT.BEGIN I BREAK I NOT.END, th */ NOT.BEGIN I BREAK I NOT.END, wh */ ILLECiALJ'AIR, qu */ NOT.BEGIN I BREAK I NOT.END, ck */ ILLECiALJ'AIR, ka */ ANY.COMBINATION, kb */ NOT.BEGIN I BREAK I NOT.END, kc */ NOT.BEGIN I BREAK I NOT.END, kd */ NOT.BEGIN I BREAK I NOT.END, ke */ ANY.COMBINATION, kf */ NOT.BEGIN I BREAK I NOT.END, kg */ NOT.BEGIN I BREAK I NOT.END, kh */ NOT BEGIN I BREAK I NOT.END, ki */ ANY.COMBINATION, kj */ NOT.BEGIN I BREAK I NOT.END, kk */ NOT.BEGIN I BREAK I NOT.END, kl */ SUFFIX I NOT.END, km */ NOT.BEGIN I BREAK I NOT.END, kn */ BEGIN I SUFFIX I NOT.END, ko */ ANY.COMBINATION, kp */ NOT.BEGIN I BREAK I NOT.END, kr */ SUFFIX I NOT.END, ks */ NOT.BEGIN I END, kt */ NOT.BEGIN I BREAK I NOT.END, ku */ ANY.COMBINATION, kv */ NOT.BEGIN I BREAK I NOT.END, kw */ NOT.BEGIN I BREAK I NOT.END, kx */ ILLEGALJAIR, ky */ NOT.BEGIN, kz */ NOT BEGIN I BREAK I NOT.END, kch */ NOT.BEGIN I BREAK I NOT.END, kgh */ NOT.BEGIN I BREAK I NOT.END, kph */ NOT.BEGIN I PREFIX, /* krh */ ILLECiALJ'AIR, /* ksh */ NOT.BEGIN, /* kth */ NOT.BEGIN I BREAK I NOT.END, /* kwh */ ILLECiALJ'AIR, /* kqu */ NOT.BEGIN I BREAK I NOT.END, /* kck */ ILLEGALJAIR, /* la */ ANY.COMBINATION, I* lb */ NOT.BEGIN I PREFIX, I* lc */ NOT.BEGIN I BREAK I NOT.END, /* Id */ NOT.BEGIN I PREFIX, /* le */ ANY.COMBINATION, /* If */ NOT.BEGIN I PREFIX, /* lg */ NOT.BEGIN I PREFIX, /* lh */ NOT.BEGIN I BREAK I NOT.END, /* li */ ANY.COMBINATION, /* lj */ NOT.BEGIN I PREFIX, 16 FIPS PUB 181 I* Ik */ NOT_BEGIN I PREFIX, /* 11 */ NOT_BEGIN I PREFIX, /* lm */ NOTJJEGIN I PREFIX, I* In */ NOT_BEC,IN I BREAK I NOTJ-ND, /* lo */ ANYJ'OMBINATION, I* lp */ NOT_BE(iIN I PREFIX, I* lr */ NOT_BEGIN I BREAK I NOT_ENI), /* Is */ NOT_BEGIN, /* It */ NOT_BEGIN I PREFIX, /* lu */ ANYJ'OMBINATION, /* lv */ NOT_BEGIN I PREFIX, I* lw */ NOT_BEGIN I BREAK I NOT.END, /* lx */ illec;al_pair, /* ly */ ANY_COMBINATION, I* lz */ NOT_BEGIN I BREAK I N(.)T_END, /* lch */ NOT_BEGIN I PREFIX, /* lgh */ NOTJJEGIN I BREAK I NOT.END. I* lph */ NOTJiEGIN I PREFIX, /* Irh */ ILLEGAL J'AIR, /* lsh */ NOTJJEGIN I PREFIX, I* 1th */ NOTJJEGIN I PREFIX, /* iwh */ illegalj'air, /* lqu */ NOTJIEGIN I BREAK I NOTJ-ND, /* lck */ ILLEGAL J'AIR, /* ma */ ANY COMBINATION, /* mb */ NOTJJEGIN I BREAK I NOTJ-ND, /* mc */ NOTJJEGIN I BREAK I NOTJ5ND, /* md */ NOT BEGIN I BREAK I NOTJ-ND, /* me */ ANYJX>MBINATION, I* mi* I NOTJJEGIN I BREAK I NOTJJND, I* mg */ NOTJJEGIN I BREAK I NOT END, /* mh */ NOTJJEGIN I BREAK I NOT END, /* mi */ ANYJ'OMBINATION, I* mj */ NOTJJEGIN I BREAK I NOT END, /* mk */ NOTJJEGIN I BREAK I NOTJ-ND, I* ml */ NOT BEGIN I BREAK I NOTJ-ND, /* mm */ NOTJJEGIN, /♦ran*/ NOTJJEGIN I BREAK I NOTJ-ND, /* mo */ ANYJ'OMBINATION, I* mp */ NOTJJEGIN, /* mr */ NOTJJEGIN I BREAK I NOT END, I* ms */ NOT BEGIN, /* mt */ NOT BEGIN, I* mu */ ANYJ'OMBINATION, I* mv */ NOTJJEGIN I BREAK I NOT END, I* mw */ NOTJJEGIN I BREAK I NOTJ-ND, /* mx */ ILLEGALJ'AIR, /* my */ ANYJ'OMBINATION, /* mz */ NOTJJEGIN I BREAK I NOT END, /* mch */ NOTJJEGIN I PREFK. I* mgh */ NOTJJEGIN I BREAK I NOTJ-ND, /* mph */ NOTJJEGIN, /* mm */ ILLEGALJ'AIR, /* msh */ NOTJJEGIN, I* mth */ NOTJJEGIN, /* mwh */ ILLEGAL J'AIR, I* mqu */ NOTJJEGIN I BREAK I NOT END, /* mck */ ILLEGAL J'AIR, /* na */ ANYJ'OMBINATION, /* nb *'/ NOTJJEGIN I BREAK I NOTJEND, I* nc */ NOTJJEGIN I BREAK I NOTJ-ND, /* nd */ NOTJJEGIN, /* ne */ ANYJ'OMBINATION, /* nf */ NOTJJEGIN I BREAK I NOT END, /* ng */ NOTJJEGIN I PREFIX, /* nh */ NOTJJEGIN I BREAK I NOT END, /* ni */ ANYJX)MBINATION, I* nj */ NOTJJEGIN I BREAK I NOT END, /* nk */ NOTJJEGIN I PREFIX, /* nl */ NOTJJEGIN I BREAK I NOTJ-ND, /* nm */ NOTJJEGIN I BREAK I NOTJ-ND, /* tin */ NOTJJEGIN, 17 FIPS PUB 181 /* no */ ANYJ'OMBINATION, /* np */ NOT_BEGIN I BREAK I NOT_ENI), /* nr */ NC)T_BEC;iN I BREAK I NOT_ENI), I* ns */ NOT BEGIN, /* nt */ NOT BEGIN, /* nu */ ANYJ'OMBINATION, /* nv */ NOT BEGIN I BREAK I NOT_ENI), /* nw */ NOT.BEGIN I BREAK I NOT.END, /* nx */ ILLEGALJ'AIR, /* ny */ NOT.BEGIN, /* nz */ NOT BEGIN I BREAK I NOT.ENI), /* nch */ NOT BEGIN I PREFIX, /* ngh */ NOT.BEGIN I BREAK I NOT.ENI), /* nph */ NOT.BEGIN ! PREFIX, /* nrii */ ILLEGALJ'AIR, /* nsh */ NOT.BEGIN, /* nth */ NOT.BEGIN, /* nwh */ ILLEGALJ'AIR, /* nqu */ NOT.BEGIN I BREAK I NOT_ENI), /* nek */ NOT BEGIN I PREFIX, /* oa */ ANYJ'OMBINATION, /* ob */ ANYJ'OMBINATION, /* oc */ ANYJ'OMBINATION, /* od */ ANYJ'OMBINATION, /* oe */ ILLEGALJ'AIR, /* of */ ANY.COMBINATION, /* og */ ANYJ'OMBINATION, /* oh */ NOT BEGIN I BREAK I NOT.END, /* oi */ ANYJ'OMBINATION, /* oj */ ANYJ'OMBINATION, /* ok */ ANYJ'OMBINATION, /* ol */ ANYJ'OMBINATION, /* om */ ANYJ'OMBINATION, /* on */ ANYJ'OMBINATION, A j /* oo */ ANYJ'OMBINATION, ^F ' /* op */ ANYJ'OMBINATION, /* or */ ANYJ'OMBINATION, /* os */ ANYJ'OMBINATION, I* ot */ ANYJ'OMBINATION, /* ou */ ANYJ'OMBINATION, /* ov */ ANYJ'OMBINATION, /* ow */ ANYJ'OMBINATION, /* ox */ ANYJ'OMBINATION, /* oy */ ANYJ'OMBINATION, /* oz */ ANYJ'OMBINATION, /* och */ ANYJ'OMBINATION, /* ogh */ NOT BEGIN, /* oph */ ANYJ'OMBINATION, /* orh */ ILLEGALJ'AIR, /* osh */ ANYJ'OMBINATION, /* oth */ ANYJ'OMBINATION, /* owh */ ILLEGALJ'AIR, /* oqu */ BREAK I NOTJBND, /* ock */ ANYJ'OMBINATION, /* pa */ ANYJ'OMBINATION, /* pb */ NOT BEGIN I BREAK I NOT END, /* pc */ NOT BEGIN I BREAK I NOT.END, /* pd */ NOT.BEGIN I BREAK I NOT.ENI), /* pe */ ANYJ'OMBINATION, /* pf */ NOT BEGIN I BREAK I NOT.ENI), /* pg */ NOT BEGIN I BREAK I NOT.END, /* ph */ NOT BEGIN I BREAK I NOT.END, I* pi */ ANYJ'OMBINATION, /* pj */ NOT BEGIN I BREAK I NOT.ENI), /* pk */ NOT.BEGIN I BREAK I NOT.ENI), /* pi */ SUFFIX I NOT.ENI), /* pm */ NOT.BEGIN I BREAK I NOT.ENI), /* pn */ NOT.BEGIN I BREAK I NOT.ENI), /* po */ ANY.COMBINATION, /* pp */ NOT.BEGIN I PREFIX, /* pr */ NOT.ENI), /* ps */ NOT.BEGIN I END, 18 #1 FIPS PUB 181 I* pt */ NOT_BEGIN I END, /* pu */ NOT_BEGIN I END, I* pv */ NOT.BEGIN I BREAK I NOT.END, /* pw */ NOT.BECHN I BREAK I NOT.END, I* px */ ILLEGAL_PAIR. I* py */ ANY.COMBINATION, /* pz */ NOT.BEGIN I BREAK I NOT.END, I* pch */ NOT.BEGIN I BREAK I NOT_END, /* pgh */ NOT.BEGIN I BREAK I NOT_END, /* pph */ NOT.BEGIN I BREAK I NOT.END, I* prh */ ILLEGAL.PAIR, /* psh */ NOTJJEGIN I BREAK I NOT.END, /* pth */ NOT.BEGIN I BREAK I NOT.END, /* pwh */ ILLEGAL.PAIR, /* pqu */ NOT.BEGIN I BREAK I NOT.END, /* pck */ ILLEGAL.PAIR, I* ra */ ANY.COMBINATION, /* rb */ NOT.BEGIN I PREFIX, /* re */ NOT.BEGIN I PREFIX, /* rd */ NOT.BEGIN I PREFIX, /* re */ ANY.COMBINATION, /* if */ NOT.BEGIN I PREFTX, I* rg */ NOT.BEGIN I PREFD(, /* rh */ NOT.BEGIN I BREAK I NOT.END, /* ri */ ANY.COMBINATION, /* rj */ NOT.BEGIN I PREFIX, I* rk */ NOT.BEGIN I PREFIX, /* rl */ NOT.BEGIN I PREFIX, I* rm */ NOT.BEGIN I PREFDC, /* m */ NOT.BECHN I PREFIX, /* ro */ ANY.COMBINATION, /* rp */ NOT.BEGIN I PREFIX. /* rr */ NOT.BEGIN I PREFIX, /* rs */ NOT.BEGIN I PREFIX, /* rt */ NOT.BEGIN I PREFIX, /* ru */ ANY.COMBINATION, /* rv */ NOT.BEGIN I PREFIX, /* rw */ NOT.BEGIN I BREAK I NOT.END, /* rx */ ILLEGAL.PAIR, /* ry */ ANY.COMBINATION, /* rz */ NOT.BEGIN I PREFIX, /* rch */ NOT.BEGIN I PREFDC, /* rgh */ NOT.BEGIN I BREAK I NOT.END, /* rph */ NOT.BEGIN I PREFTX, /* rrh */ ILLEGAL.PAIR, /* rsh */ NOT.BECHN I PREFDC, /* rth */ NOT.BEGIN I PREFDC, /* rwh */ ILLEGAL.PAIR, /* rqu */ NOT.BEGIN I PREFIX I NOT.END, /* rck */ NOT.BECHN I PREFDC, I* sa */ ANY.COMBINATION, I* sb */ NOT.BEGIN I BREAK I NOT.END, /* sc */ NOT.END, /* sd */ NOT.BECHN I BREAK I NOT.END, I* se */ ANY.COMBINATION, I* sf */ NOT.BECHN I BREAK I NOT.END, I* sg */ NOT.BEGIN I BREAK I NOT.END, /* sh */ NOT.BECHN I BREAK I NOT.END, /* si */ ANY.COMBINATION, /* sj */ NOT.BEGIN I BREAK I NOT.END, I* sk */ ANY COMBINATION, /* si */ BEGIN I SUFFIX I NOT.END, /* sm */ SUFFIX I NOT.END, /* sn */ PREFDC I SUFFIX I NOT.END, I* so */ ANY.COMBINATION, /* sp */ ANY.COMBINATION, I* sr */ NOT.BEGIN I NOT.END, /* ss */ NOT.BECHN I PREFDC, /* st */ ANY.COMBINATION, /* su */ ANY.COMBINATION, /* sv */ NOT.BEGIN I BREAK I NOT.END, /* sw */ BEGIN I SUFFIX I NOT.END, FIPS PUB 181 /* sx */ ILLEGAL_PAIR, /* sy */ ANY_COMBINATION, /* sz */ NOT BEGIN I BREAK I NOT_ENI), /* sch */ BEGIN I SUFFIX I NOT_END, /* sgh */ NOT_BEGIN I BREAK I NOT_ENI), /* sph */ NOT.BEGIN I BREAK I NOT_END, /* srli */ ILLECiALJ'AIR, /* ssh */ NOT_BEGIN I BREAK I NOT_ENI), /* sth */ NOT_BE(!IN I BREAK I NOT.ENI). /* swh */ ILLECIALJ'AIR, /* squ */ SUFFIX I NOT.ENI), /* sck */ NOT.BEGIN, /* ta */ ANYJ'OMBINATION, /* tb */ NOT_BEGIN I BREAK I NOT.ENI), /* tc */ NOT_BEGIN I BREAK I NOT_END, I* td */ NOT_BEGIN I BREAK I NOT.ENI), /* te */ ANYJ'OMBINATION, /* tf */ NOT.BEGIN I BREAK I NOT.ENI), /* tg */ NOT BEGIN I BREAK I NOT_ENI), /* th */ NOT.BEGIN I BREAK I NOT.ENI), /* ti */ ANYJ'OMBINATION, /* tj */ NOT.BEGIN I BREAK I NOT.ENI), /* tk */ NOT.BEGIN I BREAK I NOT.ENI), /* tl */ NOT.BEGIN I BREAK I NOT.ENI), /* tm */ NOT.BEGIN I BREAK I NOT.ENI), /* tn */ NOT.BEGIN I BREAK I NOT.ENI), /* to */ ANY.COMBINATION, /* tp */ NOT.BEGIN I BREAK I NOT.ENI), /* tr */ NOT.ENI), /* ts */ NOT.BEGIN I END, /* tt */ NOT.BEGIN I PREFIX, /* tu */ ANYJ'OMBINATION, /* tv */ NOT.BEGIN I BREAK I NOT.ENI), /* tw */ BEGIN I SUFFIX I NOT.ENI), /* ix */ ILLECiALJ'AIR, /* ly */ ANYJ'OMBINATION, /* tz */ NOT.BEGIN I BREAK I NOT.ENI), /* tch */ NOT.BEGIN, /* tgh */ NOT.BEGIN I BREAK I NOT.ENI), /* tph */ NOT.BEGIN I END, /* trh */ ILLEGAL.PAIR, /* tsh */ NOT.BEGIN I END, /* tth */ NOT.BEGIN I BREAK I NOT.ENI), /* twh */ ILLECiALJ'AIR, /* tqu */ NOT.BEGIN I BREAK I NOT.ENI), /* tck */ ILLEGAL.PAIR, /* ua */ NOT.BEGIN I BREAK I NOT.ENI), /* ub */ ANYJ'OMBINATION, /* uc */ ANY.COMBINATION, /* ud */ ANYJ'OMBINATION, /* ue */ NOT.BEGIN, /* uf */ ANYJ'OMBINATION, /* ug */ ANYJ'OMBINATION, /* uh */ NOT.BEGIN I BREAK I NOT.ENI), /* ui */ NOT.BEGIN I BREAK I NOT.ENI), /* uj */ ANYJ'OMBINATION, /* uk */ ANY.COMBINATION, /* ul */ ANY.COMBINATION, /* urn */ ANYJ'OMBINATION, /* un */ ANY.COMBINATION, /* uo */ NOT.BEGIN I BREAK, /* up */ ANYJ'OMBINATION, /* ur */ ANY.COMBINATION, /* us */ ANY.COMBINATION, /* ut */ ANY.COMBINATION, /* uu */ ILLEGAL.PAIR, /* uv */ ANY.COMBINATION, I* uw */ NOT.BEGIN I BREAK I NOT.ENI), /* ux */ ANYJ'OMBINATION, /* uy */ NOT.BEGIN I BREAK I NOT.ENI), I* uz */ ANYJ'OMBINATION, /* uch */ ANY.COMBINATION, ♦ ! I 20 # FIPS PUB 181 /* ugh */ NOT.BEGIN I PREFIX, /* uph */ ANY.COMBINATION, /* urh */ ILLEGAL_PAIR, I* ush */ ANY.COMBINATION, I* uth */ ANY.COMBINATION, /* uwh */ illegal.pair, I* uqu */ BREAK I NOT.END, I* uck */ ANY_COMBINATION, I* va */ ANY.COMBINATION, I* vb */ NOT_BEGIN I BREAK I NOT_END, I* vc */ NOT.BEGIN I BREAK I NOT_END, I* vd */ NOT.BEGIN I BREAK I NOT_ENI), /* ve */ ANY.COMBINATION, I* vf */ NOT_BEGIN I BREAK I NOT.END, I* vg */ NOT_BEGIN I BREAK I NOTJEND, I* vh */ NOT_BE(iIN I BREAK I NOT_ENI), /* vi */ ANY_COMBINATION, /* vj */ NOT_BEGIN I BREAK I NOT.END, /* vk */ NOT_BEGIN I BREAK I NOT.END, /* vl */ NOT_BEGIN I BREAK I NOT_ENI), I* vm */ NOT_BEGIN I BREAK I NOT_ENI), /* vn */ NOT.BEGIN I BREAK I NOT.END, I* vo */ ANY.COMBINATION, /* vp */ NOT.BEGIN I BREAK I NOT.END, /* vr */ NOT.BEGIN I BREAK I NOT.END, /* vs */ NOT.BEGIN I BREAK I NOT.END, /* vt */ NOT.BEGIN I BREAK I NOT.END, /* vu */ ANY.COMBINATION, /* w */ NOT.BEGIN I BREAK I NOT.END, /* vw */ NOT.BEGIN I BREAK I NOT.END, /* vx */ ILLEGAL.PAIR, /* vy */ NOT.BEGIN, I* vz */ NOT.BEGIN I BREAK I NOT.END, /* vch */ NOT.BEGIN I BREAK I NOT.END, /* vgh */ NOT.BEGIN I BREAK I NOT.END, /* vph */ NOT.BEGIN I BREAK I NOT.END, /* vrii */ ILLEGAL.PAIR, /* vsh */ NOT.BEGIN I BREAK I NOT.END, I* vth */ NOT.BEGIN I BREAK I NOT.END, I* vwh */ ILLEGAL.PAIR, /* vqu */ NOT.BEGIN I BREAK I NOT.END, /* vck */ ILLEGAL.PAIR, /* wa */ ANY.COMBINATION, /* wb */ NOT.BEGIN I PREFK, I* wc */ NOT.BEGIN I BREAK I NOT.END, /* wd */ NOT.BEGIN I PREFIX I END, I* we */ ANYJ'OMBINATION, /* wf */ NOT.BEGIN I PREFIX, I* wg */ NOT.BEGIN I PREFK I END, /* wh */ NOT.BEGIN I BREAK I NOT.END, /* wi */ ANY.COMBINATION, /* wj */ NOT.BEGIN I BREAK I NOT.END, /* wk */ NOT.BEGIN I PREFK, /* wl */ NOT.BEGIN I PREFIX I SUFFIX, /* wm */ NOT.BEGIN I PREFIX, /* wn */ NOT.BEGIN I PREFK, /* wo */ ANY.COMBINATION, /* wp */ NOT.BEGIN I PREFK, I* wr */ BEGIN I SUFFIX I NOT.END, I* ws */ NOT.BEGIN I PREFK, /* wt */ NOT.BEGIN I PREFK, /* wu */ ANY.COMBINATION, /* wv */ NOT.BEGIN I PREFK, I* ww */ NOT.BEGIN I BREAK I NOT.END, /* wx */ NOT.BEGIN I PREFK, /* wy */ ANY.COMBINATION, /* wz */ NOT.BEGIN I PREFK, I* wch */ NOT.BEGIN, /* wgh */ NOT.BEGIN I BREAK I NOT.END, I* wph */ NOT.BEGIN, /* wrh */ ILLEGAL.PAIR, /* wsh */ NOT.BEGIN, 21 FIPS PUB 181 /* wth */ NOT.BEGIN, /* wwh */ ILLEGAL.PAIR, /* wqu */ NOT_BE('.iIN I BREAK I NOT.END, /* wck */ NOT BEGIN, /* xa */ NOT.BEGIN, /* xb */ NOT.BEGIN I BREAK I NOT_ENI), /* xc */ NOT.BEGIN I BREAK I NOT END, /* xd */ NOT.BEGIN I BREAK I NOT_ENI), /* xe */ NOT.BEGIN, /* xf */ NOT.BEGIN I BREAK I NOT.END, /* xg */ NOT.BEGIN I BREAK I NOT.END, /* xh */ NOT.BEGIN I BREAK I NOT.END, /* xi */ NOT.BEGIN, /* xj */ NOT.BEGIN I BREAK I NOT.END, /* xk */ NOT.BEGIN I BREAK I NOT.END, /* xl */ NOT.BEGIN I BREAK I NOT.END, /* xm */ NOT.BEGIN I BREAK I NOT.END, /* xn */ NOT.BEGIN I BREAK I NOT.END, /* xo */ NOT.BEGIN, /* xp */ NOT.BEGIN I BREAK I NOT.END, /* xr */ NOT.BEGIN I BREAK I NOT.END, /* xs */ NOT.BEGIN I BREAK I NOT.END, /* xt */ NOT.BEGIN I BREAK I NOT.END, /* xu */ NOT.BEGIN, /* xv */ NOT.BEGIN I BREAK I NOT.END. /* xw */ NOT.BEGIN I BREAK I NOT.END, /* xx */ ILLEGAL.PAIR, /* xy */ NOT.BEGIN, /* xz */ NOT.BEGIN I BREAK I NOT.END, /* xch */ NOT.BEGIN I BREAK I NOT.END, /* xgh */ NOT BEGIN I BREAK I NOT.END, /* xph */ NOT BEGIN I BREAK I NOT.END, /* xrh */ ILLEGAL.PAIR, /* xsh */ NOT.BEGIN I BREAK I NOT.END, /* xth */ NOT.BEGIN I BREAK I NOT.END, /* xwh */ ILLEGAL.PAIR, /* xqu */ NOT.BEGIN I BREAK I NOT.END, /* xck */ ILLEGAL.PAIR, /* ya */ ANY.COMBINATION, I* yb */ NOT.BEGIN, /* yc */ NOT.BEGIN I NOT.END, /* yd */ NOT.BEGIN, /* ye */ ANY COMBINATION, /* yf */ NOT.BEGIN I NOT.END, /* yg */ NOT.BEGIN, /* yh */ NOT.BEGIN I BREAK I NOT.END, /* yi */ BEGIN I NOT.END, /* yj */ NOT.BEGIN I NOT.END, /* yk */ NOT.BEGIN, /* yl */ NOT.BEGIN I NOT.END, /* ym */ NOT.BEGIN, /* yn */ NOT.BEGIN, /* yo */ ANY.COMBINATION, /* yp */ NOT.BEGIN, /* yr */ NOT.BEGIN I BREAK I NOT.END, /* ys */ NOT.BEGIN, /* yt */ NOT.BEGIN, I* yu */ ANY.COMBINATION, /* yv */ NOT.BEGIN I NOT.END, /* yw */ NOT.BEGIN I BREAK I NOT.END, /* yx */ NOT.BEGIN, /* yy */ ILLEGAL.PAIR, /* yz */ NOT.BEGIN, /* ych */ NOT.BEGIN I BREAK I NOT.END, /* ygh */ NOT.BEGIN I BREAK I NOT.END, /* yph */ NOT.BEGIN I BREAK I NOT.END, /* yrh */ ILLEGAL.PAIR, /* ysh */ NOT.BEGIN I BREAK I NOT.END, /* yth */ NOT.BEGIN I BREAK I NOT.END, /* ywh */ ILLEGAL.PAIR, /* yqu */ NOT.BEGIN I BREAK I NOT.END, /* yck */ ILLEGAL.PAIR, 22 FIPS PUB 181 /* za */ ANY_COMBINATION, /* zb */ NOT.BEGIN I BREAK I NOT_ENI), /* zc */ NOT.BEGIN I BREAK I NOT.END, /* zd */ NOT_BEGIN I BREAK I NOT_ENI), /* ze */ ANY.COMBINATION, /* zf */ NOT_BEGIN I BREAK I NOT.END, /* zg */ NOT.BEGIN I BREAK I NOT_ENI), /* zh */ NOT.BEGIN I BREAK I N()T_ENI), /* zi */ ANY.COMBINATION, /* zj */ NOT.BEGIN I BREAK I NOT.END, /* zk */ NOT_BEdIN I BREAK I NOT END, /* zl */ NOT.BEGIN I BREAK I NOT.END, I* zm */ NOT_BEGIN I BREAK I NOT_END, I* zn */ NOT_BEGIN I BREAK I NOT.END, I* zo */ ANYJ'OMBINATION, /* zp */ NOT.BEGIN I BREAK I NOT.END, /* zr */ NOT.BEGIN I NOT.END, I* zs */ NOT.BEGIN I BREAK I NOT.END, I* zt */ NOT.BEGIN, /* zu */ ANYJ'OMBINATION, /* zv */ NOT.BEGIN I BREAK I NOT.END, /* zw */ SUFFIX I NOT.END, /* zx */ ILLEGAL.PAIR, /* zy */ ANY.COMBINATION, /* zz */ NOT.BEGIN, /* zch */ NOT.BEGIN I BREAK I NOT.END, /* zgh */ NOT.BEGIN I BREAK I NOT.END, /* zph */ NOT.BEGIN I BREAK I NOT.END, I* zrh */ ILLEGAL.PAIR, /* zsh */ NOT.BEGIN I BREAK I NOT.END, /* zth */ NOT.BEGIN I BREAK I NOT.END, /* zwh */ ILLEGAL.PAIR, /* zqu */ NOT.BEGIN I BREAK I NOT.END, I* zck */ ILLEGAL.PAIR, /* cha */ ANYJ'OMBINATION, I* chb */ NOT.BEGIN I BREAK I NOT.END, I* chc */ NOT.BEGIN I BREAK I NOT.END, I* chd */ NOT.BEGIN I BREAK I NOT.END, /* che */ ANY.COMBINATION, /* chf */ NOT.BEGIN I BREAK I NOT.END, /* chg */ NOT.BEGIN I BREAK I NOT.END, /* chh */ NOT.BEGIN I BREAK I NOT.END, /* chi */ ANY.COMBINATION, /* chj */ NOT.BEGIN I BREAK I NOT.END, /* chk */ NOT.BEGIN I BREAK I NOT.END, /* chl */ NOT.BEGIN I BREAK I NOT.END, /* dim */ NOT.BEGIN I BREAK I NOT.END, /* chn */ NOT.BEGIN I BREAK I NOT.END, /* cho */ ANY.COMBINATION, /* chp */ NOT.BEGIN I BREAK I NOT.END, /* chr */ NOT.END, I* chs */ NOT.BEGIN I BREAK I NOT.END, /* cht */ NOT.BEGIN I BREAK I NOT.END, /* chu */ ANY.COMBINATION, /* chv */ NOT.BEGIN I BREAK I NOT.END, I* chw */ NOT.BEGIN I NOT.END, /* chx */ ILLEGAL.PAIR, /* chy */ ANY.COMBINATION, /* chz */ NOT.BEGIN I BREAK I NOT.END, /* chch */ ILLEGAL.PAIR, /* chgh */ NOT.BEGIN I BREAK I NOT.END, /* chph */ NOT.BEGIN I BREAK I NOT.END, /* dim */ ILLEGAL PAIR, /* chsh */ NOT.BEGIN I BREAK I NOT.END, /* chth */ NOT.BEGIN I BREAK I NOT.END, /* chwh */ ILLEGAL.PAIR, /* chqu */ NOT.BEGIN I BREAK I NOT.END, /* chck */ ILLEGAL.PAIR, /* gha */ ANYJ'OMBINATION, /* ghb */ NOT.BEGIN I BREAK I PREFIX I NOT.END, /* ghc */ NOT.BEGIN I BREAK I PREFIX I NOT.END, /* ghd */ NOT.BEGIN I BREAK I PREFK I NOT.END, 23 FIPS PUB 181 ^ /* ghe */ ANY_COMBINATION, /* ghf */ NOT.BEGIN I BREAK I PREFIX I NOT.ENI), /* glig */ NOT_BEGIN I BREAK I PREFIX I NOT.ENI), /* ghh */ NOT_BEGIN I BREAK I PREFIX I NOT.ENI), /* gin */ BEGIN I NOT_END, /* ghj */ NOT_BEGIN I BREAK I PREFIX I NOT_END, /* ghk */ NOT.BEGIN I BREAK I PREFIX I NOT_ENI), /* ghl */ NOT_BEGIN I BREAK I PREFIX I NOT_END, /* ghm */ NOT BEGIN I BREAK I PREFIX I NOT END, /* ghn */ NOT.BEGIN I BREAK I PREFIX I NOT_ENI), /* gho */ BEGIN I NOT_ENI), /* ghp */ NOT_BEGIN I BREAK I NOT_ENI), /* ghr */ NOT.BEGIN I BREAK I PREFIX I NOT.ENI), /* ghs */ NOT_BEGIN I PREFIX, /* glit */ NOT.BEGIN I PREFIX, /* ghu */ NOT.BEGIN I BREAK I PREFIX I NOT_ENI), /* ghv */ NOT.BEGIN I BREAK I PREFIX I NOT_ENI), /* ghw */ NOT.BEGIN I BREAK I PREFIX I NOT.ENI), /* ghx */ ILLEGAL.PAIR, /* ghy */ NOT.BEGIN I BREAK I PREFIX I NOT.ENI), /* ghz */ NOT.BEGIN I BREAK I PREFIX I NOT.ENI), /* ghch */ NOT.BEGIN I BREAK I PREFIX I NOT.ENI), /* ghgh */ ILLEGAL.PAIR, /* ghph */ NOT.BEGIN I BREAK I PREFIX I NOT.ENI), /* ghrii */ ILLEGAL.PAIR, /* ghsh */ NOT.BEGIN I BREAK I PREFIX I NOT.ENI), /* ghth */ NOT.BEGIN I BREAK I PREFIX I NOT.ENI), /* ghwh */ ILLEGALJ'AIR, /* ghqu */ NOT.BEGIN I BREAK I PREFIX I NOT.ENI), /* ghck */ ILLEGAL.PAIR, /* pha */ ANY.COMBINATION, /* phb */ NOT.BEGIN I BREAK I NOT.ENI), /* phc */ NOT.BEGIN I BREAK I NOT.ENI), /* phd */ NOT.BEGIN I BREAK I NOT.ENI), /* phe */ ANY.COMBINATION, /* phf */ NOT.BEGIN I BREAK I NOT.ENI), /* phg */ NOT.BEGIN I BREAK I NOT.ENI), /* phh */ NOT.BEGIN I BREAK I NOT.ENI), /* phi */ ANY.COMBINATION, /* phj */ NOT.BEGIN I BREAK I NOT.ENI), /* phk */ NOT.BEGIN I BREAK I NOT.ENI), /* phi */ BEGIN I SUFFIX I NOT.ENI), /* phm */ NOT.BEGIN I BREAK I NOT.ENI), /* phn */ NOT.BEGIN I BREAK I NOT.ENI), /* pho */ ANY.COMBINATION, /* php */ NOT.BEGIN I BREAK I NOT.ENI), /* phr */ NOT.ENI), /* phs */ NOT.BEGIN, /* pht */ NOT.BEGIN, /* phu */ ANY.COMBINATION, /* phv */ NOT.BEGIN I NOT.ENI), /* phw */ NOT.BEGIN I NOT.ENI), /* phx */ ILLEGAL.PAIR, /* phy */ NOT.BEGIN, /* phz */ NOT.BEGIN I BREAK I NOT.ENI), /* phch */ NOT.BEGIN I BREAK I NOT.ENI), /* phgh */ NOT.BEGIN I BREAK I NOT.ENI), /* phph */ ILLEGAL.PAIR, /* phrh */ ILLEGAL.PAIR, /* phsh */ NOT.BEGIN I BREAK I NOT.ENI), /* phth */ NOT.BEGIN I BREAK I NOT.ENI), /* phwh */ ILLEGAL.PAIR, /* phqu */ NOT.BEGIN I BREAK I NOT.ENI), /* phck */ ILLEGAL.PAIR, /* rha */ BEGIN I NOT.ENI), /* rhb */ ILLEGAL.PAIR, /* rhc */ ILLEGAL.PAIR, /* rhd */ ILLEGAL.PAIR, /* rhe */ BEGIN I NOT.ENI), /* rhf */ ILLEGAL.PAIR, /* dig */ ILLEGALJ'AIR, /* rhh */ ILLEGALJ'AIR, #1 24 FIPS PUB 181 # I* rhi */ BECilN I NOT_END, I* rhj */ ILLECiALJ'AIR, I* rhk */ ILLECiALJ'AIR, I* ihl */ ILLECiALJ'AIR. I* rhm */ ILLEC'.ALJ'AIR, I* rhn */ ILLECiALJ'AIR, I* rho */ BECilN I NOT_END, I* rhp */ illegal j' air, I* rhr */ ILLEC.AL_PAIR, /* rhs */ ILLE(iAL_PAIR, I* rtit */ ILLEGAL_PAIR, I* riiu */ BEGIN I NOT_END, I* rhv */ ILLECiALJ'AIR, I* rhw */ ILLECiALJ'AIR, I* rhx */ ILLECiALJ'AIR, /* rhy */ BEGIN I NOT_END, I* rhz */ ILLECiALJ'AIR, I* rhch */ ILLECiALJ'AIR, /* rtigh */ ILLECiALJ'AIR, /* rhph */ ILLECiALJ'AIR, I* rhrh */ ILLECiALJ'AIR, /* rhsh */ ILLECiALJ'AIR, /* rhth */ ILLECiALJ'AIR, /* rhwh */ ILLECiALJ'AIR, I* rhqu */ ILLECiALJ'AIR, I* rhck */ ILLECiALJ'AIR, I* sha */ ANYJT)MBINATION, /* shb */ NOTJiEGIN I BREAK I NOTJZNI), I* she */ NOTJJEGIN I BREAK I NOT_END, I* shd */ NOT_BEGIN I BREAK I NOTJZNI), /* she */ ANYJ'OMBINATION, I* shf */ NOTJiEGIN I BREAK I NOT.END, /* shg */ NOTJ3EGIN I BREAK I NOTJiNI), I* shh */ ILLECiALJ'AIR, /* shi */ ANY_COMBINATION, I* shj */ NOT BEGIN I BREAK I NOTJZNI), I* shk */ NOTJ3EGIN, /* shl */ BECilN I SUFFIX I NOTJZNI), /* shm */ BECilN I SUFFIX I NOTJZNI), /* shn */ BECilN I SUFFIX I NOTJZNI), I* sho */ ANYJ'OMBINATION, I* shp */ NOTJiEGIN, /* shr */ BECilN I SUFFIX I NOTJZNI), /* shs */ NOTJJEGIN I BREAK I NOTJZNI), /* sht */ SUFFIX, I* shu */ ANYJ^OMBINATION, I* shv */ NOTJJEGIN I BREAK I NOTJZNI), /* shw */ SUFFIX I NOTJZNI), /* shx */ ILLECiALJ'AIR, /* shy */ ANYJX)MBINATION, /* shz */ NOTJJEGIN I BREAK I NOTJZNI), I* shch */ NOTJJEGIN I BREAK I NOTJZNI), /* shgh */ NOTJJEGIN I BREAK I NOTJZNI), /* shph */ NOTJJEGIN I BREAK I NOTJZNI), /* shrh */ ILLECiALJ'AIR, /* shsh */ ILLECiALJ'AIR, /* shth */ NOTJJEGIN I BREAK I NOTJZNI), /* shwh */ ILLECiALJ'AIR, /* shqu */ NOTJJEGIN I BREAK I NOTJZNI), /* shek '*/ ILLECiALJ'AIR, /* tha */ ANYJ'OMBINATION, /* thb */ NOTJJEGIN I BREAK I NOTJZNI), /* the */ NOTJJEGIN I BREAK I NOTJZNI), /* thd */ NOTJJEGIN I BREAK I NOTJZNI), /* the */ ANYJ'OMBINATION, /* thf */ NOTJJEGIN I BREAK I NOTJZNI), /* thg */ NOTJJEGIN I BREAK I NOTJZNI), /* thh */ NOTJJEGIN I BREAK I NOTJZNI), I* thi */ ANYJ'OMBINATION, /* thj */ NOTJJECilN I BREAK I NOTJZNI), /* thk */ NOTJJEGIN I BREAK I NOTJZNI), /* thi */ NOTJJEGIN I BREAK I NOTJZNI), 25 FIPS PUB 181 /* tlini */ NOT BEGIN I BREAK I NOT_END, /* thn */ NOT_BEGIN I BREAK I NOT_ENI), /* tho */ ANYJ'OMBINATION, /* thp */ NOT_BEC.IN I BREAK I NOT_ENI), /* tlir */ NOT_ENI), /* ths */ NOT BEGIN I END, /* tht */ NOT BEGIN I BREAK I NOT.END, /* thu */ ANYJ'OMBINATION, I* thv */ NOT_BEGIN I BREAK I NOT_ENI), /* thw */ SUFFIX I NOT_ENI), /* thx */ illegal j'air, /* thy */ ANYJ'OMBINATION, /* thz */ NOT_BEGIN I BREAK I NOT END, /* thch */ NOTJ3EGIN I BREAK I NOT_ENI), /* thgh */ NOT_BEGIN I BREAK I NOT_ENI), /* thph */ NOT_BEGIN I BREAK I NOT_ENI), /* thrli */ ILLEGALJ'AIR, /* thsh */ NOT_BEGIN I BREAK I NOT_ENI), /* thth */ ILLEGALJ'AIR, /* thwh */ ILLEGALJ'AIR, /* thqu */ NOTJBEGIN I BREAK I NOT.ENI), /* thck */ ILLEGALJ'AIR, /* wha */ BEGIN I NOTJEND, /* whb */ ILLEGAL PAIR, /* whc */ ILLEGALJ'AIR, I* whd */ ILLEGALJ'AIR, /* whe */ BEGIN I NOTJZNI), /* whf */ ILLEGALJ'AIR, /* whg */ ILLEGALJ'AIR, /* whh */ ILLEGALJ'AIR, /* whi */ BEGIN I NOTJZNI), /* whj */ ILLEGALJ'AIR, /* whk */ ILLEGAL PAIR, /* whi */ ILLEGALJ'AIR, ▲ /* whm */ ILLEGALJ'AIR, W /* whn */ ILLEGALJ'AIR, /* who */ BEGIN I NOT END, /* whp */ ILLEGALJ'AIR, /* whr */ ILLEGALJ'AIR, /* whs */ ILLEGALJ'AIR, /* wht */ ILLEGALJ'AIR, I* whu */ ILLEGALJ'AIR, /* whv */ ILLEGALJ'AIR, /* whw */ ILLEGALJ'AIR, /* whx */ ILLEGALJ'AIR, /* why */ BEGIN I NOT.END, /* whz */ ILLEGALJ'AIR, /* whch */ ILLEGALJ'AIR, /* whgh */ ILLEGALJ'AIR, /* whph */ ILLEGALJ'AIR, /* whrh */ ILLEGALJ'AIR, /* whsh */ ILLEGALJ'AIR, /* whth */ ILLEGALJ'AIR, /* whwh */ ILLEGALJ'AIR, /* whqu */ ILLEGALJ'AIR, /* whck */ ILLEGALJ'AIR, /* qua */ ANYJ'OMBINATION, /* qub */ ILLEGALJ'AIR, /* que */ ILLEGALJ'AIR, /* quel */ ILLEGALJ'AIR, /* que */ ANYJ'OMBINATION, /* quf */ ILLEGALJ'AIR, /* qug */ ILLEGALJ'AIR, /* quh */ ILLEGALJ'AIR, /* qui */ ANYJ'OMBINATION, /* quj */ ILLEGALJ'AIR, /* quk */ ILLEGAL PAIR, /* qui */ ILLEGALJ'AIR, /* qum */ ILLEGALJ'AIR, /* qun */ ILLEGALJ'AIR, /* quo */ ANYJ'OMBINATION, /* qup */ ILLEGALJ'AIR, 26 # FIPS PUB 181 # /* qur */ ILLEGALJ'AIR, I* qus */ ILLEGAL_PAIR, I* qut */ ILLEGAL_PAIR, I* quu */ ILLEGALJ'AIR, /* quv */ ILLEGALJ'AIR, /* quw */ ILLEGALJ'AIR, /* qux */ ILLEGAL_PAIR, I* quy */ ILLEGALJ'AIR, I* quz */ DULEGAL_PAIR, /* quch */ ILLEGALJ'AIR, I* qugh */ ILLEGALJ'AIR. I* quph */ ILLEGALJ'AIR, I* qurh */ ILLECiALJ'AIR, I* qush */ ILLEGALJ'AIR, I* quth */ ILLECiALJ'AIR, /* quwh */ ILLEGALJ'AIR, I* ququ */ ILLEGALJ'AIR, I* quck */ ILLECiALJ'AIR, /* cka */ NOTJJEGIN I BREAK I NOT.END, /* ckb */ NOTJ3EGIN I BREAK I NOT_END, I* ckc */ NOTJJEGIN I BREAK I NOTJINI), f* ckd */ NOTJJEGIN I BREAK I NOT.END, I* eke */ NOT_BEGIN I BREAK I NOTJiNI), I* ckf */ NOTJJEGIN I BREAK I NOTJiNI), I* ckg */ NOTJJEGIN I BREAK I NOTJiNI), /* ckh */ NOTJJEGIN I BREAK I NOTJiNI), I* cki */ NOTJJEGIN I BREAK I NOTJiNI), I* ckj */ NOTJJEGIN I BREAK I NOTJiNI), /* ckk */ NOTJJEGIN I BREAK I NOTJiNI), /* del */ NOTJJEGIN I BREAK I NOTJiNI), I* ckm */ NOTJJEGIN I BREAK I NOTJiNI), I* ckn */ NOTJJEGIN I BREAK I NOTJiNI), I* cko */ NOTJJEGIN I BREAK I NOTJiNI), /* ckp */ NOTJJEGIN I BREAK I NOTJiNI), I* ckr */ NOTJJEGIN I BREAK I NOTJiNI), I* cks */ NOTJJEGIN, I* ckt */ NOTJJEGIN I BREAK I NOTJiNI), I* cku */ NOTJJECilN I BREAK I NOTJiNI), I* ckv */ NOTJJEGIN I BREAK I NOTJiNI), I* ckw *l NOTJJEGIN I BREAK I NOTJiNI), I* ckx */ ILLEGALJ'AIR, I* cky */ NOTJJEGIN, I* ckz */ NOTJJEGIN I BREAK I NOTJiNI), /* ckch */ NOTJJEGIN I BREAK I NOTJiNI), /* ckgh */ NOTJJECilN I BREAK I NOTJiNI), I* ckph */ NOTJ3EGIN I BREAK I NOTJiNI), I* ckrh */ ILLEGALJ'AIR, I* cksh */ NOTJJEGIN I BREAK I NOTJiNI), I* ckth */ NOTJJECJIN I BREAK I NOTJiNI), /* ckwh */ ILLECiALJ'AIR, I* ckqu */ NOTJJEGIN I BREAK I NOTJiNI), I* ekek */ ILLEGALJ'AIR #ifdef RANJ)EBUG main (argc, argv) int argc; char *argv[]; % register int argno; register long seed; register unsigned short int pwlen; register unsigned short int minimum; int number_of_words; boolean noJegal_words; register char *unhyphenated_word; register char *hyphenated_word; time_t ltime; 27 FIPS PUB 181 #tfdef Bl int algorithm = 0; #endif number_of_words = 1; no_legal_words = FALSE; seed = 0L; pwlen = 8; minimum = 6; for (argno = 0; argno < argc; argno++) ( if (argv|argno][01 == '-') switch (argv[argnoi[l)) ( #ifdef Bl case 'a': algorithm = atoi (&argv[argno][2]); break; #endif case 's': seed = atol (&argv( argno] |2]); if (seed == 0L) seed = 1L; set_seed(seed); break; case T: pwlen = abs (atoi (&argv[argnol|2|)); if (pwlen < 1 ) pwlen = 8; break; case 'm': minimum = abs (atoi (&argv[argno]|2))); if (minimum < 1 ) minimum = 1; break; case 'n': no_legal_words = TRUE; break; I else number_of_words = atoi (argv(argno)); if (number_of_words < 1 ) number_of_words = 1; I /* * During debugging (RAN_I)EBlKi is set), we generate the seed from here * rather than the first entry to randomwordO • */ if (seed = 0L)| time(<ime); set_seed((long) ltime); } if (minimum > pwlen) I (void) fflush(stdout); (void) fpnntf (stderr, "minimum (%u) new password length cannot exceed maximum (%u)\n", (uint) minimum, (uint) pwlen); (void) fflush(stderr); exit (1); ) (void) fflush(stderr); (void) fprintf (stdout, "(New password will be between %u and %u characters long)\n", (uint) minimum, (uint) pwlen); (void) fflush (stdout); for (argno = 1; argno <= number_of_words; argno++) ( unhyphenated_word = calloc (sizeof (char), pwlen + 1); hyphenated_word = calloc (sizeof (char), 2 * pwlen); #ifdef Bl switch (algorithm) ( default: 28 FIPS PUB 181 • t case 0: (void) randomword (unhyphenated_word, hyphenated_word, minimum, pwlen, uo_legal_words, 0L); (void) fflush(stderr); (void) fprintf (stdout, "%s (%s)\n", unhyphenated_word, hyphenated_word); break; case 1: (void) randomchars (unhyphenated_word, minimum, pwlen, no_legal_words, 0L); (void) fflush(stderr); (void) fprintf (stdout, "%s\n", unhyphenated_word); break; case 2: (void) randomktters (unhyphenated_word, minimum, pwlen, no_legal_words, 0L); (void) fflush(stderr); (void) fprintf (stdout, "%s\n", unliyphenated_word); break; #else (void) randomword (unhyphenated_word, hyphenated_word, minimum, pwlen, no_legal_words, 0L); (void) fflush(stderr); (void) fprintf (stdout, "%s (%s)\n", unhyphenated_word, hyphenated_word); #endif (void) fflush (stdout); free (unhyphenated_word); free (hyphenated_word); ) ) #endif #ifdef Bl /* * Randomchars will generate a random string and place it in the * buffer word. The word must be pre-allocated. The words generated * will have sizes between minlen and maxlen. If restrict is TRUE, * words will not be generated that appear as login names or as entries * in the on-line dictionary. The seed is used on first use of the routine. * The length of the word is returned, or -1 if there were an error * (length settings are wrong or dictionary checking could not be done). * The seed is used on first use of the routine. */ int randomchars(string, minlen, maxlen, restrict, seed) register char *string; register unsigned short int minlen; register unsigned short int maxlen; register boolean restrict; long seed; ( register int loop_count; register unsigned short int string_size; register unsigned short int build; static been_here_before = FALSE; /* * Execute this upon startup. This initializes the * environment, including seed'ing the random number * generator and loading the on-line dictionary. */ if (!been_here_t>ef°re) ( been_here_before = TRUE; #ifndef RANJDEBUG set_seed(seed); #endif 1 /* * Check for minlen > maxlen. This is an error. •/ if (minlen > maxlen) return (-1); 29 FIPS PUB 181 « i loop_count = 0; slring_size = get_random(minlen, niaxlen); do { for (build = 0; build < string_size; build++) ( string[build) = (char) get_random((unsigned short int) '!' (unsigned short int) '-'); ) restrict = 0; loop_count ++; ) while (restrict && Ooop_count <= MAXJ.JNACCEFTABLE)); string|string_size] = *\0'; return string_size; /* * Randomletters will generate a random string of letters and place it in the * buffer word. The word must be pre-allocated. The words generated * will have sizes between minlen and maxlen. If restrict is TRUE, * words will not be generated that appear as login names or as entries * in the on-line dictionary. The seed is used on first use of the routine. * The length of the word is returned, or -1 if there were an error * (length settings are wrong or dictionary checking could not be done). * The seed is used on first use of the routine. */ int randomletters(string, minlen, maxlen, restrict, seed) register char *string; register unsigned short int minlen; register unsigned short int maxlen; register boolean restrict; long seed; ( register int loop_count; register unsigned short int string_size; register unsigned short int build; static been_here_before = FALSE; /* * Execute this upon startup. This initializes the * environment, including seed'ing the random number * generator and loading the on-line dictionary. */ if (!been_here_before) ( been_here_before = TRUE; #ifndef RAN_I)EBUG set_seed(seed); #endif ) /* * Check for minlen > maxlen. This is an error. */ if (minlen > maxlen) return (-1); loop_count = 0; string_size = get_random(minlen, maxlen); do 30 - FIPS PUB 181 for (build = 0; build < string_size; build++) ( string[build) = (char) get_random((unsigned short int) 'a', (unsigned short int) V); restrict = 0; loop_count ++; I while (restrict && (loop_count <= MAXJJNACCEPTABLE)); string! string_size] = "^'l return string_size; ) #endif * Randomword will generate a random word and place it in the * buffer word. Also, the hyphenated word will be placed into * the buffer hyphenated_word. Both word and hyphenated_word must * be pre-allocated. The words generated will have sizes between * minlen and maxlen. If restrict is TRUE, words will not be generated that * appear as login names or as entries in the on-line dictionary. * This algorithm was initially worded out by Morrie Gasser in 1975. * Any changes here are minimal so that as many word combinations * can be produced as possible (and thus keep the words random). * The seed is used on first use of the routine. * The length of the unhyphenated word is returned, or -1 if there * were an error (length settings are wrong or dictionary checking * could not be done. */ int randomword (word, hyphenated_word, minlen, maxlen, restrict, seed) register char *word; register char *hyphenated_word; register unsigned short int minlen; register unsigned short int maxlen; register boolean restrict; long seed; { register int pwlen; register int loop_count; static been_here_before = FALSE; I* * Execute this upon startup. This initializes the * environment, including seed'ing the random number * generator and loading the on-line dictionary. */ if (!been_here_before) been_here_before = TRUE; #ifndef RAN_I)EBUG set_seed(seed); #endif I* * Check for minlen>maxlen. This is an error. * and a length of 0. */ if (minlen > maxlen) return (-1); /* * ("heck for zero length words. This is technically not an error. 31 FIPS PUB 181 * so we take the short cut and return a null word and a length of 0. */ if (maxlen == 0) I word[0] = X)'; hyphenated_word|0] = M)'; return (0); ) /* * Continue finding words until the criteria are satisfied. * The criteria are, if restrict is set, that if the word appears * as either a login name or as part of the on-line dictionary, * throw out the word and look for another. */ loop_count = 0; do ( /* * (jet a random word. Its length is a random quantity * from with the limits specified in the call to * randomwordO- */ pwlen = get_word (word, hyphenated_word, get_random (minlen, maxlen)); restrict = 0; loop_count++; ) while (restrict && (loop_count <= MAXJINACCEPTABLE)); if (restrict) { (void) fflush(stdout); (void) fprintf(stderr, "could not find acceptable random passwords" ); (void) fflush(stderr); exit(l); ) return (pwlen); ) /* * This is the routine that returns a random word — as * yet unchecked against the passwd file or the dictionary. * It collects random syllables until a predetermined * word length is found. If a retry threshold is reached, * another word is tried. Given that the random number * generator is uniformly distributed, eventually a word * will be found if the retry limit is adequately large enough. */ static int get_word (word, hyphenated_word, pwlen) char *word; char *hyphenated_word; unsigned short int pwlen; ( register unsigned short int word_length; register unsigned short int syllablejength; register char *new_syllable; register unsigned short int * syllabi e_units; register unsigned short int word_size; register unsigned short int word_place; int unsigned short *word_units; int unsigned short syllable_size; int unsigned tries; « 41 32 FIPS PUB 181 * Keep count of retries. */ tries = 0; * The length of the word in characters. */ word_length = 0; * The length of the word in character units (each of which * two characters long. */ word size = 0; * Initialize the array storing the word units. Since we know the * length of the word, we only need one of that length. This method is * preferable to a static array, since it allows us flexibility in * choosing arbitrarily long word lengths. Since a word can contain one * syllable, we should make syllable_units, the array holding the * analogous units for an individual syllable, the same length. No * explicit rule limits the length of syllables, but digram rules and * heuristics do so indirectly. */ word_units = (unsigned short int *) calloc (sizeof (unsigned short int), pwlen); syllabi e_units - (unsigned short int *) calloc (sizeof (unsigned short int), pwlen); new_syllable = calloc (sizeof (unsigned short int), pwlen); I* * Find syllables until the entire word is constructed. */ while (word_length < pwlen) ( /* * (jet the syllable and find its length. */ (void) get_syllable (new_syllable, pwlen - word_length, syllable_units, &syllable_size); syllable_length = strlen (new_syllable); * Append the syllable units to the word units. */ for (word_place = 0; word_place <= syllable_size; word_place++) word_units[word_size + word_place] = syllable_units[word_place]; word_size += syllable_size + 1; * If the word has been improperly formed, throw out * the syllable. The checks performed here are those * that must be formed on a word basis. The other * tests are performed entirely within the syllable. * Otherwise, append the syllable to the word and * append the syllable to the hyphenated version of * the word. */ if (improper_word (word_units, word_size) II ((wordjength == 0) && have_initial_y (syllable_units, syllable_size)) II ((word_length + syllable_length == pwlen) && have_final_spht (syllable_units, syllable_size))) word_size -= syllable_size + 1; else I if (word_length = 0) 33 FIPS PUB 181 ▲ ( (void) strcpy (word, new_syl]able); (void) strcpy (hyphenated word, new_syllable); ) else { (void) strcat (word, new_syllable); (void) strcat (hyphenated_word, "-"); (void) strcat (hyphenated_word, new_syUable); ) word_length += syllabi e_length; ) /* * Keep track of the times we have tried to get * syllables. If we have exceeded the threshold, * reinitialize the pwlen and word_size variables, clear * out the word arrays, and start from scratch. */ tries++; if (tries > MAX.RETRIES) ( word_length = 0; word_size = 0; tries = 0; (void) strcpy (word, ""); (void) strcpy (hyphenated_word, ""); ) } /* * The units arrays and syllable storage are internal to this * routine. .Since the caller has no need for them, we * release the space. */ free ((char *) new_syllable); free ((char *) syllable_units); free ((char *) word_units); return ((int) wordjength); /* * ("heck that the word does not contain illegal combinations * that may span syllables. Specifically, these are: * 1. An illegal pair of units between syllables. * 2. Three consecutive vowel units. * 3. Three consecutive consonant units. * The checks are made against units (1 or 2 letters), not against * the individual letters, so three consecutive units can have * the length of 6 at most. */ static boolean improper_word (units, word_size) register unsigned short int *units; register unsigned short int word_size; ( register unsigned short int unit_count; register boolean failure; failure = FALSE; for (unit_count = 0; (failure && (unit_count < word_size); unit_count++) « /* Check for ILLEGAL_PAER. This should have been caught for units within a syllable, but in some cases it would have gone unnoticed for units between syllables (e.g., when saved_unit's in get_syllable() were not 34 FIPS PUB 181 * used). */ if ((unit_count != 0) && (digram[units[unit_count - l]]|units[unit_count|l & ILLEGALJ'AIR)) failure = TRl IE; /* * Check for consecutive vowels or consonants. Because * the initial y of a syllable is treated as a consonant * rather than as a vowel, we exclude y from the first * vowel in the vowel test. The only problem comes when * y ends a syllable and two other vowels start the next, * like fly-oint. Since such words are still * pronounceable, we accept this. */ if (Ifailure && (unit_count >= 2)) ( /* * Vowel check. */ if ((((rules|units[unit_count - 2J|.flags & VOWEL) && !(rules[units|unit_count - 2]]. flags & ALTERNATEJVOWEL)) && (rules[units[unit_count - 1]]. flags & VOWEL) && (rules[unhs[unit_countl].flags & VOWEL)) II /* * Consonant check. */ (!(rules[units(unit_count - 2]|.flags & VOWEL) && !(rules|units[unit_count - 1]). flags & VOWEL) && !(rules[units[unit_count]|.flags & VOWEL))) failure = TRUE; return (failure); ) /* * Treating y as a vowel is sometimes a problem. Some words * get formed that look irregular. One special group is when * y starts a word and is the only vowel in the first syllable. * The word ycl is one example. We discard words like these. */ static boolean have_initial_y (units, unit_size) register unsigned short int *units; register unsigned short int unit_size; I register unsigned short int unit_count; register unsigned short int vowel_count; register unsigned short int normal_vowel_count; vowel_count = 0; normal_vowel_count = O, for (unit_count = 0; unit_count <= unit_size; unit_count++) /* * Count vowels. */ if (rules[units[unit_count]].flags & VOWEL) ( vowel_count++; /* * Count the vowels that are not: 1. y, 2. at the start of * the word. */ if (!(rules[units[unit_count]].flags & ALTERNATE_VOWEL) 35 FIPS PUB 181 (unit_count != 0)) normal vowel count++; return ((vowel_count <= 1) && (nomial_vowel_count == 0)); } /* * Besides the problem with the letter y, there is one with * a silent e at the end of words, like face or nice. We * allow this silent e, but we do not allow it as the only * vowel at the end of the word or syllables like ble will * be generated. */ static boolean have_final_split (units, unit_size) register unsigned short int *units; register unsigned short int unit_size; ( register unsigned short int unit_count; register unsigned short int vowel_count; vowel_count = 0; /* * Count all the vowels in the word. */ for (unit_count = 0; unit_count <= unit_size; unit_count++) if (rules|units|unit_count]).flags & VOWEL) vowel_count++; I* * Return TRUE iff the only vowel was e, found at the end if the * word. */ return ((vowel_count == 1) && (mles[units[unit_size)].flags & NO_FINAL_SPLIT)); * Generate next unit to password, making sure that it follows * these rules: * 1. Each syllable must contain exactly 1 or 2 consecutive * vowels, where y is considered a vowel. * 2. Syllable end is determined as follows: * a. Vowel is generated and previous unit is a * consonant and syllable already has a vowel. In * this case, new syllable is started and already * contains a vowel. * b. A pair determined to be a "break" pair is encountered. * In this case new syllable is started with second unit * of this pair. * c. End of password is encountered. * d. "begin" pair is encountered legally. New syllable is * started with this pair. * e. "end" pair is legally encountered. New syllable has * nothing yet. * 3. Try generating another unit if: * a. third consecutive vowel and not y. * b. "break" pair generated but no vowel yet in current * or previous 2 units are "not_end". * c. "begin" pair generated but no vowel in syllable * preceding begin pair, or both previous 2 pairs are * designated "not_end". * d. "end" pair generated but no vowel in current syllable * or in "end" pair. * e. "not_begin" pair generated but new syllable must * begin (because previous syllable ended as defined in * 2 above). * f. vowel is generated and 2a is satisfied, but no syllable 4 36 FIPS PUB 181 * break is possible in previous 3 pairs. g. Second and third units of syllable must begin, and * first unit is "altemale_vowel". */ static char * get_syllable (syllable, pwlen, units_in_syllable, syllable_length) char * syllable; unsigned short int pwlen; unsigned short int *units_in_syllable; unsigned short int *syllable_length; f register unsigned short int unit; register short int current_unit; register unsigned short int vowel_count; register boolean rule_broken; register boolean want_vowel; register boolean want_another_unit; int unsigned tries; int unsigned short last_unit; int short length_left; unsigned short int hold_saved_unit; static unsigned short int saved_unit; static unsigned short int saved_pair[2]; /* * This is needed if the saved_unit is tries and the syllable then * discarded because of the retry limit. Since the saved_unit is OK and * fits in nicely with the preceding syllable, we will always use it. */ hold_saved_unit = saved_unit; I* * Loop until valid syllable is found. */ do ( I* * Try for a new syllable. Initialize all pertinent * syllable variables. */ tries = 0; saved_unit = hold_saved_unit; (void) strcpy (syllable, ""); vowel_count = 0; current_unit = 0; length_left = (short int) pwlen; want_another_unit = TRUE; /* * This loop finds all the units for the syllable. */ do I want_vowel = FALSE; /* * This loop continues until a valid unit is found for the * current position within the syllable. */ do ( /* * If there are saved_unit's from the previous * syllable, use them up first. */ if (saved_unit != 0) /* If there were two saved units, the first is guaranteed (by checks performed in the previous syllable) to be valid. We ignore the checks and place it in this syllable manually. 37 FIPS PUB 181 . */ if (saved_unit == 2) units_in_syllable|0] = saved_pair[l); if (ru]es[saved_pair[ll).flags & VOWEL) vowel_count++; curTent_unit++; (void) strq^y (syllable, rules[saved_pair[l|].unit_code); length_left -= strlen (syllable); /* * The unit becomes the last unit checked in the * previous syllable. */ unit = saved_pair|0); /* * The saved units have been used. Do not try to * reuse them in this syllable (unless this particular * syllable is rejected at which point we start to rebuild * it with these same saved units. */ saved_unit = 0; I else /* * If we don't have to scoff the saved units, * we generate a random one. If we know it has * to be a vowel, we get one rather than looping * through until one shows up. */ if (want_vowel) unit = random_unit (VOWEL); else unit = random_unit (NO_SPECIAL_RULE); lengthjeft -= (short int) strlen (rules|unit|.unit_code); /* * Prevent having a word longer than expected. */ if (lengthjeft < 0) rule_broken = TRUE; else rule_broken = FALSE; /* * First unit of syllable. This is special because the * digram tests require 2 units and we don't have that yet. * Nevertheless, we can perform some checks. */ if (current_unit == 0) ( /* * If the shouldn't begin a syllable, don't * use it. */ if (rules[unit].flags & NOT_BEGIN_SYLLABLE) rule_broken = TRUE; else /* * If this is the last unit of a word, * we have a one unit syllable. Since each * syllable must have a vowel, we make sure * the unit is a vowel. Otherwise, we * discard it. */ if (lengthjeft == 0) if (rules[unit].flags & VOWEL) want_another_unit = FALSE; €1 38 FIPS PUB 181 else rule_broken = TRUE; else ( /* ♦ * There are some digram tests that are * universally true. We test them out. */ /* * Reject ILLEGAL_PAIRS of units. */ if ((ALLOWED (ILLEGAL_PAIR)) II /* * Reject units that will be split between syllables * when the syllable has no vowels in it. */ (ALLOWED (BREAK) && (vowel_count == 0)) II /* * Reject a unit that will end a syllable when no * previous unit was a vowel and neither is this one. */ (ALLOWED (END) && (vowel_count = 0) && !(rules[unit].flags & VOWEL))) rule_broken = TRUE; if (current_unit == 1 ) { /* * Reject the unit if we are at te starting digram of * a syllable and it does not fit. */ if (ALLOWED (NOT_BEGIN)) rule_broken = TRUE; ) else { I* * We are not at the start of a syllable. * Save the previous unit for later tests. */ last_unit = units_in_syllable[current_unit - 1 ]; I* * Do not allow syllables where the first letter is y * and the next pair can begin a syllable. This may * lead to splits where y is left alone in a syllable. * Also, the combination does not sound to good even * if not split. */ if (((current_unit — 2) && (ALLOWED (BEGIN)) && (rules[units_in_syllableIO]).flags & ALTERNATE_VOWEL)) II /* * If this is the last unit of a word, we should * reject any digram that cannot end a syllable. */ (ALLOWED (NOTJEND) && (lengthjeft = 0)) II /* * Reject the unit if the digram it forms wants * to break the syllable, but the resulting * digram that would end the syllable is not * allowed to end a syllable. */ (ALLOWED (BREAK) && 39 FIPS PUB 181 (digram|units_in_syllable |current_unit - 2]| [last_unitl & NOT.ENI))) II /* * Reject the unit if the digram it forms * expects a vowel preceding it and there is * none. */ (ALLOWED (PREFIX) && !(rules[units_in_syUable lcurrent_unit - 2]).flags & VOWEL))) rule_broken = TRUE; /* * The following checks occur when the current unit * is a vowel and we are not looking at a word ending * with an e. */ if (!rule_broken && (rules[unit|.flags & VOWEL) && ((lengthjeft > 0) II !(rules[last_unit]. flags & NO_FINAL_SPLIT))) /* * Don't allow 3 consecutive vowels in a * syllable. Although some words formed like this * are OK, like beau, most are not. */ if ((vowel_count > 1 ) && (rules[last_unit].flags & VOWEL)) A rule_broken = TRUE; ▼ else /* * Check for the case of * vowels-consonants-vowel, which is only * legal if the last vowel is an e and we are * the end of the word (wich is not * happening here due to a previous check. */ if ((vowel_count != 0) && !(rules[last_unit].flags & VOWEL)) I /* * Try to save the vowel for the next * syllable, but if the syllable left here * is not proper (i.e., the resulting last * digram cannot legally end it), just * discard it and try for another. */ if (digram[units_in_syllable [current_unit - 2]] flast_unit) & NOT_END) rule_broken = TRUE; else I saved_unit = 1; saved_pair[0] = unit; want_another_unit = FALSE; ■* * The unit picked and the digram formed are legal. * We now determine if we can end the syllable. It may, * in some cases, mean the last unit(s) may be deferred to * the next syllable. We also check here to see if the #< 40 FIPS PUB 181 * digram formed expects a vowel to follow. */ if (!rule_broken && want_another_unit) * This word ends in a silent e. */ if (((vowel_count != 0) && (rules[unit].flags & NO_FINAL_SPLIT) && (lengthjeft = 0) && !(rules[last_unitl. flags & VOWEL)) II * This syllable ends either because the digram * is an END pair or we would otherwise exceed * the length of the word. */ (ALLOWED (END) II (lengthjeft = 0))) want another unit = FALSE; else * Since we have a vowel in the syllable * already, if the digram calls for the end of the * syllable, we can legally split it off. We also * make sure that we are not at the end of the * dangerous because that syllable may not have * vowels, or it may not be a legal syllable end, * and the retrying mechanism will loop infinitely * with the same digram. */ if ((vowel_count != 0) && (lengthjeft > 0)) ( /* * If we must begin a syllable, we do so if * the only vowel in THIS syllable is not part * of the digram we are pushing to the next * syllable. */ if (ALLOWED (BEGIN) && (current_unit > 1 ) && !((vowel_count == 1) && (rules[last_unit].flags & VOWEL))) ( saved_unit = 2; saved_pair[0] = unit; saved_pair[ 1 ] = last_unit; want_another_unit = FALSE; ) else if (ALLOWED (BREAK)) ( saved_unit = 1; saved_pair[0] = unit; want_another_unit = FALSE; ) ) else if (ALLOWED (SUFFIX)) want_vowel = TRUE; tries++; * If this unit was illegal, redetermine the amount of * letters left to go in the word. */ if (rule_broken) lengthjeft += (short int) strlen (rules[unit).unit_code); 41 FIPS PUB 181 ) while (rule_broken && (tries <= MAX_RETRJES)); /* * The unit fit OK. */ if (tries <= MAX_RETRIES) I /* * If the unit were a vowel, count it in. * However, if the unit were a y and appear * at the start of the syllable, treat it * like a constant (so that words like year can * appear and not conflict with the 3 consecutive * vowel rule. */ if ((rules[unit].flags & VOWEL) && ((current_unit > 0) II !(rules[unit].flags & ALTERNATEJVOWEL))) vowel_count++; /* * If a unit or units were to be saved, we must * adjust the syllable formed. Otherwise, we * append the current unit to the syllable. */ switch (saved_unit) ( case 0: units_in_syllable[current_unit] = unit; (void) strcat (syllable, rules(unit].unit_code); break; case 1: current_unit— ; break; case 2: (void) strcpy (&syllable[strlen (syllable) - strlen (rules [last_unjtj. unit_code)], ""); length_left += (short int) strlen (rules[last_unit|.unit_code); current_unit -= 2; break; else /* * Whoops! Too many tries. We set rule_broken so we can * loop in the outer loop and try another syllable. */ rule_broken = TRUE; /* * ...and the syllable length grows. */ *syllable_length = current_unit; current_unit++; ) while ((tries <= MAX_RETRIES) && want_another_unit); } while (rule_broken II illegal_placement (units_in_syllable, *syllable_length)); return (syllable); 1 /* * This routine goes through an individual syllable and checks * for illegal combinations of letters that go beyond looking ▼ * at digrams. We look at things like 3 consecutive vowels or # 42 FIPS PUB 181 • * consonants, or syllables with consonants between vowels (unless * one of them is the final silent e). */ static boolean illegal_placement (units, pwlen) register unsigned short int *units; register unsigned short int pwlen; { register unsigned short int vowel_count; register unsigned short int unit_count; register boolean failure; vowel_count = 0; failure = FALSE; for (unit_count = 0; Ifailure && (unit_count <= pwlen); unit_count++) ( if (urut_count >= 1 ) ( /* * Don't allow vowels to be split with consonants in * a single syllable. If we find such a combination * (except for the silent e) we have to discard the * syllable). •/ if ((!(rules[units|unit_count - lH.flags & VOWEL) && (rules[units[unit_count]].flags & VOWEL) && !((rules[units[unit_count]]. flags & NO_FINAL_SPLIT) && (unit_count == pwlen)) && (vowel_count != 0)) II /* * Perform these checks when we have at least 3 units. */ ((unit_count >= 2) &.&. /* * Disallow 3 consecutive consonants. */ ((!(rules[units[unit_count - 2]].flags & VOWEL) && !(rules(units[unit_count - l]].flags & VOWEL) && !(rules[units[unit_count)].flags & VOWEL)) II /* * Di sallow 3 consecutive vowels, where the first is * not a y. */ (((rules[units[unit_count - 2]]. flags & VOWEL) && !((rules[units[0]].flags & ALTERNATE.VOWEL) && (unit_count == 2))) && (rules[units[unit_count - l]].flags & VOWEL) && (rules[units[unit_count]].flags & VOWEL))))) failure = TRUE; I* * Count the vowels in the syllable. As mentioned somewhere * above, exclude the initial y of a syllable. Instead, * treat it as a consonant. */ if ((rules[units[unit_count]].flags & VOWEL) && !((rules[unitsiO]].flags & ALTERNATE_VOWEL) && (unit_count = 0) && (pwlen != 0))) vowel count++; 43 FIPS PUB 181 ) return (failure); * This is the standard random unit generating routine for * get_syllable(). It does not reference the digrams, but * assumes that it contains 34 units in a particular order. * This routine attempts to return unit indexes with a distribution * approaching that of the distribution of the 34 units in * English. In order to do this, a random number (supposedly * uniformly distributed) is used to do a table lookup into an * array containing unit indices. There are 211 entries in * the array for the random_unit entry point. The probability * of a particular unit being generated is equal to the * fraction of those 21 1 entries that contain that unit index. * For example, the letter 'a' is unit number 1. Since unit * index 1 appears 10 times in the array, the probability of * selecting an 'a' is 10/211. * * Changes may be made to the digram table without affect to this * procedure providing the letter-to-number correspondence of * the units does not change. Likewise, the distribution of the * 34 units may be altered (and the array size may be changed) * in this procedure without affecting the digram table or any other * programs using the random_word subroutine. */ static unsigned short int numbersf] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1. 1, 1, 2, 2, 2, 2, 2, 2, 2, 2. 2, 2. 2. 2, 3, 3, 3, 3 3 3 3 3 3 3 3 3 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14. 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, IX, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 22, 23, 23, 23, 23, 23, 23, 23, 23, 24, 25, 26, 27. 28, 29, 29, 30, 31, 32, 33 /* * This structure has a typical English frequency of vowels. * The value of an entry is the vowel position (a=0, e=4, i=8. 44 FIPS PUB 181 * o=14, u=19, y=23) in the rules array. The number of times * the value appears is the frequency. Thus, the letter "a" * is assumed to appear 2/12 = 1/6 of the time. This array * may be altered if better data is obtained. The routines that * use vowel_numbers will adjust to the size difference automatically. */ static unsigned short int vowel_numbers[] = I 0, 0, 4, 4, 4, 8, 8, 14, 14, 19, 19, 23 /* * Select a unit (a letter or a consonant group). If a vowel is * expected, use the vowel_numbers array rather than looping through * the numbers array until a vowel is found. */ static unsigned short int random_unit (type) register unsigned short int type; ( register unsigned short int number; I* * -Sometimes, we are asked to explicitly get a vowel (i.e., if * a digram pair expects one following it). This is a shortcut * to do that and avoid looping with rejected consonants. */ if (type & VOWEL) number = vowel_numbers[get_random (0, sizeof (vowel_numbers) / sizeof (unsigned short int))]; else I* * (jet any letter according to the English distribution. */ number = numbers[get_random (0, sizeof (numbers) / sizeof (unsigned short int))]; return (number); * This routine should return a uniformly distributed random number between * minlen and maxlen inclusive. The Electronic Code Book form of DES is * used to produce the random number. The inputs to DES are the old pass- * word and a pseudorandom key generated according to the procedure out- * lined in Appendix C of ANSI X9.17. */ static unsigned short int get_random (minlen, maxlen) register unsigned short int minlen; register unsigned short int maxlen; ( return minlen + (unsigned short int) randint ((int) (maxlen - minlen + 1)); /* * Produces a random number from to n-1 . */ static unsigned int randint(n) int n; ( return ((unsigned int) (randfunc(n))); / * Set the seed. This routine will only set the seed once, even if * called from multiple sources. */ static void set_seed(seed) 45 FIPS PUB 181 * long seed; mt been_here_before = 0; if (!been_here_before) ( been_here_before = 1; srand(seed); /* takes in old password and calls program to generate random number by calling the DES function. This function is called many times. It asks for the old password the first time and then sends that password to the DES function on every successive call afterwards. */ static int randfunc(n) int n; I int i, len; static char passwd(9); static boolean newpass^O; if(lnewpass) ( printf ("Please enter old password or input string: "); gets(passwd); printfC'string entered: %s\n", passwd); len = strlen(passwd); for (i=len; i<8; i++) passwd[i] = '0'; printfC'string padded: %s\n", passwd); newpass=l; ) retum(descall(passwd, n)); /* descall calls the pseudorandom key generator, random, described in Appendix C of ANSI 9.17 and puts the resulting value into the array key. The arguments of random indicate that odd parity should be generated and that the input string is eight bytes in length. The des routine, which uses key and the old password as arguments, is then called. The output from des, out, is then sent to the routine, answer, for processing */ descall(in, n) unsigned char *in; int n; ( unsigned char key|8|; unsigned char out[8]; int i; random(key, 1,); setkey(0, 0, key); des(in, out); return (answer(outji)); /* answer takes the array out and creates variable sum by adding certain values within the array together. To get a number from to n-1, it returns sum mod n (sum%n) */ mt answer(outji) unsigned char *out; int n; I unsigned int sum; /* every time this function is called, it adds the first three positions of out to get sum.*/ sum = out[0] + out[l] +out[2]; return (sum%n); FIPS PUB 181 * DES.C VERSION 4.00 * * _. * * I) A T A ENCRYPTION STANDARD * * FEDERAL INFORMATION PROCESSING STANDARDS PUBLICATION (FIPS PUB) 46-1 * * * This software was produced at the National Institute of Standards and Techology * * (NIST) as a part of research efforts and for demonstration purposes only. Our * * primary goals in its design did not include widespread use outside of * * our own laboratories. Acceptance of this software implies that you * * agree to accept it as nonproprietary and unlicensed, not supported by * * NIST, and not carrying any warranty, either expressed or implied, as to * * its performance or fitness for any particular purpose. * * * * Cryptographic devices and technical data regarding them are subject to * * Federal Government export controls as specified in Title 22, Code of * * Federal Regulations, Parts 121 through 128. Cryptographic devices * * implementing the Data Encryption Standard (DES) and technical data * * regarding them must comply with these Federal regulations. * * * #define BYTE unsigned char #define INT unsigned int )!,»i*t*t«**«tt«t*tt*tt*t*ttt*t****tt*4t*tt**ttt*tt**tt***S»t*ttt**ttt*tt**tt»** * SETKEYO Generate key schedule for given key and type of cryption * i«SiSit*ttitttttiittSttttt*****t«ttt*ttttttt«tttttt*tttttttt*ttt*t«***t**t**t/ /* PERMUTED CHOICE 1 (PCI) */ INT PC1[] = ( 57,49,41,33,25,17, 9, 1,58,50,42,34,26,18, 10, 2,59,51,43,35,27, 19,11, 3,60,52,44,36, 63,55,47,39,31,23,15, 7,62,54,46,38,30,22, 14, 6,61,53,45,37,29, 21,13, 5,28,20,12, 4, /* Schedule of left shifts for C and D blocks */ unsigned short shifts[] = ( 1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1 /* PERMUTED CHOICE 2 (PC2) */ INT PC2[] = { 14,17,11,24, 1, 5, 3,28,15, 6,21,10, 23,19,12, 4,26, 8, 16, 7,27,20,13, 2, 41,52,31,37,47,55, 30,40,51,45,33,48, 44,49,39,56,34,53, 46,42,50,36,29,32, /* Key schedule of 16 48-bvt subkeys generated from 64-bit key */ BYTE KS[16][48]; setkey(swl,sw2,pkey) INT swl; /* parity: 0=ignore,l=check */ INT sw2; /* type cryption: 0=encrypt,l=decrypt */ BYTE *pkey; /* 64-bit key packed into 8 bytes */ I register INT i, j, k, tl, t2; static BYTE key[64]; static BYTE CD[56]; /* Double-check 'parity' parameter */ if (swl != && swl != 1) ( 47 FIPS PUB 181 printf("\007*** setkey: bad parity parameter (%d) ***\n", swl) retum(O); /* Double-check 'type of cryption' parameter */ if (sw2 != && sw2 != 1) I printf('\007*** setkey: bad cryption parameter (%d) ***\n",sw2); retum(O); /* Unpack KEY from 8 bits/byte into 1 bit/byte */ unpack8(pkey,key); /* ("heck for ODD key parity */ if (swl ==1)| for (i=0; i<64; i++) | k = 1; for (j=0; j<7; j++,i++) k = (k + key[i)) % 2; if (key|i| != k) retum(O); ) /* Permute unpacked key with PCI to generate C and D */ for (i=0; i<56; i++) CD[i] = key[PCl|i|-l]; /* Rotate and permute (' and D to generate 16 subkeys */ for (i=0; i<16; i++) ( /* Rotate C and D */ for (j=0; j #define BYTE unsigned char #define INT unsigned int #define DECRYPT 1 #define ENCRYPT #define FALSE #define TRUE 1 #define SINGLE 1 #define PAIR 2 #define IGNORE #defuie PKEYLEN 8 int krypt(int, int, int, BYTE *, int, BYTE *, BYTE *); void random(BYTE *, int); void set_parity(BYTE *, int); void daytime(char *); BYTE *bytncpy(BYTE *, BYTE *, int); BYTE *bytnxor(BYTE *, BYTE *, BYTE *, int); I* *********************************************************** ****************** * KRYPTQ Encrypt/decrypt key or key pair * ******************************************************************************/ int krypt(swl,sw2,sw3,kek,sw4,ikey,okey) int swl; /* ODD parity: 0=ignore, l=check & report */ int sw2; /* type of cryption: 0=encrypt, l=decrypt */ int sw3; /* length of kek: l=single, 2=pair */ BYTE *kek; /* packed key-encrypting key */ int sw4; /* length of key: l=single, 2=pair */ BYTE *ikey; /* packed input key */ BYTE *okey; /* packed output key */ I char tkey [PKEYLEN]; I* DOUBLE-CHECK PARAMETERS */ if (sw3!=SINGLE && sw3 IMPAIR) ( printf("krypt: bad kek length (%d)",sw3); exit(l); 1 if (sw4!=SINGLE && sw4!=PAIR) { printf("krypt: bad key length (%d)",sw4); exit(l); ) if (sw3=SINGLE && sw4==PAIR) exit(l ); if (!setkey(swl,sw2Jcek)) retum(FALSE); des(ikey,okey); if (sw3==SINGLE && sw4==SINGLE) return(TRUE); /* single by single */ 51 FIPS PUB 181 if (!setkey(swl,sw2 A 01Jcek+PKEYLEN)) retum(FALSE); des(okey,tkey); (void) setkey(swl,sw2Jcek); des(tkey.okey); if (sw4==SINGLE) return(TRUE); /* single by double */ (void) krypt(swl,sw2,PAIR,kek,SINGLE,ikey+PKEYLEN,okey+PKEYLEN); return (TRUE); /* double by double */ /****************************************************************************** * RANDOM Pseudorandom KEY and IV Generator. * /* Random Key */ static BYTE mdkey[PAIR*PKEYLEN] = (0xE0,0x9A,0xA8,0x0F,0xAB,0x72,0xlC,0x3D, 0x8F,0x7D,0xC9,0x9E,0x8F,0x02,0xB6,0x2A); /* Seed */ static BYTE seed[PKEYLEN] = (0xCF,0x65,0xAE,0x7F,0xBl,0x79,0xBB,0xE3); void random(dest.odd) BYTE *dest; /* destination for random KEY or IV */ int odd; /* generate ODD parity? 0=no, l=yes */ ( BYTE dt[PKEYLEN]; /* date/time vector */ BYTE ifPKEYLEN]; BYTE j[PKEYLEN]; BYTE rfPKEYLEN]; /* DOUBLE-CHECK PARAMETERS */ if (odd!=FALSE && odd!=TRUE) ( printf(" random: bad generate parity option (%d)", odd); exit(l); ) /* (JET DATEmME VECTOR */ daytime(dt); /* I = eRNDKEY(DT) */ (void) krypt(ICiNORE,ENCRYPTJ > AIR,mdkey,SIN(jLE,dt,i); /* R = eRNDKEYO + V) */ (void) bytnxor(j,i,seed,PKEYLEN); (void) krypt(IGNORE,ENCRYPT,PAIR,mdkey,SINGLEj,r); I* new seed = eRNDKEY(R + I) */ (void) bytnxor(j,i,r,PKEYLEN); (void) krypt(K;NORE,ENCRYPTJ , AIR,rndkey,SIN(JLEJ,seed); /* GENERATE ODD PARITY, IF NEEDED */ if (odd) set_parity(r,SINGLE); I (void) bytncpy(dest,r,PKEYLEN); * SET_PARITYO Set ODD parity * ******+****************************************************** ****** ********** *^ void set_parity(keyjen) BYTE *key; /* packed 64 or 128-bit key */ int len; /* key length: 1=SINGLE, 2=PAIR */ ( int i, j, parity, mask; /* DOUBLE-CHECK PARAMETER */ if (len!=SINGLE && len!=PAIR) ( printf("set_parity: bad len parameter (%d)", len); exit(l); 52 FIPS PUB 181 for (i=0; i<(len*PKEYLEN); i++) { parity = 1; mask = 2; for (j=0; j<7; j++) ( parity = (parity + ((key[i| & mask) » (j+D)) % 2; mask = 2 * mask; } if (parity=0) key(i) = key[i) & Oxfe;/* clear */ if (parity— 1) key[i] = keyjij I 0x01;/* set */ void daytime(dt) char *dt; /* dt[8] = 64-bit block based on date & time */ I register i; int tt[8]; /* struct regval { int ax, bx, ex, dx, si, di, ds, es; }; struct regval call_regs, ret_regs; */ union REGS call_regs; union REGS ret_regs; call_regs.x.ax = 0x2a00; /* GET DATE */ intdos(&call_regs, &ret_regs); tt|0| = ret_regs.x.cx - 1900; /* ex = year */ tt[l] = (ret_regs.x.dx & OxffOO) » 8; /* dh - month */ tt[2] = ret_regs.x.dx & OxOOff; /* dl = day */ call_regs.x.ax = Ox2cOO; /* GET TIME */ intdos(&ca]]_regs, &ret_regs); tt[3] = (ret_regs.x.cx & OxffOO) » 8; /* ch = hours */ tt[4] = ret_regs.x.cx & OxOOff; /* cl = minutes */ tt[5] = (ret_regs.x.dx & OxffOO) » 8; /* dh = seconds */ tt[6] = 0; tt[7] = 0; for (i=0;i<8;i++) dt[i] = (char) tt|i]; * BYTNCTY0 Copy block of packed BYTEs * ******************************************************************** **********! BYTE *bytncpy(dest,srcjen) /* return pointer to destination block */ BYTE *dest; ' /* destination block */ BYTE *src; /* source block */ int len; /* number of bytes */ ( while Gen-- > 0) *dest++ = *src++; retum(dest); 1 * BYTNXOR0 XOR blocks of packed BYTEs * **************************************** *************************************** BYTE *bytnxor(dest,srcl,src2Jen) /* return ptr to destination block */ BYTE *dest; /* destination block */ BYTE *srcl; /* source block 1 */ BYTE *src2; I* source block 2 */ int len; /* number of BYTEs */ ( while (len-- > 0) *dest++ = *srcl++ A *src2++; retum(dest); ♦U.S. G.P.0.:1993-300-568:82094 53 ADD0DSmS17t3 « I U.S. Department of Commerce National Technical Information Service 5285 Port Royal Road Springfield, VA 22161 Official Business Penalty for Private Use $300 • - • AD ooozmim 3 1