DVM intrinsics: verification + group-arithmetic primitives (verify_sig, commitments, ec_add, ec_mul, verify_adaptor) (fixes #127) - #128
Open
liqdmetal wants to merge 3 commits into
Conversation
…mmit, verify_commit, asset_balance, ec_add)
…ives + ec_mul + verify_adaptor One reviewable package replacing three stacked PRs (DEROFDN#84 v9, DEROFDN#105 ec_mul, DEROFDN#113 verify_adaptor): v9 (>=9.0.0): verify_sig (Ed25519 auth in SCDATA), hash_to_point, pedersen_commit / verify_commit (confidential settlement), asset_balance (SC reads own balance), ec_add (homomorphic accumulation). ec_mul (>=9.0.0, I3): bn256 G1 scalar multiplication — homomorphic pair of ec_add; strict x<p decode (rejects off-curve encodings). verify_adaptor (>=10.0.0, I4): Schnorr adaptor-signature verification — the cross-chain atomic primitive; strict point decode + low-s scalar (non-malleable). Tests: verify_sig (unit + version gate), ec_mul (homomorphic pair, composition, identity), verify_adaptor (valid/wrong-key/tamper/malformed), pedersen, hash_to_point, asset_balance, ec_add, + 2 wargame (scalar malleability, non-canonical point).
This was referenced Aug 25, 2026
Ed25519 SC-auth keypair + SignSCData (domain:scid:entrypoint:args) + VerifySCData. Gated contracts authorize via signature at ringsize>=4 — removes the last legitimate use of ringsize-2 / SIGNER(). Builds directly on the verify_sig intrinsic, so it ships as one package with the intrinsics.
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.
Summary
One reviewable PR replacing three stacked PRs (#84, #105, #113). The
consolidated DVM intrinsics: group arithmetic + verification primitives.
What's in it
verify_sighash_to_pointpedersen_commitverify_commitasset_balanceec_addec_mulverify_adaptorDesign notes (why it's safe)
>=9.0.0/>=10.0.0— pre-fork contracts can't callthem.
ec_mulandverify_adaptoruse strict x<p point decode — rejectsoff-curve encodings that
DecodeCompressedsilently accepts (would be achain-split vector).
verify_adaptorenforces low-s (non-malleable: rejects s ≥ group order).verify_adaptoruses the existing bn256 +crypto.ReducedHash— zero newdependencies (Go stdlib has no secp256k1).
Tests
verify_sig (unit + version gate), ec_mul (homomorphic pair, composition,
identity), verify_adaptor (valid / wrong-key / tamper / malformed), pedersen,
hash_to_point, asset_balance, ec_add, + 2 wargame tests (scalar malleability,
non-canonical point).
Supersedes
Closes #84, #105, #113 in favour of this single package.