关于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).
TP1002071131

