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

Issue 4170056: code review 4170056: crypto/rand: Added read buffer to speed up requests for... (Closed)

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

Description

crypto/rand: Added read buffer to speed up requests for small amounts of bytes.

Patch Set 1 #

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

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

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

Messages

Total messages: 10
albert.strasheim
Hello agl1, rsc (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
14 years ago (2011-02-17 15:28:53 UTC) #1
agl1
LGTM
14 years ago (2011-02-17 15:34:44 UTC) #2
rsc
HOLD ON
14 years ago (2011-02-17 15:39:38 UTC) #3
rsc
bufio.NewReader will try to fill its buffer when you call Read the first time, which ...
14 years ago (2011-02-17 15:42:17 UTC) #4
agl1
On Thu, Feb 17, 2011 at 10:42 AM, Russ Cox <rsc@golang.org> wrote: > Or does ...
14 years ago (2011-02-17 16:20:50 UTC) #5
rsc
LGTM
14 years ago (2011-02-17 16:30:23 UTC) #6
agl1
*** Submitted as http://code.google.com/p/go/source/detail?r=dea835a8ff3e *** crypto/rand: Added read buffer to speed up requests for small ...
14 years ago (2011-02-17 20:14:57 UTC) #7
fw
* Adam Langley: > On Thu, Feb 17, 2011 at 10:42 AM, Russ Cox <rsc@golang.org> ...
14 years ago (2011-02-17 21:33:42 UTC) #8
agl1
On Thu, Feb 17, 2011 at 4:33 PM, Florian Weimer <fw@deneb.enyo.de> wrote: > On many ...
14 years ago (2011-02-17 21:37:56 UTC) #9
fw
14 years ago (2011-02-17 21:42:53 UTC) #10
* Adam Langley:

> On Thu, Feb 17, 2011 at 4:33 PM, Florian Weimer <fw@deneb.enyo.de> wrote:
>> On many systems, it drains entropy from the pool shared with
>> /dev/random, causing future reads from /dev/random to block.
>
> Which systems?

Older Linux-based systems, probably from the 2.6.18 time-frame.  The
pools weren't separate.  I'm a bit surprised that this seems to have
been fixed.

> I don't object to having a local PRNG if it's required,
> but I don't want to implement workarounds without good cause.

Understood.  It's actually quite tricky, and only possible if you
don't care that the generator might yield the same bit stream after VM
snapshotting.
Sign in to reply to this message.

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