OpenSSL FIPS Object Module Version 1.0 By the Open Source Software Institute ://www.ossinstitute.org/ http OpenSSL FIPS 1402 Security Policy Version 1.0a March 24, 2006 OpenSSL FIPS 1402 Security Policy Copyright Notice Copyright © 2003, 2004, 2005, 2006 the OpenSSL Team. This document may be freely reproduced in whole or part without permission and without restriction. Sponsored by: The Defense Medical Logistics Program The HewlettPackard Company Page 2 of 45 OpenSSL FIPS 1402 Security Policy Acknowledgments The principal author of this document is: Steve Marquess 3016193933 Consultant Steve.Marquess@det.amedd.army.mil DMLSS Program marquess@veridicalsystems.com JMLFDC 623 Porter Street Ft. Detrick, MD 21702 working under contract to the Defense Medical Logistics Standard Support program. Other significant contributors to this document are, in alphabetical order: Gary Gross HP Corporation Ben Laurie OpenSSL Peter Sargent PreVal Specialist, Inc John Weathersby Open Source Software Institute Thanks also to Andy Polyakov, Joel I. Kirch and Rick Pearce for their reviews of earlier versions of this document. The OpenSSL FIPS 1402 validation effort was sponsored by the Defense Medical Logistics Standard Support program, part of the TRICARE Management Activity, Office of the Assistant Secretary of Defense for Health Affairs, and co sponsored by the HewlettPackard Company. For further information contact: Debra Bonner 7075759771 Director of Operations Debra.Bonner@tma.osd.mil DMLSS Program Management Office http://ww.tricare.osd.mil/dmlss/ 5109 Leesburg Pike, Suite 908 Falls Church, VA 22041 Gary Gross 4084476966 office Security Evaluations Program Manager 6503801327 cell HewlettPackard gary.gross@hp.com 1501 Page Mill Road http://hp.com/ Palo Alto, CA 94304 The Open Source Software Institute (OSSI) serves as the "vendor" for this validation. Project management coordination for this effort was provided by the OSSI: John Weathersby 6014270152 office Executive Director 6018187161 cell Open Source Software Institute 6014270156 fax Administrative Office jmw@ossinstitute.org P.O. Box 547 http://ossinstitute.org/ Oxford, MS 38655 The initial OpenSSL FIPS 1402 software development work was performed by: Ben Laurie +44 (20) 8735 0686 office 17 Perryn Road +44 (20) 8735 0689 fax London ben@algroup.co.uk Page 3 of 45 OpenSSL FIPS 1402 Security Policy W3 7LR UK with subsequent significant contributions by: Stephen Henson 4 Monaco Place, shenson@drhconsultancy.co.uk Westlands, NewcastleunderLyme Staffordshire. ST5 2QT. England, United Kingdom http://www.drhconsultancy.co.uk/ Andy Polyakov Chalmers University of Technology appro@fy.chalmers.se SE412 96 Gothenburg Sweden in coordination with the OpenSSL Team at www.openssl.org, in particular: Richard Levitte levitte@stacken.kth.se Validation testing was performed by The DOMUS IT Security Laboratory. For information on validation or revalidations of software contact: Christian Brych 6132475540 office FIPS 140 Program Manager 6134471241 cell DOMUS IT Security Laboratory 6137394936 fax 2220 Walkley Road cbrych@ca.ibm.com Ottawa, Ontario http://www.domusitsl.com/ K1G 5L2 Assistance in preparation of the initial FIPS 140 documentation was provided by: Peter C. Sargent 4437424430 PreVal Specialist, Inc. preval@att.net 214 Kennedy Dr. Severna Park, MD 21146 Page 4 of 45 OpenSSL FIPS 1402 Security Policy Revision History Date Description 20060324 Additional commentary on source files in Appendix B 20060313 Final draft Page 5 of 45 OpenSSL FIPS 1402 Security Policy Table of Contents Table of Contents 1. INTRODUCTION..............................................................................................................................10 1.1 AUDIENCE.........................................................................................................................................10 1.2 DOCUMENT ORGANIZATION..................................................................................................................10 1.3 REFERENCES......................................................................................................................................11 1.4 RELATIONSHIP TO THE OPENSSL API..................................................................................................11 2. MODULE SPECIFICATION...........................................................................................................12 2.1 THE FIPS OBJECT MODULE................................................................................................................13 2.1.1 Integrity of Source Code.........................................................................................................13 2.1.2 Integrity of Object Code.........................................................................................................14 2.1.3 Integrity of Executable Code..................................................................................................15 2.1.4 Exclusivity of Integrity Tests...................................................................................................16 2.2 PORTS AND INTERFACES.......................................................................................................................16 2.3 APPROVED CRYPTOGRAPHIC ALGORITHMS..............................................................................................17 2.4 NONAPPROVED CRYPTOGRAPHIC ALGORITHMS......................................................................................18 2.5 APPROVED MODE OF OPERATION..........................................................................................................19 2.6 TEST ENVIRONMENT...........................................................................................................................20 3. ROLES, SERVICES AND AUTHENTICATION..........................................................................21 3.1 ROLES AND SERVICES..........................................................................................................................21 3.2 AUTHENTICATION...............................................................................................................................21 3.3 AUTHORIZED SERVICES........................................................................................................................21 3.4 FINITE STATE MACHINE MODEL...........................................................................................................24 4. OPERATIONAL ENVIRONMENT................................................................................................25 4.1 RULES OF OPERATION.........................................................................................................................26 4.2 COMPATIBLE PLATFORMS.....................................................................................................................26 4.3 SOFTWARE SECURITY..........................................................................................................................27 4.4 CRITICAL SECURITY PARAMETERS.........................................................................................................28 4.5 SELFTESTS.......................................................................................................................................29 4.5.1 Powerup Tests.......................................................................................................................30 4.5.2 Conditional Tests....................................................................................................................31 Page 6 of 45 OpenSSL FIPS 1402 Security Policy Pairwise consistency Test...........................................................................................................31 Software/Firmware Load Test.....................................................................................................31 Manual Key Entry Test................................................................................................................31 Continuous Random Number Generator Test..............................................................................31 Bypass Test..................................................................................................................................32 4.5.3Critical Function Tests............................................................................................................32 4.6 PHYSICAL SECURITY...........................................................................................................................32 4.7 MITIGATION OF OTHER ATTACKS.........................................................................................................32 5. DESIGN ASSURANCE.....................................................................................................................33 5.1 SOURCE CODE CONTROL.....................................................................................................................33 5.2 APPLICATION MANAGEMENT OF CRITICAL SECURITY PARAMETERS............................................................33 Identifying CSPs..........................................................................................................................33 Key Generation............................................................................................................................34 Output of Keys Used for Key Establishment...............................................................................34 Storage of CSPs...........................................................................................................................34 Destruction of CSPs.....................................................................................................................34 6. GLOSSARY........................................................................................................................................35 7. REFERENCES...................................................................................................................................36 APPENDIX A FINITE STATE MODEL............................................................................................38 A.1 DIAGRAM.........................................................................................................................................38 A.2 STATE DESCRIPTIONS.........................................................................................................................39 State 1: PowerOn State...............................................................................................................39 State 2: SelfTest State.................................................................................................................39 State 3: Error State.......................................................................................................................39 State 4: Operational State.............................................................................................................39 State 5: CryptoOfficer State........................................................................................................40 State 6: User State........................................................................................................................40 State 7: Show Status State............................................................................................................40 State 8: Key Management State...................................................................................................40 State 9: PowerOff State...............................................................................................................40 APPENDIX B CONTROLLED SOURCE FILE FINGERPRINTS.................................................41 APPENDIX C INSTALLATION AND INITIALIZATION..............................................................43 Page 7 of 45 OpenSSL FIPS 1402 Security Policy C.0 VALIDATING THE SOURCE DISTRIBUTION FILE........................................................................................43 C.1 BUILDING THE FIPS OBJECT MODULE FROM SOURCE.............................................................................43 C.2 INSTALLING AND PROTECTING THE FIPS OBJECT MODULE......................................................................44 C.3 LINKING THE RUNTIME EXECUTABLE APPLICATION.................................................................................44 C.4 FIPS MODE INITIALIZATION...............................................................................................................45 Page 8 of 45 OpenSSL FIPS 1402 Security Policy TABLE OF FIGURES Table of Contents TABLE 2.3 APPROVED CRYPTOGRAPHIC ALGORITHMS...................................................18 TABLE 2.4 NONAPPROVED CRYPTOGRAPHIC ALGORITHMS.........................................19 TABLE 3.1 SERVICES AUTHORIZED FOR ROLES....................................................................21 TABLE 3.3 AUTHORIZED SERVICES...........................................................................................24 TABLE 4.5.1 POWERUP SELFTESTS.........................................................................................30 TABLE 4.5.2 CONDITIONAL TESTS.............................................................................................31 EXAMPLE 4.C INVOCATION OF FIPS_MODE_SET()..............................................................45 Page 9 of 45 OpenSSL FIPS 1402 Security Policy 1. Introduction This document is the nonproprietary FIPS 1402 security policy for the OpenSSL FIPS software object module to meet FIPS 1402 level 1 requirements. This Security Policy details the secure operation of the OpenSSL FIPS Object Module v1.0 (OpenSSL FIPS) by the Open Source Software Institute (ossinstitute.org) as required in Federal Information Processing Standards Publication 1402 (FIPS 1402) as published by the National Institute of Standards and Technology (NIST) of the United States Department of Commerce. 1.1 Audience This document is required as a part of the FIPS 1402 validation process. It describes the OpenSSL FIPS object module in relation to FIPS 1402 requirements. The companion document OpenSSL FIPS 1402 User Guide (Reference 14) is a technical reference for developers using, and system administrators installing, the OpenSSL FIPS software, for use in risk assessment reviews by security auditors, and as a summary and overview for program managers. 1.2 Document Organization This Security Policy document is one part of the complete FIPS 1402 Submission Package. The Submission Package contains: · Nonproprietary FIPS 1402 Security Policy: this document · Algorithm Certificates: Listed in Table 3.3 of this document · Design specification and functional specification of OpenSSL software: included with the standard OpenSSL software distributions and available at http://openssl.org/. Also see Reference 11 and Reference 14 · Crypto Officer and User Guidance documentation: subsumed in this document · Finite State Machine: Appendix A of this document · Vendor Evidence Document: OpenSSL FIPS 140 Vendor Evidence Document, v1.0 · Source Code Listing: included in the OpenSSL source distributions Page 10 of 45 OpenSSL FIPS 1402 Security Policy This Security Policy document is available online at the NIST Cryptographic Module Validation website, http://csrc.nist.gov/cryptval/1401/1401val2006.htm, and is also included in the OpenSSL distributions. This document outlines the functionality provided by the module and gives highlevel details on the means by which the module satisfies FIPS 1402 requirements. 1.3 References For more information on the OpenSSL FIPS software module please visit http://www.ossinstitute.org/. For more information on the OpenSSL project see http://openssl.org/. For more information on NIST and the cryptographic module validation program, please visit http://csrc.nist.gov/cryptval/. 1.4 Relationship to the OpenSSL API The FIPS object module is designed for use in conjunction with the separate API libraries provided by the OpenSSL project. Applications linked with the FIPS object module and with the separate OpenSSL libraries can use the FIPS validated cryptographic functions of the FIPS object module and the high level support and encapsulation features of OpenSSL. Page 11 of 45 OpenSSL FIPS 1402 Security Policy 2. Module Specification For the purposes of FIPS 1402 validation the OpenSSL FIPS Object Module v1.0 is defined as a specific discrete unit of binary object code (the "FIPS Object Module") generated from a specific set and revision level of C language source files embedded within a source distribution. These platform portable source files are compiled to create this object code in an isolated and separated form that is used to provide a cryptographic API (Application Programming Interface) to external applications. The precise description of these source files is given in Appendix B. The term Module elsewhere in this document refers to this OpenSSL FIPS Object Module object code ("FIPS Object Module"). The source code may be used to generate Modules for use on a wide variety of hardware and operating system platforms. The Module provides an API for invocation of FIPS approved cryptographic functions from calling applications. The Module is designed for use in conjunction with separate libraries provided by the OpenSSL project. The Module was tested by the FIPS 1402 Cryptographic Module Testing (CMT) laboratory for two specific test platforms. The OpenSSL FIPS Object Module, when generated from the identical unmodified source code, is "Vendor Affirmed" to be FIPS 1402 compliant when running on other supported computer systems provided the conditions described in §4, "Operational Environment", are met. On any platform the Module generated from the Module source code (the source files identified in Appendix B) is not validated if that source code is modified in any way. The Module was designed and implemented to meet FIPS 1402 requirements. As such, there are no special steps, other than building the binary FIPS Object Module file from the OpenSSL FIPS approved and HMACSHA1 verified source code, and loading and initializing with a runtime executable application, required to ensure FIPS 1402 compliant operation of the Module. This process of generating the FIPS Object Module and the runtime application from source code is the same for all platforms and is documented in the User Guide, Reference 14. The Module provides confidentiality, integrity, and message digest services. It natively supports the following algorithms: DES1, Triple DES, AES, RSA (for digital signatures), DH, DSA, SHA1, SHA 224, SHA256, SHA384, SHA512, and HMACSHA1, HMACSHA224, HMACSHA256, 1 Transitional phase only ­ valid until May 19, 2007. Note DES is provided for backward compatibility with legacy applications and should not be used for new development. Page 12 of 45 OpenSSL FIPS 1402 Security Policy HMAC384, HMACSHA512. OpenSSL FIPS performs ANSI X9.31 compliant pseudorandom number generation. 2.1 The FIPS Object Module The generation of the Module from source code introduces some new challenges in complying with the requirements of the FIPS 1402 standard. The concept of the FIPS Object Module and the documented process for creating it from source code were developed to satisfy those requirements. The single integrity test of a validated binary executable is replaced by a chain of integrity tests beginning with the source files used for the CMVP validation testing, and ending with the runtime executable application generated from that source code. The purpose of the FIPS Object Module is to maintain the separate and distinct identity of the object code within the logical boundary as required by FIPS 1402. Since the Module is generated from source code and not distributed as prebuilt binary code, this separation must be maintained for all phases of the software from source code to intermediate object code to executing memory mapped runtime code. The process of generating the binary FIPS Object Module must assure that the same unmodified source is used with the same buildtime options, and that unmodified object code is used in the generation of runtime executable applications. The concept of the FIPS Object Module and the documented process for creating it from source code were developed to address the following specific areas of concern: · Integrity of Source Code · Integrity of Object Code · Integrity of Executable Code · Exclusivity of Integrity Tests 2.1.1 Integrity of Source Code The integrity of the sequestered source files is protected at two levels; first by a HMACSHA1 digest of the entire source distribution, and second by individual HMACSHA1 digests of each such source file. These digests are published in this document (see Appendix B). The entire source distribution Page 13 of 45 OpenSSL FIPS 1402 Security Policy digest should be checked manually as specified in Appendix C, and the individual file digests are automatically checked by the documented build process when the FIPS Object Module is created. Since this document is posted on the CMVP validation list website the digests recorded there cannot be arbitrarily changed. Note the HMACSHA1 digests that protect the sequestered source files are specific to only those files. 2.1.2 Integrity of Object Code Once generated the FIPS Object Module file is protected by a HMACSHA1 digest. This digest protects only object code belonging to the Module, and is verified at the time the FIPS Object Module is incorporated into an executable application. Fixed Object Code Order and Content The presence and relative order of the generated object code in the FIPS Object Module must be fixed and invariant. The sequestered source files are used to generate the FIPS Object Module. The instructions in this document forbid user specified buildtime options when building the FIPS Object Module, hence all the object code derived from the sequestered source code is always included in the FIPS Object Module. The usual compilation and linking process does not care about the relative order of individual object modules, and can omit object code not needed to satisfy link references. When generating or linking against the validated binary code we are required to prevent any such omission or rearrangement of the object code derived from the sequestered source files. The FIPS Object Module is created by compiling all the sequestered source code into a single monolithic object module2, the FIPS Object Module. The object code within the FIPS Object Module cannot be removed, replaced, rearranged, or extended by the standard tools used for the management of software libraries or the creation of executable application code. All subsequent references to this monolithic object module will preserve the relative order, and presence, of the original object code. 2 Here the technical term object module is used in the context of software development and computer science, not FIPS 140 2. Page 14 of 45 OpenSSL FIPS 1402 Security Policy The FIPS Object Module is not a static library. It may be incorporated into shared library files or runtime executable application files, but in any event can only be incorporated intact and in its entirety. Isolation of Object Code The object code generated by the compilation of these sequestered source files is carefully isolated from all other OpenSSL and application object code. This isolation is accomplished by collecting all of this sequestered object code into a single discrete unit of object code. We refer to this discrete unit as the FIPS Object Module, which resides in the FIPS Object Module file, fipscanister.o. The FIPS Object Module contains only the object code belonging to the Module. The integrity of the FIPS Object Module file is protected by a HMACSHA1 digest that is calculated over the file at the time it is created, and stored in a separate file, fipscanister.o.sha1, that is installed along with fipscanister.o. This digest is checked whenever an application is linked against the FIPS Object Module file. 2.1.3 Integrity of Executable Code The design of the FIPS Object Module includes the definition of reference points within the object code that are used to define the object code to be protected by the runtime integrity test. At application link time a HMACSHA1 digest of the memory mapped object code within the FIPS Object Module is created and stored in the FIPS Object Module. This digest is calculated entirely within the confines of the FIPS Object Module and so will never include extraneous object code. This digest is independent of other object code, data, memory or file areas, etc. that may adjoin, surround, embed, link to, or otherwise reference the FIPS Object Module. In order to test the integrity of the FIPS Object Module, an integrity test is required over the object code within the logical boundary only. This requirement is satisfied with the runtime incore integrity test over object code within the FIPS Object Module that carefully excludes any nonsequestered object code from the digest calculation and verification. Note this integrity testing technique is conceptually similar to the case of firmware integrity testing: not only is nonsequestered code omitted from the digest, but also nonexecuting ancillary data specific to the particular executable format. Only the actual machine code byte sequence directly executed by the Page 15 of 45 OpenSSL FIPS 1402 Security Policy CPU and the actual data referred to in the course of execution are included in the digest; i.e. only what really matters to the general purpose computer at runtime, pure code as with firmware. 2.1.4 Exclusivity of Integrity Tests Each of the checks in the chain of integrity tests is exclusive to components specific to the Module. · The HMACSHA1 digests that protect the sequestered source files are specific to only those files. · The HMACSHA1 digest that protects the FIPS Object Module in the FIPS Object Module file is specific to only that file which contains only object code generated from the sequestered source files. · The HMACSHA1 digest that protects the FIPS Object Module in a executable module is specific to object code within the Module. 2.2 Ports and Interfaces For the purposes of this FIPS1402 validation the Module is considered a multichip standalone module. Although the Module is software the physical embodiment is a general purpose computer that consists of multiple components, considered to be a multichip standalone module by FIPS1402. The logical cryptographic boundary for the Module is the discrete contiguous block of object code (the FIPS Object Module) containing the machine instructions and data generated from the OpenSSL FIPS source, as used by the calling application. The physical cryptographic boundary contains the general purpose computing hardware of the system executing the application. This system hardware includes the central processing unit(s), cache and main memory (RAM), system bus, and peripherals including disk drives and other permanent mass storage devices, network interface cards, keyboard and console and any terminal devices. The Module provides a logical interface via an Application Programming Interface (API). This logical interface exposes services that applications may utilize directly or extend to add support for new data sources or protocols. The API provides functions that may be called by the referencing application. Page 16 of 45 OpenSSL FIPS 1402 Security Policy The API interface provided by the Module is mapped onto the FIPS 1402 logical interfaces: data input, data output, control input, and status output. Each of the FIPS 1402 logical interfaces relates to the Module's callable interface, as follows: · Data input input parameters to all functions that accept input from CryptoOfficer or User entities · Data output output parameters from all functions that return data as arguments or return values from CryptoOfficer or User entities · Control input ­ All API function that are input into the module by the CryptoOfficer and User entities · Status output information returned via exceptions (return/exit codes) to CryptoOfficer or User entities The API function specifications are included in the OpenSSL project documentation which covers both FIPS and nonFIPS functions. 2.3 Approved Cryptographic Algorithms The Module supports the following FIPSapproved cryptographic algorithms: Data Encryption Standard (DES3 FIPS 463), Triple DES, Digital Signature Algorithm (DSA FIPS 1862), Rivest Shamir Adleman (RSA) PKCS #1 digital signatures, DiffieHellman, Advanced Encryption Standard (AES ­ FIPS 197), Secure Hashing Algorithm (SHA1, SHA2 FIPS 1802), and KeyedHash Message Authentication Code (HMAC FIPS 198). Triple DES may be used to protect the contents of the key database when used with a mode of operation that requires an initialization vector (IV), i.e. Electronic Codebook (ECB) mode is not permitted for key database protection purposes. The Module performs ANSI X9.31 pseudorandom number generation. 3 Transitional phase only ­ valid until May 19, 2007. Note DES is provided for backward compatibility with legacy applications and should not be used for new development. Page 17 of 45 OpenSSL FIPS 1402 Security Policy Approved Algorithms Algorithm Algorithm Standard FIPS Validation Use Type Certificate # asymmetric RSA PKCS#1 78 key transport keys DSA FIPS 1862 108 sign and verify operations sign and verify operations symmetric DES4 CBC, CFB8, FIPS 463 258 encrypt/decrypt key CFB64, ECB, OFB operations modes 3DES CBC, CFB8, FIPS 463 256 CFB64, ECB, OFB modes AES CBC, CFB8, FIPS 197 146 CFB128, ECB, OFB each with 128, 192, or 256 bit keys HMAC HMACSHA1 FIPS 198 95 module integrity HMACSHA224 code integrity HMACSHA256 message integrity HMACSHA384 HMACSHA512 hashing SHA1 FIPS 1802 235 hashing hashing SHA224 FIPS 1802 hashing SHA256 SHA384 SHA512 360 RNG ANSI X9.31 ANSI X9.31 111 random number generation Table 2.3 Approved Cryptographic Algorithms The RSA implementation includes known answer tests at startup which consist of a sign and verify operation and pairwise consistency test which is also a sign and verify operation when keys are generated. 2.4 NonApproved Cryptographic Algorithms 4 Transitional phase only ­ valid until May 19, 2007. Note DES is provided for backward compatibility with legacy applications and should not be used for new development. Page 18 of 45 OpenSSL FIPS 1402 Security Policy With the exception of DiffieHellman (DH), all nonFIPS algorithms (those algorithms not listed in Table 2.2) are not included in the Module. As a convenience for application developers the use of non FIPS algorithms in the separate OpenSSL library is disabled in FIPS mode. DiffieHellman (key agreement, key establishment) methodology supports 80 bits to 256 bits of encryption strength. Algorithm Algorithm Standard FIPS Approval # Use Type key DH N/A none key agreement agreement Table 2.4 NonApproved Cryptographic Algorithms Note that FIPS 1402 does not strictly require that all nonFIPS approved algorithms be disabled, and other validated cryptographic libraries are available which support nonFIPS approved algorithms. However, since the Module is intended for general use with the OpenSSL library by applications that will not require separate FIPS 1402 validations, this choice was made as a deliberate design decision to maintain confidence that those applications are operating in Approved mode when using the FIPS Object Module in FIPS mode in conjunction with the OpenSSL library. 2.5 Approved Mode of Operation A single initialization call, FIPS_mode_set(), is required to initialize the Module for operation in the FIPS 1402 Approved mode, referred to herein as "FIPS mode". When the Module is in FIPS mode all security functions and cryptographic algorithms are performed in Approved mode. Use of the FIPS_mode_set() function call is described in the User Guide, Reference 14. The FIPS mode initialization is performed when the application invokes the FIPS_mode_set() call. Prior to this invocation the Module is uninitialized with the internal global flag FIPS_mode set to FALSE indicating nonFIPS mode by default. The FIPS_mode_set() function verifies the integrity of the runtime executable using a HMACSHA1 digest computed at build time. If this computed HMACSHA1 digest matches the stored known digest then the powerup selftest, consisting of the algorithm specific Pairwise Consistency and Known Answer tests, is performed. If any component of the powerup selftest fails the internal global error Page 19 of 45 OpenSSL FIPS 1402 Security Policy flag FIPS_selftest_fail is set to prevent subsequent invocation of any cryptographic function calls. If all components of the powerup selftest are successful then FIPS_mode_set() sets the FIPS_mode flag to TRUE and the Module is in FIPS mode. 2.6 Test Environment The Module was tested by the FIPS 1402 CMT laboratory on the following computer systems: · HewlettPackard HP9000 Model 320 (PARISC architecture) running the HPUX 11i operating system and gcc v3.4.2. · IBM NetVista (x86 architecture) running the SUSE Linux 9.0 operating system and gcc v3.3.1. The OpenSSL FIPS Object Module, when generated from the identical unmodified source code, is "Vendor Affirmed" to be FIPS 1402 compliant when running on other supported computer systems provided the conditions described in IG G.5 (Reference 3), are met. On any platform the Module generated from the Module source code (the source files identified in Appendix B) is not validated if that source code is modified in any way. Page 20 of 45 OpenSSL FIPS 1402 Security Policy 3. Roles, Services and Authentication 3.1 Roles and Services The User and Crypto Officer roles are implicitly assumed by any entity that can access services implemented in the Module. In addition the Crypto Officer role can install and initialize the Module; this role is implicitly entered when installing the Module or performing system administration functions on the host operating system: Role Authorized Services User role All services except installation and initialization Crypto Officer role All services including installation and initialization Table 3.1 Services Authorized for Roles The Module meets the FIPS 1402 level 1 requirements for Roles and Services for User and Crypto Officer roles. As a library and as allowed by FIPS 1402 the Module does not support user identification or authentication for those roles. 3.2 Authentication The Module does not provide identification or authentication mechanisms that would distinguish between the two supported roles. These roles are implicitly assumed by the services that are accessed, and can be differentiated by assigning module installation and configuration services to the Crypto Officer. Only a single user in a specific role may access Module services at the same time. 3.3 Authorized Services The services provided by the Module are listed in the following table. All services may be performed in both User and Crypto Officer roles except for the Module installation and Initialization services which may only be performed by in the Crypto Officer role: Page 21 of 45 OpenSSL FIPS 1402 Security Policy Roles Service Critical Algorithm API Functions Access Security Parameters User, Symmetric symmetric AES AES_cbc_encrypt Read Crypto Encryption/ key 3DES AES_decrypt Write Officer Decryption (2 key)5 AES_encrypt Execute AES_set_decrypt_key 3DES AES_set_encrypt_key (3 key)6 AES_Td AES_Te _x86_AES_decrypt _x86_AES_encrypt DES_check_key_parity DES_decrypt3 DES_ede3_cbc_encrypt DES_encrypt1 DES_encrypt2 DES_encrypt3 DES_is_weak_key DES_key_sched DES_ncbc_encrypt DES_set_key DES_set_key_checked DES_set_key_unchecked DES_set_odd_parity User, Digital asymmetric RSA DSA_generate_key Read Crypto Signature private DSA DSA_generate_parameters Write Officer key DSA_OpenSSL Execute FIPS_dsa_check 5 DES_encrypt2 is used exclusively with 2 Key Triple DES for encryption and decryption. 6 DES_decrypt3, DES_encrypt3 are used exclusively with 3DES for decryption and encryption respectively. Page 22 of 45 OpenSSL FIPS 1402 Security Policy Roles Service Critical Algorithm API Functions Access Security Parameters User, Message Digest none SHA1, SHA2 SHA1 Read Crypto HMAC key HMAC sha1_block_asm_data_order Write Officer sha1_block_asm_host_order Execute SHA1_Final SHA1_Init SHA1_Transform SHA1_Update SHA224 SHA224_Final SHA224_Init SHA224_Update SHA256 SHA256_block_data_order SHA256_block_host_oeder SHA256_Final SHA256_Init SHA256_Transform SHA256_Update SHA384 SHA384_Final SHA358_Init SHA384_Update SHA512 SHA512_Final SHA512_Init SHA512_Transform SHA512_Update User, Random Number seed key ANSI X9.31 FIPS_rand_method Read Crypto Generation FIPS_rand_seed Write Officer FIPS_rand_seeded Execute FIPS_set_prng_key User, Show Status none N/A FIPS_mode Execute Crypto FIPS_mode_set Officer Crypto Module none N/A FIPS_check_incore_fingerprint Read Officer Initialization FIPS_check_rsa Execute FIPS_dsa_check FIPS_incore_fingerprint FIPS_mode_set FIPS_rand_check ERR_load_FIPS_strings Page 23 of 45 OpenSSL FIPS 1402 Security Policy Roles Service Critical Algorithm API Functions Access Security Parameters User, Self Test none N/A FIPS_selftest Crypto (includes FIPS_selftest_aes Execute Officer integrity, FIPS_selftest_des known answer, FIPS_selftest_dsa and pairwise FIPS_selftest_failed consistency FIPS_selftest_hmac tests) FIPS_selftest_rng FIPS_selftest_rsa FIPS_selftest_sha1 User, Key asymmetric N/A RSA_generate_key Read Crypto Establishment public and RSA_PKCS1_SSLeay Write Officer private RSA_X931_derive Execute keys RSA_X931_generate_key DH_check DH_compute_key DH_generate_key DH_generate_parameters DH_OpenSSL Table 3.3 Authorized Services See the Vendor Evidence document, Appendix A, "API Entry points by Source File" for the correspondence between the API and the source files which implement that API. 3.4 Finite State Machine Model The Module implements the finite state machine detailed in Appendix A. Page 24 of 45 OpenSSL FIPS 1402 Security Policy 4. Operational Environment The FIPS Object Module is generated from source code available for use on a wide variety of computer hardware and operating system platforms. Applications referencing the FIPS Object Module run as processes under the control of the host system operating system. Modern operating systems segregate running processes into virtual memory areas that are logically separated from all other processes by the operating system and CPU. The FIPS Object Module functions completely within the process space of the process which loads it. It does not communicate with any processes other than the one that loads it, and satisfies the FIPS 1402 requirement for a single user mode of operation. The FIPS Object Module was built from source and tested on specific hardware/software environments (See §2.6) . As stated in §G.5 of Reference 3 ("Implementation Guidance for FIPS 1402 and the Cryptographic Module Validation Program") the Module maintains FIPS 1402 validation on other hardware and operating systems provided that: 1. The source code that is compiled into the FIPS Object Module is the same as the source code used for the validation testing, and is compiled in the same way. 2. The host operating system satisfies the rules of operation outlined in the following section, 4.1 § . The CMVP allows the recompilation of the software cryptographic module utilizing the unchanged source files specified in Appendix B with compilers different than the listed compilers that were used for validation testing. The validation status is maintained utilizing the different compilers without re testing the newly compiled cryptographic module. However, the CMVP makes no statement as to the correct operation of the module utilizing compilers not listed in Appendix B. The CMVP allows user porting of a validated software cryptographic module on an OS(s) and/or GPC (s) which were not included as part of the validation testing. The validation status is maintained on the new OS(s) and/or GPC without retesting the cryptographic module on the new OS(s) and/or GPC(s). However, the CMVP makes no statement as to the correct operation of the module when executed on an OS(s) and/or GPC(s) not listed on the validation certificate. Page 25 of 45 OpenSSL FIPS 1402 Security Policy The module validated by the CMVP and which assurance is provided is based as caveated on the validation certificate and when compiled with the reference compilers and operated on the reference operating systems annotated on the certificate. FIPS 1402 IG G.5 and the above caveats allow re compilation and porting but without CMVP assurance as to the correct operation of the module. 4.1 Rules of Operation 1. The Module is initialized in the FIPS mode of operation using the FIPS_mode_set() function call. 2. The replacement or modification of the Module by unauthorized intruders is prohibited. 3. The Operating System enforces authentication method(s) to prevent unauthorized access to Module services 4. All Critical Security Parameters are verified as correct and are securely generated, stored, and destroyed. 5. All host system components that can contain sensitive cryptographic data (main memory, system bus, disk storage) must be located in a secure environment. 6. The referencing application accessing the Module runs in a separate virtual address space with a separate copy of the executable code. 7. The unauthorized reading, writing, or modification of the address space of the Module is prohibited. 8. The writable memory areas of the Module (data and stack segments) are accessible only by a single application so that the Module is in "single user" mode, i.e. only the one application has access to that instance of the Module. 9. The operating system is responsible for multitasking operations so that other processes cannot access the address space of the process containing the Module. 10. Secret or private keys that are input or output from an application must be input or output in encrypted form using a FIPS Approved algorithm. 4.2 Compatible Platforms The Module is designed to run on a very wide range of hardware and software platforms as long as the conditions in IG G.5 (Reference 3) are met. Any such computing platform that meets the conditions listed above can be used to host a FIPS 1402 validated Module generated in accordance with this Page 26 of 45 OpenSSL FIPS 1402 Security Policy Security Policy7. At the time the OpenSSL FIPS Object Module v 1.0 was developed all platforms supported by the full OpenSSL distribution were covered by the FIPS validated source files included in the Module. However, successful compilation of the Module for all such platforms was not verified8. If any platform specific errors occur that can only be corrected by modification of the Module source files (Appendix B) then the Module will not be validated for that platform. Note also that future releases of OpenSSL may add support for additional platforms requiring new platform specific source replacing parts of the current sequestered source, in which case the modified Module will not be validated for those new platforms. Note there is a possibility that the introduction of a new platform may be incompatible with the design of the integrity test, preventing a valid verification. The implementation of the integrity test is designed to fail for any such unrecognized platforms. 4.3 Software Security Three separate integrity checks are performed in the process of generating and running an application using the Module: 1. The integrity of the original validated source is checked in two separate ways before generating the binary FIPS Object Module file. First, the integrity of the entire source distribution file OpenSSLfips1.0.tar.gz must be checked as documented in Appendix C. If that disgest does not match then any software generated from the distribution cannot be considered validated. The cryptographic algorithm implementations are from the OpenSSL project (www.openssl.org), and have been validated separately by NIST/CSE. All of this code is located in the ./fips1.0/ subdirectory of the OpenSSL distribution file hierarchy. The OpenSSL source distribution includes HMACSHA1 digests of all the validated code which are published in this document in Appendix B. Because of this isolation from the rest of the source distribution these files are known as sequestered files. This subset has been given the version 7 See §2.4 and §G.5 of Reference 3 ("Implementation Guidance for FIPS PUB 1402 and the Cryptographic Module Validation Program") 8 In particular crossplatform compilation has not been addressed. Page 27 of 45 OpenSSL FIPS 1402 Security Policy designation "OpenSSL FIPS Object Module v1.0". The code in this cryptographic module cannot be changed without affecting the FIPS 1402 validation, hence the isolation of the code within the distribution and the distinct version number. This low level code is stable, unlike the rest of OpenSSL which is actively maintained. The build process checks the original source file HMACSHA1 digests while it is building the fipscanister.o FIPS Object Module file. Therefore, once the build completes, the FIPS Object Module file is known to contain the code compiled from the FIPS validated source. 2. The integrity of the binary FIPS Object Module file is checked before generating the runtime executable application . When the FIPS Object Module file has been built, a HMACSHA1 digest for that file is generated, and is installed along with the file itself. When the application is generated this HMACSHA1 digest is used to check the integrity of the installed FIPS Object Module file, and a HMACSHA1 digest of the resulting runtime executable application is created and embedded within the FIPS Object Module. 3. The integrity of the FIPS Object Module in the runtime executable application is checked at runtime prior to performing the powerup selftests. At runtime the FIPS_mode_set() function uses the embedded HMACSHA1 digest to check the integrity of the memory mapped contents of the FIPS Object Module9. This chain of integrity checks assures that applications using OpenSSL, such as Apachessl, mod_ssl, OpenSSH, stunnel, etc., will use FIPS 1402 validated cryptography when built using the validated FIPS Object Module. 4.4 Critical Security Parameters A Critical Security Parameter (CSP) is information, such as passwords, symmetric keys, asymmetric private keys, etc., that must be protected from unauthorized access. Since the Module is accessed via 9 Specifically, the object code (text segment) and initialized readonly data (rodata segment) areas of memory as mapped by the runtime linker/loader from the FIPS Object Module file. Page 28 of 45 OpenSSL FIPS 1402 Security Policy an API from a referencing application10, the Module does not manage CSPs. In fact, for most applications CSPs will be found in multiple locations external to the Module, such as in application buffers, primary (RAM) memory, secondary disk storage, CPU registers, and on the system bus. In the case of networked clientserver applications some CSPs will be found on both the client and server system and on the network infrastructure in between (Ethernet and WAN communication lines, routers, switches). The application designer and the end user share a responsibility to ensure that CSPs are always protected from unauthorized access. This protection will generally make use of the security features of the host hardware and software which is outside of the cryptographic boundary defined for this Module. As an example of the relationship between OpenSSL FIPS Object Module and the calling application, consider the OpenSSH application. The FIPS Object Module is used for actual cryptographic operations (random number generation, encryption, decryption) but the CSPs are stored and managed by the OpenSSH application. The persistent peruser CSPs (public and private keys) are stored in the ~/.ssh/ subdirectory and the application enforces the presence of appropriate permissions (private key owned by the user account and not world readable or group writable). 4.5 SelfTests The Module performs a number of powerup and conditional selftests to ensure proper operation of the Module. Powerup tests include cryptographic algorithm known answer tests and integrity tests. The integrity tests are performed using a HMACSHA1 digest calculated over the object code in the FIPS Object Module. Powerup tests are run automatically when the Module is initialized. Additionally, powerup tests may be executed at any time by calling the FIPS_selftest() function and verifying it returns true. No FIPS mode cryptographic functionality will be available until after successful execution of all powerup tests. No authentication is required to perform selftests either automatically or upon demand. The failure of any powerup selftest or continuous test causes the Module to enter the SelfTest Failure state (see Appendix A), and all cryptographic operations are disabled until the Module is reinitialized with a successful FIPS_mode_set() call. Note the most likely cause of a selftest failure is memory or hardware errors. In practice a selftest failure means the application must exit and be restarted. 10 Either directly, or indirectly via a separate library referenced by the application. Page 29 of 45 OpenSSL FIPS 1402 Security Policy 4.5.1 Powerup Tests Known Answer Tests (KATs) are tests where a cryptographic value is calculated and compared with a stored previously determined answer. The powerup selftests for the following algorithms use a KAT: Algorithm Known Answer Test AES encryption and decryption with 128 bit key DES11 encryption and decryption 2 Key Triple DES encryption and decryption 3DES encryption and decryption DSA pairwise consistency test (signing and signature verification)12 RSA pairwise consistency test with 1024 bit key public encryption and private decryption with 1024 bit key sign and verify test with 1024 bit key HMAC HMACSHA1 HMACSHA224 HMACSHA256 HMACSHA384 HMACSHA512 RNG random number generation from known IV Table 4.5.1 Powerup SelfTests For pseudorandom number generation (RNG) there are continuous tests of random number generator output and seed material. 11 Transitional phase only ­ valid until May 19, 2007. Note DES is provided for backward compatibility with legacy applications and should not be used for new development. 12 Note FIPS 1402 allows a pairwise consistency test in lieu of a KAT for DSA. Page 30 of 45 OpenSSL FIPS 1402 Security Policy 4.5.2 Conditional Tests In addition to the powerup tests, the Module performs several conditional tests including pairwise consistency tests on newly generated public and private key pairs. Conditional tests are performed automatically as necessary and cannot be turned off. Currently, all conditional tests relate to services available only to users. Thus, conditional and critical function tests are not performed at any time in response to Crypto Officer actions. Algorithm Conditional Test DSA pairwise consistency test (signing and signature verification) RSA pairwise consistency test (public encryption and private decryption with 1024 bit key) RNG repeat test per FIPS 1402 §4.9.2 Table 4.5.2 Conditional Tests Pairwise consistency Test A pairwise consistency test is performed for RSA key pair generation and DSA signature calculations. Software/Firmware Load Test Not applicable; the Module does not utilize externally loaded cryptographic modules. Manual Key Entry Test Not applicable; keys are not manually entered into the Module. Continuous Random Number Generator Test The test for failure to a constant value as described in FIPS 1402 §4.9.2 is performed at each call that returns random data, FIPS_rand_bytes(). Page 31 of 45 OpenSSL FIPS 1402 Security Policy Bypass Test Not applicable; the Module does not implement a bypass capability. 4.5.3 Critical Function Tests The Module does not implement any critical function tests. 4.6 Physical Security The Module does not claim to enforce any physical security as it is implemented entirely in software. 4.7 Mitigation of Other Attacks The Module does not mitigate against any specific attacks. Page 32 of 45 OpenSSL FIPS 1402 Security Policy 5. Design Assurance The Module is managed in accordance with the established configuration management and source version control procedures of the OpenSSL project, with additional mechanisms to assure the integrity of source code as delivered and used to create applications. 5.1 Source Code Control Software development functions for OpenSSL software (configuration management, version control, change control, software defect tracking) are managed by the OpenSSL group. The source code revisions are maintained in a CVS13 repository (http://cvs.openssl.org/) with public read access but with write access restricted to the core OpenSSL team. Individually packaged revisions are released periodically in "tarball" (compressed tar archive) form. The integrity of the Module is based on HMACSHA1. The OpenSSL group also maintains several mailing lists for developers and end users (http:// www.openssl.org /support/ ), accessible on a subscription basis or as searchable archives. 5.2 Application Management of Critical Security Parameters Identifying CSPs All CSPs must be created, stored, and destroyed in an approved manner as described by Reference 1, FIPS 1402. CSPs are those items of information which must be protected from disclosure, such as symmetric keys, asymmetric private keys, etc. Note that the application designer and end user/system administrator/Crypto Officer share a responsibility for protection of CSPs; the former to include appropriate technical protections and the latter to install and configure the application correctly. Technical protections include checks to require that files storing CSPs have appropriate permissions (not group writable or world readable, for example). Administrative protections include installation of the runtime software (executables and configuration files) in protected locations. End users have a responsibility to refrain from comprising CSPs (as by sending a password in clear text or copying an encryption key to an unprotected location). 13 See http://www.cvshome.org/. Page 33 of 45 OpenSSL FIPS 1402 Security Policy Key Generation The Module API provides cryptographic functions used for key generation. As with other validated cryptographic libraries, API function calls from the calling application that lies outside of the logical cryptographic boundary are used to generate keys. For example, a call to the RSA_generate_key() API function would be used to generate RSA keys, AES_set_encrypt_key() for AES, DES_set_key() for DES, and so forth. The control input that drives the invocation of the Module API functions comes from the calling application. Output of Keys Used for Key Establishment Secret keys used for key establishment must be wrapped with RSA by the calling application (the application using the Module to perform cryptographic operations) before being output. Storage of CSPs The Module does not store any critical security parameters (CSPs) in persistent media; while the Module is initialized any CSPs reside temporarily in RAM and are destroyed at the end of the session. Any keys or other CSPs otherwise stored in persistent media must be protected in accordance with FIPS requirements in Reference 1, FIPS 1402. Destruction of CSPs When no longer needed, CSPs contained within the application must be deleted by overwriting in a way that will make them unrecoverable. The fips_rand_bytes() function in the Module can be used to generate random data to overwrite the storage location of a CSP. Note the OPENSSL_cleanse() function call which is typically used to perform key wiping functions is not part of the Module. This function overwrites a memory storage area to ensure destruction of data, using the random data generation functions of the Module. Page 34 of 45 OpenSSL FIPS 1402 Security Policy 6. Glossary AES Advanced Encryption Standard API Application Programming Interface CBC Cipher Block Chaining CFB Cipher Feedback CMT Cryptographic Module Testing CMVP Cryptographic Module Validation Program CO Crypto Officer CSE Communications Security Establishment (Canada) CSP Critical Security Parameter DES Digital Encryption Standard DH DiffieHellman DSA Digital Signature Algorithm ECB Electronic Codebook FIPS Federal Information Processing Standard FSM Finite State Machine HMACSHA1 Hash based Message Authentication Code IV Initialization Vector KAT Known Answer Test NIST National Institute of Standards and Technology (United States) OFB Output Feedback OpenSSH The open source SSH implementation OpenSSL The open source cryptographic library implementation OS Operating System RSA Rivest, Shamir and Adleman SHA1 Secure Hash Algorithm SSH Secure Shell application layer protocol SSL Secure Socket Layer transport layer protocol tar Tape Archive command common to Unix® based and Linux® systems tarball Compressed tar archive, a common format for software distribution TLS Transport Layer Security XOR Exclusive Or 3DES Triple DES Page 35 of 45 OpenSSL FIPS 1402 Security Policy 7. References 1. FIPS PUB 1402 , Security Requirements for Cryptographic Modules, May 2001, National Institute of Standards and Technology 2. Derived Test Requirements for FIPS PUB 1402, Security Requirements for Cryptographic Modules, 15 November 2001 (draft), National Institute of Standards and Technology 3. Implementation Guidance for FIPS PUB 1402 and the Cryptographic Module Validation Program, January 21, 2005, National Institute of Standards and Technology 4. FIPS PUB 197 , Advanced Encryption Standard (AES), 26 November 2001, National Institute of Standards and Technology 5. FIPS PUB 463 , Data Encryption Standard (DES), 25 October 25 1999, National Institute of Standards and Technology 6. FIPS PUB 81 , DES Modes of Operation, 2 December 1980, National Institute of Standards and Technology 7. The Advanced Encryption Standard Algorithm Validation Suite (AESAVS) , 15 November 2002, National Institute of Standards and Technology 8. NIST Special Publication 80020, Modes of Operation Validation System for the Triple Data Encryption Algorithm (TMOVS): Requirements and Procedures, April 2000, National Institute of Standards and Technology 9. NIST Special Publication 80017, Modes of Operation Validation System (MOVS): Requirements and Procedures, February 1998, National Institute of Standards and Technology 10. FIPS 1801 , Secure Hash Standard (SHS), 17 April 1995, National Institute of Standards and Technology 11. Network Security with OpenSSL, John Viega et. al., 15 June 2002, O'Reilly & Associates Page 36 of 45 OpenSSL FIPS 1402 Security Policy 12. FIPS 171, National Institute of Standards and Technology, 27 April 1992, http://csrc.nist.gov/publications/fips/fips171/fips171.txt 13. RFC 2246, The TLS Protocol, T. Dierks, C. Allen, January 1999, http://www.ietf.org/rfc/rfc2246.txt 14. OpenSSL FIPS 1402 User Guide, v1.0, included in OpenSSL distributions and available at http://www.openssl.org/. 15. Handbook of Applied Cryptography, Alfred Menezes, October 1996, CRC Press. The relevant page describing a RNG implementation is available online at http://www.cacr.math.uwaterloo.ca/hac/about/chap5.pdf. 16. X9.311988, Digital Signatures using Reversible Public Key Cryptography for the Financial Services Industry (rDSA), September 9, 1998, American National Standards Institute. Page 37 of 45 OpenSSL FIPS 1402 Security Policy Appendix A Finite State Model This Appendix describes the Finite State Machine (FSM) model for an application utilizing the OpenSSL FIPS Object Module. Figure A.1 is a finite state diagram showing the states and transitions between states. At any point in time the Module is in one and only one state. Various software or operating system driven events can cause a transition to another state. A.1 Diagram 1 POWERON STATE 2 3 SELFTEST ERROR STATE STATE 4 OPERATIONAL STATE 5 6 CRYPTO USER STATE OFFICER STATE 7 SHOW STATUS STATE 8 KEY MANAGEMENT STATE 9 POWEROFF STATE Figure A.1 Finite State Machine Diagram Page 38 of 45 OpenSSL FIPS 1402 Security Policy A.2 State Descriptions State 1: PowerOn State The application containing the FIPS Object Module has not been loaded into memory by the host operating system. The Module transitions to the PowerOn State when the application is invoked as a process by the host operating system. State 2: SelfTest State The application has been loaded into memory for a process created by the host operating system, but the powerup selftests and FIPS mode initialization (FIPS_mode_set() call) have not yet been performed. The FIPS_mode_set() call will transition to either the Error or Operational state. Any of the following errors can occur during the powerup self test, all cause a transition to the Error state: FIPS_R_FINGERPRINT_DOES_NOT_MATCH "fingerprint does not match" FIPS_R_FINGERPRINT_DOES_NOT_MATCH_NONPIC_RELOCATED "fingerprint does not match, possibly because of nonPIC relocatation" FIPS_R_FINGERPRINT_DOES_NOT_MATCH_SEGMENT_ALIASING "fingerprint does not match, because of invalid segment aliasing" FIPS_R_FIPS_MODE_ALREADY_SET "fips mode already set" FIPS_R_FIPS_SELFTEST_FAILED "fips selftest failed" FIPS_R_NON_FIPS_METHOD "non fips method" FIPS_R_PAIRWISE_TEST_FAILED "pairwise test failed" FIPS_R_SELFTEST_FAILED "selftest failed" FIPS_R_UNSUPPORTED_PLATFORM "unsupported platform" State 3: Error State The initial powerup selftest or subsequent optional selftest has failed. The application and Module will typically terminate on detection of the powerup selftest error. While not likely in practice, a successful reinvocation of the powerup selftest could transition to the Operational state. State 4: Operational State The powerup selftest has executed successfully. The cryptographic algorithms in the Module can now be accessed by the application. The Module will remain in the Operational state until the application is terminated and enters the PowerOff state. Page 39 of 45 OpenSSL FIPS 1402 Security Policy State 5: CryptoOfficer State The application is in cryptoofficer state. State 6: User State The application is in user state. State 7: Show Status State The application is performing a show status operation. State 8: Key Management State The application is performing a key management operation. State 9: PowerOff State The host operating system has terminated the application process and released all memory. Page 40 of 45 OpenSSL FIPS 1402 Security Policy Appendix B Controlled Source File Fingerprints The OpenSSL FIPS Object Module v1.0 consists of the FIPS Object Module (the fipscanister.o contiguous unit of binary object code) generated from the specific source files found in the specific special OpenSSL distribution OpenSSLfips1.0.tar.gz with HMACSHA1 digest14 of 55e35c0207dceb472512132822504834c757da75 at http://www.openssl.org/source/OpenSSLfips 1.0.tar.gz. The set of files specified in this tar file constitutes the complete set of source files of this module. There shall be no additions, deletions, or alterations of this set as used during module build. The OpenSSL distribution tar file shall be verified using the above HMACSHA1 digest. Provided below for reference only are the Cryptographically Significant Source Files in the OpenSSL FIPS Object Module which can be individually verified for additional assurance. File paths of the sequestered source files are relative to the root of the directory ./fips1.0/ created when the distribution is unpacked. The arbitrary 16 byte key of: 65 74 61 6f 6e 72 69 73 68 64 6c 63 75 70 66 6d (equivalent to the ASCII string "etaonrishdlcupfm") is used to generate the HMACSHA1 values for the FIPS Object Module integrity checks. Cryptographically Significant Source Files in the OpenSSL FIPS Object Module Source file path HMACSHA1 aes/asm/fipsax86elf.s f797b524a79196e7f59458a5b223432fcfd4a868 aes/fips_aes_core.c b70bbbd675efe0613da0d57055310926a0104d55 aes/fips_aes_locl.h a98eb0aa449f1d95b8064e261b2ac2b1f328685e aes/fips_aes_selftest.c 98b01502221e7fe529fd981222f2cbb52eb4cbe0 des/asm/fipsdx86elf.s 9570b03422ffbe5d3d090f91758ebfd46acd5d57 des/fips_des_enc.c 9527f8ea81602358f1aa11348237fdb1e9eeff32 des/fips_des_locl.h e008da40dc6913e374edd66a20d44e1752f00583 des/fips_des_selftest.c 3bc574e51647c5f5ab45d1007b2cf461d67764a9 des/fips_set_key.c cd1ba25d29376849523a9ddc194c3156a8a7a913 The command "openssl sha1 hmac etaonrishdlcupfm OpenSSLfips1.0.tar.gz" will display this HMACSHA1 digest 14 value. Page 41 of 45 OpenSSL FIPS 1402 Security Policy Cryptographically Significant Source Files in the OpenSSL FIPS Object Module dh/fips_dh_check.c 63347e2007e224381d4a7b6d871633889de72cf3 dh/fips_dh_gen.c 93fe69b758ca9d70d70cda1c57fff4eb5c668e85 dh/fips_dh_key.c 2d79eb8d59929ec129d34f53b5aded4a290a28ca dsa/fips_dsa_gen.c 78c879484fd849312ca4828b957df3842b70efc0 dsa/fips_dsa_ossl.c 2fadb271897a775f023393aa22ddede8a76eec0d dsa/fips_dsa_selftest.c 7c2ba8d82feda2aadc8b769a3b6c4c25a6356e01 fips.c 3a2deb3c319512952bf5547ed92116a7e0db472b fips_canister.c da6d0f5daf9594881fd060773a5f3e057ba302ff fips_err.h e0649ee1d60c8162f7eeb293f89f3b63ac85202a fips_err_wrapper.c d3e2be316062510312269e98f964cb87e7577898 fips.h 57d602d18efe0594f806fbcc64269e9440638ef4 fips_locl.h f90a23c7f68642727012bbfd48ed58706383ad71 fips_premain.c 6a08d15c578f1258246181bf52134ae974aa5a80 hmac/fips_hmac.c a477cec1da76c0092979c4a875b6469339bff7ef hmac/fips_hmac_selftest.c ebb32b205babf4300017de767fd6e3f1879765c9 rand/fips_rand.c 7e3964447a81cfe4e75df981827d14a5fe0c2923 rand/fips_rand.h bf009ea8963e79b1e414442ede9ae7010a03160b rand/fips_rand_selftest.c 5661f383decf0708d0230409fe1564223e834a3b rsa/fips_rsa_eay.c 2512f849a220daa083f346b10effdb2ee96d4395 rsa/fips_rsa_gen.c 577466931c054d99caf4ac2aefff0e35efd94024 rsa/fips_rsa_selftest.c a9dc47bd1001f795d1565111d26433c300101e06 rsa/fips_rsa_x931g.c 1827d381bb21c53a38a7194cb1c428a2b5f1e3ab sha/asm/fipssx86elf.s ae66fb23ab8e1a2287e87a0a2dd30a4b9039fe63 sha/fips_md32_common.h c34d8b7785d3194ff968cf6d3efdd2bfcaec1fad sha/fips_sha1dgst.c 26e529d630b5e754b4a29bd1bb697e991e7fdc04 sha/fips_sha1_selftest.c a08f9c1e2c0f63b9aa96b927c0333a03b020749f sha/fips_sha256.c 97e6dee22a1fe993cc48aa8ff37af10701d7f599 sha/fips_sha512.c 74e6ef26de96f774d233888b831289e69834dd79 sha/fips_sha.h cbe98c211cff1684adfa3fe6e6225e92a0a25f6c sha/fips_sha_locl.h 30b6d6bdbdc9db0d66dc89010c1f4fe1c7b60574 sha/fips_standalone_sha1.c 46a66875e68398eabca2e933958a2d865149ca1b Makefile 369e2e023b73789e6af4b8fa2503a7b909c4c3f0 Note the reference compilers for the two tested platforms were gcc v3.4.2 (HPUX) and gcc v3.3.1 (SUSE). Page 42 of 45 OpenSSL FIPS 1402 Security Policy Appendix C Installation and Initialization These instructions assume the following: 1. The reader has the basic knowledge of how to unpack a source distribution; and 2. The reader has a functional development environment to execute the instructions below. C.0 Validating the Source Distribution File The HMACSHA1 digest of the OpenSSLfips1.0.tar.gz source distribution file is published in Appendix B. Generate a HMACSHA1 digest of that file using the same key and compare it to the published value to confirm that the file is authentic and unmodified. The following command can be used on any system that contains a recent version of the standard OpenSSL product: openssl sha1 hmac etaonrishdlcupfm OpenSSLfips1.0.tar.gz The displayed digest value must exactly match the published value in Appendix B, or the distribution cannot be used to generate any FIPS 1402 validated software. C.1 Building the FIPS Object Module from Source Build the OpenSSL FIPS Object Module from source after unpacking the source distribution OpenSSL fips1.0.tar.gz. The FIPS specific code is incorporated into the generated FIPS Object Module file when the fips configuration option is specified as: $ ./config fips Note that no other configuration options may be specified by the user. Then: $ make Page 43 of 45 OpenSSL FIPS 1402 Security Policy to generate the FIPS Object Module file fipscanister.o, and the digest for the FIPS Object Module file, fipscanister.o.sha1. The fipscanister.o, and fipscanister.o.sha1 files are intermediate files. The object code in the fipscanister.o file is incorporated into the runtime executable application at the time the binary executable is generated. C.2 Installing and Protecting the FIPS Object Module The Crypto Officer should install the generated files in a location protected by the host operating system security features. These protections should allow write access only to Crypto Officers and read access only to authorized users. The usual # make install will install both the fipscanister.o and fipscanister.o.sha1 files in the default location for the type of system15 with the appropriate permissions to satisfy the security requirement. In addition the source file used to generate the embedded digest, fips_premain.c, and the digest that protects that file, fips_premain.c.sha1, are installed as well. The fips_premain.c source file is used at application link time to create the embedded digest. After installation of the four files (fipscanister.o, fipscanister.o.sha1, fips_premain.c, fips_premain.c.sha) the unpacked distribution and all other generated files should be discarded. C.3 Linking the Runtime Executable Application Note that applications interfacing with the FIPS Object Module are outside of the cryptographic boundary. When linking the application with the FIPS Object Module two steps are necessary: 1. The HMACSHA1 digest of the FIPS Object Module file must be calculated and verified against the installed digest to ensure the integrity of the FIPS object module. 15 Typically /usr/local/lib/ for Unix® based or Linux® systems. Page 44 of 45 OpenSSL FIPS 1402 Security Policy 2. A HMACSHA1 digest of the FIPS Object Module must be generated and embedded in the FIPS Object Module for use by the FIPS_mode_set() function at runtime initialization. The OpenSSL distribution contains a reference utility which can be used to perform the verification of the FIPS Object Module and to generate the new HMACSHA1 digest for the runtime executable application. Failure to embed the digest in the executable object will prevent initialization of FIPS mode. At runtime the FIPS_mode_set() function compares the embedded HMACSHA1 digest with a digest generated from the FIPS Object Module object code. This digest is the final link in the chain of validation from the original source to the runtime executable application file. C.4 FIPS Mode Initialization Somewhere very early in the execution of the application FIPS mode must be enabled. This should be done by invocation of the FIPS_mode_set() function call as in this example: #ifdef OPENSSL_FIPS if(options.no_fips <= 0) { if(!FIPS_mode_set(1)) { ERR_load_crypto_strings(); ERR_print_errors(BIO_new_fp(stderr,BIO_NOCLOSE)); exit(1); } else fprintf(stderr,"*** IN FIPS MODE ***\n"); } #endif Example 4.C Invocation of FIPS_mode_set() Note that it is permitted to _not_ enable FIPS mode, in which case, the FIPS Object Module used in conjunction with the OpenSSL API should function as the OpenSSL API alone always has. The application will not, of course, be FIPS 1402 validated. Page 45 of 45