Take the 2-minute tour ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

is there any benchmark for RSA 4096bit long keys on general computers ? how many encryption decryption possible per second ? all benchmarks only show 1024 and 2048 benchmarks :(

share|improve this question
    
As a rule of thumb, the private key operation will be 8 times and the public key operation 4 times as expensive than what RSA 2048 needs. –  CodesInChaos Dec 7 '12 at 12:19
    
But if you want high performance and high security, why RSA? You could use a ~256 bit (or if paranoid ~512 bit) elliptic curve. That's pretty fast and offers a security level of 128 bit (or 256 bit for a 512 bit curve). –  CodesInChaos Dec 7 '12 at 12:21
    
@CodesInChaos what is elliptic curve relation to RSA? –  mary Dec 7 '12 at 12:49
    
ECDH is a protocol not a key like RSA to distribute publicly .. –  mary Dec 7 '12 at 13:07
    
Implementing asymmetric encryption on top of ECDH is trivial. ECDH can do almost everything RSA encryption can do. Just like with RSA you have a key-pair, which can be long term, and can be used for encryption. –  CodesInChaos Dec 7 '12 at 13:15
show 5 more comments

2 Answers 2

up vote 3 down vote accepted

A "general computer" simply doesn't exist, test for yourself with this command:

openssl speed rsa

As an example here is the output on a Mac Pro 2007 withIntel Xeon 5130:

Doing 512 bit private rsa's for 10s: 67450 512 bit private RSA's in 9.95s
Doing 512 bit public rsa's for 10s: 961891 512 bit public RSA's in 9.94s
Doing 1024 bit private rsa's for 10s: 19914 1024 bit private RSA's in 9.93s
Doing 1024 bit public rsa's for 10s: 343029 1024 bit public RSA's in 9.98s
Doing 2048 bit private rsa's for 10s: 3101 2048 bit private RSA's in 10.00s
Doing 2048 bit public rsa's for 10s: 100363 2048 bit public RSA's in 10.00s
Doing 4096 bit private rsa's for 10s: 430 4096 bit private RSA's in 9.95s
Doing 4096 bit public rsa's for 10s: 27080 4096 bit public RSA's in 9.93s
OpenSSL 1.0.1 14 Mar 2012
built on: Tue Aug 21 05:18:48 UTC 2012
options:bn(64,64) rc4(16x,int) des(idx,cisc,16,int) aes(partial) blowfish(idx) 
compiler: cc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -DTERMIO -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wa,--noexecstack -Wall -DOPENSSL_NO_TLS1_2_CLIENT -DOPENSSL_MAX_TLS1_2_CIPHER_LENGTH=50 -DMD32_REG_T=int -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM
                  sign    verify    sign/s verify/s
rsa  512 bits 0.000148s 0.000010s   6778.9  96769.7
rsa 1024 bits 0.000499s 0.000029s   2005.4  34371.6
rsa 2048 bits 0.003225s 0.000100s    310.1  10036.3
rsa 4096 bits 0.023140s 0.000367s     43.2   2727.1

And here is the same command on a slightly more up-to-date mobile (aka laptop) CPU (Intel i5 2540M)

Doing 512 bit private rsa's for 10s: 178265 512 bit private RSA's in 10.00s
Doing 512 bit public rsa's for 10s: 2244112 512 bit public RSA's in 10.01s
Doing 1024 bit private rsa's for 10s: 52008 1024 bit private RSA's in 10.00s
Doing 1024 bit public rsa's for 10s: 792898 1024 bit public RSA's in 10.01s
Doing 2048 bit private rsa's for 10s: 7216 2048 bit private RSA's in 10.00s
Doing 2048 bit public rsa's for 10s: 232383 2048 bit public RSA's in 10.01s
Doing 4096 bit private rsa's for 10s: 1012 4096 bit private RSA's in 10.01s
Doing 4096 bit public rsa's for 10s: 62854 4096 bit public RSA's in 10.01s
OpenSSL 1.0.1e 11 Feb 2013
built on: Mon Jul 15 12:44:45 UTC 2013
options:bn(64,64) rc4(16x,int) des(idx,cisc,16,int) aes(partial) blowfish(idx) 
compiler: cc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -DTERMIO -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wa,--noexecstack -Wall -DOPENSSL_NO_TLS1_2_CLIENT -DOPENSSL_MAX_TLS1_2_CIPHER_LENGTH=50 -DMD32_REG_T=int -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM
                  sign    verify    sign/s verify/s
rsa  512 bits 0.000056s 0.000004s  17826.5 224187.0
rsa 1024 bits 0.000192s 0.000013s   5200.8  79210.6
rsa 2048 bits 0.001386s 0.000043s    721.6  23215.1
rsa 4096 bits 0.009891s 0.000159s    101.1   6279.1
share|improve this answer
add comment

That might help you :

Benchmark

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.