]> Cypherpunks repositories - gostls13.git/commit
crypto/internal/fips140/nistec: make SetBytes constant time
authorFilippo Valsorda <filippo@golang.org>
Wed, 19 Feb 2025 21:41:59 +0000 (22:41 +0100)
committerGopher Robot <gobot@golang.org>
Fri, 21 Feb 2025 18:31:33 +0000 (10:31 -0800)
commitf24b299df2896a4e8a80863dbb55a264f4b9bb68
treede89282d58a75b028e1dab7c3172b38aebde40d2
parentd93f6df0cc4f33127ef76fa994edd54d7726d0a9
crypto/internal/fips140/nistec: make SetBytes constant time

Similarly to CL 648035, SetBytes doesn't need to be constant time for
the uses we make of it in the standard library (ECDH and ECDSA public
keys), but it doesn't cost much to make it constant time for users of
the re-exported package, or even just to save the next person from
convincing themselves that it's ok for it not to be constant time.

Change-Id: I6a6a465622a0de08d9fc71db75c63185a82aa54a
Reviewed-on: https://go-review.googlesource.com/c/go/+/650579
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
src/crypto/ecdh/ecdh_test.go
src/crypto/internal/fips140/nistec/fiat/generate.go
src/crypto/internal/fips140/nistec/fiat/p224.go
src/crypto/internal/fips140/nistec/fiat/p256.go
src/crypto/internal/fips140/nistec/fiat/p384.go
src/crypto/internal/fips140/nistec/fiat/p521.go
src/crypto/internal/fips140/subtle/constant_time.go
src/crypto/internal/fips140/subtle/constant_time_test.go [new file with mode: 0644]