]> Cypherpunks repositories - gostls13.git/commit
crypto/x509: support PSS signatures.
authorAdam Langley <agl@golang.org>
Tue, 5 Jul 2016 20:50:18 +0000 (13:50 -0700)
committerAdam Langley <agl@golang.org>
Thu, 18 Aug 2016 00:40:17 +0000 (00:40 +0000)
commite41b0e2bcb2667425b7eb223baa2b9945466651b
tree189beaeee670935d865fdebf10eab6ba276dc73e
parent59aeac20c0412442848982a9287b4bab66c25682
crypto/x509: support PSS signatures.

Although the term “RSA” is almost synonymous with PKCS#1 v1.5, that
standard is quite flawed, cryptographically speaking. Bellare and
Rogaway fixed PKCS#1 v1.5 with OAEP (for encryption) and PSS (for
signatures) but they only see a fraction of the use of v1.5.

This change adds support for creating and verifying X.509 certificates
that use PSS signatures. Sadly, every possible dimension of flexibility
seems to have been reflected in the integration of X.509 and PSS
resulting in a huge amount of excess complexity. This change only
supports one “sane” configuration for each of SHA-{256, 384, 512}.
Hopefully this is sufficient because it saves a lot of complexity in the
code.

Although X.509 certificates with PSS signatures are rare, I'm inclined
to look favourably on them because they are sufficiently superior.

Fixes #15958.

Change-Id: I7282e0b68ad0177209f8b2add473b94aa5224c07
Reviewed-on: https://go-review.googlesource.com/24743
Run-TryBot: Adam Langley <agl@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/crypto/x509/x509.go
src/crypto/x509/x509_test.go