Skip to content

All-zero projective values compare equal to finite points #212

Description

@1sgtpepper

Summary of Bug

The short-Weierstrass ProjectiveVar accepts (x, y, z) = (0, 0, 0).
value() decodes any z = 0 value as the group identity, but gadget equality only
checks homogeneous cross-products. The all-zero value therefore compares equal to every
finite projective point, including the generator.

Expected behavior is equality of the decoded native group values. The canonical gadget
identity (0, 1, 0) and native projective equality both distinguish the identity from
a finite point.

Open PR #211 changes the fallback
subgroup check in the same file; it does not validate the all-zero representation or
change projective equality.

Version

Steps to Reproduce

  1. Check out the isolated
    reproduction commit.

  2. Run:

    cd reproductions/curve-relation-binding
    cargo +1.85.1 test --locked --test projective_relation_binding -- --nocapture
  3. The test shows that public coordinates [0, 0, 0] decode as identity while
    satisfying equality with the finite generator. A Groth16 proof verifies; canonical
    identity, native equality, corrected-rule, and valid-point controls behave as expected.

CI: run 29424343134,
job 87382727104.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions