]> Cypherpunks repositories - gostls13.git/commit
crypto/rsa: remove another forgotten note to future self
authorFilippo Valsorda <filippo@golang.org>
Mon, 5 May 2025 11:35:36 +0000 (13:35 +0200)
committerGopher Robot <gobot@golang.org>
Mon, 7 Jul 2025 16:16:40 +0000 (09:16 -0700)
commit20978f46fdf097cf3d9164918441dd296ee274f2
tree5ba25bfd248fc6c91d3156b59904ba9b7b7faafc
parent33fb4819f59d16c483be6cf2016f79eef3543691
crypto/rsa: remove another forgotten note to future self

In CL 226937 I refactored the RSA-PSS implementation, and apparently
left behind a note to think a bit harder about whether this bytes.Equal
check should be constant time or not. It snuck through code review, so
it's 2018 again, no one is worried about pandemics, I have just joined
Google, and I am mailing CL 147637 again.

Anyway, as discussed in #67043 and documented in CL 587277, the inputs
to signature verification functions are not secret, and are allowed to
leak through timing side channels. This means an attacker can already
compute h (from signature and public key) and h0 (from message hash and
public key). What the attacker can't do is produce a signature that
yields the correct h (since that requires the private key).

Change-Id: I6a6a4656d6255bdad628a94f48f7ea878a304263
Reviewed-on: https://go-review.googlesource.com/c/go/+/685255
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
src/crypto/internal/fips140/rsa/pkcs1v22.go