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

Issue 7948044: code review 7948044: crypto/rsa: don't correct private exponent unless needed. (Closed)

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

Description

crypto/rsa: don't correct private exponent unless needed. At some point in the past, I believe the GCD algorithm was setting d to be negative. The RSA code has been correcting that ever since but, now, it appears to have changed and the correction isn't needed. Having d be too large is harmless, it's just a little odd and I happened to notice.

Patch Set 1 #

Patch Set 2 : code review 7948044: crypto/rsa: don't correct private exponent unless needed. #

Patch Set 3 : diff -r e1a94ec9f285 https://code.google.com/p/go/ #

Patch Set 4 : diff -r e1a94ec9f285 https://code.google.com/p/go/ #

Patch Set 5 : diff -r 49bee4257d78 https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -1 line) Patch
M src/pkg/crypto/rsa/rsa.go View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M src/pkg/crypto/rsa/rsa_test.go View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 5
agl1
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go/
12 years ago (2013-03-21 21:10:09 UTC) #1
rsc
Why do you think priv.D cannot come back negative? I don't see that documented, and ...
12 years ago (2013-03-21 21:13:16 UTC) #2
agl1
On Thu, Mar 21, 2013 at 5:13 PM, Russ Cox <rsc@golang.org> wrote: > Why do ...
12 years ago (2013-03-22 14:52:06 UTC) #3
rsc
LGTM I suck at reading diffs.
12 years ago (2013-03-25 20:11:07 UTC) #4
agl1
12 years ago (2013-03-25 23:08:41 UTC) #5
*** Submitted as https://code.google.com/p/go/source/detail?r=892655b57e28 ***

crypto/rsa: don't correct private exponent unless needed.

At some point in the past, I believe the GCD algorithm was setting d to
be negative. The RSA code has been correcting that ever since but, now,
it appears to have changed and the correction isn't needed.

Having d be too large is harmless, it's just a little odd and I
happened to notice.

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/7948044
Sign in to reply to this message.

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