Repository navigation
Post quantum precompile usage guidance and example - #505
Closed
quantova-inc wants to merge 4 commits into
Closed
quantova-inc wants to merge 4 commits into
quantova-inc wants to merge 4 commits into
Conversation
quantova-inc
requested review from
ZhiyuCircle,
ancazamfir,
romac and
sergio-mena
as code owners
November 3, 2026 07:20
Contributor
|
Hi @quantova-inc, Thank you for your interest in contributing to Arc Node. This PR has been automatically closed because it does not reference a GitHub issue. All PRs must reference an existing issue using the format To contribute properly:
Please see our CONTRIBUTING.md for more details. |
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Following the thread on binding the precompile, this is the split osr21 scoped. The precompile stays neutral and I add the safe usage layer around it.
What is in here.
contracts/src/pq/README.md. The precompile verifies a signature over the exact bytes and injects no chain id, no verifying contract and no purpose, the same asecrecover. The caller has to bind the domain into the signed message. A domain stops cross domain reuse. A nonce and a deadline stop replay inside a domain.contracts/src/pq/examples/PQAuthExample.sol. It builds an EIP 712 digest over chain id, verifying contract and a purpose, passes that 32 byte digest as the message, marks the nonce used before the verify call and checks a deadline.contracts/src/pq/examples/conformance-manifest.md. It maps each of the six existing vectors to its expected result and records the corpus source and license. The source is theslh_dsacrate under Apache 2.0, generated by the existinggenerate_pq_test_vectors.rs.contracts/test/pq/PQAuthExample.t.sol. Eight tests. A changed chain, a changed contract and a changed purpose each fail. A reused nonce is rejected while the precompile verifies the same signature again, which shows the replay stop is the contract's job and not the precompile's.All eight pass on solc 0.8.29. The contract logic around the precompile call is about 104k gas and deployment is about 387k.
Happy to maintain this and add more coverage if you want it. partnerships@quantova.org