GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — docs: more explicit crypto.pseudoRandomBytes information by calvinmetcalf · Pull Request #545 · nodejs/node

Conversation

@calvinmetcalf

@calvinmetcalf calvinmetcalf commented Jan 21, 2015

Copy link
Copy Markdown
Contributor

the docs as it is make it sound like pseudoRandomBytes is tapping a different entropy source or possibly might be a /dev/urandom to crypto.pseudoRandomBytes's /dev/random.

Is there a reason pseudoRandomBytes is in the api in the first place?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bnoordhuis

bnoordhuis commented Jan 21, 2015

Copy link
Copy Markdown
Member

Is there a reason pseudoRandomBytes is in the api in the first place?

Yes, but the reason may be invalid. When I added them, I reasoned that people may want to plug in a custom RAND engine but, to this day, I've never heard of anyone actually doing that. I speculate that people with hardware RNG devices feed that entropy into the system entropy pool, not directly into openssl.

The PR LGTM but can you update the commit log? The first line should be <= 50 characters and there should be one or two lines describing the what and why of the change. Thanks!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bnoordhuis

bnoordhuis commented Jan 21, 2015

Copy link
Copy Markdown
Member

On the subject of crypto.pseudoRandomBytes(), your PR made me realize that there is probably no downside to making it an alias of crypto.randomBytes(). In the past, there was a material difference between them, but as of f68a116, that's no longer the case.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@calvinmetcalf

calvinmetcalf commented Jan 21, 2015

Copy link
Copy Markdown
Contributor Author

Ok can amend the commit.

Would it make sense to think about depreciating it?

On Wed, Jan 21, 2015, 5:59 PM Ben Noordhuis [email protected]
wrote:

Is there a reason pseudoRandomBytes is in the api in the first place?

Yes, but the reason may be invalid. When I added them, I reasoned that
people may want to plug in a custom RAND engine but, to this day, I've
never heard of anyone actually doing that. I speculate that people with
hardware RNG devices feed that entropy into the system entropy pool, not
directly into openssl.

The PR LGTM but can you update the commit log? The first line should be <=
50 characters and there should be one or two lines describing the what and
why of the change. Thanks!

—
Reply to this email directly or view it on GitHub
#545 (comment).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@calvinmetcalf

calvinmetcalf commented Jan 21, 2015

Copy link
Copy Markdown
Contributor Author

Ok i can update the pull to do that as well

On Wed, Jan 21, 2015, 6:03 PM Ben Noordhuis [email protected]
wrote:

On the subject of crypto.pseudoRandomBytes(), your PR made me realize that
there is probably no downside to making it an alias of
crypto.randomBytes(). In the past, there was a material difference between
them, but as of f68a116
f68a116,
that's no longer the case.

—
Reply to this email directly or view it on GitHub
#545 (comment).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bnoordhuis

bnoordhuis commented Jan 21, 2015

Copy link
Copy Markdown
Member

@calvinmetcalf Let's start with the documentation update. Changing crypto.pseudoRandomBytes() would also require ripping out some code from src/node_crypto.cc.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@calvinmetcalf

calvinmetcalf commented Jan 21, 2015

Copy link
Copy Markdown
Contributor Author

Haha ok won't get ahead of myself

On Wed, Jan 21, 2015, 6:07 PM Ben Noordhuis [email protected]
wrote:

@calvinmetcalf https://github.com/calvinmetcalf Let's start with the
documentation update. Changing crypto.pseudoRandomBytes() would also
require ripping out some code from src/node_crypto.cc.

—
Reply to this email directly or view it on GitHub
#545 (comment).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@calvinmetcalf Calvin Metcalf
docs: more explicit crypto.pseudoRandomBytes information
bfd2245
Updates the docs for the crypto.pseudoRandomBytes function
to more explicitly detail how it's the same as crypto.randomBytes
just without a safety net (e.g. it doesn't throw an error when
there is low entropy).
@calvinmetcalf
calvinmetcalf force-pushed the pseudoRandomBytes branch from 83251c4 to bfd2245 Compare January 22, 2015 02:25
@calvinmetcalf

calvinmetcalf commented Jan 22, 2015

Copy link
Copy Markdown
Contributor Author

updated

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@calvinmetcalf calvinmetcalf mentioned this pull request Jan 22, 2015
crypto: make pseudoRandomBytes an alias for randomBytes #557
Closed
bnoordhuis pushed a commit that referenced this pull request Jan 22, 2015
@calvinmetcalf @bnoordhuis
doc: more explicit crypto.pseudoRandomBytes docs
d481bb6
Updates the docs for the crypto.pseudoRandomBytes function
to more explicitly detail how it's the same as crypto.randomBytes
just without a safety net (e.g. it doesn't throw an error when
there is low entropy).

PR-URL: #545
Reviewed-By: Ben Noordhuis <[email protected]>
@bnoordhuis

bnoordhuis commented Jan 22, 2015

