Skip to content

Instantly share code, notes, and snippets.

@xhliu

xhliu/factor.py Secret

Created October 17, 2022 22:45
factor circom
// p and q are factorizations of n
pragma circom 2.0.0;
template Factor() {
  // Private Inputs:
  signal input p;
  signal input q;
  // Public Inputs:
  signal output n;
  assert(p > 1);
  assert(q > 1);
  n <== p * q;
}
component main = Factor();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment