iden3 / circom_old

Circuit compiler for zkSNARKs
GNU General Public License v3.0
471 stars 82 forks source link

Inaccuracy in documentation about the relation between factoring and P ?= NP #43

Open daira opened 4 years ago

daira commented 4 years ago

The documentation at https://docs.iden3.io/#/guides/circom-and-snarkjs?id=_23-toy-example includes the factoring decision problem as an example circuit, and says:

For very large numbers, no efficient, non-quantum integer factorization algorithm is known.

Note: While common consensus is that no efficient algorithm exists, it has not been proven to be the case. To prove such a thing would be equivalent to proving that P = NP -- in other words it would require solving one of the major unsolved problems in computer science. For more on how NP and complexity-theoritic reductions relate to zk-snarks see this excellent post by Chrisitian Reitwiessner.

In actuality, the factoring decision problem is widely believed not to be NP-hard, which would mean that an efficient factoring algorithm is not sufficient to establish P = NP. See https://en.wikipedia.org/wiki/Integer_factorization#Difficulty_and_complexity for a summary of what is known.

There is also a misspelling of "complexity-theoretic".

unixpi commented 4 years ago

thankyou @daira. my mistake. it's been corrected.