Security

淺談 Password-Based Authentication 密碼認證現代趨勢

Authentication(認證)在 Access control 中,是相當重要的階段。 Authentication 的目的是證明用戶或應用程序確實是該用戶或該應用程序所聲稱的真實身份。

一般而言可透過下列 factors (要素) 進行認證:

  • Ownership-based authentication (你有什麼)
    • 實體物品, 如鑰匙,銀行卡
  • Characteristic-based authentication (你是什麼)
    • 多為生物識別, 如指紋,眼虹膜,語音。
  • Knowledge-based authentication (你知道什麼)
    • 只有特定用戶知道的資訊,如密碼,PIN code
  • Location-based authentication (你在哪裡)
    • 與特定主機的連接或利用GPS信號來識別位置

為了加強資訊安全,現今許多系統在登入機制會提供 2-step authentication,以降低風險

所謂的 2-step authentication,意即用戶或該應用程序要通過兩次的認證機制之後,才能得到授權,存取相關資源。

這邊要注意的是, 2-step authentication 不等同於 2-factor authentication.

說明如下:

  • 2-step authentication
    • 用戶或該應用程序要通過兩次的認證機制之後,才能得到授權,存取相關資源。
    • 這兩次的認證內容可使用同類型的要素。如第一次輸入密碼,第二次輸入 PIN code,這兩次要素同屬為 Knowledge-based authentication (你知道什麼)。
  • 2-factor authentication
    • 用戶或該應用程序要通過兩次的認證機制,且兩次的認證要素類型需相異,才能得到授權,存取相關資源。
    • 這兩次的認證內容需使用不同類型要素。如第一次輸入密碼,第二次輸入指紋。這兩次要素分屬為 Knowledge-based authentication (你知道什麼) 以及 Characteristic-based authentication (你是什麼)。

一般而言,最常見的認證要素類型還是使用 Password-Based authentication。

常見密碼相關規則為:

  • 定期修改 (如: 每三個月)。
  • 一定長度以上 (如:大於八個字元)。
  • 使用數字、大小寫字母及符號(例如:# % $ @…)混合組成的密碼字串。

早期的規範, 如 SP 800-63-1 [1] 以及 ISO-27001/2:2013 [2] 皆有類似的條文。

客觀來說,應用上述密碼規則會加強安全強度。但隨著時間的演進,實際上使用發現不一定安全。主要是這些複雜的密碼規則讓人難以記住,造成難以符合使用者心理接受度 (Principle of Psychological Acceptability) [3]。難以記住的密碼往往會誘使人把密碼寫在貼在螢幕上的便利貼中,反而失去密碼認證的保護用意。

故近幾年的規範改版後的內容,主要以夠長, 好記住, 且不容易遭受字典攻擊 [5]的基礎概念來敘述密碼規則需求。

在 2017 年發行的 SP 800-63B “Digital Identity Guidelines – Authentication and Lifecycle Management" [6] 中,除非必要 (例如: 確定遭受攻擊) ,否則不需定期修改密碼。

“Verifiers SHOULD NOT require memorized secrets to be changed arbitrarily (e.g., periodically). However, verifiers SHALL force a change if there is evidence of compromise of the authenticator.”

至於密碼字串的組成,不應對內容強加其他組成規則(例如,要求混合使用不同字符類型或禁止連續重複字符)。

Verifiers SHOULD NOT impose other composition rules (e.g., requiring mixtures of different character types or prohibiting consecutively repeated characters) for memorized secrets.

尚在 draft version 的 ISO-27001/2 也將原本需定期修改的密碼規則移除,建議密碼以好記、不易被猜到、不容易遭受字典攻擊、且長度夠長為主。

期待之後的系統能採用這些新型的密碼建議規則。


References:

[1] https://csrc.nist.gov/publications/detail/sp/800-63/1/archive/2011-12-12

[2] https://www.iso.org/standard/54534.html

[3] https://www.us-cert.gov/bsi/articles/knowledge/principles/psychological-acceptability

[4] https://csrc.nist.gov/publications/detail/sp/800-63/3/final

[5] https://en.wikipedia.org/wiki/Dictionary_attack

[6] https://pages.nist.gov/800-63-3/sp800-63b.html

 

發表迴響