RSA2048基础知识

1. RSA家族

在数学上,RSA numbers是一系列大的semiprimes(半素数,仅能分解为两个素数因子。)截止到2019年11月,下列表中的20个(总共54个)RSA数值已被成功分解,分别是:RSA-100到RSA-230的16个数,以及从RSA-768、RSA-704、RSA-640以及RSA-240。
在这里插入图片描述

2. RSA2048

RSA-2048具有617个十进制数字,共2048bits。是目前最大的RSA数字,有20万美金的悬赏用于对RSA-2048的因式分解。

RSA-2048 = 2519590847565789349402718324004839857142928212620403202777713783604366202070
           7595556264018525880784406918290641249515082189298559149176184502808489120072
           8449926873928072877767359714183472702618963750149718246911650776133798590957
           0009733045974880842840179742910064245869181719511874612151517265463228221686
           9987549182422433637259085141865462043576798423387184774447920739934236584823
           8242811981638150106748104516603773060562016196762561338441436038339044149526
           3443219011465754445417842402092461651572335077870774981712577246796292638635
           6373289912154831438167899885040445364023527381951378636564391212010397122822
           120720357

3. RSA-2048 vs SHA-256 vs AES-256

RSA-2048:为非对称成加密算法,发送方和接收方均各有一组公钥和私钥key。因存在幂运算,其计算速度远远小于AES-256。可用于对小量数据的加密,如用于对密钥key的加密。是密钥交换协议的重要组成部分。采用公钥进行加密,采用私钥进行解密。
SHA-256:不是加解密算法,是一个安全Hash算法。可用于确认数据的完整性。可称为one way encryption,不存在相应的解密算法。
AES-256:为对称块加密算法,用于消息的加解密。可对大量数据同时进行加解密。计算速度快于RSA。加密和解密使用相同的密钥key。

在文件传输中,为保证数据的完整性和安全性,常将RSA-2048、SHA-256和AES-256组合使用:

  • 1) 生成随机AES-256 key;
  • 2)计算文件明文的SHA-256摘要;
  • 3)使用AES-256对文件进行加密;
  • 4)对加密后的文件进行前置操作:
  • 4.1)用接收方的RSA-2048公钥对AES-256 key进行加密,保证仅有指定的接收方才能恢复相应的AES-256 key;
  • 4.2)SHA-256摘要,接收方可用于判断确认所接收解密的文件是正确的。

4. 加密算法性能

各加密算法的性能,可通过openssl speed来粗略查看。

