<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go/src/crypto/rand/rand.go, branch json-isValidNumber-before</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=json-isValidNumber-before</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=json-isValidNumber-before'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2023-01-26T10:15:35Z</updated>
<entry>
<title>crypto/rand, internal/syscall/unix: add support for getrandom on NetBSD ≥ 10.0</title>
<updated>2023-01-26T10:15:35Z</updated>
<author>
<name>Tobias Klauser</name>
<email>tklauser@distanz.ch</email>
</author>
<published>2023-01-25T15:19:26Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=4df10fba1687a6d4f51d7238a403f8f2298f6a16'/>
<id>urn:sha1:4df10fba1687a6d4f51d7238a403f8f2298f6a16</id>
<content type='text'>
The getrandom syscall was added to NetBSD in version 10.0, see
https://man.netbsd.org/NetBSD-10.0-STABLE/getrandom.2

Change-Id: I2714c1040791f7f4728be8d869058a38cbd93d4d
Reviewed-on: https://go-review.googlesource.com/c/go/+/463123
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Tobias Klauser &lt;tobias.klauser@gmail.com&gt;
Reviewed-by: Benny Siegert &lt;bsiegert@gmail.com&gt;
</content>
</entry>
<entry>
<title>crypto/rand: properly handle large Read on windows</title>
<updated>2022-05-05T22:44:02Z</updated>
<author>
<name>Roland Shoemaker</name>
<email>roland@golang.org</email>
</author>
<published>2022-04-26T02:02:35Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=bb1f4416180511231de6d17a1f2f55c82aafc863'/>
<id>urn:sha1:bb1f4416180511231de6d17a1f2f55c82aafc863</id>
<content type='text'>
Use the batched reader to chunk large Read calls on windows to a max of
1 &lt;&lt; 31 - 1 bytes. This prevents an infinite loop when trying to read
more than 1 &lt;&lt; 32 -1 bytes, due to how RtlGenRandom works.

This change moves the batched function from rand_unix.go to rand.go,
since it is now needed for both windows and unix implementations.

Fixes #52561

Change-Id: Id98fc4b1427e5cb2132762a445b2aed646a37473
Reviewed-on: https://go-review.googlesource.com/c/go/+/402257
Run-TryBot: Roland Shoemaker &lt;roland@golang.org&gt;
Reviewed-by: Filippo Valsorda &lt;filippo@golang.org&gt;
Reviewed-by: Filippo Valsorda &lt;valsorda@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>crypto/rand: document additional getrandom/getentropy support in Reader</title>
<updated>2021-10-05T07:32:41Z</updated>
<author>
<name>Tobias Klauser</name>
<email>tklauser@distanz.ch</email>
</author>
<published>2021-10-04T21:55:52Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=d55009c59458c5fe8520f8cd10e8b61696ebab7a'/>
<id>urn:sha1:d55009c59458c5fe8520f8cd10e8b61696ebab7a</id>
<content type='text'>
CL 269999 added support for getrandom on Dragonfly.
CL 299134 added support for getrandom on Solaris.
CL 302489 added support for getentropy on macOS.

Update the godoc for Reader accordingly.

Change-Id: Ice39e5e62f052f21b664db6abbfd97f03944586e
Reviewed-on: https://go-review.googlesource.com/c/go/+/353190
Trust: Tobias Klauser &lt;tobias.klauser@gmail.com&gt;
Run-TryBot: Tobias Klauser &lt;tobias.klauser@gmail.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</content>
</entry>
<entry>
<title>crypto/rand: generate random numbers using RtlGenRandom on Windows</title>
<updated>2020-10-27T12:00:35Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2019-12-05T17:48:21Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=333e90448a0e55f2e1161853caecf3d30ef3a74a'/>
<id>urn:sha1:333e90448a0e55f2e1161853caecf3d30ef3a74a</id>
<content type='text'>
CryptGenRandom appears to be unfavorable these days, whereas the classic
RtlGenRandom is still going strong.

This commit also moves the warnBlocked function into rand_unix, rather
than rand, because it's now only used on unix.

Fixes #33542

Change-Id: I5c02a5917572f54079d627972401efb6e1ce4057
Reviewed-on: https://go-review.googlesource.com/c/go/+/210057
Run-TryBot: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Filippo Valsorda &lt;filippo@golang.org&gt;
Trust: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>crypto/rand: warn to stderr if blocked 60+ sec on first Reader.Read call</title>
<updated>2018-10-03T22:50:25Z</updated>
<author>
<name>Brad Fitzpatrick</name>
<email>bradfitz@golang.org</email>
</author>
<published>2018-10-03T22:18:07Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=1961d8d72a53e780effa18bfa8dbe4e4282df0b2'/>
<id>urn:sha1:1961d8d72a53e780effa18bfa8dbe4e4282df0b2</id>
<content type='text'>
Fixes #22614

