[openssl-dev] [openssl.org #4013] [PATCH] Binary ECC: lambda projective coordinates

Billy Brumley via RT rt at openssl.org
Thu Aug 20 16:07:56 UTC 2015


This patch speeds up binary curve ECC, particularly ECDSA sign and
verify -- up to 5x improvement. It also rolls in RT 3863.

Before patch: $ apps/openssl speed ecdh; apps/openssl speed ecdsa

                              op      op/s
 160 bit ecdh (secp160r1)   0.0002s   6071.7
 192 bit ecdh (nistp192)   0.0002s   5274.3
 224 bit ecdh (nistp224)   0.0003s   3765.9
 256 bit ecdh (nistp256)   0.0001s  15110.3
 384 bit ecdh (nistp384)   0.0006s   1623.6
 521 bit ecdh (nistp521)   0.0013s    779.8
 163 bit ecdh (nistk163)   0.0002s   5458.8
 233 bit ecdh (nistk233)   0.0002s   4278.8
 283 bit ecdh (nistk283)   0.0004s   2370.3
 409 bit ecdh (nistk409)   0.0007s   1512.3
 571 bit ecdh (nistk571)   0.0016s    634.6
 163 bit ecdh (nistb163)   0.0002s   5226.9
 233 bit ecdh (nistb233)   0.0002s   4102.0
 283 bit ecdh (nistb283)   0.0005s   2214.0
 409 bit ecdh (nistb409)   0.0007s   1403.5
 571 bit ecdh (nistb571)   0.0017s    589.6

                              sign    verify    sign/s verify/s
 160 bit ecdsa (secp160r1)   0.0001s   0.0002s  18743.2   5022.9
 192 bit ecdsa (nistp192)   0.0001s   0.0002s  16058.0   4275.1
 224 bit ecdsa (nistp224)   0.0001s   0.0003s  12243.6   3101.8
 256 bit ecdsa (nistp256)   0.0000s   0.0001s  25672.8  10551.7
 384 bit ecdsa (nistp384)   0.0002s   0.0007s   5672.3   1337.2
 521 bit ecdsa (nistp521)   0.0004s   0.0015s   2739.5    656.6
 163 bit ecdsa (nistk163)   0.0002s   0.0004s   5926.5   2628.6
 233 bit ecdsa (nistk233)   0.0003s   0.0005s   3005.7   2040.8
 283 bit ecdsa (nistk283)   0.0005s   0.0009s   1986.0   1135.5
 409 bit ecdsa (nistk409)   0.0011s   0.0014s    875.8    714.8
 571 bit ecdsa (nistk571)   0.0025s   0.0033s    407.2    307.5
 163 bit ecdsa (nistb163)   0.0002s   0.0004s   5955.7   2496.3
 233 bit ecdsa (nistb233)   0.0003s   0.0005s   3027.2   1941.5
 283 bit ecdsa (nistb283)   0.0005s   0.0009s   1979.3   1069.0
 409 bit ecdsa (nistb409)   0.0011s   0.0015s    873.9    680.9
 571 bit ecdsa (nistb571)   0.0025s   0.0035s    407.6    285.1

After patch: $ apps/openssl speed ecdh; apps/openssl speed ecdsa

                              op      op/s
 160 bit ecdh (secp160r1)   0.0002s   6071.2
 192 bit ecdh (nistp192)   0.0002s   5182.0
 224 bit ecdh (nistp224)   0.0003s   3811.1
 256 bit ecdh (nistp256)   0.0001s  15146.6
 384 bit ecdh (nistp384)   0.0006s   1629.7
 521 bit ecdh (nistp521)   0.0013s    787.5
 163 bit ecdh (nistk163)   0.0002s   4953.6
 233 bit ecdh (nistk233)   0.0003s   3875.9
 283 bit ecdh (nistk283)   0.0005s   2163.5
 409 bit ecdh (nistk409)   0.0008s   1292.3
 571 bit ecdh (nistk571)   0.0017s    579.4
 163 bit ecdh (nistb163)   0.0002s   4920.8
 233 bit ecdh (nistb233)   0.0003s   3797.5
 283 bit ecdh (nistb283)   0.0005s   2187.6
 409 bit ecdh (nistb409)   0.0008s   1294.3
 571 bit ecdh (nistb571)   0.0017s    573.1

                              sign    verify    sign/s verify/s
 160 bit ecdsa (secp160r1)   0.0001s   0.0002s  18759.4   5074.0
 192 bit ecdsa (nistp192)   0.0001s   0.0002s  16093.8   4261.2
 224 bit ecdsa (nistp224)   0.0001s   0.0003s  12219.5   3194.9
 256 bit ecdsa (nistp256)   0.0000s   0.0001s  25561.8  10578.7
 384 bit ecdsa (nistp384)   0.0002s   0.0007s   5665.2   1352.6
 521 bit ecdsa (nistp521)   0.0004s   0.0015s   2714.5    647.4
 163 bit ecdsa (nistk163)   0.0001s   0.0002s  17117.7   4026.1
 233 bit ecdsa (nistk233)   0.0001s   0.0003s  12921.6   3108.2
 283 bit ecdsa (nistk283)   0.0001s   0.0006s   7994.1   1784.6
 409 bit ecdsa (nistk409)   0.0002s   0.0009s   4943.8   1074.2
 571 bit ecdsa (nistk571)   0.0004s   0.0021s   2235.5    476.0
 163 bit ecdsa (nistb163)   0.0001s   0.0002s  17119.8   4002.7
 233 bit ecdsa (nistb233)   0.0001s   0.0003s  13129.5   3104.2
 283 bit ecdsa (nistb283)   0.0001s   0.0006s   7977.2   1765.5
 409 bit ecdsa (nistb409)   0.0002s   0.0009s   4927.0   1073.8
 571 bit ecdsa (nistb571)   0.0004s   0.0021s   2263.0    478.2

$ cat /proc/cpuinfo
processor    : 0
vendor_id    : GenuineIntel
cpu family    : 6
model        : 60
model name    : Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz
stepping    : 3
microcode    : 0x17
cpu MHz        : 3200.000
cache size    : 6144 KB
physical id    : 0
siblings    : 4
core id        : 0
cpu cores    : 4
apicid        : 0
initial apicid    : 0
fpu        : yes
fpu_exception    : yes
cpuid level    : 13
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe
syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts
rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq
dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid
sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx
f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm
tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle
avx2 smep bmi2 erms invpcid rtm
bogomips    : 6384.88
clflush size    : 64
cache_alignment    : 64
address sizes    : 39 bits physical, 48 bits virtual
power management: <SNIP>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: lambda.patch
Type: text/x-patch
Size: 20540 bytes
Desc: not available
URL: <http://mta.openssl.org/pipermail/openssl-dev/attachments/20150820/f44d0502/attachment-0001.bin>
-------------- next part --------------
_______________________________________________
openssl-bugs-mod mailing list
openssl-bugs-mod at openssl.org
https://mta.openssl.org/mailman/listinfo/openssl-bugs-mod


More information about the openssl-dev mailing list