# openssl speed
Doing md4 for 3s on 16 size blocks: 11192370 md4's in 2.99s
Doing md4 for 3s on 64 size blocks: 9789523 md4's in 2.99s
Doing md4 for 3s on 256 size blocks: 6405243 md4's in 2.99s
Doing md4 for 3s on 1024 size blocks: 2688333 md4's in 2.99s
Doing md4 for 3s on 8192 size blocks: 420011 md4's in 3.00s
Doing md5 for 3s on 16 size blocks: 8369385 md5's in 2.99s
Doing md5 for 3s on 64 size blocks: 6858297 md5's in 2.99s
Doing md5 for 3s on 256 size blocks: 4233567 md5's in 2.98s
Doing md5 for 3s on 1024 size blocks: 1690176 md5's in 2.99s
Doing md5 for 3s on 8192 size blocks: 249397 md5's in 2.99s
Doing hmac(md5) for 3s on 16 size blocks: 7193940 hmac(md5)'s in 2.99s
Doing hmac(md5) for 3s on 64 size blocks: 6184652 hmac(md5)'s in 3.00s
Doing hmac(md5) for 3s on 256 size blocks: 3965048 hmac(md5)'s in 3.00s
Doing hmac(md5) for 3s on 1024 size blocks: 1638513 hmac(md5)'s in 3.00s
Doing hmac(md5) for 3s on 8192 size blocks: 253106 hmac(md5)'s in 2.99s
Doing sha1 for 3s on 16 size blocks: 10132228 sha1's in 3.00s
Doing sha1 for 3s on 64 size blocks: 8146653 sha1's in 3.00s
Doing sha1 for 3s on 256 size blocks: 5009608 sha1's in 3.00s
Doing sha1 for 3s on 1024 size blocks: 2002856 sha1's in 3.00s
Doing sha1 for 3s on 8192 size blocks: 318337 sha1's in 3.00s
Doing sha256 for 3s on 16 size blocks: 12672160 sha256's in 3.00s
Doing sha256 for 3s on 64 size blocks: 7701824 sha256's in 3.00s
Doing sha256 for 3s on 256 size blocks: 3407309 sha256's in 2.99s
Doing sha256 for 3s on 1024 size blocks: 1031131 sha256's in 2.99s
Doing sha256 for 3s on 8192 size blocks: 146562 sha256's in 3.00s
Doing sha512 for 3s on 16 size blocks: 9915608 sha512's in 3.00s
Doing sha512 for 3s on 64 size blocks: 9940546 sha512's in 3.00s
Doing sha512 for 3s on 256 size blocks: 4044246 sha512's in 2.98s
Doing sha512 for 3s on 1024 size blocks: 1468656 sha512's in 2.99s
Doing sha512 for 3s on 8192 size blocks: 210842 sha512's in 2.99s
Doing whirlpool for 3s on 16 size blocks: 6944980 whirlpool's in 3.00s
Doing whirlpool for 3s on 64 size blocks: 3889156 whirlpool's in 3.00s
Doing whirlpool for 3s on 256 size blocks: 1637085 whirlpool's in 3.00s
Doing whirlpool for 3s on 1024 size blocks: 497989 whirlpool's in 3.00s
Doing whirlpool for 3s on 8192 size blocks: 66194 whirlpool's in 3.00s
Doing rmd160 for 3s on 16 size blocks: 6639822 rmd160's in 3.00s
Doing rmd160 for 3s on 64 size blocks: 4405953 rmd160's in 3.00s
Doing rmd160 for 3s on 256 size blocks: 2173709 rmd160's in 2.99s
Doing rmd160 for 3s on 1024 size blocks: 711907 rmd160's in 3.00s
Doing rmd160 for 3s on 8192 size blocks: 97819 rmd160's in 3.00s
Doing rc4 for 3s on 16 size blocks: 104398752 rc4's in 3.00s
Doing rc4 for 3s on 64 size blocks: 31545790 rc4's in 3.00s
Doing rc4 for 3s on 256 size blocks: 6877576 rc4's in 3.00s
Doing rc4 for 3s on 1024 size blocks: 1645193 rc4's in 3.00s
Doing rc4 for 3s on 8192 size blocks: 203294 rc4's in 3.00s
Doing des cbc for 3s on 16 size blocks: 14769376 des cbc's in 2.99s
Doing des cbc for 3s on 64 size blocks: 3826188 des cbc's in 3.00s
Doing des cbc for 3s on 256 size blocks: 968856 des cbc's in 3.00s
Doing des cbc for 3s on 1024 size blocks: 243358 des cbc's in 3.00s
Doing des cbc for 3s on 8192 size blocks: 30414 des cbc's in 3.00s
Doing des ede3 for 3s on 16 size blocks: 5716671 des ede3's in 3.00s
Doing des ede3 for 3s on 64 size blocks: 1445072 des ede3's in 3.00s
Doing des ede3 for 3s on 256 size blocks: 360944 des ede3's in 2.99s
Doing des ede3 for 3s on 1024 size blocks: 90732 des ede3's in 3.00s
Doing des ede3 for 3s on 8192 size blocks: 11334 des ede3's in 3.00s
Doing aes-128 cbc for 3s on 16 size blocks: 24631877 aes-128 cbc's in 3.00s
Doing aes-128 cbc for 3s on 64 size blocks: 7235641 aes-128 cbc's in 3.00s
Doing aes-128 cbc for 3s on 256 size blocks: 1872315 aes-128 cbc's in 3.00s
Doing aes-128 cbc for 3s on 1024 size blocks: 1045226 aes-128 cbc's in 3.00s
Doing aes-128 cbc for 3s on 8192 size blocks: 130959 aes-128 cbc's in 2.97s
Doing aes-192 cbc for 3s on 16 size blocks: 21333727 aes-192 cbc's in 2.99s
Doing aes-192 cbc for 3s on 64 size blocks: 5870946 aes-192 cbc's in 3.00s
Doing aes-192 cbc for 3s on 256 size blocks: 1568693 aes-192 cbc's in 3.00s
Doing aes-192 cbc for 3s on 1024 size blocks: 885877 aes-192 cbc's in 3.00s
Doing aes-192 cbc for 3s on 8192 size blocks: 112634 aes-192 cbc's in 3.00s
Doing aes-256 cbc for 3s on 16 size blocks: 18663671 aes-256 cbc's in 3.00s
Doing aes-256 cbc for 3s on 64 size blocks: 5212481 aes-256 cbc's in 3.00s
Doing aes-256 cbc for 3s on 256 size blocks: 1337117 aes-256 cbc's in 2.99s
Doing aes-256 cbc for 3s on 1024 size blocks: 770637 aes-256 cbc's in 3.00s
Doing aes-256 cbc for 3s on 8192 size blocks: 96435 aes-256 cbc's in 3.00s
Doing aes-128 ige for 3s on 16 size blocks: 25451038 aes-128 ige's in 3.00s
Doing aes-128 ige for 3s on 64 size blocks: 6981651 aes-128 ige's in 3.00s
Doing aes-128 ige for 3s on 256 size blocks: 1760954 aes-128 ige's in 3.00s
Doing aes-128 ige for 3s on 1024 size blocks: 441065 aes-128 ige's in 3.00s
Doing aes-128 ige for 3s on 8192 size blocks: 55695 aes-128 ige's in 3.00s
Doing aes-192 ige for 3s on 16 size blocks: 21785823 aes-192 ige's in 3.00s
Doing aes-192 ige for 3s on 64 size blocks: 5886243 aes-192 ige's in 3.00s
Doing aes-192 ige for 3s on 256 size blocks: 1477620 aes-192 ige's in 3.00s
Doing aes-192 ige for 3s on 1024 size blocks: 373844 aes-192 ige's in 3.00s
Doing aes-192 ige for 3s on 8192 size blocks: 46697 aes-192 ige's in 2.99s
Doing aes-256 ige for 3s on 16 size blocks: 19001164 aes-256 ige's in 3.00s
Doing aes-256 ige for 3s on 64 size blocks: 5096041 aes-256 ige's in 3.00s
Doing aes-256 ige for 3s on 256 size blocks: 1279082 aes-256 ige's in 3.00s
Doing aes-256 ige for 3s on 1024 size blocks: 322624 aes-256 ige's in 3.00s
Doing aes-256 ige for 3s on 8192 size blocks: 39879 aes-256 ige's in 3.00s
Doing ghash for 3s on 16 size blocks: 110084604 ghash's in 3.00s
Doing ghash for 3s on 64 size blocks: 107279204 ghash's in 3.00s
Doing ghash for 3s on 256 size blocks: 75513491 ghash's in 3.00s
Doing ghash for 3s on 1024 size blocks: 25529869 ghash's in 3.00s
Doing ghash for 3s on 8192 size blocks: 3519625 ghash's in 3.00s
Doing camellia-128 cbc for 3s on 16 size blocks: 20552757 camellia-128 cbc's in 2.99s
Doing camellia-128 cbc for 3s on 64 size blocks: 8245095 camellia-128 cbc's in 3.00s
Doing camellia-128 cbc for 3s on 256 size blocks: 2372390 camellia-128 cbc's in 3.00s
Doing camellia-128 cbc for 3s on 1024 size blocks: 615912 camellia-128 cbc's in 3.00s
Doing camellia-128 cbc for 3s on 8192 size blocks: 76875 camellia-128 cbc's in 3.00s
Doing camellia-192 cbc for 3s on 16 size blocks: 17667431 camellia-192 cbc's in 3.00s
Doing camellia-192 cbc for 3s on 64 size blocks: 6421025 camellia-192 cbc's in 3.00s
Doing camellia-192 cbc for 3s on 256 size blocks: 1781356 camellia-192 cbc's in 3.00s
Doing camellia-192 cbc for 3s on 1024 size blocks: 458733 camellia-192 cbc's in 3.00s
Doing camellia-192 cbc for 3s on 8192 size blocks: 57112 camellia-192 cbc's in 3.00s
Doing camellia-256 cbc for 3s on 16 size blocks: 17482815 camellia-256 cbc's in 3.00s
Doing camellia-256 cbc for 3s on 64 size blocks: 6399505 camellia-256 cbc's in 2.99s
Doing camellia-256 cbc for 3s on 256 size blocks: 1763399 camellia-256 cbc's in 3.00s
Doing camellia-256 cbc for 3s on 1024 size blocks: 459114 camellia-256 cbc's in 3.00s
Doing camellia-256 cbc for 3s on 8192 size blocks: 58079 camellia-256 cbc's in 3.00s
Doing seed cbc for 3s on 16 size blocks: 16155875 seed cbc's in 3.00s
Doing seed cbc for 3s on 64 size blocks: 4138579 seed cbc's in 3.00s
Doing seed cbc for 3s on 256 size blocks: 1041488 seed cbc's in 3.00s
Doing seed cbc for 3s on 1024 size blocks: 261726 seed cbc's in 3.00s
Doing seed cbc for 3s on 8192 size blocks: 32636 seed cbc's in 3.00s
Doing rc2 cbc for 3s on 16 size blocks: 10161942 rc2 cbc's in 3.00s
Doing rc2 cbc for 3s on 64 size blocks: 2577169 rc2 cbc's in 3.00s
Doing rc2 cbc for 3s on 256 size blocks: 648541 rc2 cbc's in 3.00s
Doing rc2 cbc for 3s on 1024 size blocks: 163894 rc2 cbc's in 3.00s
Doing rc2 cbc for 3s on 8192 size blocks: 20487 rc2 cbc's in 3.00s
Doing blowfish cbc for 3s on 16 size blocks: 25095686 blowfish cbc's in 2.99s
Doing blowfish cbc for 3s on 64 size blocks: 6724904 blowfish cbc's in 2.99s
Doing blowfish cbc for 3s on 256 size blocks: 1709281 blowfish cbc's in 3.00s
Doing blowfish cbc for 3s on 1024 size blocks: 428595 blowfish cbc's in 3.01s
Doing blowfish cbc for 3s on 8192 size blocks: 52852 blowfish cbc's in 3.00s
Doing cast cbc for 3s on 16 size blocks: 23082946 cast cbc's in 2.99s
Doing cast cbc for 3s on 64 size blocks: 6259874 cast cbc's in 3.00s
Doing cast cbc for 3s on 256 size blocks: 1599368 cast cbc's in 3.00s
Doing cast cbc for 3s on 1024 size blocks: 402544 cast cbc's in 3.00s
Doing cast cbc for 3s on 8192 size blocks: 49801 cast cbc's in 3.00s
Doing 512 bit private rsa's for 10s: 206892 512 bit private RSA's in 10.00s
Doing 512 bit public rsa's for 10s: 2518308 512 bit public RSA's in 10.00s
Doing 1024 bit private rsa's for 10s: 75916 1024 bit private RSA's in 10.00s
Doing 1024 bit public rsa's for 10s: 1148144 1024 bit public RSA's in 9.99s
Doing 2048 bit private rsa's for 10s: 16917 2048 bit private RSA's in 9.99s
Doing 2048 bit public rsa's for 10s: 379233 2048 bit public RSA's in 10.00s
Doing 4096 bit private rsa's for 10s: 1579 4096 bit private RSA's in 10.00s
Doing 4096 bit public rsa's for 10s: 104729 4096 bit public RSA's in 10.00s
Doing 512 bit sign dsa's for 10s: 202933 512 bit DSA signs in 10.00s
Doing 512 bit verify dsa's for 10s: 215246 512 bit DSA verify in 10.00s
Doing 1024 bit sign dsa's for 10s: 91273 1024 bit DSA signs in 10.00s
Doing 1024 bit verify dsa's for 10s: 86347 1024 bit DSA verify in 9.99s
Doing 2048 bit sign dsa's for 10s: 30116 2048 bit DSA signs in 10.00s
Doing 2048 bit verify dsa's for 10s: 28902 2048 bit DSA verify in 10.00s
Doing 160 bit sign ecdsa's for 10s: 25870 160 bit ECDSA signs in 10.00s
Doing 160 bit verify ecdsa's for 10s: 38279 160 bit ECDSA verify in 10.00s
Doing 192 bit sign ecdsa's for 10s: 22013 192 bit ECDSA signs in 10.00s
Doing 192 bit verify ecdsa's for 10s: 32423 192 bit ECDSA verify in 9.99s
Doing 224 bit sign ecdsa's for 10s: 99415 224 bit ECDSA signs in 10.01s
Doing 224 bit verify ecdsa's for 10s: 73593 224 bit ECDSA verify in 10.00s
Doing 256 bit sign ecdsa's for 10s: 117609 256 bit ECDSA signs in 10.00s
Doing 256 bit verify ecdsa's for 10s: 91327 256 bit ECDSA verify in 10.00s
Doing 384 bit sign ecdsa's for 10s: 6837 384 bit ECDSA signs in 10.00s
Doing 384 bit verify ecdsa's for 10s: 10647 384 bit ECDSA verify in 9.99s
Doing 521 bit sign ecdsa's for 10s: 24301 521 bit ECDSA signs in 10.00s
Doing 521 bit verify ecdsa's for 10s: 17396 521 bit ECDSA verify in 10.00s
Doing 163 bit sign ecdsa's for 10s: 6557 163 bit ECDSA signs in 9.98s
Doing 163 bit verify ecdsa's for 10s: 20534 163 bit ECDSA verify in 9.96s
Doing 233 bit sign ecdsa's for 10s: 3115 233 bit ECDSA signs in 9.95s
Doing 233 bit verify ecdsa's for 10s: 15300 233 bit ECDSA verify in 9.97s
Doing 283 bit sign ecdsa's for 10s: 1986 283 bit ECDSA signs in 9.99s
Doing 283 bit verify ecdsa's for 10s: 9179 283 bit ECDSA verify in 9.99s
Doing 409 bit sign ecdsa's for 10s: 837 409 bit ECDSA signs in 10.00s
Doing 409 bit verify ecdsa's for 10s: 5585 409 bit ECDSA verify in 9.99s
Doing 571 bit sign ecdsa's for 10s: 383 571 bit ECDSA signs in 10.01s
Doing 571 bit verify ecdsa's for 10s: 2577 571 bit ECDSA verify in 9.99s
Doing 163 bit sign ecdsa's for 10s: 6509 163 bit ECDSA signs in 9.99s
Doing 163 bit verify ecdsa's for 10s: 19603 163 bit ECDSA verify in 10.00s
Doing 233 bit sign ecdsa's for 10s: 3077 233 bit ECDSA signs in 9.99s
Doing 233 bit verify ecdsa's for 10s: 14806 233 bit ECDSA verify in 10.00s
Doing 283 bit sign ecdsa's for 10s: 1971 283 bit ECDSA signs in 10.00s
Doing 283 bit verify ecdsa's for 10s: 8731 283 bit ECDSA verify in 9.98s
Doing 409 bit sign ecdsa's for 10s: 841 409 bit ECDSA signs in 9.98s
Doing 409 bit verify ecdsa's for 10s: 5326 409 bit ECDSA verify in 9.97s
Doing 571 bit sign ecdsa's for 10s: 385 571 bit ECDSA signs in 9.97s
Doing 571 bit verify ecdsa's for 10s: 2390 571 bit ECDSA verify in 9.98s
Doing 160 bit  ecdh's for 10s: 29853 160-bit ECDH ops in 10.00s
Doing 192 bit  ecdh's for 10s: 25107 192-bit ECDH ops in 10.00s
Doing 224 bit  ecdh's for 10s: 115202 224-bit ECDH ops in 10.00s
Doing 256 bit  ecdh's for 10s: 139884 256-bit ECDH ops in 10.00s
Doing 384 bit  ecdh's for 10s: 7705 384-bit ECDH ops in 9.99s
Doing 521 bit  ecdh's for 10s: 26038 521-bit ECDH ops in 9.99s
Doing 163 bit  ecdh's for 10s: 42161 163-bit ECDH ops in 9.99s
Doing 233 bit  ecdh's for 10s: 32610 233-bit ECDH ops in 9.99s
Doing 283 bit  ecdh's for 10s: 19371 283-bit ECDH ops in 9.99s
Doing 409 bit  ecdh's for 10s: 11624 409-bit ECDH ops in 10.00s
Doing 571 bit  ecdh's for 10s: 5256 571-bit ECDH ops in 10.00s
Doing 163 bit  ecdh's for 10s: 40534 163-bit ECDH ops in 10.00s
Doing 233 bit  ecdh's for 10s: 31566 233-bit ECDH ops in 9.99s
Doing 283 bit  ecdh's for 10s: 18260 283-bit ECDH ops in 10.00s
Doing 409 bit  ecdh's for 10s: 10966 409-bit ECDH ops in 9.99s
Doing 571 bit  ecdh's for 10s: 4881 571-bit ECDH ops in 10.00s
OpenSSL 1.0.2g  1 Mar 2016
built on: reproducible build, date unspecified
options:bn(64,64) rc4(16x,int) des(idx,cisc,16,int) aes(partial) blowfish(idx)
compiler: cc -I. -I.. -I../include  -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wa,--noexecstack -Wall -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 -DECP_NISTZ256_ASM
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
md2                  0.00         0.00         0.00         0.00         0.00
mdc2                 0.00         0.00         0.00         0.00         0.00
md4              59892.28k   209541.63k   548408.77k   920686.62k  1146910.04k
md5              44786.01k   146799.67k   363688.98k   578842.88k   683297.73k
hmac(md5)        38496.00k   131939.24k   338350.76k   559279.10k   693459.65k
sha1             54038.55k   173795.26k   427486.55k   683641.51k   869272.23k
rmd160           35412.38k    93993.66k   186110.20k   242997.59k   267111.08k
rc4             556793.34k   672976.85k   586886.49k   561559.21k   555128.15k
des cbc          79033.45k    81625.34k    82675.71k    83066.20k    83050.50k
des ede3         30488.91k    30828.20k    30903.57k    30969.86k    30949.38k
idea cbc             0.00         0.00         0.00         0.00         0.00
seed cbc         86164.67k    88289.69k    88873.64k    89335.81k    89118.04k
rc2 cbc          54197.02k    54979.61k    55342.17k    55942.49k    55943.17k
rc5-32/12 cbc        0.00         0.00         0.00         0.00         0.00
blowfish cbc    134291.30k   143944.43k   145858.65k   145807.73k   144321.19k
cast cbc        123520.78k   133543.98k   136479.40k   137401.69k   135989.93k
aes-128 cbc     131370.01k   154360.34k   159770.88k   356770.47k   361217.55k
aes-192 cbc     114160.41k   125246.85k   133861.80k   302379.35k   307565.91k
aes-256 cbc      99539.58k   111199.59k   114482.26k   263044.10k   263331.84k
camellia-128 cbc   109981.31k   175895.36k   202443.95k   210231.30k   209920.00k
camellia-192 cbc    94226.30k   136981.87k   152009.05k   156580.86k   155953.83k
camellia-256 cbc    93241.68k   136979.37k   150476.71k   156710.91k   158594.39k
sha256           67584.85k   164305.58k   291729.47k   353136.50k   400211.97k
sha512           52883.24k   212064.98k   347425.16k   502977.84k   577664.77k
whirlpool        37039.89k    82968.66k   139697.92k   169980.25k   180753.75k
aes-128 ige     135738.87k   148941.89k   150268.07k   150550.19k   152084.48k
aes-192 ige     116191.06k   125573.18k   126090.24k   127605.42k   127940.41k
aes-256 ige     101339.54k   108715.54k   109148.33k   110122.33k   108896.26k
ghash           587117.89k  2288623.02k  6443817.90k  8714195.29k  9610922.67k
                  sign    verify    sign/s verify/s
