Skip to Content
CSE442TIntroduction to Cryptography (Lecture 20)

CSE442T Introduction to Cryptography (Lecture 20)

Chapter 5: Authentication

Construction of CRHF (Collision Resistant Hash Function)

Let h:{0,1}n+1{0,1}nh: \{0, 1\}^{n+1} \to \{0, 1\}^n be a CRHF.

Base on the discrete log assumption, we can construct a CRHF H:{0,1}n+1{0,1}nH: \{0, 1\}^{n+1} \to \{0, 1\}^n as follows:

Gen(1n):(g,p,y)Gen(1^n):(g,p,y)

pΠ~n(p=2q+1)p\in \tilde{\Pi}_n(p=2q+1)

gg generator for group of sequence modp\mod p (G_q)

yy is a random element in GqG_q

hg,p,y(x,b)=ybgxmodph_{g,p,y}(x,b)=y^bg^x\mod p, ybgxmodp{0,1}ny^bg^x\mod p \in \{0,1\}^n

gxmodpg^x\mod p if b=0b=0, ygxmodpy\cdot g^x\mod p if b=1b=1.

Under the discrete log assumption, HH is a CRHF.

  • It is easy to sample (g,p,y)(g,p,y)
  • It is easy to compute
  • Compressing by 1 bit

Proof

The hash function hh is a CRHF

Suppose there exists an adversary A\mathcal{A} that can break hh with non-negligible probability μ\mu.

P[(p,g,y)Gen(1n);(x1,b1),(x2,b2)A(p,g,y):yb1gx1yb2gx2modp(x1,b1)(x2,b2)]=μ(n)>1p(n)P[(p,g,y)\gets Gen(1^n);(x_1,b_1),(x_2,b_2)\gets \mathcal{A}(p,g,y):y^{b_1}g^{x_1}\equiv y^{b_2}g^{x_2}\mod p\land (x_1,b_1)\neq (x_2,b_2)]=\mu(n)>\frac{1}{p(n)}

Where yb1gx1=yb2gx2modpy^{b_1}g^{x_1}=y^{b_2}g^{x_2}\mod p is the collision of HH.

Suppose b1=b2b_1=b_2.

Then yb1gx1yb2gx2modpy^{b_1}g^{x_1}\equiv y^{b_2}g^{x_2}\mod p implies gx1gx2modpg^{x_1}\equiv g^{x_2}\mod p.

So x1=x2x_1=x_2 and (x1,b1)=(x2,b2)(x_1,b_1)=(x_2,b_2).

So b1b2b_1\neq b_2, Without loss of generality, say b1=1b_1=1 and b2=0b_2=0.

ygx1gx2modpy\cdot g^{x_1}\equiv g^{x_2}\mod p implies ygx2x1modpy\equiv g^{x_2-x_1}\mod p.

We can create a adversary B\mathcal{B} that can break the discrete log assumption with non-negligible probability μ(n)\mu(n) using A\mathcal{A}.

Let g,pg,p be chosen and set random xx such that y=gxmodpy=g^x\mod p.

Let the algorithm B\mathcal{B} defined as follows:

function B(p,g,y): (x_1,b_1),(x_2,b_2)\gets \mathcal{A}(p,g,y) If (x_1,1) and (x_2,0) and there is a collision: y=g^{x_2-x_1}\mod p return x_2-x_1 for b=1 Else: return "Failed"
P[B succeeds]P[A succeeds]1p(n)>1p(n)P[B\text{ succeeds}]\geq P[A\text{ succeeds}]-\frac{1}{p(n)}>\frac{1}{p(n)}

So B\mathcal{B} can break the discrete log assumption with non-negligible probability μ(n)\mu(n), which contradicts the discrete log assumption.

So hh is a CRHF.

To compress by more, say hk:0,1n{0,1}nk,k1h_k:{0,1}^n\to \{0,1\}^{n-k},k\geq 1, then we can use h:{0,1}n+1{0,1}nh: \{0,1\}^{n+1}\to \{0,1\}^n multiple times.

hk(x)=h(h((h(x))))=hk(x)h_k(x)=h(h(\cdots(h(x)))\cdots)=h^{k}(x)

To find a collision of hkh_k, the adversary must find a collision of hh.

Application of CRHF to Digital Signature

Digital signature scheme on {0,1}\{0,1\}^* for a fixed security parameter nn. (one-time secure)

  • Use Digital Signature Scheme on {0,1}n\{0,1\}^{n}: Gen,Sign,VerGen, Sign, Ver.
  • Use CRHF family {hi:{0,1}{0,1}n}iI\{h_i:\{0,1\}^*\to \{0,1\}^n\}_{i\in I}

Gen(1n):(pk,sk)Gen(1n)Gen'(1^n):(pk,sk)\gets Gen(1^n), choose iIi\in I uniformly at random.

