aboutsummaryrefslogtreecommitdiff
path: root/src/crypto/elliptic/p256_generic.go
diff options
context:
space:
mode:
authorFilippo Valsorda <filippo@golang.org>2021-10-30 02:01:35 -0400
committerFilippo Valsorda <filippo@golang.org>2022-04-27 14:22:53 +0000
commit83ff0b0c61c6ae99a058c851f4b0680064d46e8b (patch)
tree4eb31aa54eb89da6e42c998705bb493c4355fbd6 /src/crypto/elliptic/p256_generic.go
parent6796a7924c20d2c58b0cf78766b94543abfadc1b (diff)
downloadgo-83ff0b0c61c6ae99a058c851f4b0680064d46e8b.tar.gz
go-83ff0b0c61c6ae99a058c851f4b0680064d46e8b.zip
crypto/elliptic: use generics for nistec-based curves
There was no way to use an interface because the methods on the Point types return concrete Point values, as they should. A couple somewhat minor annoyances: - Allocations went up due to #48849. This is fine here, where math/big causes allocations anyway, but would probably not be fine in nistec itself. - Carrying the newPoint/newGenerator functions around as a field is a little weird, even if type-safe. It also means we have to make what were functions methods so they can access newPoint to return the zero value. This is #35966. For #52182 Change-Id: I050f3a27f15d3f189818da80da9de0cba0548931 Reviewed-on: https://go-review.googlesource.com/c/go/+/360015 Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Roland Shoemaker <roland@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/crypto/elliptic/p256_generic.go')
0 files changed, 0 insertions, 0 deletions