libngu PR #62: HMAC_DRBG core, verified against NIST CAVP vectors
libngu-pr-62
Latest reviewed change
source content difference between and
The pull request state changed from Open to Merged, and the page rendered additional contributor labels.
There was an error while loading. Please reload this page.
Copy link
Copy Markdown
+Contributor
Part 1 of 3 — see #63 and #64; this core is inert until #64 wires it into random.c.
Self-contained core for the RNG rework that follows: K/V state machine with instantiate, mixing reseed, and backtracking-resistant generate. No heap allocation and no failure paths -- HMAC is built directly on the SHA-256 backend the rest of libngu already uses (mbedtls or cifra, as in hash.c), because mbedtls' HMAC layer allocates and hardware SHA (MBEDTLS_SHA256_ALT) can fail at runtime; the latter is refused at compile time until a target proves its no-fail contract. Reseed interval and prediction resistance are deliberately omitted and documented: the consumer (random.c, next commits) mixes fresh entropy into every output instead. Secret-bearing temporaries are wiped via a volatile-store helper the optimizer cannot elide.
Verified by a host-compiled harness (ngu_tests: make cavp, part of 'make tests') against official NIST CAVP vectors -- 12 vectors plus 2 derived partial-block KATs, run through BOTH SHA-256 backends. The vector extractor cross-checks every vector against an independent pure-python reference before emitting; vectors are checked in with provenance.
Closed
First lines only. The complete diff is in the timeline below.
- Organisation
- switck
- Evidence role
- Repository pull request
- Published
- not established
- Source changes
- 2
- Detected differences
- 3
- Unreviewed
- 0
- Copies held
- 4
First of the three-PR split of #59 that its author offered on 1 August, and the only one closed: at first capture on 7 Aug 2026 the page shows jgmontoya wanting to merge one commit and a state of Closed. The commit adds an HMAC_DRBG (SP 800-90A 10.1.2, SHA-256) as a self-contained core for the RNG rework that follows, built on the SHA-256 backend libngu already uses rather than on mbedtls' allocating HMAC layer, and states it was checked by a host-compiled harness against official NIST CAVP vectors through both backends. Registered from its own page because the record had been describing this stack from titles rendered on the #59 and #61 pages. Whether the closure was withdrawal, supersession or rejection is not stated on the captured page, and this project does not infer it.
Every check is recorded, including checks that found no text change. A detected edit is therefore bounded between two checks. The publisher's exact save time is not observable from this record. Last checked .
This post is held twice: here, with this project's own note on why it matters, and again as part of the conversation captured at , which is polled for changes. Both copies are the same post; neither is a separate event.
Snapshot and diff bodies for this chain monitor are held in the local evidence archive but withheld from the public site because they can contain the addresses of people who published nothing themselves. Capture times and reviewed change summaries remain available below.
Held captures
-
The pull request state changed from Open to Merged, and the page rendered additional contributor labels.
Recovered from the Internet Archive rather than captured by this project. The row records that third-party provenance separately from captures made by this project.
What changed from the previous capture 4 lines
There was an error while loading. Please reload this page. Copy link Copy Markdown +Contributor Part 1 of 3 — see #63 and #64; this core is inert until #64 wires it into random.c. Self-contained core for the RNG rework that follows: K/V state machine with instantiate, mixing reseed, and backtracking-resistant generate. No heap allocation and no failure paths -- HMAC is built directly on the SHA-256 backend the rest of libngu already uses (mbedtls or cifra, as in hash.c), because mbedtls' HMAC layer allocates and hardware SHA (MBEDTLS_SHA256_ALT) can fail at runtime; the latter is refused at compile time until a target proves its no-fail contract. Reseed interval and prediction resistance are deliberately omitted and documented: the consumer (random.c, next commits) mixes fresh entropy into every output instead. Secret-bearing temporaries are wiped via a volatile-store helper the optimizer cannot elide. Verified by a host-compiled harness (ngu_tests: make cavp, part of 'make tests') against official NIST CAVP vectors -- 12 vectors plus 2 derived partial-block KATs, run through BOTH SHA-256 backends. The vector extractor cross-checks every vector against an independent pure-python reference before emitting; vectors are checked in with provenance. Closed random: harden entropy backends and state handling #64 -Open +Merged random: fail-closed entropy backends; replace Yasmarang with CAVP-verified HMAC_DRBG #59 Closed Aug 7, 2026 Copy link Copy Markdown +Contributor Author No longer relevant given #61 All reactionsExtracted text as captured
Skip to content Navigation Menu Sign inAppearance settings Platform AI CODE CREATION GitHub CopilotWrite better code with AI GitHub Copilot appDirect agents from issue to merge MCP RegistryIntegrate external tools DEVELOPER WORKFLOWS ActionsAutomate any workflow CodespacesInstant dev environments IssuesPlan and track work Code ReviewManage code changes Code QualityEnforce quality at merge APPLICATION SECURITY GitHub Advanced SecurityFind and fix vulnerabilities Code securitySecure your code as you build Secret protectionStop leaks before they start EXPLORE Why GitHub Documentation Blog Changelog Marketplace View all features Solutions BY COMPANY SIZE Enterprises Small and medium teams Startups Nonprofits BY USE CASE App Modernization DevSecOps DevOps CI/CD View all use cases BY INDUSTRY Healthcare Financial servicesExcerpt only. The complete copy is held offline and backs quotations on this site. The original publication remains the canonical public source.
-
The pull request state changed from Open to Closed.
Recovered from the Internet Archive rather than captured by this project. The row records that third-party provenance separately from captures made by this project.
What changed from the previous capture 2 lines
This was referenced Aug 1, 2026 random: reject two-word entropy cycles #63 -Open +Closed random: harden entropy backends and state handling #64 OpenExtracted text as captured
Skip to content Navigation Menu Sign inAppearance settings Platform AI CODE CREATION GitHub CopilotWrite better code with AI GitHub Copilot appDirect agents from issue to merge MCP RegistryIntegrate external tools DEVELOPER WORKFLOWS ActionsAutomate any workflow CodespacesInstant dev environments IssuesPlan and track work Code ReviewManage code changes Code QualityEnforce quality at merge APPLICATION SECURITY GitHub Advanced SecurityFind and fix vulnerabilities Code securitySecure your code as you build Secret protectionStop leaks before they start EXPLORE Why GitHub Documentation Blog Changelog Marketplace View all features Solutions BY COMPANY SIZE Enterprises Small and medium teams Startups Nonprofits BY USE CASE App Modernization DevSecOps DevOps CI/CD View all use cases BY INDUSTRY Healthcare Financial servicesExcerpt only. The complete copy is held offline and backs quotations on this site. The original publication remains the canonical public source.
-
Recovered from the Internet Archive rather than captured by this project. The row records that third-party provenance separately from captures made by this project.
What changed from the previous capture 0 lines
Extracted text as captured
Skip to content Navigation Menu Sign inAppearance settings Platform AI CODE CREATION GitHub CopilotWrite better code with AI GitHub Copilot appDirect agents from issue to merge MCP RegistryIntegrate external tools DEVELOPER WORKFLOWS ActionsAutomate any workflow CodespacesInstant dev environments IssuesPlan and track work Code ReviewManage code changes Code QualityEnforce quality at merge APPLICATION SECURITY GitHub Advanced SecurityFind and fix vulnerabilities Code securitySecure your code as you build Secret protectionStop leaks before they start EXPLORE Why GitHub Documentation Blog Changelog Marketplace View all features Solutions BY COMPANY SIZE Enterprises Small and medium teams Startups Nonprofits BY USE CASE App Modernization DevSecOps DevOps CI/CD View all use cases BY INDUSTRY Healthcare Financial servicesExcerpt only. The complete copy is held offline and backs quotations on this site. The original publication remains the canonical public source.
1 presentation-noise difference. Sidebar, ticker and other page chrome churn that our review classified as not being a change to what the source says.
- +5 -3 Only GitHub header chrome changed. The 'Sign in' and 'Appearance settings' labels split onto separate lines, and the search prompt changed from 'Type / to search' to 'Search/'.
The excerpts and plain unified diffs above show the text this project held and how it changed. To verify a quotation, compare it against the page itself or against the Internet Archive's copies, which are independent of this project.
Complete captures are held offline rather than mirrored here, so this page shows diffs and excerpts. If a quotation is ever disputed, the full copy can be produced. Ask.
Compare the screenshot or a quotation against the original while it is available.