aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing_test.go
diff options
context:
space:
mode:
authorFilippo Valsorda <filippo@golang.org>2024-11-29 16:27:49 +0100
committerGopher Robot <gobot@golang.org>2024-11-30 01:49:37 +0000
commitdd7ab5ec5d6329dd5da052d2438274572ad7113b (patch)
tree282b5886abb564daa2d0c9a84ece7d1feed16119 /src/testing/testing_test.go
parentc5c4f3dd5f5e5a6a27fe53dc57eaf6acf414a4bc (diff)
downloadgo-dd7ab5ec5d6329dd5da052d2438274572ad7113b.tar.xz
crypto/internal/fips140/rsa: do trial divisions in key generation
This is optimized to be cheap in terms of extra code and complexity, rather than performance, so we reuse the GCD we have for inverting d. Recovers most of the performance loss since CL 630516, although benchmarking key generation is by nature extremely noisy. goos: darwin goarch: arm64 pkg: crypto/rsa cpu: Apple M2 │ 3b42687c56 │ b3d018a1e8-dirty │ │ sec/op │ sec/op vs base │ GenerateKey/2048-8 104.1m ± 7% 139.7m ± 20% +34.10% (p=0.000 n=20) Updates #69799 For #69536 Change-Id: I00347610935db8feb0597529a301ad7ace5b2f22 Reviewed-on: https://go-review.googlesource.com/c/go/+/632479 Reviewed-by: Roland Shoemaker <roland@golang.org> Auto-Submit: Filippo Valsorda <filippo@golang.org> Reviewed-by: Daniel McCarney <daniel@binaryparadox.net> Reviewed-by: Russ Cox <rsc@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/testing/testing_test.go')
0 files changed, 0 insertions, 0 deletions