Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.

Conversation

@jmcardon
Copy link
Member

@jmcardon jmcardon commented Sep 15, 2025

Our pairing-check function has a vulnerability: It can admit points outside of G2 which can be used to potentially forge a valid proof.

For reviewers: you cannot simply forge points outside of the curve for G1 as the cofactor is 1, so any points lying on the curve must be in G1. However, G2 (E(F_{p^2})) has a large cofactor and points can live in other subgroups whose order is not r=21888242871839275222246405745257275088548364400416034343698204186575808495617.

In our test, we create a simple call to pairing-check that trivializes it with points outside of G2, and show that it indeed fails after the pact 5.4 patch.

PR checklist:

  • Test coverage for the proposed changes
  • PR description contains example output from repl interaction or a snippet from unit test output
  • (If Relevant) Documentation has been (manually) updated at https://docs.kadena.io/pact

Additionally, please justify why you should or should not do the following:

  • Benchmark regressions
  • Confirm replay/back compat (Ignore until core release)
  • (For Kadena engineers) Run integration-tests against a Chainweb built with this version of Pact (Ignore until core release)

@jmcardon jmcardon merged commit 8db2936 into master Sep 15, 2025
9 of 10 checks passed
@jmcardon jmcardon deleted the jose/fix-curves branch September 15, 2025 21:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants