Skip to content

doc: document crypto RNG behaviour across snapshot/checkpoint restore - #67342

Open
Fuma2514 wants to merge 1 commit into
nodejs:mainfrom
Fuma2514:doc-crypto-snapshot-reseed
Open

Fuma2514 wants to merge 1 commit into
nodejs:mainfrom
Fuma2514:doc-crypto-snapshot-reseed

Conversation

@Fuma2514

@Fuma2514 Fuma2514 commented Nov 8, 2026

Copy link
Copy Markdown

For #66880.

The issue measured that crypto.randomBytes, crypto.randomInt, crypto.randomFill, crypto.randomUUID and crypto.getRandomValues produce identical output across a snapshot/checkpoint restore (QEMU/Firecracker/CRIU), because OpenSSL's DRBG continues from the saved state until its next reseed, and crypto.randomUUID draws from a 128-identifier cache. The issue explicitly offered a documentation PR.

This PR adds, docs-only:

  • A NOTE under crypto.randomBytes explaining the DRBG-continues-after-restore behaviour, which functions are affected, and that resumed applications should reseed after their own restore signal.
  • A sentence under crypto.randomUUID about the 128-UUID entropy cache repeating after a restore and the disableEntropyCache escape hatch.

No code changes; the wording follows the sentence shape the issue proposed.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/crypto

@nodejs-github-bot nodejs-github-bot added crypto Issues and PRs related to the crypto subsystem. doc Issues and PRs related to Node.js documentation. labels Nov 8, 2026
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Welcome to Node.js, and thank you for your first contribution!

Before review, please take a moment to read:

Please make sure every commit is signed off. For a first pull request, GitHub Actions require collaborator approval and Jenkins CI must be started by a collaborator or triager, so an initial wait is normal.

Caution

AgentScan found account activity patterns that may be consistent with automation. This is a heuristic, not proof that this pull request was opened by an agent or violates policy. AI-assisted contributions are permitted, but automated tooling must not open pull requests without advance approval, and contributors must personally understand, test, verify, and take responsibility for every submitted change. See the AgentScan analysis, AI use policy, and automation policy for additional context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agentscan:automated-account crypto Issues and PRs related to the crypto subsystem. doc Issues and PRs related to Node.js documentation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants