大网数据广告活动
网站运营与故障问答

Performance: 4096 Bit RSA-Key compared to 2048 bit RSA-Key

· 52CE 我爱测

Is there a comparison between 4096 Bit RSA-Key and a 2048 Bit RSA-Key? I'd like to know what impact on performance it has, if I'm choosing a 4096-Bit key for ssl-encryption. Is there any info which says, how much more CPU usage w…

问题原文

原帖链接 · jsterr · CC BY-SA 3.0

Is there a comparison between 4096 Bit RSA-Key and a 2048 Bit RSA-Key? I'd like to know what impact on performance it has, if I'm choosing a 4096-Bit key for ssl-encryption. Is there any info which says, how much more CPU usage will be required if a 4096 bit key is used instead of a 2048 bit one?

社区高分解答

原帖链接 · Tom Brossman · CC BY-SA 4.0

Use OpenSSL's speed command to benchmark the two types and compare results. Here's an example command to run on the server to compare only the key types and sizes you mention:

openssl speed rsa2048 rsa4096

For reference, here are some benchmark results from a modest VPS:

                  sign    verify    sign/s verify/s
rsa 2048 bits 0.000685s 0.000032s   1459.1  31629.7
rsa 4096 bits 0.007574s 0.000113s    132.0   8851.0

As you can see, doubling the certificate key size places an enormous additional burden on the server's CPU and is many times slower. Avoid 4096 bit keys unless you have a specific threat model which requires their use.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2015-09-09)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0 / CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。