Copy link
Copy Markdown
Member

Thanks Calvin, landed in d481bb6 with minor touch-ups for line length.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bnoordhuis bnoordhuis closed this Jan 22, 2015
@calvinmetcalf
calvinmetcalf deleted the pseudoRandomBytes branch January 22, 2015 15:43
This was referenced Apr 24, 2023
[Snyk] Fix for 6 vulnerabilities aliscco/alisco-node#94
Open
[Snyk] Fix for 4 vulnerabilities aliscco/alisco-node#100
Open
@aliscco aliscco mentioned this pull request Apr 24, 2023
[Snyk] Fix for 6 vulnerabilities aliscco/alisco-node#110
Open
This was referenced Apr 24, 2023
[Snyk] Fix for 4 vulnerabilities aliscco/alisco-node#116
Open
[Snyk] Fix for 4 vulnerabilities aliscco/alisco-node#120
Open
@aliscco aliscco mentioned this pull request Apr 24, 2023
[Snyk] Fix for 4 vulnerabilities aliscco/alisco-node#124
Open
@snyk-bot snyk-bot mentioned this pull request Apr 25, 2023
[Snyk] Fix for 4 vulnerabilities aliscco/alisco-node#135
Open
This was referenced Apr 25, 2023
[Snyk] Fix for 3 vulnerabilities aliscco/alisco-node#140
Open
[Snyk] Fix for 4 vulnerabilities aliscco/alisco-node#141
Open
[Snyk] Security upgrade xo from 0.24.0 to 0.42.0 aliscco/alisco-node#143
Open
[Snyk] Fix for 4 vulnerabilities aliscco/alisco-node#147
Open
[Snyk] Fix for 4 vulnerabilities aliscco/alisco-node#148
Open
[Snyk] Security upgrade xo from 0.37.1 to 0.42.0 aliscco/alisco-node#151
Open
[Snyk] Fix for 19 vulnerabilities aliscco/alisco-node#155
Open
[Snyk] Fix for 5 vulnerabilities aliscco/alisco-node#156
Open
[Snyk] Fix for 4 vulnerabilities aliscco/alisco-node#158
Open
This was referenced Dec 1, 2023
[Snyk] Fix for 1 vulnerabilities leonardoadame/node#365
Open
[Snyk] Fix for 1 vulnerabilities leonardoadame/node#368
Open
[Snyk] Fix for 1 vulnerabilities leonardoadame/node#374
Open
[Snyk] Fix for 1 vulnerabilities leonardoadame/node#376
Open
[Snyk] Fix for 1 vulnerabilities leonardoadame/node#383
Open
[Snyk] Fix for 1 vulnerabilities leonardoadame/node#386
Open
[Snyk] Security upgrade xo from 0.11.2 to 0.42.0 leonardoadame/node#390
Open
[Snyk] Fix for 1 vulnerabilities leonardoadame/node#392
Open
[Snyk] Fix for 1 vulnerabilities leonardoadame/node#398
Open
[Snyk] Security upgrade xo from 0.24.0 to 0.42.0 leonardoadame/node#400
Open
[Snyk] Fix for 1 vulnerabilities leonardoadame/node#407
Open
[Snyk] Security upgrade xo from 0.35.0 to 0.42.0 leonardoadame/node#409
Open
[Snyk] Security upgrade xo from 0.16.0 to 0.42.0 leonardoadame/node#412
Open
[Snyk] Fix for 1 vulnerabilities leonardoadame/node#414
Open
[Snyk] Fix for 1 vulnerabilities leonardoadame/node#430
Open
[Snyk] Fix for 1 vulnerabilities leonardoadame/node#434
Open
[Snyk] Fix for 1 vulnerabilities leonardoadame/node#436
Closed
[Snyk] Fix for 1 vulnerabilities leonardoadame/node#439
Open
[Snyk] Fix for 1 vulnerabilities leonardoadame/node#449
Open
[Snyk] Fix for 1 vulnerabilities leonardoadame/node#454
Open
[Snyk] Fix for 1 vulnerabilities leonardoadame/node#456
Open
[Snyk] Fix for 1 vulnerabilities leonardoadame/node#461
Open
[Snyk] Fix for 1 vulnerabilities leonardoadame/node#469
Open
[Snyk] Fix for 1 vulnerabilities leonardoadame/node#476
Open
[Snyk] Fix for 1 vulnerabilities leonardoadame/node#487
Open
[Snyk] Fix for 1 vulnerabilities leonardoadame/node#494
Open
[Snyk] Security upgrade xo from 0.23.0 to 0.42.0 leonardoadame/node#509
Open
[Snyk] Fix for 1 vulnerabilities leonardoadame/node#524
Open
[Snyk] Fix for 1 vulnerabilities leonardoadame/node#537
Open
[Snyk] Fix for 1 vulnerabilities leonardoadame/node#544
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@calvinmetcalf @bnoordhuis
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.