278. FIPS Validation Application Tests

278.1. Description

Federal Information Processing Standards (FIPS) are publicly announced standards developed by the United States federal government for use in computer systems by non-military government agencies and government contractors.

This application is used to parse and perform symmetric cryptography computation to the NIST Cryptographic Algorithm Validation Program (CAVP) test vectors.

For an algorithm implementation to be listed on a cryptographic module validation certificate as an Approved security function, the algorithm implementation must meet all the requirements of FIPS 140-2 and must successfully complete the cryptographic algorithm validation process.

Limitations and Supported test vectors, please see http://doc.dpdk.org/guides/sample_app_ug/fips_validation.html

278.2. Prerequisites

Get the latest IPSec Multi-buffer library (nasm package is required, for Ubuntu “apt install nasm”, for Fedora/RHEL “dnf install nasm”):

git clone https://github.com/intel/intel-ipsec-mb.git

cd intel-ipsec-mb

git checkout d3e25eed9d010b2c24b9970828eb9b45f4795c06    (latest working commit)

make -j 4

make install

Get/install FIPS Object Module:

wget https://www.openssl.org/source/openssl-fips-2.0.16.tar.gz

cd openssl-fips-2.0.16; ./config

make

make install

Get/install the OpenSSL library:

wget https://www.openssl.org/source/openssl-1.0.2o.tar.gz

export CFLAGS='-fPIC'

./config shared fips

make depend

make

Build FIPS validation application(in DPDK examples directory):

meson configure -Dexamples=fips_validation x86_64-native-linuxapp-gcc
ninja -C x86_64-native-linuxapp-gcc

278.3. Test Case Common Step

Launch fips validation application command:

./x86_64-native-linuxapp-gcc/examples/dpdk-fips_validation [EAL options]
 -- --req-file FILE_PATH/FOLDER_PATH
 --rsp-file FILE_PATH/FOLDER_PATH
 [--cryptodev DEVICE_NAME] [--cryptodev-id ID] [--path-is-folder]

req-file: The path of the request file or folder, separated by path-is-folder option. rsp-file: The path that the response file or folder is stored. separated by path-is-folder option. cryptodev: The name of the target DPDK Crypto device to be validated. cryptodev-id: The id of the target DPDK Crypto device to be validated. path-is-folder: If presented the application expects req-file and rsp-file are folder paths.

Check test results by comparing the generated .rsp files with the reference .rsp/.fax files

278.4. Test Case 01: fips_aesni_mb_aes_test

Test Command:

./x86_64-native-linuxapp-gcc/examples/dpdk-fips_validation --socket-mem 2048,0 --legacy-mem -l 9,10,66 -n 6 --vdev crypto_aesni_mb_pmd_1 -- --req-file /root/FIPS/AES/req --rsp-file /root/FIPS/AES/resp --cryptodev crypto_aesni_mb_pmd_1 --path-is-folder --cryptodev-id 0 --self-test

278.5. Test Case 02: fips_aesni_mb_3des_test

Test Command:

./x86_64-native-linuxapp-gcc/examples/dpdk-fips_validation --socket-mem 2048,0 --legacy-mem -l 9,10,66 -n 6 --vdev crypto_aesni_mb_pmd_1 -- --req-file /root/FIPS/TDES/req --rsp-file /root/FIPS/TDES/resp --cryptodev crypto_aesni_mb_pmd_1 --path-is-folder --cryptodev-id 0 --self-test

278.6. Test Case 03: fips_aesni_mb_hmac_test

Test Command:

./x86_64-native-linuxapp-gcc/examples/dpdk-fips_validation --socket-mem 2048,0 --legacy-mem -l 9,10,66 -n 6 --vdev crypto_aesni_mb_pmd_1 -- --req-file /root/FIPS/HMAC/req --rsp-file /root/FIPS/HMAC/resp --cryptodev crypto_aesni_mb_pmd_1 --path-is-folder --cryptodev-id 0 --self-test

278.7. Test Case 04: fips_aesni_mb_ccm_test

Test Command:

./x86_64-native-linuxapp-gcc/examples/dpdk-fips_validation --socket-mem 2048,0 --legacy-mem -l 9,10,66 -n 6 --vdev crypto_aesni_mb_pmd_1 -- --req-file /root/FIPS/CCM/req --rsp-file /root/FIPS/CCM/resp --cryptodev crypto_aesni_mb_pmd_1 --path-is-folder --cryptodev-id 0 --self-test

278.8. Test Case 05: fips_aesni_mb_cmac_test

Test Command:

./x86_64-native-linuxapp-gcc/examples/dpdk-fips_validation --socket-mem 2048,0 --legacy-mem -l 9,10,66 -n 6 --vdev crypto_aesni_mb_pmd_1 -- --req-file /root/FIPS/CMAC/req --rsp-file /root/FIPS/CMAC/resp --cryptodev crypto_aesni_mb_pmd_1 --path-is-folder --cryptodev-id 0 --self-test

278.9. Test Case 06: fips_qat_gcm_test

Test Command:

./x86_64-native-linuxapp-gcc/examples/dpdk-fips_validation --socket-mem 2048,0 --legacy-mem -l 9,10,66 -n 6 -a 0000:1a:01.0 -- --req-file /root/FIPS/GCM/req --rsp-file /root/FIPS/GCM/resp --path-is-folder --cryptodev-id 0 --self-test

278.10. Test Case 07: fips_qat_aes_test

Test Command:

./x86_64-native-linuxapp-gcc/examples/dpdk-fips_validation --socket-mem 2048,0 --legacy-mem -l 9,10,66 -n 6 -a 0000:1a:01.0 -- --req-file /root/FIPS/AES/req --rsp-file /root/FIPS/AES/resp --path-is-folder --cryptodev-id 0 --self-test

