Proof of knowledge

From HandWiki
Short description: Class of interactive proof

In cryptography, a proof of knowledge is an interactive proof in which the prover succeeds in 'convincing' a verifier that the prover knows something. What it means for a machine to 'know something' is defined in terms of computation. A machine 'knows something', if this something can be computed, given the machine as an input. As the program of the prover does not necessarily spit out the knowledge itself (as is the case for zero-knowledge proofs[1]) a machine with a different program, called the knowledge extractor is introduced to capture this idea. We are mostly interested in what can be proven by polynomial time bounded machines. In this case the set of knowledge elements is limited to a set of witnesses of some language in NP.

Let [math]\displaystyle{ x }[/math] be a statement of language [math]\displaystyle{ L }[/math] in NP, and [math]\displaystyle{ W(x) }[/math] the set of witnesses for x that should be accepted in the proof. This allows us to define the following relation: [math]\displaystyle{ R= \{(x,w): x \in L, w \in W(x)\} }[/math].

A proof of knowledge for relation [math]\displaystyle{ R }[/math] with knowledge error [math]\displaystyle{ \kappa }[/math] is a two party protocol with a prover [math]\displaystyle{ P }[/math] and a verifier [math]\displaystyle{ V }[/math] with the following two properties:

  1. Completeness: If [math]\displaystyle{ (x,w) \in R }[/math], then the prover [math]\displaystyle{ P }[/math] who knows witness [math]\displaystyle{ w }[/math] for [math]\displaystyle{ x }[/math] succeeds in convincing the verifier [math]\displaystyle{ V }[/math] of his knowledge. More formally: [math]\displaystyle{ \Pr(P(x,w)\leftrightarrow V(x) \rightarrow 1) =1 }[/math], i.e. given the interaction between the prover P and the verifier V, the probability that the verifier is convinced is 1.
  2. Validity: Validity requires that the success probability of a knowledge extractor [math]\displaystyle{ E }[/math] in extracting the witness, given oracle access to a possibly malicious prover [math]\displaystyle{ \tilde P }[/math], must be at least as high as the success probability of the prover [math]\displaystyle{ \tilde P }[/math] in convincing the verifier. This property guarantees that no prover that doesn't know the witness can succeed in convincing the verifier.

Details on the definition

This is a more rigorous definition of Validity:[2]

Let [math]\displaystyle{ R }[/math] be a witness relation, [math]\displaystyle{ W(x) }[/math] the set of all witnesses for public value [math]\displaystyle{ x }[/math], and [math]\displaystyle{ \kappa }[/math] the knowledge error. A proof of knowledge is [math]\displaystyle{ \kappa }[/math]-valid if there exists a polynomial-time machine [math]\displaystyle{ E }[/math], given oracle access to [math]\displaystyle{ \tilde P }[/math], such that for every [math]\displaystyle{ \tilde P }[/math], it is the case that [math]\displaystyle{ E^{\tilde P(x)}(x) \in W(x) \cup \{ \bot \} }[/math] and [math]\displaystyle{ \Pr(E^{\tilde P(x)}(x) \in W(x)) \geq \Pr(\tilde P(x)\leftrightarrow V(x) \rightarrow 1) - \kappa(x). }[/math]

The result [math]\displaystyle{ \bot }[/math] signifies that the Turing machine [math]\displaystyle{ E }[/math] did not come to a conclusion.

The knowledge error [math]\displaystyle{ \kappa(x) }[/math] denotes the probability that the verifier [math]\displaystyle{ V }[/math] might accept [math]\displaystyle{ x }[/math], even though the prover does in fact not know a witness [math]\displaystyle{ w }[/math]. The knowledge extractor [math]\displaystyle{ E }[/math] is used to express what is meant by the knowledge of a Turing machine. If [math]\displaystyle{ E }[/math] can extract [math]\displaystyle{ w }[/math] from [math]\displaystyle{ \tilde P }[/math], we say that [math]\displaystyle{ \tilde P }[/math] knows the value of [math]\displaystyle{ w }[/math].

This definition of the validity property is a combination of the validity and strong validity properties.[2] For small knowledge errors [math]\displaystyle{ \kappa(x) }[/math], such as e.g. [math]\displaystyle{ 2^{-80} }[/math] or [math]\displaystyle{ 1/\mathrm{poly}(|x|) }[/math] it can be seen as being stronger than the soundness of ordinary interactive proofs.

