支持弱算法或受损算法
【Support for weak or compromised algorithms】
node:crypto 模块仍然支持一些已经被攻破的算法,这些算法不推荐使用。该 API 还允许使用密钥长度较小的密码和哈希,这些也过于薄弱,不适合安全使用。
【The node:crypto module still supports some algorithms which are already
compromised and are not recommended for use. The API also allows
the use of ciphers and hashes with a small key size that are too weak for safe
use.】
用户应根据其安全需求,自行负责选择加密算法和密钥长度。
【Users should take full responsibility for selecting the crypto algorithm and key size according to their security requirements.】
根据NIST SP 800-131A的建议:
【Based on the recommendations of NIST SP 800-131A:】
- 在需要抗冲突性的场合(如数字签名),MD5 和 SHA-1 已不再可接受。
- 建议 RSA、DSA 和 DH 算法使用的密钥至少为 2048 位,而 ECDSA 和 ECDH 曲线的密钥至少为 224 位,以确保在未来几年内安全使用。
modp1、modp2和modp5的 DH 组密钥大小小于 2048 位,不推荐使用。
有关其他建议和详细信息,请参阅参考资料。
【See the reference for other recommendations and details.】
一些已知存在弱点且在实际中几乎无关紧要的算法只能通过 传统供应商 提供,而 传统供应商 默认情况下未启用。
【Some algorithms that have known weaknesses and are of little relevance in practice are only available through the legacy provider, which is not enabled by default.】