问题原文
原帖链接 · 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.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
