Repository navigation
pkc%test(bls): run the legacy map's own steps in gen_hash.cpp - #118
Conversation
A patch gives the map's encoding and cofactor steps external linkage, so the program runs them on the field elements it writes and stops unless they give the library's point. The corpus is unchanged.
|
Warning This pull request may have conflicts, please coordinate with the authors of these pull requests. Potential conflicts |
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! 🚀 New features to boost your workflow:
|
|
✅ Final review complete — no blockers (commit f3ac1b6) · triage: normal |
thepastaclaw
left a comment
There was a problem hiding this comment.
Final validation — Phase 1 + Phase 2
No actionable defects remain after verification against the exact head and pinned Dash reference implementation. The generator follows the reference map’s encoding, addition and cofactor sequence, and patch contents now participate in build-cache identity; the reported documentation nitpick is not a contradiction. Validation was static only, with current CI confirming successful corpus regeneration and comparison, lint, and applicable build/test checks.
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
normalbygpt-6.1-sol(effort low) — The diff adds cryptographic corpus consistency checks and patch-aware build reuse logic, requiring substantive review but not changing production cryptography or another critical surface. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort xhigh); agentphase1-reviewer - Phase 1 model:
muse-spark-1.3-contributor— not quota-gated; passed overgemini-3.8-flash-high(antigravity quota lookup failed),glm-5.3-flash(not used above high effort; tier asks max) - Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— security-auditor (completed, effort high); agentphase2-reviewer
Takes dashpay#118 dashpay#116 dashpay#117 dashpay#120 dashpay#124 dashpay#125. The fork keeps its V2 split, its basic-keyed IES calls beside the new `_as` forms, S5's V23_1 params and FU-1's governance signature bound.
Motivation
In #101 the program that writes
bls_read.json5was reworked so that nothing in it stands in for the library.gen_hash.cpp, from #112, still repeats the legacy hash to G2's tag hashing and reduction steps with relic and takes only the final point from the library, so nothing showed that the steps it records are the ones the library runs. This pull request is the follow-up agreed in the #101 review.Additional Information
pkgs/pkc/contrib/util/legacy_steps.patchgives the release's legacy map's encoding of a field element and its cofactor multiplication external linkage. Their code is unchanged.regen.pyapplies it after the relic template patch, and the build directory's name now covers both patches, so a build from before is not reused.gen_hash.cppruns those two steps on the four field elements it writes, as the map does: the encodings of the two pairs, their sum and its cofactor multiple. The program stops, writing nothing, unless the result is the library's own map of the message. The hashing and reduction are still repeated with relic, as the map computes them inline.The check ties every
_hashand_fpvalue to the library except the order of the two pairs of tags, since the sum of their encodings is the same either way.pkgs/pkc/contrib/README.mdsays so.Breaking Changes
None. No library code changes, and
bls_hash.json5is unchanged.How Has This Been Tested?
regen.py --program hashextracts and builds the patched release afresh and writesbls_hash.json5byte-identical to the committed one, with GCC 15. Only Linux x86_64 was run.just test lint fuzz::test) is green on the commit.Checklist
comments and concerns without said assistance. I assume authorship of the code submitted.
Agent disclosure
Code, commit messages and this description were generated with Claude Code using Claude Opus 5.5, running autonomously as an agent on behalf of the author. The agent also built the pinned release's BLS library and wrote the corpus with it. The change was reviewed by a Claude Code agent using Opus 5.5.
🤖 Generated with Claude Code