Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(757)

Issue 6493112: code review 6493112: crypto/rsa: reject PublicKey.E if it won't fit in a 32-... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 6 months ago by rsc
Modified:
11 years, 6 months ago
Reviewers:
CC:
agl1, golang-dev
Visibility:
Public.

Description

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.

Patch Set 1 #

Patch Set 2 : diff -r 56f5a223dcd7 https://go.googlecode.com/hg/ #

Total comments: 4

Patch Set 3 : diff -r 16c78ab3b63c https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r 16c78ab3b63c https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -0 lines) Patch
M src/pkg/crypto/rsa/pkcs1v15.go View 1 3 chunks +9 lines, -0 lines 0 comments Download
M src/pkg/crypto/rsa/rsa.go View 1 2 3 4 chunks +34 lines, -0 lines 0 comments Download

Messages

Total messages: 4
rsc
Hello agl1 (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
11 years, 6 months ago (2012-09-12 16:25:20 UTC) #1
agl1
https://codereview.appspot.com/6493112/diff/2001/src/pkg/crypto/rsa/rsa.go File src/pkg/crypto/rsa/rsa.go (right): https://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") "crypto/rsa: public ...
11 years, 6 months ago (2012-09-12 17:36:06 UTC) #2
agl1
LGTM
11 years, 6 months ago (2012-09-12 17:36:12 UTC) #3
rsc
11 years, 6 months ago (2012-09-13 14:47:04 UTC) #4
*** Submitted as 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#new...
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.

http://codereview.appspot.com/6493112/diff/2001/src/pkg/crypto/rsa/rsa.go#new...
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.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b