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).

