This is a more rigorous definition of Validity:2
Let R {\displaystyle R} be a witness relation, W ( x ) {\displaystyle W(x)} the set of all witnesses for public value x {\displaystyle x} , and κ {\displaystyle \kappa } the knowledge error. A proof of knowledge is κ {\displaystyle \kappa } -valid if there exists a polynomial-time machine E {\displaystyle E} , given oracle access to P ~ {\displaystyle {\tilde {P}}} , such that for every P ~ {\displaystyle {\tilde {P}}} , it is the case that E P ~ ( x ) ( x ) ∈ W ( x ) ∪ { ⊥ } {\displaystyle E^{{\tilde {P}}(x)}(x)\in W(x)\cup \{\bot \}} and Pr ( E P ~ ( x ) ( x ) ∈ W ( x ) ) ≥ Pr ( P ~ ( x ) ↔ V ( x ) → 1 ) − κ ( x ) . {\displaystyle \Pr(E^{{\tilde {P}}(x)}(x)\in W(x))\geq \Pr({\tilde {P}}(x)\leftrightarrow V(x)\rightarrow 1)-\kappa (x).}
The result ⊥ {\displaystyle \bot } signifies that the Turing machine E {\displaystyle E} did not come to a conclusion.
The knowledge error κ ( x ) {\displaystyle \kappa (x)} denotes the probability that the verifier V {\displaystyle V} might accept x {\displaystyle x} , even though the prover does in fact not know a witness w {\displaystyle w} . The knowledge extractor E {\displaystyle E} is used to express what is meant by the knowledge of a Turing machine. If E {\displaystyle E} can extract w {\displaystyle w} from P ~ {\displaystyle {\tilde {P}}} , we say that P ~ {\displaystyle {\tilde {P}}} knows the value of w {\displaystyle w} .
This definition of the validity property is a combination of the validity and strong validity properties.3 For small knowledge errors κ ( x ) {\displaystyle \kappa (x)} , such as e.g. 2 − 80 {\displaystyle 2^{-80}} or 1 / p o l y ( | x | ) {\displaystyle 1/\mathrm {poly} (|x|)} it can be seen as being stronger than the soundness of ordinary interactive proofs.
In order to define a specific proof of knowledge, one need not only define the language, but also the witnesses the verifier should know. In some cases proving membership in a language may be easy, while computing a specific witness may be hard. This is best explained using an example:
Let ⟨ g ⟩ {\displaystyle \langle g\rangle } be a cyclic group with generator g {\displaystyle g} in which solving the discrete logarithm problem is believed to be hard. Deciding membership of the language L = { x ∣ g w = x } {\displaystyle L=\{x\mid g^{w}=x\}} is trivial, as every x {\displaystyle x} is in ⟨ g ⟩ {\displaystyle \langle g\rangle } . However, finding the witness w {\displaystyle w} such that g w = x {\displaystyle g^{w}=x} holds corresponds to solving the discrete logarithm problem.
One of the simplest and frequently used proofs of knowledge, the proof of knowledge of a discrete logarithm, is due to Schnorr.4 The protocol is defined for a cyclic group G q {\displaystyle G_{q}} of order q {\displaystyle q} with generator g {\displaystyle g} .
In order to prove knowledge of x = log g y {\displaystyle x=\log _{g}y} , the prover interacts with the verifier as follows:
The verifier accepts, if g s = t y c {\displaystyle g^{s}=ty^{c}} .
We can see this is a valid proof of knowledge because it has an extractor that works as follows:
Since ( s 1 − s 2 ) = ( r + c 1 x ) − ( r + c 2 x ) = x ( c 1 − c 2 ) {\displaystyle (s_{1}-s_{2})=(r+c_{1}x)-(r+c_{2}x)=x(c_{1}-c_{2})} , the output of the extractor is precisely x {\displaystyle x} .
This protocol happens to be zero-knowledge, though that property is not required for a proof of knowledge.
Protocols which have the above three-move structure (commitment, challenge and response) are called sigma protocols.5 The naming originates from Sig, referring to the zig-zag symbolizing the three moves of the protocol, and MA, an abbreviation of "Merlin-Arthur".6 Sigma protocols exist for proving various statements, such as those pertaining to discrete logarithms. Using these proofs, the prover can not only prove the knowledge of the discrete logarithm, but also that the discrete logarithm is of a specific form. For instance, it is possible to prove that two logarithms of y 1 {\displaystyle y_{1}} and y 2 {\displaystyle y_{2}} with respect to bases g 1 {\displaystyle g_{1}} and g 2 {\displaystyle g_{2}} are equal or fulfill some other linear relation. For a and b elements of Z q {\displaystyle Z_{q}} , we say that the prover proves knowledge of x 1 {\displaystyle x_{1}} and x 2 {\displaystyle x_{2}} such that y 1 = g 1 x 1 ∧ y 2 = g 2 x 2 {\displaystyle y_{1}=g_{1}^{x_{1}}\land y_{2}=g_{2}^{x_{2}}} and x 2 = a x 1 + b {\displaystyle x_{2}=ax_{1}+b} . Equality corresponds to the special case where a = 1 and b = 0. As x 2 {\displaystyle x_{2}} can be trivially computed from x 1 {\displaystyle x_{1}} this is equivalent to proving knowledge of an x such that y 1 = g 1 x ∧ y 2 = ( g 2 a ) x g 2 b {\displaystyle y_{1}=g_{1}^{x}\land y_{2}={(g_{2}^{a})}^{x}g_{2}^{b}} .
This is the intuition behind the following notation,7 which is commonly used to express what exactly is proven by a proof of knowledge.
states that the prover knows an x that fulfills the relation above.
Proofs of knowledge are useful tool for the construction of identification protocols, and in their non-interactive variant, signature schemes. Such schemes are:
They are also used in the construction of group signature and anonymous digital credential systems.
Shafi Goldwasser, Silvio Micali, and Charles Rackoff. The knowledge complexity of interactive proof-systems. Proceedings of 17th Symposium on the Theory of Computation, Providence, Rhode Island. 1985. Draft. Extended abstract /wiki/Shafi_Goldwasser ↩
Mihir Bellare, Oded Goldreich: On Defining Proofs of Knowledge. CRYPTO 1992: 390–420 /wiki/Mihir_Bellare ↩
C P Schnorr, Efficient identification and signatures for smart cards, in G Brassard, ed. Advances in Cryptology – Crypto '89, 239–252, Springer-Verlag, 1990. Lecture Notes in Computer Science, nr 435 /wiki/Claus_P._Schnorr ↩
[1] On Sigma protocols https://cs.au.dk/~ivan/Sigma.pdf ↩
[2] Modular Design of Secure yet Practical Cryptographic Protocols https://ir.cwi.nl/pub/21438 ↩
Proof Systems for General Statements about Discrete Logarithms https://crypto.ethz.ch/publications/files/CamSta97b.pdf ↩