I am working on a security-related project and have to make sure it is FIPS 140-2 compliant.

According to my understanding, FIPS compliance is compliance at hardware as well as software level. Currently there are 2 Samsung Android devices which are FIPS compliant, i.e. they have compliance at hardware and software level. I have a few questions.

  1. If I want to make my Android app FIPS compliant, if the only crypto module used in my project is compliant, is it enough?

    The crypto module provided by the Android SDK is the BouncyCastle library and it is not FIPS compliant.

    I am using the FIPS-compliant OpenSSL library in my project as per https://stackoverflow.com/questions/11091905/android-build-openssl-fips-2-0. I have built my project library using the OpenSSL library ie libssl.a and libcrypto.a configured using FIPS mode.

  2. According to the the FIPS OpenSSL module for Android documentation, the module has been tested on different Android devices of armv7 architecture. Will Android hardware not being FIPS compliant matter here ?

  3. AES algorithm is under FIPS compliance. Does this mean that if I use the AES algorithm in Java code instead of using the FIPS-compliant OpenSSL library, it isn't FIPS compliant?

    If AES is under FIPS compliance, what does it have to do with a Java or C# implementation of AES. Do they both have to pass through the CMVP?

2 Answers 2


If you want the project to be FIPS compliant, you'll need to have the whole solution tested for FIPS - hardware and/or software. Using FIPS compliant software packages will simplify the process though you need to ensure you use that software in a manner that supports its FIPS compliant status. For example, if you're using AES your encryption mechanism is validated as strong. However, that doesn't mean you have appropriate key management in place so you need to consider the layers involved in the security and compliance.

To answer your questions:

1) You can have an Android app using a FIPS compliant crypto module. That means the crypto module is compliant - it does not mean your application is compliant. The only reassurance this provides people is that you're not rolling your own encryption and you're using a known, recognised library.

2) Android hardware not being FIPS will only matter in terms of whether your project requires FIPS hardware or not. You could just look to have have software validated (FIPS Level 1)

3) You could write your AES implementation using Java or OpenSSL and have that validated. Just because you're using one or the other doesn't mean it's compliant. It will depend on the testing done by the CMVP.

Whatever you do, if you want FIPS compliance, you need your project tested and validated. It cannot be FIPS compliant just because you use libraries or encryption algorithms that can be or are approved for use within FIPS projects.


By FIPS, I assume you mean FIPS 140.

FIPS 140 defines four levels of security.

  • Level 1 is essentially about implementing cryptography and authentication correctly, as in passing some basic functional tests. You must use approved algorithms for cryptography and for random number generation. You can certify a software product at level 1.
  • Levels 2 and above involve gradually stronger security mechanisms. The hardware must be included in the certification.

Do not confuse FIPS 140-2 (“fips one-forty dash two”), where 2 is the version number of the standard, with FIPS 140-2 level 1 (“fips one-forty dash two level 1”), where 1 is the level of security.

You'll be wanting FIPS 140 level 1 then.

Regarding your question 3: FIPS 140 requires a validated implementation, and you can only validate an implementation of an approved algorithm. AES (with a suitable mode) is an approved algorithm, it's up to you to have the implentation validated. Note that in order for your software to be FIPS compliant, you don't just have to follow the standard and say it is compliant: you need to go through the validation program.

Using a validated crypto library won't help you much, except perhaps for the random number generator. You'll have to select approved algorithms, and pass the comformance tests anyway.

FIPS 140 level 1 isn't much more than what you'd do in a serious product regardless of certification (use reasonable algorithms, run a few tests). It does add two requirements for which a FIPS-compliant library may help a little:

  • Each algorithm must be tested before use, after each power up. Testing means running one test vector and verifying the result. Your software must refuse to use the algorithm if the corresponding test has failed.
  • Any key that is stored in your module must be erased after use. There is no strong security validation here, but you may run into difficulties if you're using a language with a garbage collectors that can move objects around.

If you use a FIPS-compliant library, it's possible that your client will be satisfied with that and won't require you to validate your software. You have to take it up with your client.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .