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

Issue 35870043: code review 35870043: crypto/rand: it's an error for bits < 6 in Prime() (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 5 months ago by minux1
Modified:
10 years, 2 months ago
Reviewers:
agl1
CC:
golang-dev, agl1
Visibility:
Public.

Description

crypto/rand: support generation of 2-5 bit primes, also document the error return for Prime Fixes issue 6849. Fixes issue 6867.

Patch Set 1 #

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

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

Total comments: 2

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

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

Patch Set 6 : diff -r 7326da92ff4d https://code.google.com/p/go #

Patch Set 7 : diff -r 7326da92ff4d https://code.google.com/p/go #

Patch Set 8 : diff -r 7326da92ff4d https://code.google.com/p/go #

Total comments: 1

Patch Set 9 : diff -r 6ec0276dad0e https://code.google.com/p/go #

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

Patch Set 11 : diff -r 51b22afec887 https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -3 lines) Patch
M src/pkg/crypto/rand/util.go View 1 2 3 4 5 6 2 chunks +5 lines, -3 lines 0 comments Download
A src/pkg/crypto/rand/util_test.go View 1 2 3 4 5 6 7 8 1 chunk +26 lines, -0 lines 0 comments Download

Messages

Total messages: 11
minux1
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
10 years, 5 months ago (2013-12-02 06:55:37 UTC) #1
minux1
https://codereview.appspot.com/35870043/diff/40001/src/pkg/crypto/rand/util.go File src/pkg/crypto/rand/util.go (right): https://codereview.appspot.com/35870043/diff/40001/src/pkg/crypto/rand/util.go#newcode32 src/pkg/crypto/rand/util.go:32: if bits < 1 { alternatively, we can modify ...
10 years, 5 months ago (2013-12-02 07:00:24 UTC) #2
minux1
PTAL. Switched to the error approach.
10 years, 5 months ago (2013-12-02 07:05:31 UTC) #3
agl1
LGTM
10 years, 5 months ago (2013-12-02 18:43:25 UTC) #4
minux1
On 2013/12/02 07:05:31, minux wrote: > PTAL. Switched to the error approach. Yet another fix ...
10 years, 5 months ago (2013-12-02 18:48:08 UTC) #5
agl1
On 2013/12/02 18:48:08, minux wrote: > If we choose to go this route, we need ...
10 years, 5 months ago (2013-12-02 18:52:52 UTC) #6
minux1
On Mon, Dec 2, 2013 at 1:52 PM, <agl@golang.org> wrote: > On 2013/12/02 18:48:08, minux ...
10 years, 5 months ago (2013-12-02 19:10:42 UTC) #7
minux1
PTAL.
10 years, 5 months ago (2013-12-02 19:39:52 UTC) #8
minux1
Note: generation of 2-5 bit prime is biased, because we insist that top 2-bit are ...
10 years, 5 months ago (2013-12-02 19:42:02 UTC) #9
agl1
LGTM https://codereview.appspot.com/35870043/diff/140001/src/pkg/crypto/rand/util_test.go File src/pkg/crypto/rand/util_test.go (right): https://codereview.appspot.com/35870043/diff/140001/src/pkg/crypto/rand/util_test.go#newcode22 src/pkg/crypto/rand/util_test.go:22: if !p.ProbablyPrime(100) { s/100/32/ should be fine. (False ...
10 years, 5 months ago (2013-12-03 15:37:27 UTC) #10
minux1
10 years, 5 months ago (2013-12-10 04:25:53 UTC) #11
*** Submitted as https://code.google.com/p/go/source/detail?r=ec7c0e25938c ***

crypto/rand: support generation of 2-5 bit primes, also document the error
return for Prime
Fixes issue 6849.
Fixes issue 6867.

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

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