Skip to content

Commit

Permalink
crypto/rsa: deprecate multiprime RSA support
Browse files Browse the repository at this point in the history
Fixes #56921

Change-Id: I03f9969a5146ab7becd983784d8cb5b23a3fbb18
Reviewed-on: https://go-review.googlesource.com/c/go/+/459976
TryBot-Bypass: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
  • Loading branch information
FiloSottile authored and gopherbot committed Mar 16, 2023
1 parent 006b35c commit 5ddbe05
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions api/next/56921.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pkg crypto/rsa, func GenerateMultiPrimeKey //deprecated #56921
pkg crypto/rsa, type PrecomputedValues struct, CRTValues //deprecated #56921
4 changes: 2 additions & 2 deletions src/crypto/rsa/rsa.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ type PrecomputedValues struct {
// differently in PKCS #1 and interoperability is sufficiently
// important that we mirror this.
//
// Note: these values are still filled in by Precompute for
// Deprecated: These values are still filled in by Precompute for
// backwards compatibility but are not used. Multi-prime RSA is very rare,
// and is implemented by this package without CRT optimizations to limit
// complexity.
Expand Down Expand Up @@ -278,7 +278,7 @@ func GenerateKey(random io.Reader, bits int) (*PrivateKey, error) {
// This package does not implement CRT optimizations for multi-prime RSA, so the
// keys with more than two primes will have worse performance.
//
// Note: The use of this function with a number of primes different from
// Deprecated: The use of this function with a number of primes different from
// two is not recommended for the above security, compatibility, and performance
// reasons. Use GenerateKey instead.
//
Expand Down

0 comments on commit 5ddbe05

Please sign in to comment.