Skip to content

[circomlib] Prove BinSub soundness and completeness #203

@pirapira

Description

@pirapira

Formalize the BinSub (binary subtraction) circuit from circomlib.

The BinSub circuit performs binary subtraction with borrow bit handling.

Implementation details

  • Located in circomlib/circuits/binsub.circom
  • Implements n-bit binary subtraction: (in[0] + 2^n) - in[1] = out + aux*2^n
  • Takes two n-bit binary inputs and produces n-bit output plus auxiliary borrow bit
  • Similar complexity to BinSum which is already being formalized

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    gadgetWrite a circuit using clean. Usually well-suited for external contributionsgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions