FIPS 140 小註解

FIPS [1] 是一個安全規範, 全名為 Federal Information Processing Standards, 望文生義是個美國聯邦的規格. FIPS 基於 ISO 19790 [2] 的規範, 家族有 FIPS-1, FIPS-2, FIPS-3 等幾個版本. FIPS-1 和 FIPS-2 分別誕生於 1994 年和 2001 年, 算是老古董. FIPS-2 現已停止受理 [9]. FIPS-3 是 2019 年才出來的新標準, 將全面取代 FIPS-2.

FIPS 規範的不只是加密模組, 還包括文件, 和 source code 裡面的註解. FIPS-1 的涵蓋面包括: exact module name, hardware, software, firmware, and/or applet version numbers. 這些部分不能被竄改, 但沒有保證一定安全. FIPS-2 和以上的 level 會包含 operating platform.

FIPS-2 裡面又分成 4 個 level:

  • Level 1 可產品化的基本款.
  • Level 2 加上 physical tamper-evidence 和 role-based authentication.
  • Level 3 加上 physical tamper-resistance, identity-based authentication, 以及規定 “critical security parameters" 的 API 要和普通 API 分開 (physical or logical).
  • Level 4 需要硬體保護 (physical), 並且通過攻擊測試.

FIPS-3 除了參考 ISO 19790, 還參考 ISO 24759 [3]. 在 FIPS-2 level 2 當中, 它只提到要留下攻擊的證據, 在 level 3 才需要抵抗. 但打不過也沒關係. FIPS-3 提供一個在執行時自測的方式 (self-tests are only performed if used) [4]. 既然能在 run-time 跑, 它的演算法必須很快.

如果通過 FIPS 認證會拿到一個標章. Goole 後就會發現這 logo 居然可以有很多不同的長相. WolfSSL [4] 說: 號稱 FIPS-140 ready 或是 Design for FIPS 都是混淆視聽, 正版 logo 要通過NIST [5] 認證才算數. 所以標準長相是下圖的前兩個和右下黑白那個 (140-3 和 140-2) [6].

無論是 module 或 product 都可以過 FIPS-140 認證 (Algorithm 走 CAVP [10]). 對於 product 來說, 就是聲明 XX module inside. 目前排隊進名單的廠商非常踴躍, 以 processor 週邊硬體來說, 名單中有 CPU 兩大品牌 Intel 和 AMD 的 Cryptographic CoProcessor, 軟體有 RedHat Linux 的  Crypto API Cryptographic Module. Apple 則是同時有 Intel 版和自家 A 系列 CPU 的 corecrypto Module 都在待測之中.

這個 FIPS 認證流程叫做 CMVP (Cryptographic Module Validation Program), 想要 NIST review 要付工本費 (Cost Recovery fee). 但待測名單很長, 有 351 個 module 在等待測試的名單[7]. 已經過認證的只有 135 個 module [8]. 不知道 NIST 有沒有 super hot run 呢? 還好 Android Kernel Cryptographic Module 已經在 FIPS 140-3 Review Pending 名單之中, 所以只要用對 kernel, 就可以輕鬆上車.

[Ref]

  1. https://en.wikipedia.org/wiki/FIPS_140
  2.  ISO/IEC 19790:2012(E) Information technology — Security techniques — Security requirements for cryptographic modules
  3.  ISO/IEC 24759:2017(E) Information technology — Security techniques — Test requirements for cryptographic modules.
  4. WOLFCRYPT FIPS 140-2 and FIPS 140-3
  5. The National Institute of Standards and Technology (NIST) 
  6. https://csrc.nist.gov/Projects/cryptographic-module-validation-program/use-of-fips-140-2-logo-and-phrases
  7. https://csrc.nist.gov/Projects/cryptographic-module-validation-program/modules-in-process/Modules-In-Process-List
  8. https://csrc.nist.gov/Projects/cryptographic-module-validation-program/modules-in-process/IUT-List
  9. https://www.informationsecurity.com.tw/article/article_detail.aspx?aid=8977
  10. Algorithm 的驗證走 CAVP (Cryptographic Algorithm Validation Program)