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

Issue 6352093: code review 6352093: crypto/rsa: left-pad PKCS#1 v1.5 outputs. (Closed)

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

Description

crypto/rsa: left-pad PKCS#1 v1.5 outputs. OpenSSL requires that RSA signatures be exactly the same byte-length as the modulus. Currently it'll reject ~1/256 of our signatures: those that end up a byte shorter. Fixes issue 3796.

Patch Set 1 #

Patch Set 2 : diff -r 63d9b9b595c5 https://code.google.com/p/go/ #

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

Total comments: 2

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

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

Messages

Total messages: 4
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/
11 years, 8 months ago (2012-07-10 23:22:50 UTC) #1
eds2
LGTM (but definitely get more opinions), thanks for the quick fix. http://codereview.appspot.com/6352093/diff/5001/src/pkg/crypto/rsa/pkcs1v15.go File src/pkg/crypto/rsa/pkcs1v15.go (right): ...
11 years, 8 months ago (2012-07-11 00:33:48 UTC) #2
r
LGTM
11 years, 8 months ago (2012-07-11 01:11:10 UTC) #3
agl1
11 years, 8 months ago (2012-07-11 16:47:20 UTC) #4
*** Submitted as http://code.google.com/p/go/source/detail?r=46ca86e70e96 ***

crypto/rsa: left-pad PKCS#1 v1.5 outputs.

OpenSSL requires that RSA signatures be exactly the same byte-length
as the modulus. Currently it'll reject ~1/256 of our signatures: those
that end up a byte shorter.

Fixes issue 3796.

R=golang-dev, edsrzf, r
CC=golang-dev
http://codereview.appspot.com/6352093

http://codereview.appspot.com/6352093/diff/5001/src/pkg/crypto/rsa/pkcs1v15.go
File src/pkg/crypto/rsa/pkcs1v15.go (right):

http://codereview.appspot.com/6352093/diff/5001/src/pkg/crypto/rsa/pkcs1v15.g...
src/pkg/crypto/rsa/pkcs1v15.go:28: // EM = 0x02 || PS || 0x00 || M
On 2012/07/11 00:33:48, eds2 wrote:
> I don't totally understand the code change here, but should this comment be
> updated to:
> 
> // EM = 0x00 || 0x02 || PS || 0x00 || M

That's probably clearer, thanks. (Done.)
Sign in to reply to this message.

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