|
About OSF Resources |
FAQ - The I.G. 9.5 IssueLast update 2013-03-14
Q1: What is the issue? Executive summary please.
From time to time the strange little world of FIPS 140-2 validation testing manages to conjure thrills and excitement from what is normally a very dull and boring topic. The latest such surprise is a new interpretation1 of the "guidance" (mandatory requirement) in section 9.5 of the Implementation Guidance (I.G.) document, a key canon of the FIPS 140-2 scripture. The bureaucracy responsible for such interpretations is the CMVP.
Q2: We have a FIPS 140-2 validation currently in process. Are we affected?
If your formal test report submission has already occurred (on or before December 27, 2012) then you're in the clear. If not your validation is affected to an as yet unknown degree, and have presumably already been so informed by your test lab. Q3: Why is the new I.G. 9.5 requirement bad news?
This new interpretation requires that none of the function calls in our cryptographic library can return useful information until after the POST3 is performed. It also requires that this restriction must be enforced in the module, that is in the cryptographic library itself, and not merely stated as a condition to be satisfied by the calling application. Q4: What hacks to the FIPS module will be required?
First there is the problem that a library cannot choose which API functions are called or when they are called; that is decided by the calling applications. So, some mechanism must be used to disable all function calls. A simple global static variable won't work because the POST itself calls many of the same API functions, and if those functions are disabled the POST will see errors just as any external application would. The POST can't just flip the global static variable without introducing a race condition, as other threads could call those functions while the POST was executing, which is a no-no not only from a technical perspective (the code is no longer thread safe) but is also a FIPS 140-2 scripture violation. Q5: Will a new validation be required for the hacked FIPS module?
Yes, and that's a problem ... a big one. Q6: What about the matching "FIPS capable" OpenSSL?
That will need to be modified to match the new FIPS module, of course. Q7: What are the best case prospects for a new I.G. 9.5 compatible FIPS module and matching OpenSSL?
Well, two things will need to happen: Q8: What is the worst case scenario?
If we don't find substantial funding for the coding and validation work required, and also find the enthusiasm for once again diverting a large proportion of our limited manpower to a goal of interest to only a narrow segment15 of the overall OpenSSL user community, then the OpenSSL FIPS Object Module 2.0 (#1747) will be the end of the line in that series of open source based validations. There will be no longer be a ready-made code base suitable as a model for future private label validations. Q9: We need validated OpenSSL crypto now. What can we do?
At present your best -- in fact only -- option is to leverage the existing 2.0 FIPS module (#1747) by adding additional platforms as necessary. Over sixty platforms16 have been formally tested already and that number will continue to grow, and if your platform(s) of interest aren't already covered they can be added at a relatively modest cost in time and money (as compared to a full validation). Contact OSF for details on sponsoring additional platforms for the 2.0 FIPS module. Q10: Any chance the CMVP will reconsider?
We're being asked this a lot. This impact of this requirement is widespread and we have heard from multiple sources that some accredited test labs and affected vendors have already communicated their concerns to the CMVP. A closed meeting between the test labs and CMVP occurred on February 27, at which this issue was a primary topic of discussion. The CMVP has re-affirmed that new guidance but subsequent preliminary feedback indicates they will permit a temporary transitional period to allow currently in-process validations to be completed. Details on the terms of that transitional period are as yet unknown.
2
For our commercial clients we absorb as much of the risk of the validation process as we can, as that is
part of the "valued add" for our validation services. In this case that means we will absorb the full
cost of the substantial amount of labor that will be needed for recoding and retesting.
We will also have to pay the lab fees for the formal algorithm and
operational environment testing that will need to be repeated with the new code (or if the labs waive some
or all of those fees then they take a loss, as their testing effort is also non-trivial). At present
the losses we will
incur promise to be a substantial portion of our annual revenues. Ouch. If we ever do commence doing
private label validations again we will need to factor in this level of risk.
3
The Power Up Self Test (POST) is an elaborate set of initialization tests mandated by FIPS 140-2. Roughly
speaking they consist of an integrity check to verify no bits have flipped in the executable code since it
was created, and
checks for the various algorithms which are basically complex mathematical tautologies (does 1+1=2?). The
algorithm tests won't fail unless there is something really wrong with the computing environment (1+1≠2).
So, for all practical purposes a POST failure will not occur and if it does you have far worse problems
than a failed crypto module.
4
The monolithic object module is an invention born of the first validation attempt in order to satisfy
the peculiar requirements of FIPS 140-2; see section 2.3 of the FIPS module
User Guide. In essense it is a
composite object module with the individual object modules forced in a specific order in terms of
ascending file or memory offsets. That ordering is technically irrelevant to the
behavior of the static linker during creation of the "fipscanister" object module and the final application
executable containing that object module.
All OpenSSL FIPS Object Module validations (and the many "private label" validations derived from them)
have featured this monolithic object module that is statically linked into an executable application
file. In practice that application often takes the form of the libcrypto.so shared library file (or
libeay32.dll for Windows
operating systems) for the "FIPS capable" OpenSSL, but for some platforms (e.g. Apple iOS) the FIPS module
is statically linked into the application executable. Implementing the FIPS module for static linking
exclusively was a strategic design decision from the beginning as there is no platform portable way to implement the
integrity test mandated by FIPS 140-2.
5
In some very platform and architecture specific contexts hiding of selected global symbols in
object code may be possible, using sophisticated compiler and linker voodoo. See for instance
Drepper, 2011-12-10, section 2.2, for
one specific object code format (ELF). Such voodoo is not an option one would chose absent any other recourse.
6
Appendix I of the
User Guide for the OpenSSL FIPS Object Module v.20
was machine generated from the source code to satisfy a FIPS 140-2 documentation requirement
that such documentation exist. That documentation would not have been prepared otherwise
as it has minimal real-world utility; application programmers will not reference the FIPS module API directly except in
unusual circumstances in which source code would be consulted as a matter of course anyway.
That automation was developed to avoid the considerable labor costs of manually preparing
documentation for previous validations.
As such it documents every external function and is
not a useful guide to the FIPS module interface. That interface was designed for compatibility
with the "FIPS Capable" OpenSSL as described in that User Guide document, and not for direct reference by application
programmers. The source code to OpenSSL itself is the best description of the FIPS module
interface.
Should documentation prove to be a critical issue then it could be redone accordingly to
reference only selected functions, either by machine generation from the "FIPS Capable" OpenSSL
source and/or by filtering on the basis of the "blocking" mechanism as implemented in the
FIPS module. Either approach would be more accurate than manually drafted documentation.
7
Almost invariably both identical or near identical cryptographic algorithm implementations, one
validated and one not, will reside in the same executable or shared library file. The "FIPS
capable" OpenSSL will preferentially use the non-validated algorithm implementations as those
are actively maintained to incorporate bugfixes and performance improvements (unlike the FIPS
module which effectively cannot be maintained). So, this blocking will be for the purpose of
preventing use by an application when such access is undesirable anyway.
8
While the open source based validations use the same or very similar source code as many conventional
proprietary binary validations they are subjected to a much higher level of scrutiny that significantly drives
up the cost.
9
Requirement changes can impact ongoing validations up to the point where the formal
test report is submitted to the CMVP by the accredited test lab; that is to say after all
the design, implementation, and testing work has been completed. Until that point, a
period that can span many months for a typical validation, new requirements can mean major
rework and expense. That risk should be factored into the contingency planning for any
validation effort.
10
Some users won't know or care one way or the other whether the products they purchase use FIPS 140-2
validated cryptography, but some specifically do not want validated cryptography: it is inherently less secure
(in the real-world sense of resistance to malicious compromise)
than the equivalent unvalidated implementations; a blanket restriction to the FIPS 140-2 approved algorithms can cause
interoperability issues; and for some algorithms performance is inferior. Absent a specific policy mandate there
is no reason to use validated cryptography; it is not "better" in any technical or functional sense and is much
more difficult to maintain.
11
As an aid to conversion of existing OpenSSL based applications to use of FIPS validated cryptography
we put a lot of effort into having the "FIPS capable" OpenSSL API automatically provide the appropriate behavior.
When FIPS mode is enabled the calling application is not supposed to invoke any non-validated cryptographic
algorithm implementations. Due to the complexity of the legacy OpenSSL API, handling the redirection automatically and
comprehensively is a bit tricky. Where there was a chance that redirection of a cryptographic operation to the
validated implementation might fail we erred on the side of caution by unconditionally referencing the validated
implementation where the FIPS module is present. That is done for instance for the SHA digests, where for the
present at least the validated and unvalidated implementations are identical.
12
The FIPS_mode_set() function is actually defined in the FIPS capable OpenSSL, not the
FIPS module. It initializes the passthrough and disabling mechanisms in OpenSSL and calls the
FIPS_module_mode_set() function defined in the FIPS module which actually enables the FIPS module
of operation.
13
The tentative name for the associated macro is OPENSSL_FIPS_IG_9_5_BOLLOCKS. We do try to keep our
sense of humor.
14
Briefly stated "letter" revisions (e.g. 1.0.1e) are for bugfixes only; the introduction of new features
requires a "number" release (e.g. 1.0.2). The argument has been advanced that a new crippled FIPS module
could be considered a bug, but before adding any such support to the 1.0.1 baseline we would have
to be absolutely sure the existing #1747 validated module was not affected.
15
When working on FIPS 140-2 validation issues it's easy to forget that they are of interest to only
some OpenSSL users. Use of FIPS 140-2 validated cryptography is mandated for the U.S. and Canadian governments,
and is of some interest in selected commercial settings (financial, health care industries) in North America and
Europe, but of little or no interest throughout most of the world and for very large sectors of the software
industry. A valid argument can be made that too many scarce OpenSSL resources have been already consumed in accommodating
the peculiar requirements of FIPS 140-2 instead of improving the OpenSSL product in general.
16
The #1747 validation includes more tested platforms ("Operational Environments") than any other validation. We
believe it also includes the largest number of algorithms.
17
The current OpenSSL FIPS Object Module 2.0 (#1747) does not support GMAC, and the FIPS module with the
associated "FIPS capable" OpenSSL 1.0.1 does not fully address the
"Lucky Thirteen" TLS vulnerability. We have been adding
GMAC support to recent private label validations. The TLS vulnerability could potentially, though not easily,
be addressed for new private label validations but this latest issue makes that moot. As with GMAC support
that vulnerability can't be fully addressed for the existing 2.0 module because of the practical
impossibility of changing an existing validated module.
18
We've been asked this several times already and don't have a ready answer as the cost will depend on
a more thorough analysis of the coding issues and external factors such as the accredited test lab fees.
The coding work alone will probably cost a minimum of mid five figures (US$50,000+) and in the low-to-mid
six figures at least for a formal FIPS 140-2 validation. That assumes compliance is even theoretically
possible (see earlier footnote on the meaning of "all" functions).
|
|
|