推荐的 GnuPG 密钥大小和类型?

发布于 2024-07-18 05:01:37 字数 393 浏览 8 评论 0原文

GNU 隐私保护实用介绍Windows 推荐 DSA 和 ElGamal,但我想知道 RSA 目前是否足够好,可以使用,如果可以,我应该使用多大的最小密钥大小? 是否可以使用 SHA-256 进行签名(为了与电子邮件客户端兼容)?

另外,除了 e-ignite:密钥类型 之外,您可以指出该主题的其他来源?

A Practical Introduction to GNU Privacy Guard in Windows recommends DSA and ElGamal, but I would like to know if RSA is good enough to use these days, and if so, what minimum key size should I use? Is it ok to use SHA-256 for signing (for compatibility with e-mail clients)?

Also, beside e-ignite: Key Types, can you point to other sources for this subject?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

怎樣才叫好 2024-07-25 05:01:37

如今 RSA/DSA 的最小值实际上是 1024 位,因此椭圆曲线的使用越来越广泛,因为它们速度更快并且使用更短的密钥。

要具有与 AES256 类似的安全性,您将需要至少 3072 位(384 字节)密钥...

现在使用证书的电子邮件客户端 - 所以它是单独的东西(X.509),但对于与 RSA/DSA 一起使用,最常见的选项是 SHA -1(现在有点弱)。

我建议研究:

RSA/DSA minimum today is 1024 bit actually, so Elleptical Curves becoming more in use since they are faster and using shorter keys.

To have a similar security as AES256 you will need at least 3072 bit (384 bytes) key...

Email clients using certificates nowadays - so it's separate thing (X.509), but for using with RSA/DSA most common option is SHA-1 (somewhat weak now).

I recommend study of:

听你说爱我 2024-07-25 05:01:37

我知道这个话题已经很老了,但此时 DSA 1024 被认为太弱了,SHA-1 也是如此。
您应该使用 RSA 2048(用于签名和加密)和 SHA256(用于摘要)。 通常,使用的对称算法是 AES256,这已经足够了。

加密时,GPG 对数据进行 gzip 压缩,创建 AES256 密钥并用它加密数据。 然后,它使用接收方 RSA 或 ElGamal 公钥对 AES 密钥进行加密,并将加密的 AES 密钥 + 加密的数据打包发送。

根据当时预测的计算机能力,据说 RSA 2048 可以保护数据到 2015 年左右,RSA 4096 可以保护数据到 2020 年。 (我不太确定日期,但 4096 位密钥比 2048 位密钥更难破解是合乎逻辑的)

I know the topic is old, but at this time, DSA 1024 is considered to be too weak, as is SHA-1.
You should use RSA 2048 (for signing and encryption) and SHA256 (for digest). Normally, the symmetric algorithm used is AES256, which is good enough.

When encrypting, GPG gzips the data, creates an AES256 key and encrypts the data with it. It then encrypts the AES key with the recipient RSA or ElGamal public key and sends the encrypted AES key + the encrypted data in a pack.

RSA 2048 is said to protect data until 2015 or so, and RSA 4096 would protect data until 2020, based on the predicted computer power at that time. (I'm not totally sure about the dates, but it is logical that a 4096 bit key would be harder to crack than a 2048 bit one)

停滞 2024-07-25 05:01:37

SHA-1 很弱,但尚未完全破解。 SHA-256 只是 SHA-1 的扩展,目前它可能也比最初想象的要弱(考虑到同样的弱点被认为会影响整个 sha 家族),但它仍然需要大量的计算能力才能获得匹配。

无论如何,就数字签名而言,这不再是一个问题,因为这只是最后一步。 还是先有加密。

至于密钥大小,无论是 RSA 还是 ElGammel/DSA,我现在无论如何都会推荐 2048 位密钥。
区别在于 RSA 基于阶乘数学,而 ElGammel/DSA 基于对数数学,两者都不一定被认为更好或更差(尽管我认为基于椭圆曲线的东西与对数东西密切相关)。

SHA-1 is weak, but not fully broken. SHA-256 is just an extension to SHA-1, currently it's probably also weaker than first thought (given the same weakness is thought to affect the whole sha family), however it still requires a lot of computing power to get a match.

Anyway, in terms of digital signatures, this becomes less of a problem due to the way that's just the final step. There is still encryption first.

As for key size whether RSA or ElGammel/DSA I would recommend 2048 bit keys anyway now.
the difference is RSA is based on factorial math while ElGammel/DSA is based on logarithmic math, neither can necessarily be considered better or worse (to not though i that elliptic curve based stuff is closely related to the logarithms stuff).

白鸥掠海 2024-07-25 05:01:37

我推荐 RSA/RSA 4096 与 AES256 和 SHA512

I would recommend RSA/RSA 4096 with AES256 and SHA512

败给现实 2024-07-25 05:01:37

GPG 只能使用 RSA 进行签名,不能加密。 默认值为 DSA/Elgamal 1024/2048。 Elgamal 默认密钥长度曾经是 1024,但一定有人认为这不够安全。 GPG 邮件列表上的人说大多数人不需要超过 2048。

我不太清楚各种签名算法。 我知道 SHA-1 存在问题,但这与 DSA/RSA 有何关系?

多年来我一直拥有使用上述默认值的相同密钥。 我不经常使用它,但我想知道生成一个新的是否合理。

GPG can only use RSA for signing, not encryption. The default is DSA/Elgamal 1024/2048. The Elgamal default key length used to be 1024, but someone must have decided that was not secure enough. People on the GPG mailing list say that most people shouldn't need more than 2048.

I'm less clear on the various signing algorithms. I know there are issues with SHA-1, but how does this relate to DSA/RSA?

I've had the same key for years that uses the above default values. I don't use it much, but am wondering whether generating a new one is justified.

一口甜 2024-07-25 05:01:37

如果您不知道,您应该使用 GPG 默认值! (这就是作者的意图。)

If you don't know, you should use the GPG defaults! (This is how the authors have intended it.)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文