Change-Id: I220afbaaeab4dec6d59eeeef12107234a77f1587
Reviewed-on: https://go-review.googlesource.com/c/139419
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</content>
</entry>
<entry>
<title>crypto/rand: use the new getrandom syscall on FreeBSD</title>
<updated>2018-08-22T01:49:02Z</updated>
<author>
<name>David Carlier</name>
<email>devnexen@gmail.com</email>
</author>
<published>2018-08-21T07:54:04Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=64f3d75bc288679e9e18cb9513897e7139f3fc3b'/>
<id>urn:sha1:64f3d75bc288679e9e18cb9513897e7139f3fc3b</id>
<content type='text'>
Since the 12.x branch, the getrandom syscall had been introduced
with similar interface as Linux's and consistent syscall id
across architectures.

Change-Id: I63d6b45dbe9e29f07f1b5b6c2ec8be4fa624b9ee
GitHub-Last-Rev: 6fb76e6522ef5ccb96d02445ffa39796dae89016
GitHub-Pull-Request: golang/go#25976
Reviewed-on: https://go-review.googlesource.com/120055
Run-TryBot: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</content>
</entry>
<entry>
<title>crypto/rand: make documentation consistent between package comment and Reader</title>
<updated>2018-06-20T15:07:49Z</updated>
<author>
<name>Brad Fitzpatrick</name>
<email>bradfitz@golang.org</email>
</author>
<published>2018-06-19T21:55:01Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=f549af6f0a79479dddc70593291c31401b1f495a'/>
<id>urn:sha1:f549af6f0a79479dddc70593291c31401b1f495a</id>
<content type='text'>
Updates #25959

Change-Id: I9ae64b216ab5807718db0db98b32de1dc5fa4bec
Reviewed-on: https://go-review.googlesource.com/119875
Reviewed-by: Rob Pike &lt;r@golang.org&gt;
Reviewed-by: Filippo Valsorda &lt;filippo@golang.org&gt;
</content>
</entry>
<entry>
<title>crypto/rand, crypto/x509: add js/wasm architecture</title>
<updated>2018-05-03T18:00:24Z</updated>
<author>
<name>Richard Musiol</name>
<email>mail@richard-musiol.de</email>
</author>
<published>2018-03-04T12:38:08Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=63756e0c8f76856a436274fc47d912815f9f17e6'/>
<id>urn:sha1:63756e0c8f76856a436274fc47d912815f9f17e6</id>
<content type='text'>
This commit adds the js/wasm architecture to the crypto packages.

Updates #18892

Change-Id: Id41a9d54920746d5019cbeedcff1b83874f2ef73
Reviewed-on: https://go-review.googlesource.com/110095
Reviewed-by: Austin Clements &lt;austin@google.com&gt;
</content>
</entry>
<entry>
<title>all: make copyright headers consistent with one space after period</title>
<updated>2016-03-01T23:34:33Z</updated>
<author>
<name>Brad Fitzpatrick</name>
<email>bradfitz@golang.org</email>
</author>
<published>2016-03-01T22:57:46Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=519474451a44b861e54466998a893a173bd54c4b'/>
<id>urn:sha1:519474451a44b861e54466998a893a173bd54c4b</id>
<content type='text'>
This is a subset of https://golang.org/cl/20022 with only the copyright
header lines, so the next CL will be smaller and more reviewable.

Go policy has been single space after periods in comments for some time.

The copyright header template at:

    https://golang.org/doc/contribute.html#copyright

also uses a single space.

Make them all consistent.

Change-Id: Icc26c6b8495c3820da6b171ca96a74701b4a01b0
Reviewed-on: https://go-review.googlesource.com/20111
Run-TryBot: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Matthew Dempsky &lt;mdempsky@google.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>crypto/rand: use the getentropy syscall on OpenBSD</title>
<updated>2016-02-26T19:58:09Z</updated>
<author>
<name>Michael McConville</name>
<email>momcconville@gmail.com</email>
</author>
<published>2016-01-03T01:50:57Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=ddfe7b3dc00291862f33224b68ffdad0ef4001ab'/>
<id>urn:sha1:ddfe7b3dc00291862f33224b68ffdad0ef4001ab</id>
<content type='text'>
Go already supports Linux's getrandom, which is a slightly modified
version of getentropy.

getentropy was added in OpenBSD 5.6. All supported versions of OpenBSD
include it so, unlike with Linux and getrandom, we don't need to test
for its presence.

Fixes #13785.

Change-Id: Ib536b96675f257cd8c5de1e3a36165e15c9abac9
Reviewed-on: https://go-review.googlesource.com/18219
Run-TryBot: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</content>
</entry>
</feed>
