Skip to content

Commit

Permalink
crypto/elliptic: utilize faster z14 multiply/square instructions (whe…
Browse files Browse the repository at this point in the history
…n available)

In the s390x assembly implementation of NIST P-256 curve, utilize faster multiply/square
instructions introduced in the z14. These new instructions are designed for crypto
and are constant time. The algorithm is unchanged except for faster
multiplication when run on a z14 or later. On z13, the original mutiplication
(also constant time) is used.

P-256 performance is critical in many applications, such as Blockchain.

name            old time      new time     delta
BaseMultP256    24396 ns/op   21564 ns/op  1.13x
ScalarMultP256  87546 ns/op   72813 ns/op. 1.20x

Change-Id: I7e6d8b420fac56d5f9cc13c9423e2080df854bac
Reviewed-on: https://go-review.googlesource.com/c/146022
Reviewed-by: Michael Munday <[email protected]>
Reviewed-by: Brad Fitzpatrick <[email protected]>
Run-TryBot: Michael Munday <[email protected]>
  • Loading branch information
wgo authored and mundaym committed Dec 5, 2018
1 parent 9be01c2 commit 897e080
Show file tree
Hide file tree
Showing 4 changed files with 551 additions and 41 deletions.
Loading

0 comments on commit 897e080

Please sign in to comment.