Relation to general 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 [math]\displaystyle{ \langle g \rangle }[/math] be a cyclic group with generator [math]\displaystyle{ g }[/math] in which solving the discrete logarithm problem is believed to be hard. Deciding membership of the language [math]\displaystyle{ L=\{x \mid g^w=x \} }[/math] is trivial, as every [math]\displaystyle{ x }[/math] is in [math]\displaystyle{ \langle g \rangle }[/math]. However, finding the witness [math]\displaystyle{ w }[/math] such that [math]\displaystyle{ g^w=x }[/math] holds corresponds to solving the discrete logarithm problem.

Protocols

Schnorr protocol

One of the simplest and frequently used proofs of knowledge, the proof of knowledge of a discrete logarithm, is due to Schnorr.[3] The protocol is defined for a cyclic group [math]\displaystyle{ G_q }[/math] of order [math]\displaystyle{ q }[/math] with generator [math]\displaystyle{ g }[/math].

In order to prove knowledge of [math]\displaystyle{ x=\log_g y }[/math], the prover interacts with the verifier as follows:

  1. In the first round the prover commits himself to randomness [math]\displaystyle{ r }[/math]; therefore the first message [math]\displaystyle{ t=g^r }[/math] is also called commitment.
  2. The verifier replies with a challenge [math]\displaystyle{ c }[/math] chosen at random.
  3. After receiving [math]\displaystyle{ c }[/math], the prover sends the third and last message (the response) [math]\displaystyle{ s=r+cx }[/math] reduced modulo the order of the group.

The verifier accepts, if [math]\displaystyle{ g^s = t y^{c} }[/math].

We can see this is a valid proof of knowledge because it has an extractor that works as follows:

  1. Simulate the prover to output [math]\displaystyle{ t=g^r }[/math]. The prover is now in state [math]\displaystyle{ Q }[/math].
  2. Generate random value [math]\displaystyle{ c_1 }[/math] and input it to the prover. It outputs [math]\displaystyle{ s_1=r+c_1x }[/math].
  3. Rewind the prover to state [math]\displaystyle{ Q }[/math]. Now generate a different random value [math]\displaystyle{ c_2 }[/math] and input it to the prover to get [math]\displaystyle{ s_2=r+c_2x }[/math].
  4. Output [math]\displaystyle{ (s_1-s_2)(c_1-c_2)^{-1} }[/math].

Since [math]\displaystyle{ (s_1-s_2)=(r+c_1x)-(r+c_2x)=x(c_1-c_2) }[/math], the output of the extractor is precisely [math]\displaystyle{ x }[/math].

This protocol happens to be zero-knowledge, though that property is not required for a proof of knowledge.

Sigma protocols

Protocols which have the above three-move structure (commitment, challenge and response) are called sigma protocols.[4] The naming originates from Sig, referring to the zig-zag symbolizing the three moves of the protocol, and MA, an abbreviation of "Merlin-Arthur".[5] 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 [math]\displaystyle{ y_1 }[/math] and [math]\displaystyle{ y_2 }[/math] with respect to bases [math]\displaystyle{ g_1 }[/math] and [math]\displaystyle{ g_2 }[/math] are equal or fulfill some other linear relation. For a and b elements of [math]\displaystyle{ Z_q }[/math], we say that the prover proves knowledge of [math]\displaystyle{ x_1 }[/math] and [math]\displaystyle{ x_2 }[/math] such that [math]\displaystyle{ y_1= g_1^{x_1} \land y_2=g_2^{x_2} }[/math] and [math]\displaystyle{ x_2 = a x_1 + b }[/math]. Equality corresponds to the special case where a = 1 and b = 0. As [math]\displaystyle{ x_2 }[/math] can be trivially computed from [math]\displaystyle{ x_1 }[/math] this is equivalent to proving knowledge of an x such that [math]\displaystyle{ y_1= g_1^{x} \land y_2={(g_2^a)}^{x} g_2^b }[/math].

This is the intuition behind the following notation,[6] which is commonly used to express what exactly is proven by a proof of knowledge.

[math]\displaystyle{ PK\{(x): y_1= g_1^{x} \land y_2={(g_2^a)}^{x} g_2^b \}, }[/math]

states that the prover knows an x that fulfills the relation above.

Applications

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.

See also

References

  1. 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
  2. 2.0 2.1 Mihir Bellare, Oded Goldreich: On Defining Proofs of Knowledge. CRYPTO 1992: 390–420
  3. 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
  4. [1] On Sigma protocols
  5. [2] Modular Design of Secure yet Practical Cryptographic Protocols
  6. Proof Systems for General Statements about Discrete Logarithms