Docsity

Cryptography: Private and Public Key Encryption Protocols and One-Way Functions - Prof. Er, Study notes of Computer Science

Toggle sidebar
bg1
Cryptography
•Scenario
–Alice wants to send Bob a message x∈ {0,1}∗without letting anyone else know
what xis.
–Alice and Bob can compute with complete secrecy
–Alice and Bob cannot communicate without eavesdroppers
•Cryptographic protocol
–Alice privately computes y=E(e, x) and sends yto Bob
–Bob privately computes x=D(d, y) to recover message x
–Assumptions about E , D, e, d
∗Dand Eare inverse functions with proper keys eand d
∗Dand Eshould be “easily computable”, i.e. in FP
∗Functions Dand Eare publicly known
∗Key dis not publicly known
∗Key e’s secrecy varies depending on cryptographic protocol
•Evaluation criteria for cryptographic protocols
–Implementation issues
–Security guarantee
Private Key Cryptography
•Encryption key eis only known to Alice (and maybe Bob)
•Cryptanalysis (codebreaking) problem
–Input string y
–Knowledge of Eand D
–No knowledge of eor d
–Question: What is xsuch that E(e, x) = y?
•Example protocol: One-time pad
–Implementation
∗e=dand |d|=|x|
∗E(d, x) = d⊕xand D(d, y) = y⊕d
∗Example with x= 1001 and d= 0101
–Security Guarantee
∗Code breaker can only learn length of message without extra information
∗Every string sof length |y|is equally likely to be xbecause there exists a string
ksuch that s⊕k=y
1
pf3
pf4
pf5

Partial preview of the text

Download Cryptography: Private and Public Key Encryption Protocols and One-Way Functions - Prof. Er and more Study notes Computer Science in PDF only on Docsity!

Cryptography

  • Scenario
    • Alice wants to send Bob a message x ∈ { 0 , 1 }∗^ without letting anyone else know what x is.
    • Alice and Bob can compute with complete secrecy
    • Alice and Bob cannot communicate without eavesdroppers
  • Cryptographic protocol
    • Alice privately computes y = E(e, x) and sends y to Bob
    • Bob privately computes x = D(d, y) to recover message x
    • Assumptions about E, D, e, d ∗ D and E are inverse functions with proper keys e and d ∗ D and E should be “easily computable”, i.e. in FP ∗ Functions D and E are publicly known ∗ Key d is not publicly known ∗ Key e’s secrecy varies depending on cryptographic protocol
  • Evaluation criteria for cryptographic protocols
    • Implementation issues
    • Security guarantee

Private Key Cryptography

  • Encryption key e is only known to Alice (and maybe Bob)
  • Cryptanalysis (codebreaking) problem
    • Input string y
    • Knowledge of E and D
    • No knowledge of e or d
    • Question: What is x such that E(e, x) = y?
  • Example protocol: One-time pad
    • Implementation ∗ e = d and |d| = |x| ∗ E(d, x) = d ⊕ x and D(d, y) = y ⊕ d ∗ Example with x = 1001 and d = 0101
    • Security Guarantee ∗ Code breaker can only learn length of message without extra information ∗ Every string s of length |y| is equally likely to be x because there exists a string k such that s ⊕ k = y

∗ Without any more information, this length is the only information gained by the eavesdropper ∗ We can work on ways to even disguise length

  • Implementation issues ∗ E and D are extremely simple functions ∗ Initialization required to first establish secret key d and this key itself must be communicated in secret by some means. ∗ key d must be length of message and no reuse of key bits allowed (or else code breaker can gain information) which means frequent retransmission of bits is needed. ∗ Separate key needed for each pair of communicators. (multiple clients) ∗ What about someone who doesn’t know Bob? (second, new client)

