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

Issue 4280041: crypto/openpgp: add DSA signature support. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years ago by agl1
Modified:
13 years, 11 months ago
Reviewers:
CC:
bradfitz, nsz_port70.net, golang-dev
Visibility:
Public.

Description

crypto/openpgp: add DSA signature support.

Patch Set 1 #

Patch Set 2 : diff -r 165b09de2f17 https://go.googlecode.com/hg/ #

Total comments: 8

Patch Set 3 : diff -r 87209dfd5825 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+178 lines, -32 lines) Patch
M src/pkg/crypto/openpgp/packet/packet.go View 1 3 chunks +7 lines, -1 line 0 comments Download
M src/pkg/crypto/openpgp/packet/private_key.go View 1 3 chunks +30 lines, -1 line 0 comments Download
M src/pkg/crypto/openpgp/packet/public_key.go View 1 2 2 chunks +21 lines, -10 lines 0 comments Download
M src/pkg/crypto/openpgp/packet/signature.go View 1 6 chunks +74 lines, -14 lines 0 comments Download
M src/pkg/crypto/openpgp/read_test.go View 1 6 chunks +28 lines, -4 lines 0 comments Download
M src/pkg/crypto/openpgp/write.go View 1 2 chunks +4 lines, -0 lines 0 comments Download
M src/pkg/crypto/openpgp/write_test.go View 1 2 chunks +14 lines, -2 lines 0 comments Download

Messages

Total messages: 5
agl1
14 years ago (2011-03-13 18:42:43 UTC) #1
bradfitz
LGTM http://codereview.appspot.com/4280041/diff/2001/src/pkg/crypto/openpgp/packet/public_key.go File src/pkg/crypto/openpgp/packet/public_key.go (right): http://codereview.appspot.com/4280041/diff/2001/src/pkg/crypto/openpgp/packet/public_key.go#newcode202 src/pkg/crypto/openpgp/packet/public_key.go:202: if !dsa.Verify(dsaPublicKey, hashBytes, sig.DSASigR, sig.DSASigS) { kinda sad ...
14 years ago (2011-03-13 18:50:37 UTC) #2
nsz_port70.net
* agl@golang.org <agl@golang.org> [2011-03-13 18:42:43 +0000]: > Description: > crypto/openpgp: add DSA signature support. > ...
14 years ago (2011-03-13 21:47:41 UTC) #3
agl1
On Sun, Mar 13, 2011 at 5:47 PM, Szabolcs Nagy <nsz@port70.net> wrote: > i don't ...
14 years ago (2011-03-15 17:13:30 UTC) #4
agl1
14 years ago (2011-03-16 14:50:20 UTC) #5
*** Submitted as http://code.google.com/p/go/source/detail?r=424b74bdf29e ***

crypto/openpgp: add DSA signature support.

R=bradfitzgo, nsz
CC=golang-dev
http://codereview.appspot.com/4280041

Committer: Adam Langley <agl@golang.org>

http://codereview.appspot.com/4280041/diff/2001/src/pkg/crypto/openpgp/packet...
File src/pkg/crypto/openpgp/packet/public_key.go (right):

http://codereview.appspot.com/4280041/diff/2001/src/pkg/crypto/openpgp/packet...
src/pkg/crypto/openpgp/packet/public_key.go:202: if !dsa.Verify(dsaPublicKey,
hashBytes, sig.DSASigR, sig.DSASigS) {
On 2011/03/13 18:50:37, bradfitzgo wrote:
> kinda sad that that this returns a bool rather than an os.Error just for
> symmetry with rsa

Yea, I think returning an os.Error from the RSA code was a mistake and I'll
clean that up.

http://codereview.appspot.com/4280041/diff/2001/src/pkg/crypto/openpgp/packet...
File src/pkg/crypto/openpgp/packet/signature.go (right):

http://codereview.appspot.com/4280041/diff/2001/src/pkg/crypto/openpgp/packet...
src/pkg/crypto/openpgp/packet/signature.go:423: // SignRSA signs a message with
an RSA private key. The hash, h, must contain
On 2011/03/13 18:50:37, bradfitzgo wrote:
> The omission of error details is probably fine & obvious, but you say nothing
of
> where its signature goes on the success case.

Done.

http://codereview.appspot.com/4280041/diff/2001/src/pkg/crypto/openpgp/packet...
src/pkg/crypto/openpgp/packet/signature.go:435: // the hash of the message to be
signed and will be mutated by this function
On 2011/03/13 18:50:37, bradfitzgo wrote:
> likewise, and missing trailing period here (you have one above)

Done.

http://codereview.appspot.com/4280041/diff/2001/src/pkg/crypto/openpgp/packet...
src/pkg/crypto/openpgp/packet/signature.go:448: return
error.InvalidArgumentError("Signature: need to call SignRSA/DSA before
Serialize")
On 2011/03/13 18:50:37, bradfitzgo wrote:
> "SignRSA or SignDSA" ?

Done.
Sign in to reply to this message.

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