278.11. Test Case 08: fips_qat_3des_test

Test Command:

./x86_64-native-linuxapp-gcc/examples/dpdk-fips_validation --socket-mem 2048,0 --legacy-mem -l 9,10,66 -n 6 -a 0000:1a:01.0 -- --req-file /root/FIPS/TDES/req --rsp-file /root/FIPS/TDES/resp --path-is-folder --cryptodev-id 0 --self-test

278.12. Test Case 09: fips_qat_hmac_test

Test Command:

./x86_64-native-linuxapp-gcc/examples/dpdk-fips_validation --socket-mem 2048,0 --legacy-mem -l 9,10,66 -n 6 -a 0000:1a:01.0 -- --req-file /root/FIPS/HMAC/req --rsp-file /root/FIPS/HMAC/resp --path-is-folder --cryptodev-id 0 --self-test

278.13. Test Case 10: fips_qat_ccm_test

Test Command:

./x86_64-native-linuxapp-gcc/examples/dpdk-fips_validation --socket-mem 2048,0 --legacy-mem -l 9,10,66 -n 6 -a 0000:1a:01.0 -- --req-file /root/FIPS/CCM/req --rsp-file /root/FIPS/CCM/resp --path-is-folder --cryptodev-id 0 --self-test

278.14. Test Case 11: fips_qat_cmac_test

Test Command:

./x86_64-native-linuxapp-gcc/examples/dpdk-fips_validation --socket-mem 2048,0 --legacy-mem -l 9,10,66 -n 6 -a 0000:1a:01.0 -- --req-file /root/FIPS/CMAC/req --rsp-file /root/FIPS/CMAC/resp --path-is-folder --cryptodev-id 0 --self-test

278.15. Test Case 12: fips_openssl_gcm_test

Test Command:

./x86_64-native-linuxapp-gcc/examples/dpdk-fips_validation --socket-mem 2048,0 --legacy-mem -l 9,10,66 -n 6 --vdev crypto_openssl_pmd_1 -- --req-file /root/FIPS/GCM/req --rsp-file /root/FIPS/GCM/resp --cryptodev crypto_openssl_pmd_1 --path-is-folder --cryptodev-id 0 --self-test

278.16. Test Case 13: fips_openssl_aes_test

Test Command:

./x86_64-native-linuxapp-gcc/examples/dpdk-fips_validation --socket-mem 2048,0 --legacy-mem -l 9,10,66 -n 6 --vdev crypto_openssl_pmd_1 -- --req-file /root/FIPS/AES/req --rsp-file /root/FIPS/AES/resp --cryptodev crypto_openssl_pmd_1 --path-is-folder --cryptodev-id 0 --self-test

278.17. Test Case 14: fips_openssl_3des_test

Test Command:

./x86_64-native-linuxapp-gcc/examples/dpdk-fips_validation --socket-mem 2048,0 --legacy-mem -l 9,10,66 -n 6 --vdev crypto_openssl_pmd_1 -- --req-file /root/FIPS/TDES/req --rsp-file /root/FIPS/TDES/resp --cryptodev crypto_openssl_pmd_1 --path-is-folder --cryptodev-id 0 --self-test

278.18. Test Case 15: fips_openssl_hmac_test

Test Command:

./x86_64-native-linuxapp-gcc/examples/dpdk-fips_validation --socket-mem 2048,0 --legacy-mem -l 9,10,66 -n 6 --vdev crypto_openssl_pmd_1 -- --req-file /root/FIPS/HMAC/req --rsp-file /root/FIPS/HMAC/resp --cryptodev crypto_openssl_pmd_1 --path-is-folder --cryptodev-id 0 --self-test

278.19. Test Case 16: fips_openssl_ccm_test

Test Command:

./x86_64-native-linuxapp-gcc/examples/dpdk-fips_validation --socket-mem 2048,0 --legacy-mem -l 9,10,66 -n 6 --vdev crypto_openssl_pmd_1 -- --req-file /root/FIPS/CCM/req --rsp-file /root/FIPS/CCM/resp --cryptodev crypto_openssl_pmd_1 --path-is-folder --cryptodev-id 0 --self-test

278.20. Test Case 17: fips_aesni_gcm_gcm_test

Test Command:

./x86_64-native-linuxapp-gcc/examples/dpdk-fips_validation --socket-mem 2048,0 --legacy-mem -l 9,10,66 -n 6 --vdev crypto_aesni_gcm_pmd_1 -- --req-file /root/FIPS/GCM/req --rsp-file /root/FIPS/GCM/resp --cryptodev crypto_aesni_gcm_pmd_1 --path-is-folder --cryptodev-id 0 --self-test

278.21. Test Case 18: fips_self-test

Test Command:

./x86_64-native-linuxapp-gcc/examples/dpdk-fips_validation -a 0000:1a:01.0 --socket-mem 2048,0 --vdev crypto_aesni_mb_pmd_1 -- --req-file /root/FIPS/AES/req --rsp-file ./root/FIPS/AES/resp --cryptodev crypto_aesni_mb_pmd_1 --path-is-folder --self-test

278.22. Test Case 19: fips_broken-test

Test Command:

./x86_64-native-linuxapp-gcc/examples/dpdk-fips_validation -a 0000:1a:01.0--socket-mem 2048,0 --vdev crypto_aesni_mb_pmd_1 -- --req-file /root/FIPS/AES/req --rsp-file ./root/FIPS/AES/resp --cryptodev crypto_aesni_mb_pmd_1 --path-is-folder --self-test --broken-test-id 15 --broken-test-dir dec