Secure communication

over an insecure channel.

Problem

A and B communicate, E evesdrops. E should not know what is communicated, and E should not be able to cause miscommunication between A and B.

Unbounded adversary

(Shannon) Theory of perfect secrecy. Adversary assumed to have unlimited computational resources. Secure encryption system exists only if |S| is as large as |m|.

One time pad

E(pad,m)=mpad; D(pad,c)=cpad. Unbreakable even by computationally unbounded adversary: Modern cryptography abandons this. m,c:Prpad(E(pad,m)=c)=2n: so perfectly secret. But not good for 2 messages: E(pad,m1)E(pad,m2) reveals common bits.

Bounded adversary

Often parametrized by security parameter k.

Passive adversary

Possibly randomized algorithm which runs in poly(k) time, has passive access to everything on the insecure channel. May know probability distribution over messages.

Is said to break cryptosystem if it succeeds with non negligible probability: 1poly(k).

Active adversary

Passive adversary with extra powers. Can alter or stop messages, request polynomial number of cyphertexts to be decyphered.

A common active adversary attack is the replay attack.

Collusion attacks

Multiple adversaries share info and attack.

Proving security/ vulnerability

Security from evesdropping

Prob of predicting m given c = Prob of predicting m without c: seeing c gives no ‘information’.

Specify scheme

Describe Setup(l), encrypt, decrypt, keygen etc.. algs.

General strategy

Show security of B based on security of A: Secure(A)Secure(B)attackable(B)attackable(A): The latter form is more convenient to prove.

Make security game

Take polytime B attacker, call it Z. Make B challenger/ A attacker, call it Y. Take A challenger, call it X. Visualization: use boxes and arrows to see how Y uses Z to respond to X’s challenge.

Show success of attack wnnp

Security parameter l: All probabilities and running time are in terms of this. Use cases to analyze probability of success of attack.

Show equivalence of 2 models of security

Show that a successful attacker in one can be used to build a successful attacker in another.

Using hardness assumptions to prove security

Take hardness assumption H. Use this as A.

Tightness of assumption

Cryptosystem B, assumption A. Show that you can break A given attacker for B. Show that you can break B given attacker for A.

Security from weaker adversaries

Sometimes, proof of security against CPA is not known. So, security is proved against weaker adversaries. Eg: Security in random oracle model, selective security etc..

A stepping stone in finding proof of security against unhindered adversary.

Private key encryption

Communicators A and B; Encryption and decryption algorithms E, D; common secret key S; adversary may know (E, D), but not S; cleartext or plaintext message m; ciphertext c = E(m,S).

Substitution cipher

S = the permutation f. Easy to break by adversary who sees moderately many ciphertexts. \why

Public key cryptography

Aka assymetric key cryptography.

Weak definition

Uses trapdoor one way functions. Setup(l) = (PK, SK). Weak defn: E(m, PK) = c; D(c, SK) = m: If A transmits only 2 messages, Attacker could encrypt both messages and say what is being transmitted.

Strong defnition: blinding messages

So, random r is chosen, m is blinded using r to get m’, E(m,r,PK)=c. D(c, SK) = m’, r; thence unblind to get m.

Blinding and unblinding is often done by computing a blinding factor (bf). Agents agree on bf in a way similar to key exchange protocols.

Hybrid cryptography

In practice, this is used, rather than pure public key cryptography as it is slow. Public key crypto is used only to share a common secret ‘session key’ S. S is then used to actually encrypt messages.

Semantic security: chosen plaintext attack (CPA)

Take challenger C and attacker A.

C sends PK to A. A sends plaintexts m0 and m1 to C. C picks gU{0,1} and sends c=E(mg,r,PK). A surmises and returns g.

If A has non negligible advantage over random guessing, the crypto scheme is broken by A.

Semantic security from CCA

Same as CPA security game, with extra powers to the attacker: The attacker A can ask for decryption of poly num of cyphertexts in two phases: one before challenger C sends c=E(mg,r,PK), and one afterwards. In second phase, A cannot demand decryption of c. If given an invalide cyphertext, C responds with ‘invalid cyphertext’ or message.

Hybrid proofs

Eg: two public key schemes: X1, X2; new PK scheme X encrypts m to users using both; show secure(X1)secure(X2)secure(X). So show ¬s(X)¬s(X1)¬s(X2): Consider CPA game where attacker B knows {m0,m1}, X challenger A picks random bit g, encrypts mg; gives B c0=enc(mg,X1),c1=enc(mg,X2); B guesses g’; So ¬s(X)Pr(g=g)21+ϵ. Take p1=Pr(g=1|g=1),p0=Pr(g=1|g=0); imagine hybrid case: ph=Pr(g=1|enc(m0,X1),enc(m1,X2)). ¬s(X)Pr(g=g)21+ϵ2ϵ|p1p0||p1ph|+|p0ph||p1ph|ϵ|p0ph|ϵ¬s(X1)¬s(X2).

RSA