rsa  512 bits 0.000048s 0.000004s  20689.2 251830.8
rsa 1024 bits 0.000132s 0.000009s   7591.6 114929.3
rsa 2048 bits 0.000591s 0.000026s   1693.4  37923.3
rsa 4096 bits 0.006333s 0.000095s    157.9  10472.9
                  sign    verify    sign/s verify/s
dsa  512 bits 0.000049s 0.000046s  20293.3  21524.6
dsa 1024 bits 0.000110s 0.000116s   9127.3   8643.3
dsa 2048 bits 0.000332s 0.000346s   3011.6   2890.2
                              sign    verify    sign/s verify/s
 160 bit ecdsa (secp160r1)   0.0004s   0.0003s   2587.0   3827.9
 192 bit ecdsa (nistp192)   0.0005s   0.0003s   2201.3   3245.5
 224 bit ecdsa (nistp224)   0.0001s   0.0001s   9931.6   7359.3
 256 bit ecdsa (nistp256)   0.0001s   0.0001s  11760.9   9132.7
 384 bit ecdsa (nistp384)   0.0015s   0.0009s    683.7   1065.8
 521 bit ecdsa (nistp521)   0.0004s   0.0006s   2430.1   1739.6
 163 bit ecdsa (nistk163)   0.0015s   0.0005s    657.0   2061.6
 233 bit ecdsa (nistk233)   0.0032s   0.0007s    313.1   1534.6
 283 bit ecdsa (nistk283)   0.0050s   0.0011s    198.8    918.8
 409 bit ecdsa (nistk409)   0.0119s   0.0018s     83.7    559.1
 571 bit ecdsa (nistk571)   0.0261s   0.0039s     38.3    258.0
 163 bit ecdsa (nistb163)   0.0015s   0.0005s    651.6   1960.3
 233 bit ecdsa (nistb233)   0.0032s   0.0007s    308.0   1480.6
 283 bit ecdsa (nistb283)   0.0051s   0.0011s    197.1    874.8
 409 bit ecdsa (nistb409)   0.0119s   0.0019s     84.3    534.2
 571 bit ecdsa (nistb571)   0.0259s   0.0042s     38.6    239.5
                              op      op/s
 160 bit ecdh (secp160r1)   0.0003s   2985.3
 192 bit ecdh (nistp192)   0.0004s   2510.7
 224 bit ecdh (nistp224)   0.0001s  11520.2
 256 bit ecdh (nistp256)   0.0001s  13988.4
 384 bit ecdh (nistp384)   0.0013s    771.3
 521 bit ecdh (nistp521)   0.0004s   2606.4
 163 bit ecdh (nistk163)   0.0002s   4220.3
 233 bit ecdh (nistk233)   0.0003s   3264.3
 283 bit ecdh (nistk283)   0.0005s   1939.0
 409 bit ecdh (nistk409)   0.0009s   1162.4
 571 bit ecdh (nistk571)   0.0019s    525.6
 163 bit ecdh (nistb163)   0.0002s   4053.4
 233 bit ecdh (nistb233)   0.0003s   3159.8
 283 bit ecdh (nistb283)   0.0005s   1826.0
 409 bit ecdh (nistb409)   0.0009s   1097.7
 571 bit ecdh (nistb571)   0.0020s    488.1

参考资料:
[1] https://en.wikipedia.org/wiki/RSA_numbers#RSA-2048
[2] https://www.quora.com/What-is-the-difference-between-SHA-256-AES-256-and-RSA-2048-bit-encryptions

  • 10
    点赞
  • 45
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值