支持弱算法或受损算法


【Support for weak or compromised algorithms】

node:crypto 模块仍然支持一些已被破译且目前不推荐使用的算法。该 API 还允许使用密钥过小的加密算法和哈希算法,这些算法过于薄弱,无法安全使用。

【The node:crypto module still supports some algorithms which are already compromised and are not currently 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 位,以确保在未来几年内安全使用。
  • modp1modp2modp5 的 DH 组密钥大小小于 2048 位,不推荐使用。

有关其他建议和详细信息,请参阅参考资料。

【See the reference for other recommendations and details.】