]> Cypherpunks repositories - gostls13.git/commit
crypto/rsa: fix infinite loop in GenerateMultiPrimeKey for large nprimes
authorRémy Oudompheng <oudomphe@phare.normalesup.org>
Sun, 24 Feb 2013 16:19:09 +0000 (17:19 +0100)
committerRémy Oudompheng <oudomphe@phare.normalesup.org>
Sun, 24 Feb 2013 16:19:09 +0000 (17:19 +0100)
commitb582ef385555f88d41679a621d34bc260de4eb68
treeb2c3c96abeb1f945f5325ad2549caec7b46f56ab
parent5a8b7dc6d009bd95f5904b4250107ef57c163c22
crypto/rsa: fix infinite loop in GenerateMultiPrimeKey for large nprimes

The heuristics for BitLen of a product of randomly generated primes
are wrong, and the generated candidates never match the required
size for nprimes > 10. This corner case is not expected to be used in
practice.

R=agl
CC=golang-dev
https://golang.org/cl/7397052
src/pkg/crypto/rsa/rsa.go
src/pkg/crypto/rsa/rsa_test.go