๐ŸŽ‰ ไปŽ330่ฝฌไธบWashUๅธฎๅŠฉๆ‰‹ๅ†Œๅ•ฆ!

CSE442
ๆจกๅ—
Cse442t L16

Lecture 16

Continue on PRG

PRG exists โ€…โ€ŠโŸนโ€…โ€Š\implies Pseudorandom function family exists.

Multi-message secure encryption

Gen(1n):Gen(1^n): Output fi:{0,1}nโ†’{0,1}nf_i:\{0,1\}^n\to \{0,1\}^n from PRF family

Enci(m):Enc_i(m): Random rโ†{0,1}nr\gets \{0,1\}^n Ouput (r,mโŠ•fi(r))(r,m\oplus f_i(r))

Deci(r,c):Dec_i(r,c): Output cโŠ•fi(r)c\oplus f_i(r)

Proof of security:

Suppose DD distinguishes, for infinitly many nn.

The encryption of aa pair of lists

(1) {iโ†Gen(1n):(r1,m1โŠ•fi(r1)),(r2,m2โŠ•fi(r2)),(r3,m3โŠ•fi(r3)),โ€ฆ,(rq,mqโŠ•fi(rq)),}\{i\gets Gen(1^n):(r_1,m_1\oplus f_i(r_1)),(r_2,m_2\oplus f_i(r_2)),(r_3,m_3\oplus f_i(r_3)),\ldots,(r_q,m_q\oplus f_i(r_q)), \}

(2) {Fโ†RFn:(r1,m1โŠ•F(r1))โ€ฆ}\{F\gets RF_n: (r_1,m_1\oplus F(r_1))\ldots\}

(3) One-time pad {(r1,m1โŠ•s1)}\{(r_1,m_1\oplus s_1)\}

(4) One-time pad {(r1,m1โ€ฒโŠ•s1)}\{(r_1,m_1'\oplus s_1)\}

If (1) (2) distinguished,

(r1,fi(r1)),โ€ฆ,(rq,fi(rq))(r_1,f_i(r_1)),\ldots,(r_q,f_i(r_q)) is distinguished from

(r1,F(r1)),โ€ฆ,(rq,F(rq))(r_1,F(r_1)),\ldots, (r_q,F(r_q))

So DD distinguishing output of r1,โ€ฆ,rqr_1,\ldots, r_q of PRF from the RF, this contradicts with definition of PRF.

EOP

Noe we have

(RSA assumption and Discrete log assumption for one-way function exists.)

One-way function exists โ€…โ€ŠโŸนโ€…โ€Š\implies

Pseudo random generator exists โ€…โ€ŠโŸนโ€…โ€Š\implies

Pseudo random function familiy exists โ€…โ€ŠโŸนโ€…โ€Š\implies

Mult-message secure encryption exists.

Public key cryptography

1970s.

The goal was to agree/share a key without meeting in advance

Diffie-Helmann Key exchange

A and B create a secret key together without meeting.

Rely on discrete log assumption.

They pulicly agree on modulus pp and generator gg.

Alice picks random exponent aa and computes gamodโ€‰โ€‰pg^a\mod p

Bob picks random exponent bb and computes gbmodโ€‰โ€‰pg^b\mod p

and they send result to each other.

And Alice do (gb)a(g^b)^a where Bob do (ga)b(g^a)^b.

Diffie-Helmann assumption

With ga,gbg^a,g^b no one can compute gabg^{ab}.

Public key encryption scheme

Idea: The recipient Bob distributes opened Bob-locks

  • Once closed, only Bob can open it.

Public-key encryption scheme:

  1. Gen(1n):Gen(1^n): Outputs (pk,sk)(pk,sk)
  2. Encpk(m):Enc_{pk}(m): Efficient for all m,pkm,pk
  3. Decsk(c):Dec_{sk}(c): Efficient for all c,skc,sk
  4. P[(pk,sk)โ†Gen(1n):Decsk(Encpk(m))=m]=1P[(pk,sk)\gets Gen(1^n):Dec_{sk}(Enc_{pk}(m))=m]=1

Let A,EA, E knows pkpk not sksk and BB knows pk,skpk,sk.

Adversary can now encypt any message mm with the public key.

  • Perfect secrecy impossible
  • Randomness necessary

Security of public key

โˆ€n.u.p.p.tD,โˆƒฯต(n)\forall n.u.p.p.t D,\exists \epsilon(n) such that โˆ€n,m0,m1โˆˆ{0,1}n\forall n,m_0,m_1\in \{0,1\}^n

{(pk,sk)โ†Gen(1n):(pk,Encpk(m0))}{(pk,sk)โ†Gen(1n):(pk,Encpk(m1))}\{(pk,sk)\gets Gen(1^n):(pk,Enc_{pk}(m_0))\} \{(pk,sk)\gets Gen(1^n):(pk,Enc_{pk}(m_1))\}

are distinguished by at most ฯต(n)\epsilon (n)

This "single" message security implies multi-message security!

Left as exercise

We will achieve security in sending a single bit 0,10,1

Time for trapdoor permutation. (EX. RSA)

Encryption Scheme: Given family of trapdoor permutation {fi}\{f_i\} with hardcore bit h(i)h(i)

Gen(1n):(fi,fiโˆ’1)Gen(1^n):(f_i,f_i^{-1}), where fiโˆ’1f_i^{-1} uses trapdoor permutation of tt

Output((fi,hi),fiโˆ’1)Output ((f_i,h_i),f_i^{-1})

m=0m=0 or 11.

Encpk(m):rโ†{0,1}nEnc_{pk}(m):r\gets\{0,1\}^n

Output(fi(r),hi(r)+m)Output (f_i(r),h_i(r)+m)

Decsk(c1,c2)Dec_{sk}(c_1,c_2)

r=fiโˆ’1(c1)r=f_i^{-1}(c_1)

m=c2+h1(r)m=c_2+h_1(r)