@@ -19,10 +19,14 @@ This library provides key generation, signing, and verifying, for five
1919popular NIST "Suite B" GF(p) (_ prime field_ ) curves, with key lengths of 192,
2020224, 256, 384, and 521 bits. The "short names" for these curves, as known by
2121the OpenSSL tool (` openssl ecparam -list_curves ` ), are: ` prime192v1 ` ,
22- ` secp224r1 ` , ` prime256v1 ` , ` secp384r1 ` , and ` secp521r1 ` . It also includes the
23- 256-bit curve ` secp256k1 ` used by Bitcoin. No other curves
24- are included, but it is not too hard to add support for more curves
25- over prime fields.
22+ ` secp224r1 ` , ` prime256v1 ` , ` secp384r1 ` , and ` secp521r1 ` . It includes the
23+ 256-bit curve ` secp256k1 ` used by Bitcoin. There is also support for the
24+ regular (non-twisted) variants of Brainpool curves from 160 to 512 bits. The
25+ "short names" of those curves are: ` brainpoolP160r1 ` , ` brainpoolP192r1 ` ,
26+ ` brainpoolP224r1 ` , ` brainpoolP256r1 ` , ` brainpoolP320r1 ` , ` brainpoolP384r1 ` ,
27+ ` brainpoolP512r1 ` .
28+ No other curves are included, but it is not too hard to add support for more
29+ curves over prime fields.
2630
2731## Dependencies
2832
@@ -48,18 +52,25 @@ Use `tox -e speed` to generate this table on your own computer.
4852On an Intel Core i7 4790K @ 4.0GHz I'm getting the following performance:
4953
5054```
51- siglen keygen keygen/s sign sign/s verify verify/s
52- NIST192p: 48 0.01586s 63.05 0.00853s 117.26 0.01624s 61.58
53- NIST224p: 56 0.02153s 46.46 0.01145s 87.36 0.02307s 43.35
54- NIST256p: 64 0.02850s 35.09 0.01500s 66.65 0.02925s 34.19
55- NIST384p: 96 0.06664s 15.01 0.03512s 28.48 0.06887s 14.52
56- NIST521p: 132 0.13048s 7.66 0.07050s 14.18 0.13673s 7.31
57- SECP256k1: 64 0.02809s 35.60 0.01531s 65.32 0.03113s 32.12
58- ```
55+ siglen keygen keygen/s sign sign/s verify verify/s
56+ NIST192p: 48 0.01534s 65.18 0.00833s 120.05 0.01601s 62.48
57+ NIST224p: 56 0.02107s 47.46 0.01153s 86.74 0.02220s 45.05
58+ NIST256p: 64 0.02824s 35.40 0.01523s 65.66 0.02965s 33.73
59+ NIST384p: 96 0.06640s 15.06 0.03572s 27.99 0.06973s 14.34
60+ NIST521p: 132 0.13150s 7.60 0.07094s 14.10 0.13869s 7.21
61+ SECP256k1: 64 0.02807s 35.63 0.01525s 65.58 0.02964s 33.74
62+ BRAINPOOLP160r1: 40 0.01100s 90.88 0.00564s 177.45 0.01053s 94.92
63+ BRAINPOOLP192r1: 48 0.01633s 61.25 0.00833s 120.05 0.01591s 62.84
64+ BRAINPOOLP224r1: 56 0.02261s 44.23 0.01153s 86.76 0.02234s 44.77
65+ BRAINPOOLP256r1: 64 0.02997s 33.36 0.01532s 65.29 0.03084s 32.42
66+ BRAINPOOLP320r1: 80 0.04774s 20.95 0.02447s 40.86 0.04717s 21.20
67+ BRAINPOOLP384r1: 96 0.07007s 14.27 0.03566s 28.04 0.07056s 14.17
68+ BRAINPOOLP512r1: 128 0.13390s 7.47 0.06766s 14.78 0.13425s 7.45
69+ ```
5970
6071For comparison, a highly optimised implementation (including curve-specific
6172assemply) like OpenSSL provides following performance numbers on the same
62- machine. Run ` openssl speed ` :
73+ machine. Run ` openssl speed ` to reproduce it :
6374```
6475 sign verify sign/s verify/s
6576 192 bits ecdsa (nistp192) 0.0002s 0.0002s 4785.6 5380.7
0 commit comments