Skip to content

Conversation

@bnoordhuis
Copy link
Member

Add an API for obtaining cryptographically strong random data from the
system PRNG.

Refs: #1055
CI: https://ci.nodejs.org/job/libuv-test-commit/1437/ (still need to figure out why random_sync fails on Windows)

Copy link
Member

@saghul saghul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments and a question, thanks for picking this up Ben!

@cjihrig
Copy link
Contributor

cjihrig commented Jul 31, 2019

@bnoordhuis the CI link is expired. Just double checking - from reading the comments, it looks like this isn't ready. Is that correct? If it's not, do you want to try to get this in the next release? I'm mainly asking for selfish personal reasons.

@bnoordhuis
Copy link
Member Author

Hah, I figured you'd be interested in that. :-)

I'm afraid it still needs more work. It's on my todo list but it's a pretty busy time for me right now.

@saghul
Copy link
Member

saghul commented Sep 11, 2019

Ping, I grew some interest too :-) Any way I can help?

@bnoordhuis
Copy link
Member Author

@saghul If you want to pick this up that'd be great. You should be able to push to my branch, and if not, let me know and I'll give you commit rights to my fork.

@saghul saghul force-pushed the uv_random branch 2 times, most recently from 2fd425c to 3879f12 Compare September 12, 2019 21:47
@saghul
Copy link
Member

saghul commented Sep 12, 2019

@saghul
Copy link
Member

saghul commented Sep 12, 2019

@saghul
Copy link
Member

saghul commented Sep 13, 2019

There seem to be legit failures on windows. Will dig.

@saghul
Copy link
Member

saghul commented Sep 16, 2019

@cjihrig
Copy link
Contributor

cjihrig commented Sep 16, 2019

The CI is having all sorts of issues right now, but none of the failures look related 👍

Copy link
Member Author

@bnoordhuis bnoordhuis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't LGTM my own PR but... LGTM ^^

Nice to see this come to completion. Great job, Saúl.

Copy link
Member

@saghul saghul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😎

@saghul
Copy link
Member

saghul commented Sep 16, 2019

@bnoordhuis I fixed the couple of nits, squashed, rebased and approved ;-) Please take one last look.

Copy link
Member Author

@bnoordhuis bnoordhuis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :-)

- macOS, OpenBSD: `getentropy(2) <https://man.openbsd.org/getentropy.2>_`
if available, or `/dev/urandom` after reading from `/dev/random` once.
- AIX: `/dev/random`.
- IBMi: `/dev/urandom`.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- IBMi: `/dev/urandom`.
- IBM i: `/dev/urandom`.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed this critical issue :-P

Add an API for obtaining cryptographically strong random data from the
system PRNG.

Co-authored-by: Saúl Ibarra Corretgé <[email protected]>
Refs: libuv#1055
PR-URL: libuv#2347
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
@saghul saghul merged commit 4ed2a78 into libuv:v1.x Sep 18, 2019
@saghul
Copy link
Member

saghul commented Sep 18, 2019

Landed in ✨ 4ed2a78

vtjnash added a commit to vtjnash/libuv that referenced this pull request Jan 7, 2020
@vtjnash vtjnash mentioned this pull request Jan 7, 2020
cjihrig pushed a commit that referenced this pull request Jan 8, 2020
Introduced in #2404
and #2347.

PR-URL: #2609
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
codebytere added a commit to electron/electron that referenced this pull request Feb 13, 2020
codebytere added a commit to electron/electron that referenced this pull request Feb 13, 2020
codebytere added a commit to electron/electron that referenced this pull request Feb 13, 2020
codebytere added a commit to electron/electron that referenced this pull request Feb 13, 2020
codebytere added a commit to electron/electron that referenced this pull request Feb 13, 2020
codebytere added a commit to electron/electron that referenced this pull request Feb 13, 2020
codebytere added a commit to electron/electron that referenced this pull request Feb 15, 2020
codebytere added a commit to electron/electron that referenced this pull request Feb 18, 2020
codebytere added a commit to electron/electron that referenced this pull request Feb 21, 2020
codebytere added a commit to electron/electron that referenced this pull request Feb 21, 2020
codebytere added a commit to electron/electron that referenced this pull request Feb 24, 2020
codebytere added a commit to electron/electron that referenced this pull request Feb 24, 2020
* chore: bump node in DEPS to v12.16.0

* Fixup asar support setup patch

nodejs/node#30862

* Fixup InternalCallbackScope patch

nodejs/node#30236

* Fixup GN buildfiles patch

nodejs/node#30755

* Fixup low-level hooks patch

nodejs/node#30466

* Fixup globals require patch

nodejs/node#31643

* Fixup process stream patch

nodejs/node#30862

* Fixup js2c modification patch

nodejs/node#30755

* Fixup internal fs override patch

nodejs/node#30610

* Fixup context-aware warn patch

nodejs/node#30336

* Fixup Node.js with ltcg config

nodejs/node#29388

* Fixup oaepLabel patch

nodejs/node#30917

* Remove redundant ESM test patch

nodejs/node#30997

* Remove redundant cli flag patch

nodejs/node#30466

* Update filenames.json

* Remove macro generation in GN build files

nodejs/node#30755

* Fix some compilation errors upstream

* Add uvwasi to deps

nodejs/node#30258

* Fix BoringSSL incompatibilities

* Fixup linked module patch

nodejs/node#30274

* Add missing sources to GN uv build

libuv/libuv#2347

* Patch some uvwasi incompatibilities

* chore: bump Node.js to v12.6.1

* Remove mark_arraybuffer_as_untransferable.patch

nodejs/node#30549

* Fix uvwasi build failure on win

* Fixup --perf-prof cli option error

* Fixup early cjs module loading

* fix: initialize diagnostics properly

nodejs/node#30025

* Disable new esm syntax specs

nodejs/node#30219

* Fixup v8 weakref hook spec

nodejs/node#29874

* Fix async context timer issue

* Disable monkey-patch-main spec

It relies on nodejs/node#29777, and we don't
override prepareStackTrace.

* Disable new tls specs

nodejs/node#23188

We don't support much of TLS owing to schisms between BoringSSL and
OpenSSL.

Co-authored-by: Shelley Vohr <[email protected]>
liujinye-sys pushed a commit to open-vela/apps_system_libuv that referenced this pull request Jul 23, 2025
Add an API for obtaining cryptographically strong random data from the
system PRNG.

Co-authored-by: Saúl Ibarra Corretgé <[email protected]>
Refs: libuv/libuv#1055
PR-URL: libuv/libuv#2347
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
liujinye-sys pushed a commit to open-vela/apps_system_libuv that referenced this pull request Jul 23, 2025
Introduced in libuv/libuv#2404
and libuv/libuv#2347.

PR-URL: libuv/libuv#2609
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
liujinye-sys pushed a commit to open-vela/apps_system_libuv that referenced this pull request Dec 16, 2025
Add an API for obtaining cryptographically strong random data from the
system PRNG.

Co-authored-by: Saúl Ibarra Corretgé <[email protected]>
Refs: libuv/libuv#1055
PR-URL: libuv/libuv#2347
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
liujinye-sys pushed a commit to open-vela/apps_system_libuv that referenced this pull request Dec 16, 2025
Introduced in libuv/libuv#2404
and libuv/libuv#2347.

PR-URL: libuv/libuv#2609
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants