OPENSSL FIPS

https://www.openssl.org/docs/fipsnotes.html

https://wiki.openssl.org/index.php/FIPS_mode()

openssl-fips是符合FIPS标准的Openssl。
联邦信息处理标准(Federal Information Processing Standards,FIPS)是一套描述文件处理、加密算法和其他信息技术标准(在非军用政府机构和与这些机构合作的政府承包商和供应商中应用的标准)的标准。
 

编译过openssl的同学应该知道一个叫OPENSSL_FIPS的宏。这个宏有什么作用呢。
Intel AES指令(AES-NI)是Intel32纳米微架构上的一组新指令。这些指令对于使用 AES(Advancde Encryption Standard)算法进行数据加解密的操作能够起到加速的作用。AES标准由FIPS定义,如今广泛 应用在贸易安全,数据库的加密等各个方面。
Intel AES-NI包括七条指令。其中六条是硬件对AES的支持(四条关于AES加解密,另两条指令有关AES key的扩展)。第七条指令有助于进位乘法。
AES-NI可以灵活地支持AES的各种使用方式,包括各种标准密钥的长度,各种模式的操作,甚至是一些非标准或是未来可能的各种方式。对比现在一些纯软件的实现,它对性能的提升非常显著。
如果打开该宏,直接调用Intel AES指令,轻松获得5倍左右的性能提升(这个摘抄网上的说法,没有真正测试过)。

BTW: 改Openssl version的地方(crypto/opensslv.h中的宏: OPENSSL_VERSION_TEXT)

 

 

The OpenSSL FIPS Object Module is a specific subset of OpenSSL, API-compatible with OpenSSL, and provided as source code. That module has gone through the long and painful administrative process of obtaining a FIPS 140-2 validation. It has achieved the "overall level: 1" (see the validation certificate).

The intent of FIPS 140-2 validation is to show, basically, that some level of "seriousness" was applied during the development. Validation cannot prove that there is no bug or vulnerability, but it can show that the developers applied proper methodologies which, hopefully, should avoid bugs and make the software conform to a specific set of target properties.

Now, there are some caveats:

  • In practice, the OpenSSL developers applied the same development methodologies for both the FIPS module, and "plain" OpenSSL. Both versions share a lot of code; the FIPS module is actually a subset of the normal library version. For the same functionalities, the plain OpenSSL should be no less secure than the FIPS module. (For functionalities which the plain OpenSSL offers but not the FIPS module, anything goes).

  • The FIPS module is validated only insofar as you use it absolutely unchanged. If you modify the slightest character in the source code, you are no longer covered by the FIPS validation.

The second point, in particular, implies that if a bug is found in "normal OpenSSL", and a bugfix is published, then that bugfix is not immediately imported into the FIPS module, because that would void its FIPSness. Therefore, it can be argued that the plain OpenSSL is in fact more secure than the FIPS module, since it is fixed much more quickly when holes are uncovered.

Summary: if you do not target some sort of conformance to FIPS 140-2, use the normal OpenSSL.

 

OpenSSL FIPS documentation: 

http://www.openssl.org/docs/fips/

Download:

http://www.openssl.org/source/

unpack and compile OpenSSL FIPS module:

./config

make

sudo make install

unpack and comiple openssl:

./config fips

make

sudo make install

posted @ 2017-08-30 13:55  小 楼 一 夜 听 春 雨  阅读(2778)  评论(0编辑  收藏  举报