sk=(sk,i)sk'=(sk,i)

Signsk(m):σSignsk(hi(m))Sign'_{sk'}(m):\sigma\gets Sign_{sk}(h_i(m)), return (i,σ)(i,\sigma)

pk=(pk,i)pk'=(pk,i)

Verpk(m,(i,σ)):Verpk(m,σ)Ver'_{pk'}(m,(i,\sigma)):Ver_{pk}(m,\sigma) and iIi\in I

One-time secure:

  • Given that (Gen,Sign,VerGen,Sign,Ver) is one-time secure
  • hh is a CRHF

Then (Gen,Sign,VerGen',Sign',Ver') is one-time secure.

Ideas of Proof

If the digital signature scheme (Gen,Sign,VerGen',Sign',Ver') is not one-time secure, then there exists an adversary A\mathcal{A} which can ask oracle for one signature on m1m_1 and receive σ1=Signsk(m1)=Signsk(hi(m1))\sigma_1=Sign'_{sk'}(m_1)=Sign_{sk}(h_i(m_1)).

  • It outputs m2m1m_2\neq m_1 and receives σ2=Signsk(m2)=Signsk(hi(m2))\sigma_2=Sign'_{sk'}(m_2)=Sign_{sk}(h_i(m_2)).
  • If Verpk(m2,σ2)Ver'_{pk'}(m_2,\sigma_2) is accepted, then Verpk(hi(m2),σ2)Ver_{pk}(h_i(m_2),\sigma_2) is accepted and iIi\in I.

There are two cases to consider:

Case 1: hi(m1)=hi(m2)h_i(m_1)=h_i(m_2), Then A\mathcal{A} finds a collision of hh.

Case 2: hi(m1)hi(m2)h_i(m_1)\neq h_i(m_2), Then A\mathcal{A} produced valid signature on hi(m2)h_i(m_2) after only seeing Signsk(m1)Signsk(m2)Sign'_{sk'}(m_1)\neq Sign'_{sk'}(m_2). This contradicts the one-time secure of (Gen,Sign,VerGen,Sign,Ver).

Many-time Secure Digital Signature

Using one-time secure digital signature scheme on {0,1}\{0,1\}^* to construct many-time secure digital signature scheme on {0,1}\{0,1\}^*.

Let Gen,Sign,VerGen,Sign,Ver defined as follows:

$Gen(1^n):(pk,sk)\gets (pk_0,sk_0)

For the first message:

(pk1,sk1)Gen(1n)(pk_1,sk_1)\gets Gen'(1^n)

Signsk(m1):σ1Signsk0(m1pk1)Sign_{sk}(m_1):\sigma_1\gets Sign_{sk_0}(m_1||pk_1), return σ1=(1,m1,pk1,σ1)\sigma_1'=(1,m_1,pk_1,\sigma_1)

We need to remember state σ1\sigma_1' and sk1sk_1 for the second message.

For the second message:

(pk2,sk2)Gen(1n)(pk_2,sk_2)\gets Gen'(1^n)

Signsk(m2):σ2Signsk1(m2pk0)Sign_{sk}(m_2):\sigma_2\gets Sign_{sk_1}(m_2||pk_0), return σ2=(0,m2,pk0,σ1)\sigma_2'=(0,m_2,pk_0,\sigma_1')

We need to remember state σ2\sigma_2' and sk2sk_2 for the third message.

For the ii-th message:

(pki,ski)Gen(1n)(pk_i,sk_i)\gets Gen'(1^n)

Signsk(mi):σiSignski1(mipki1)Sign_{sk}(m_i):\sigma_i\gets Sign_{sk_{i-1}}(m_i||pk_{i-1}), return σi=(i1,mi,pki1,σi1)\sigma_i'=(i-1,m_i,pk_{i-1},\sigma_{i-1}')

We need to remember state σi\sigma_i' and skisk_i for the (i+1)(i+1)-th message.

Verpk:(mi,(i,mi,pk,σi,σi1))Ver_{pk}:(m_i,(i,m_i,p_k,\sigma_i,\sigma_{i-1})) Will need to verify all the states public keys so far.

Verpk0(m1pk1,σ1)= AcceptVerpk1(m2pk2,σ2)= AcceptVerpki(mipki,σi)= AcceptVer_{pk_0}(m_1||pk_1, \sigma_1) = \text{ Accept}\\ Ver_{pk_1}(m_2||pk_2, \sigma_2) = \text{ Accept}\\ \vdots\\ Ver_{pk_i}(m_i||pk_i, \sigma_i) = \text{ Accept}

Proof on homework.

Drawbacks:

  • Signature size and verification time grows linearly with the number of messages.
  • Memory for signing grows linearly with the number of messages.

These can be fixed.

Question: Note that the signature signing message longer than the public key, which is impossible in Lamport Scheme.

Last updated on