1
0
mirror of https://github.com/golang/go synced 2024-11-26 10:28:19 -07:00
go/src/crypto
Joel Sing a274b3003b crypto/internal/bigmod: provide assembly addMulVVW* for riscv64
This provides an assembly implementation of addMulVVW* for riscv64,
processing four words per loop, resulting in a performance gain
of 23%+ for RSA decryption/signing on a StarFive VisionFive 2:

                       │    rsa1     │                rsa2                 │
                       │   sec/op    │   sec/op     vs base                │
DecryptPKCS1v15/2048-4   24.29m ± 0%   18.65m ± 0%  -23.24% (p=0.000 n=10)
DecryptPKCS1v15/3072-4   73.28m ± 0%   54.08m ± 0%  -26.20% (p=0.000 n=10)
DecryptPKCS1v15/4096-4   163.5m ± 0%   119.1m ± 0%  -27.17% (p=0.000 n=10)
EncryptPKCS1v15/2048-4   1.505m ± 0%   1.446m ± 0%   -3.93% (p=0.000 n=10)
DecryptOAEP/2048-4       24.37m ± 0%   18.72m ± 0%  -23.17% (p=0.000 n=10)
EncryptOAEP/2048-4       1.570m ± 0%   1.510m ± 0%   -3.84% (p=0.000 n=10)
SignPKCS1v15/2048-4      24.52m ± 0%   18.80m ± 0%  -23.36% (p=0.000 n=10)
VerifyPKCS1v15/2048-4    1.491m ± 0%   1.431m ± 0%   -4.00% (p=0.000 n=10)
SignPSS/2048-4           24.60m ± 0%   18.89m ± 0%  -23.21% (p=0.000 n=10)
VerifyPSS/2048-4         1.565m ± 0%   1.504m ± 0%   -3.87% (p=0.000 n=10)
geomean                  10.90m        9.066m       -16.79%

Change-Id: I8414ba0028b0781a945610abe02c285d2387aef3
Reviewed-on: https://go-review.googlesource.com/c/go/+/516536
Reviewed-by: Mark Ryan <markdryan@rivosinc.com>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: M Zhuo <mzh@golangcn.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Joel Sing <joel@sing.id.au>
TryBot-Result: Gopher Robot <gobot@golang.org>
2023-08-15 07:52:41 +00:00
..
aes cmd/asm: add s390x crypto related instructions 2023-08-02 19:58:18 +00:00
boring
cipher
des
dsa
ecdh crypto: document non-determinism of GenerateKey 2023-06-23 16:12:46 +00:00
ecdsa cmd/asm: add KDSA instruction support 2023-08-11 20:48:28 +00:00
ed25519 crypto: document non-determinism of GenerateKey 2023-06-23 16:12:46 +00:00
elliptic
hmac
internal crypto/internal/bigmod: provide assembly addMulVVW* for riscv64 2023-08-15 07:52:41 +00:00
md5 crypto/md5: optimize amd64 assembly 2023-08-04 16:02:36 +00:00
rand crypto/rand, internal/syscall/unix: use simpler random seed on NetBSD 2023-08-07 00:26:43 +00:00
rc4
rsa crypto: document non-determinism of GenerateKey 2023-06-23 16:12:46 +00:00
sha1 cmd/asm: add s390x crypto related instructions 2023-08-02 19:58:18 +00:00
sha256 cmd/asm: add s390x crypto related instructions 2023-08-02 19:58:18 +00:00
sha512 cmd/asm: add s390x crypto related instructions 2023-08-02 19:58:18 +00:00
subtle
tls crypto/tls: add GODEBUG to control max RSA key size 2023-08-10 20:33:01 +00:00
x509 crypto/x509: rename duplicated test 2023-06-23 19:48:23 +00:00
crypto.go
issue21104_test.go