Public Key Cryptography

  • Diffie and Hellman were the pioneers
  • This gets around many of the implementation problems we just discussed but at some loss of security
  • Bob publicizes universal encryption key e
  • Decryption (codebreaking) problem
    • Input string y
    • Knowledge of D and E
    • Knowledge of e
    • No knowledge of d
    • Question: What is x such that E(e, x) = y?
  • Implementation bottlenecks disappear (though E and D may be more complex than exclusive or)
  • Security
    • Protocol is breakable
    • Eavesdropper can compute x with absolute certainty with no extra information
    • Try all strings x and see if E(e, x) = y and stop when a match is found.
    • In fact, this demonstrates decryption problem is in FNP (assuming E and D are in FP)
    • Thus we cannot have a public-key protocol which is not breakable
    • We can only hope public-key protocol requires signficant computational time and expense to break
    • Furthermore, this type of security can only exist if P 6 = NP

Cryptography and Complexity Theory

  • Can we link the existence of one-way functions to P = NP?
    • No, but I’m not going to get into this.
  • Would this be meaningful?
    • No
    • We have based complexity theory and NP-completeness on worst-case performance of algorithms
    • In cryptography, this is not acceptable. We want all cases (or almost all cases) to require exponential time to decrypt.
  • Strong one-way functions
    • First 3 same as one-way functions
    • there is no integer k and no algorithm which, for large enough n, in time O(nk) successfully computes f −^1 (y) for at least 2

n nk^ strings^ y^ of length^ n.

  • That is, no polynomial-time algorithm successfully inverts f on a polynomial frac- tion of the inputs of length n
  • Trapdoor Functions
  • strong one-way functions
  • we can generate keys relatively quickly
  • we can decode efficiently given an extra decryption key
  • RSA seems to be a trapdoor function

Randomization

  • There are still some security problems
    • Maybe some important message are easy to decrypt for certain decrypting algo- rithms (quicksort worst-case analogy) ∗ ATTACK AT DAWN ∗ SELL IBM
    • Eavesdropper could notice message repetitions
    • 1-bit messages b ∗ 0 e^ = 0 ∗ 1 e^ = 1
  • Solution: Randomized RSA
    • Implementation ∗ Choose a random integer k ≤ pq 2

∗ Send y = (2k + b)e^ mod pq ∗ Upon decryption, Bob only looks at last bit to recover message

  • Question: How secure is this one bit b?
  • Alternatively: Can decrypter get last bit without getting k as well?
  • It can be proven that any method which guesses b from (2x + b)e^ mod pq, pq, and e with probability significantly greater than 12 can be used to break RSA.
  • We can apply this method to deal with other problems too
  • Implementation ∗ Break x into b 1 , b 2 , · · · bn ∗ Choose k 1 , k 2 , · · · , kn randomly ∗ Send encrypted 2k 1 + b 1 , 2 k 2 + b 2 , · · · 2 kn + bn
  • avoids repetition problem
  • no one message is always easy (every message unlikely to be easy no matter what decrypting algorithm is used)

Zero Knowledge Proofs

  • Setting
    • Alice and Bob are taking a take-home final
    • One of the questions asks them to 3-color a large graph
    • Alice finds a 3-coloring quickly and gloats to Bob she is done
    • Bob doesn’t believe her since he hasn’t been able to find this 3-coloring
    • Alice wants to convince Bob she really has found the 3-coloring, but she doesn’t want to help Bob find it
    • Such a proof is called a zero-knowledge proof (protocol)
  • Example
    • Alice has a 3-coloring C which is a mapping from V to { 00 , 01 , 10 } ∗ We use two bits bi and b′ i to encode a node’s color
    • Protocol Round
      1. Alice’s Actions ∗ Alice chooses a random permutation of 3 colors 00, 01 , 10 ∗ Alice chooses |V | RSA key combinations (pi, qi, di, ei) ∗ For each node i, Alice computes

yi = (2xi + bi)ei^ mod piqi

y i′ = (2x′ i + b′ i)ei^ mod piqi where xi, x′ i ≤ pi 2 ,qi ∗ Alice sends to Bob (ei, piqi, yi, y′ i) for all i ∈ V