]> Cypherpunks repositories - gostls13.git/commit
crypto/elliptic: add s390x assembly implementation of NIST P-256 Curve
authorVolodymyr Paprotski <vpaprots@ca.ibm.com>
Fri, 14 Oct 2016 20:19:25 +0000 (16:19 -0400)
committerMichael Munday <munday@ca.ibm.com>
Tue, 8 Nov 2016 17:50:17 +0000 (17:50 +0000)
commit41eb9bb993b22979eebffe4eaeeca53db8e7b388
tree9c0342ad5922b62fa78d1d47f587bbaddf7cb92c
parent5d28bc58b6524b2043e2864b8de99fb05e7160d5
crypto/elliptic: add s390x assembly implementation of NIST P-256 Curve

A paranoid go at constant time implementation of P256 curve.

This code relies on z13 SIMD instruction set. For zEC12 and below,
the fallback is the existing P256 implementation. To facilitate this
fallback mode, I've refactored the code so that implementations can
be picked at run-time.

Its 'slightly' difficult to grok, but there is ASCII art..

name            old time/op  new time/op  delta
BaseMultP256     419µs ± 3%    27µs ± 1%  -93.65% (p=0.000 n=10+8)
ScalarMultP256  1.05ms ±10%  0.09ms ± 1%  -90.94% (p=0.000 n=10+8)

Change-Id: Ic1ded898a2ceab055b1c69570c03179c4b85b177
Reviewed-on: https://go-review.googlesource.com/31231
Run-TryBot: Michael Munday <munday@ca.ibm.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Michael Munday <munday@ca.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/crypto/elliptic/p256.go
src/crypto/elliptic/p256_asm_s390x.s [new file with mode: 0644]
src/crypto/elliptic/p256_generic.go [new file with mode: 0644]
src/crypto/elliptic/p256_s390x.go [new file with mode: 0644]