http://code.google.com/p/go/source/detail?r=5b9d38cee052 ***
crypto/rsa: reject PublicKey.E if it won't fit in a 32-bit int
Right now we only have 32-bit ints so that's a no-op.
Took the opportunity to check for some other invalid values too.
Suggestions for additions or modifications welcome.
R=agl
CC=golang-dev
http://codereview.appspot.com/6493112
http://codereview.appspot.com/6493112/diff/2001/src/pkg/crypto/rsa/rsa.go
File src/pkg/crypto/rsa/rsa.go (right):
http://codereview.appspot.com/6493112/diff/2001/src/pkg/crypto/rsa/rsa.go#newcode28
src/pkg/crypto/rsa/rsa.go:28: var errPublicKey = errors.New("crypto/rsa:
invalid public key")
On 2012/09/12 17:36:06, agl1 wrote:
"crypto/rsa: public exponent too large"?
Done."crypto/rsa: public exponent too large"?
http://codereview.appspot.com/6493112/diff/2001/src/pkg/crypto/rsa/rsa.go#newcode74
src/pkg/crypto/rsa/rsa.go:74: // Check that the prime factors are
actually prime. Note that this is
On 2012/09/12 17:36:06, agl1 wrote:
Include the check here?
Done.Include the check here?
http://codereview.appspot.com/6493112/