Choose random N=pq with p, q large primes : use rand alg; pick PK: exponent e{1,..ϕ(N)1} coprime with ϕ(N); choose SK exp d to satisfy de=1modϕ(N); PK: (N, e); SK: (N, d). Message of length m; encrypt: c=memodN: exponentiation by squaring; decrypt: cdmodN.

Security from RSA hardness assumption. Vulnerable to CCA.

This is the fastest PK scheme.

ElGamal

PK=(g,gy). SK = y. Encr: Pick random r, make bf: (gy)r. c=gr,m.gyr. Decr: Recover (gr)y, thence decrypt. Agreement on bf similar to DH key exchange.

Security from CPA if DDH hard

If DDH is hard, ElGamal is secure: Consider DDH Challenger DC, DDH attacker DA, El Gamal attacker A. DC picks random t, sets T=gab if t=1. DC gives g,ga,gb,T to DA. DA gives PK=g,ga to A. A gives m0 and m1 to DA. DA picks random b and gives A c=T,mb.T. If T is a valid bf, A returns g wnnp. Thence, DA can defeat DC wnnp: analyze probabilities of success for the cases where t=0 and t=1.

Vulnerability when DDH broken

Can use any DDH atatcker to break ElGamal: show with a security game.

True if there are efficiently computable bilinear maps.

CCA vulnerability

Attacker demands decryption of c=gr+r,hmb.gy(r+r), thence identifies mb: cyphertext for hmb used as some challengers may refuse to decrypt a previously sent msg.

CCA secure scheme from IBE scheme

PK = PP; SK = MSK, SigSK (Signature SK), SigPK. Enc(m) : choose random id, find \ CT=EncIBE(PP,ID,m), make CT, id, sigSK(CT). \ Dec: if sigPK(sigSK(CT))CT abort; else get Keygen(MSK,id)=SKid; do DecIBE(CT,SKid)=m.

Speed

1 pairing costs approximately as much as 8 large exponentiations.

DLA based cryptosystem

Setup(l): SK=(x,y). PK=(g,u=gx,v=gy). Encrypt by selecting random a and b. Come to agreement on BF: va+b.

Applications

Public key cryptography is highly secure. But, it is often slower compared to symmetric key encryption.

SSL uses public key cryptography for key exchange and symmetric encryption for privacy.

Key exchange

Diffie Hellman (DH)

A chooses generator g, prime p, random aG. Sends (g,p,gamodp) to B. B picks random b, sends gbmodp. Both A and B now find secrect key S=gabmodp.

3 party key exchange

A, B, C pick x, y, z; have bilinear map e:G×GGT, generator gG; publish gx,gy,gz; agree upon SK = e(g,g)xyz=e(gx,gy)z.

Access control

Server based vs encryption based.

Role based access control

Functional encryption: Specify access policy (a bool formula) as part of ct.

Sharing a secret

Want people with 2 attributes to access something: Share secret info mG between 2 roles: Turn policy into a infix boolean tree: When you encounter , split m into r, m-r. Subject to collusion attack: Solve by initially encrypting with requestor’s PK.

Broadcast encryption

Bandwidth limited. Eg: Direct TV, radio, GPS.

Like IBE. Setup(l,n): PP,SK1..SKn. \ Enc(PP,m,S[n]):c. Dec(c,i,SKi,S[n])=m iff iS.

Want collusion resistance. t-collusion resistance: |c|t2logn \why.

CPA Security

Challenger A, attacker B. A to B: PP; B to A: keygen requests, get {SKi}; B to A: target set S’, chosen messages m1,m2; A picks random b, returns enc(PP,mb,S). B can encrypt arbit m himself.

Static security: announce S’ first.

BB IBE based scheme

(BGW) Setup(l,n): Pick random a, g, {u1..un}, {r1..rn}. PP:e(g,g)a,{ui}. SKi:gauiri,gri,jiujri.

Enc(PP,m,S):me(g,g)as,gs,iSuis for random s: like BB IBE enc \ to iSuis: a SK for every S.

Dec: Want to find bf: e(g,g)as; so find e(gs,gauiri), find e(gri,iSuis)=iSe(gri,uis), divide by e(gs,jS,jiujri).

Security against q-BDHE

A q-BDHE challenger, B q-BDHE attacker, C BGW attacker.

A to B: g,h,gb,gb2,..gbq,gbq+2..gb2a: no gbq+1; see if Te?=(g,h)bq+1.

C to B: S’. B sets h=gs,a=bq+1; picks (yi), sets iS:ui=gyi, other i: ui=gbigyi. B answers keygen reqs: need find gauiri=gbn+1(gbigyi)ri, don’t know ga, so try cancellation by picking ri=bn+1i; actually, to make ri look random, must add some xi. C to B: m1,m2. B to C: picks mb, sends mbT,gs,iShyi.

Piracy of broadcast system

DRM impossibility argument: Can’t protect content from leaking out. Can only protect original broadcast stream. Traitor tracing: Who pirated the original stream?