Gueron, Shay via RT
2013-10-22 17:30:20 UTC
Hello all,
This patch is a contribution to OpenSSL.
It offers an efficient and constant-time implementation of EC multiplication for NIST P256 curve.
It accelerated ECDSA (sign and verify) as well as ECDH (compute and generate key), for the P256 curve.
The implementation is based on Montgomery multiplication, specifically optimized for the P-256 prime, using x86-64 assembly. It is intended to run on any x86-64 CPU (running Linux).
We measured the performance benefit of this patch on Intel(R) CPUs Codename Haswell and Sandy Bridge, using 'openssl speed'. Here are the numbers.
Single thread, single core:
Sandy ***@3.4GHz:
ECDSA sign:
OpenSSL - 8,759 sign/sec
OpenSSL with NISTP enabled - 8,822 sign/sec
This patch - 17,111 sign/sec
1.95/1.94X speedup
ECDSA verify:
OpenSSL - 2,303 verify/sec
OpenSSL with NISTP enabled - 3,831 verify/sec
This patch - 6,193 verify/sec
2.69/1.62X speedup
ECDH:
OpenSSL - 2,795 op/sec
OpenSSL with NISTP enabled - 5,189 op/sec
This patch - 8,087 op/sec
2.89X/1.56X speedup
***@3.4GHz:
ECDSA sign:
OpenSSL - 10,212 sign/sec
OpenSSL with NISTP enabled - 10,499 sign/sec
This patch - 22,747 sign/sec
2.22X/2.16X speedup
ECDSA verify:
OpenSSL - 2,647 verify/sec
OpenSSL with NISTP enabled - 4,384 verify/sec
This patch - 7,622 verify/sec
2.88X/1.74X speedup
ECDH:
OpenSSL - 3,193 op/sec
OpenSSL with NISTP enabled - 5,932 op/sec
This patch - 10,288 op/sec
3.22X/1.73X speedup
Two threads, single core:
Sandy ***@3.4GHz:
ECDSA sign:
OpenSSL - 10,076 sign/sec
OpenSSL with NISTP enabled - 8,911 sign/sec
This patch - 19,901 sign/sec
2/2.2X speedup
ECDSA verify:
OpenSSL - 2,480 verify/sec
OpenSSL with NISTP enabled - 3,840 verify/sec
This patch - 7,056 verify/sec
2.8/1.8X speedup
ECDH:
OpenSSL - 2,983 op/sec
OpenSSL with NISTP enabled - 5,290 op/sec
This patch - 9,657 op/sec
3.2X/1.8X speedup
***@3.4GHz:
ECDSA sign:
OpenSSL - 11,004 sign/sec
OpenSSL with NISTP enabled - 10,153 sign/sec
This patch - 25,094 sign/sec
2.3X/2.5X speedup
ECDSA verify:
OpenSSL - 2,598 verify/sec
OpenSSL with NISTP enabled - 3,947 verify/sec
This patch - 7,705 verify/sec
3X/2X speedup
ECDH:
OpenSSL - 3,166 op/sec
OpenSSL with NISTP enabled - 5,387 op/sec
This patch - 10,438 op/sec
3.3X/1.9X speedup
Reference:
[1] S. Gueron, V. Krasnov: "Fast Prime Field Elliptic Curve Cryptography with 256 Bit Primes"
Developers and authors:
***************************************************************************
Shay Gueron (1, 2), and Vlad Krasnov (1)
(1) Intel Corporation, Israel Development Center, Haifa, Israel
(2) University of Haifa, Israel
***************************************************************************
Copyright(c) 2013, Intel Corp.
---------------------------------------------------------------------
Intel Israel (74) Limited
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List openssl-***@openssl.org
Automated List Manager ***@openssl.org
This patch is a contribution to OpenSSL.
It offers an efficient and constant-time implementation of EC multiplication for NIST P256 curve.
It accelerated ECDSA (sign and verify) as well as ECDH (compute and generate key), for the P256 curve.
The implementation is based on Montgomery multiplication, specifically optimized for the P-256 prime, using x86-64 assembly. It is intended to run on any x86-64 CPU (running Linux).
We measured the performance benefit of this patch on Intel(R) CPUs Codename Haswell and Sandy Bridge, using 'openssl speed'. Here are the numbers.
Single thread, single core:
Sandy ***@3.4GHz:
ECDSA sign:
OpenSSL - 8,759 sign/sec
OpenSSL with NISTP enabled - 8,822 sign/sec
This patch - 17,111 sign/sec
1.95/1.94X speedup
ECDSA verify:
OpenSSL - 2,303 verify/sec
OpenSSL with NISTP enabled - 3,831 verify/sec
This patch - 6,193 verify/sec
2.69/1.62X speedup
ECDH:
OpenSSL - 2,795 op/sec
OpenSSL with NISTP enabled - 5,189 op/sec
This patch - 8,087 op/sec
2.89X/1.56X speedup
***@3.4GHz:
ECDSA sign:
OpenSSL - 10,212 sign/sec
OpenSSL with NISTP enabled - 10,499 sign/sec
This patch - 22,747 sign/sec
2.22X/2.16X speedup
ECDSA verify:
OpenSSL - 2,647 verify/sec
OpenSSL with NISTP enabled - 4,384 verify/sec
This patch - 7,622 verify/sec
2.88X/1.74X speedup
ECDH:
OpenSSL - 3,193 op/sec
OpenSSL with NISTP enabled - 5,932 op/sec
This patch - 10,288 op/sec
3.22X/1.73X speedup
Two threads, single core:
Sandy ***@3.4GHz:
ECDSA sign:
OpenSSL - 10,076 sign/sec
OpenSSL with NISTP enabled - 8,911 sign/sec
This patch - 19,901 sign/sec
2/2.2X speedup
ECDSA verify:
OpenSSL - 2,480 verify/sec
OpenSSL with NISTP enabled - 3,840 verify/sec
This patch - 7,056 verify/sec
2.8/1.8X speedup
ECDH:
OpenSSL - 2,983 op/sec
OpenSSL with NISTP enabled - 5,290 op/sec
This patch - 9,657 op/sec
3.2X/1.8X speedup
***@3.4GHz:
ECDSA sign:
OpenSSL - 11,004 sign/sec
OpenSSL with NISTP enabled - 10,153 sign/sec
This patch - 25,094 sign/sec
2.3X/2.5X speedup
ECDSA verify:
OpenSSL - 2,598 verify/sec
OpenSSL with NISTP enabled - 3,947 verify/sec
This patch - 7,705 verify/sec
3X/2X speedup
ECDH:
OpenSSL - 3,166 op/sec
OpenSSL with NISTP enabled - 5,387 op/sec
This patch - 10,438 op/sec
3.3X/1.9X speedup
Reference:
[1] S. Gueron, V. Krasnov: "Fast Prime Field Elliptic Curve Cryptography with 256 Bit Primes"
Developers and authors:
***************************************************************************
Shay Gueron (1, 2), and Vlad Krasnov (1)
(1) Intel Corporation, Israel Development Center, Haifa, Israel
(2) University of Haifa, Israel
***************************************************************************
Copyright(c) 2013, Intel Corp.
---------------------------------------------------------------------
Intel Israel (74) Limited
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List openssl-***@openssl.org
Automated List Manager ***@openssl.org