mirror of
https://github.com/luxfi/chains.git
synced 2026-09-24 00:26:00 +00:00
Verify() checked the signature against a.GroupPubKey — a field of the very struct being verified. That answers "was this signed by whoever signed it", which every attestation satisfies, including one an attacker minted with its own key and shipped alongside. B-Chain called it immediately before releasing funds, so a self-consistent forgery passed the one check standing between a request and a real transfer. The expected key is an argument now, because it is the whole check: a signature is evidence only when the verifier already knows whose signature it will accept. The caller has it — B-Chain holds the group public point from M-Chain's keygen and never holds a custody secret. A nil or empty expected key fails closed, which is the state of a chain whose keygen has not completed, and exactly when releasing funds would be worst. The attestation still carries its own key so a holder can see which group signed, but a disagreement with the key we trust is a refusal, not a preference for theirs. Co-authored-by: Hanzo Dev <[email protected]>