]> Cypherpunks repositories - gostls13.git/commit
crypto/internal/nistec: fix p256Select (PPC64) and p256SelectAffine (PPC64/s390x)
authorPaul E. Murphy <murp@ibm.com>
Tue, 27 Aug 2024 19:44:16 +0000 (14:44 -0500)
committerPaul Murphy <murp@ibm.com>
Mon, 23 Sep 2024 18:27:32 +0000 (18:27 +0000)
commitbc047b62b2ec0c6eae3437a26410039c82365f60
tree8ee74fd287d91309ef5478ec3eba43f7990823db
parenta92c80eb40e72385257fc714143e0278e110aa1a
crypto/internal/nistec: fix p256Select (PPC64) and p256SelectAffine (PPC64/s390x)

They are constant time, but some constants were incorrect. This
resulting in reading beyond the tables.

I've added linux specific tests which verify these functions are not
reading beyond the limits of their table.

Thank you Sun Yimin, @emmansun for catching this bug and suggesting
corrected constants.

Fixes #69080

Cq-Include-Trybots: luci.golang.try:gotip-linux-ppc64_power10,gotip-linux-ppc64_power8,gotip-linux-ppc64le_power10,gotip-linux-ppc64le_power8,gotip-linux-ppc64le_power9

Change-Id: Id37e0e22b2278ea20adaa1c84cbb32c3f20d4cf7
Reviewed-on: https://go-review.googlesource.com/c/go/+/608816
Run-TryBot: Paul Murphy <murp@ibm.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Archana Ravindar <aravinda@redhat.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/crypto/internal/nistec/p256_asm_ppc64le.s
src/crypto/internal/nistec/p256_asm_s390x.s
src/crypto/internal/nistec/p256_asm_test.go [new file with mode: 0644]