## Identification protocol

Identification protocol is different than signature scheme as identification protocol is used to identify that prover holds the private while signature scheme is used to verify that the holder indeed used the private key to sign the message and generate the signature.

Steps followed in schnorr identification protocol:

```
sequenceDiagram
participant a as Prover
participant b as Verifier
note left of a: (I,st)<-P1(sk)
a->>b:I
note right of b: r<-Random
b->>a:r
note left of a: s=P2(sk,st,r)
a->>b:s
note over b:V(pk,r,s)=I
```

### Properties

**Correctness**: Honest Prover should be able to convince a Honest verifier that it knows the secret.**Soundness**: Malicious Prover (doesn’t know secret) shouldn’t be able to convince a Honest verifier with non-negligible probability.**Non-Degeneracy**: there should be enough initial values $I$ or in other words, for a fixed $sk$ and $I$, $Pr[P_{1}(sk)→I]≤negl(n)$.

Identification Experiment $Ident_{A,Π}(n)$:

- $Gen(1_{n})→(pk,sk)$.
- $A$ is given $pk$ and given access to a $Trans(⋅)$ oracle that can give transcript $(I,r,s)$ of an honest execution of the protocol.
- $A$ outputs $I$, and is given a uniform $r←Ω_{pk}$ to which $A$ responds with $s$.
- experiment succeeds if $V(pk,r,s)=I$.

$Pr[Ident_{A,Π}(n)=1]≤negl(n)$

Not feasible, requires interaction from *verifier*. Also not publicly verifiable as both parties have to be involved.

FS86 introduced Fiat-Shamir which transforms identification protocols to signatures. Later, it was recognised by PS96 that this can be generalised to any interactive protocol with negligible soundness to turn it into non-interactive protocol.

Prove any signature scheme instantiated from an identification scheme and Fiat-Shamir transcript is secure if underlying identification scheme is secure.

## Schnorr Digital Signature

Schnorr’s Identification Scheme $Π=(Gen,P_{1},P_{2},V)$. Let there be two parties $A$ (Prover) and $B$ (Verifier):

- A runs $Gen(1_{n})→(pk,sk)$. Let private key be $x$ and public key = $Gx(modN)$
- Generates random value using $P_{1}$, $Y=Gy(modN)$
- $Y$ is sent to B
- B generates random challenge $c$, and send to A
- A sends back: $z=y+xc$
- B verifies: $z.G=y.G+c.x.G=Y+c.PK$

Security of Schnorr’s identification scheme depends on Discrete Logarithm Problem. So, if an adversary is able to forge a signature, it can also break DLP.

Passive adversarial approach doesn't work, i.e. access to honest transcript is of no use. Why?

Used to implement ==*Proof of Knowledge*==. Used in cryptography to prove to verifier that prover knows some value $x$. Verifier gets convinced that they are communicating with the prover without verifier’s knowledge of private key and prover is in fact, right about his private key.

Features:

- faster than ECDSA as doesn’t have to calculate $1/s$
- linear

But this also proposes other disadvantages that this signature scheme can’t be used for aggregation and multi-sigs due to its linearity.

Non-interactive Schnorr identification protocol also exists using Fiat-Shamir transformation where challenge $c$ is not generated by verifier but $c=H(g,q,h,u)$ where g: generator, q: prime number, h: public key, u: public key of random nonce

### Proving Schnorr Signatures Are Zero-knowledge

Proving **completeness** is the easiest part in protocol, i.e. if the prover performs protocol honestly, verifier is able to verify it by just substituting g in schnorr signatures.

**Soundness** is done through another algorithm called * extractor* which is able to extract secret of the prover by tricking it. Note: it doesn’t actually reveal the secret but only proving that extractor can extract the secret by duping prover. Done through replay attack on schnorr protocol.

Construct an algorithm $A_{′}$ running $A$ attacking Identification scheme $Π$ as subroutine.

- Answers $Trans$ queries of $A$ uniformly.
- $A$ outputs $I$. $A_{′}$ chooses $r_{1}$ uniformly, sends to $A$ which outputs $s_{1}$.
- Rewinds $A$ to challenge generation point with same randomness. Returns $r_{2}$ and gets $s_{2}$ as response from $A$.
- if $r_{1}=r_{2}$ and $g_{s_{1}}⋅h_{−r_{1}}=I=g_{s_{2}}⋅h_{−r_{2}}$, then calculates secret key as $[(s_{1}−s_{2})⋅(r_{1}−r_{2})_{−1}modq]$. Reason why Probability is negligible.

**Zero-Knowledgness** is proven through a *simulator* which has no knowledge of the the secret and yet it is able to convince every verifier into believing that the statement is true. This has an assumption that *verifier* is **honest**, i.e. **HVZK**. Done through rewinding a verifier so that prover knows challenge $c$ and forging false signature on the basis of it.