iPhone - iOS 使用 SecKeyGeneratePair 的 RSA 算法中的最小密钥大小(以位为单位)

iPhone - Minimum KeySize (InBits) in RSA Algorithm for iOS using SecKeyGeneratePair

ios 使用 SecKeyGeneratePair 的 RSA 算法中的最小密钥大小是多少。当我试图使它成为 256 时,它抛出错误 SecKeyGeneratePair 错误! -50 并且它与 512

一起工作正常

SecKeyGeneratePair documentation 中您可以看到它接受的最小 RSA 密钥大小是 512 位。

然而,512 位 RSA 密钥长期以来一直被认为是不安全的:在撰写本文时,NIST 建议的 RSA 密钥长度为 2048 位,请参阅“NIST Special Publication 800-57 Part 1: Recommendation for Key Management (Rev. 4)”第 53-56 页。

NIST 估计 2048 位 RSA 密钥应该可以使用到 2030 年。