關於SFTP功能

SFTP功能支援多種加密演算法,以確保檔案傳輸的安全。為了確保與各種伺服器相容,支援多種加密演算法,其中包括一些可能不符合目前安全最佳作法的演算法。

SFTP功能支援的加密演算法

下列加密演算法皆受支援。

Key exchange algorithms

  • curve25519-sha256
  • curve25519-sha256@libssh.org
  • ecdh-sha2-nistp256
  • ecdh-sha2-nistp384
  • ecdh-sha2-nistp521
  • diffie-hellman-group-exchange-sha256
  • diffie-hellman-group16-sha512
  • diffie-hellman-group18-sha512
  • diffie-hellman-group14-sha256
  • diffie-hellman-group14-sha1
  • diffie-hellman-group1-sha1
  • diffie-hellman-group-exchange-sha1

Host key algorithms

  • ecdsa-sha2-nistp256
  • ecdsa-sha2-nistp384
  • ecdsa-sha2-nistp521
  • ecdsa-sha2-nistp256-cert-v01@openssh.com
  • ecdsa-sha2-nistp384-cert-v01@openssh.com
  • ecdsa-sha2-nistp521-cert-v01@openssh.com
  • ssh-ed25519
  • ssh-rsa
  • ssh-dss

Ciphers

  • aes128-ctr
  • aes192-ctr
  • aes256-ctr
  • aes256-cbc
  • rijndael-cbc@lysator.liu.se
  • aes192-cbc
  • aes128-cbc
  • blowfish-cbc
  • arcfour128
  • arcfour
  • cast128-cbc
  • 3des-cbc

MACs

  • hmac-sha2-256
  • hmac-sha2-512
  • hmac-sha1
  • hmac-sha1-96
  • hmac-md5
  • hmac-md5-96
  • hmac-ripemd160
  • hmac-ripemd160@openssh.com

關於建議的加密演算法

根據NIST建議(NIST SP 800-57 Part 1, Revision 5)及相關安全性標準,建議使用下列加密演算法。

Key exchange algorithms

  • curve25519-sha256
  • curve25519-sha256@libssh.org
  • ecdh-sha2-nistp256
  • ecdh-sha2-nistp384
  • ecdh-sha2-nistp521
  • diffie-hellman-group-exchange-sha256
  • diffie-hellman-group16-sha512
  • diffie-hellman-group18-sha512

Host key algorithms

  • ecdsa-sha2-nistp256
  • ecdsa-sha2-nistp384
  • ecdsa-sha2-nistp521
  • ecdsa-sha2-nistp256-cert-v01@openssh.com
  • ecdsa-sha2-nistp384-cert-v01@openssh.com
  • ecdsa-sha2-nistp521-cert-v01@openssh.com
  • ssh-ed25519

Ciphers

  • aes128-ctr
  • aes192-ctr
  • aes256-ctr

MACs

  • hmac-sha2-256
  • hmac-sha2-512

關於已棄用的演算法

基於相容性理由,SFTP功能也支援下列演算法,但是根據NIST建議(NIST SP 800-57 Part 1, Revision 5)及相關安全性標準,這些演算法已經棄用,並可能在未來版本中移除。

Key exchange algorithms

  • diffie-hellman-group14-sha256
  • diffie-hellman-group14-sha1
  • diffie-hellman-group1-sha1
  • diffie-hellman-group-exchange-sha1

Host key algorithms

  • ssh-dss
  • ssh-rsa

Ciphers

  • rijndael-cbc@lysator.liu.se
  • blowfish-cbc
  • arcfour128
  • arcfour
  • cast128-cbc
  • 3des-cbc
  • aes128-cbc
  • aes192-cbc
  • aes256-cbc

MACs

  • hmac-sha1
  • hmac-sha1-96
  • hmac-md5
  • hmac-md5-96
  • hmac-ripemd160
  • hmac-ripemd160@openssh.com

連線相容性

SFTP功能的設計是為了平衡安全性與相容性。目前,我們出於以下原因支援已棄用的演算法,但我們可能會在未來版本中刪除這些演算法,以增強安全性。

  • 自由攝影師和獨立製作攝影師需要連接到由各種客戶營運的伺服器。
  • 必須維持與較舊系統和舊型伺服器之間的相容性。
  • 在伺服器端變更加密演算法設定很複雜,而且並非所有使用者都準備好改用安全的設定。
  • SFTP伺服器設定通常與其他安全服務共享,因此必須考量到對伺服器上其他服務的影響,而且變更可能不一定能夠輕易實現。
  • 為了確保在不同環境中的互通性,必須廣泛支援多種加密演算法。

SFTP連線期間所使用的加密演算法是與目的地伺服器自動協商決定的,因此取決於伺服器的設定。雖然我們意識到了安全風險,但目前我們優先考慮廣泛的相容性,以便滿足使用者的多樣化需求。

安全風險

使用棄用的演算法會增加SHA-1型演算法和DSA金鑰遭到中間人攻擊的風險、伺服器身分欺騙的風險,以及使用舊加密演算法(例如3DES和RC4變體)進行密碼分析的可能性,這可能會使傳輸中的資料外洩。

安全連線建議

使用SFTP用戶端功能時,請事先檢查您所連接的伺服器是否支援建議的加密演算法。我們建議您在伺服器端僅啟用建議的演算法,並停用不建議的演算法。


參考資料

  • Recommendation for Key Management, Special Publication 800-57 Part 1 Revision 5, NIST, 2020.
  • Transitioning the Use of Cryptographic Algorithms and Key Lengths, Special Publication 800-131A Revision 2, NIST, 2019.
  • Recommendation for Block Cipher Modes of Operation: The CMAC Mode for Authentication, Special Publication 800-38B, NIST, 2005 (includes updates as of 10/06/2016).
TP1002070631