如何将android密钥库签名算法名称:SHA1withRSA(弱)更新为强密钥

sej*_*ejn 3 android sha1 rsa android-security

如何将android密钥库签名算法名称:SHA1withRSA(弱)更新为强密钥

Signature algorithm name: SHA1withRSA (weak)
Subject Public Key Algorithm: 1024-bit RSA key (weak)
Version: 3

Warning:
The certificate uses the SHA1withRSA signature algorithm which is considered a security risk. This algorithm will be disabled in a future update.
The certificate uses a 1024-bit RSA key which is considered a security risk. This key size will be disabled in a future update.
Run Code Online (Sandbox Code Playgroud)

Maa*_*wes 5

正如警告所示,存在两个问题。不可能“将算法更新为强密钥”。

该证书使用SHA1withRSA签名算法,该算法被认为存在安全风险。该算法将在未来的更新中被禁用。

这是因为 SHA-1 的抗碰撞性已经被破坏。使用 SHA-256 ( "SHA256withRSA") 或 SHA-512 ( "SHA512withRSA") 签名来解决此问题。您还可以查看 PSS 签名,尽管“SHA256withRSA”实现的 PKCS#1 v1.5 签名格式仍然被认为是安全的。

该证书使用 1024 位 RSA 密钥,这被认为存在安全风险。此密钥大小将在未来的更新中禁用。

要获得 128 位安全性,需要升级到 3072 位 RSA 密钥对。这意味着重新生成密钥对,并且可能还请求新的证书。2048 位 RSA 密钥仍然普遍使用,但我只会出于向后兼容性的原因而使用这个最小密钥大小(或者,实际上,如果更大的密钥大小对您或您的 CA 都不可行)。