Encryption and Decryption Part 4 Ken Dewey Rose State College Midwest City, OK 73110 - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

Encryption and Decryption Part 4 Ken Dewey Rose State College Midwest City, OK 73110

Description:

Receiver picks a simple (super increasing) knapsack (S), multiplier (w) and ... Si are chosen to be approx. 2200 apart! Knapsack has approx. 200 terms (m = 200) ... – PowerPoint PPT presentation

Number of Views:102
Avg rating:3.0/5.0
Slides: 18
Provided by: kend8
Category:

less

Transcript and Presenter's Notes

Title: Encryption and Decryption Part 4 Ken Dewey Rose State College Midwest City, OK 73110


1
EncryptionandDecryption(Part 4)Ken
DeweyRose State CollegeMidwest City, OK 73110
2
Merkle-Hellman Knapsack
Ralph C. Merkle
Martin Hellman
3
How it works
  • Pick
  • Simple (Super Increasing) Knapsack
  • Calculate
  • Hard Knapsack
  • then
  • Encrypt Message
  • Easy Enough?

4
Merkle-Hellman Algorithm (contd)
  • Sending an Encrypted Message
  • Receiver picks a simple (super increasing)
    knapsack (S), multiplier (w) and modulus (n)
  • S 1, 2, 6 w 11 n 13 (Note n is prime)
  • Receiver computes hard knapsack (H h1, h2,
    h3)
  • hi w si mod n
  • h1 w s1 mod n 11 1 mod 13 11 mod 13
    11
  • h2 w s2 mod n 11 2 mod 13 22 mod 13 9
  • h3 w s3 mod n 11 6 mod 13 66 mod 13 1

5
Merkle-Hellman Algorithm (contd)
  • Sending an Encrypted Message (contd.)
  • Receiver sends H 11, 9, 1 to sender
  • Receiver keeps S, w and n secret
  • Suppose sender wishes to transmit P 101 010
    011
  • P 1 0 1 0 1 0 0 1 1
  • 11 9 1 11 9 1 11 9 1
  • C 12 9 10

6
Modulus
  • 33 mod 8 ?
  • What is the remainder?
  • 33 / 8 4.125
  • 8 4 32 33-32 1
  • 33 mod 8 1

7
Merkle-Hellman Algorithm (contd)
  • Decrypting an Encrypted Message
  • H wS mod n (from previous slide)
  • C HP wSP mod n (from previous slide)
  • w-1C w-1HP w-1wSP mod n SP mod n
  • w-1Ci SPi mod n (note S 1, 2, 6
  • Remember w-1 6 C 12,9, 10
  • w-1Ci mod n P
  • 6 12 72 mod 13 7 101
  • 6 9 54 mod 13 2 010
  • 6 10 60 mod 13 8 011

8
Example
  • Consider the Merkle-Hellmen Cryptosystem.
  • Assume that the
  • simple knapsack (S) 1 3 6
  • multiplier (w) 11
  • modulus (n) 13
  • Compute H (hard knapsack)
  • Hi Si w mod n (General Formula)
  • H1 1 11 mod 13 11 mod 13 11
  • H2 3 11 mod 13 33 mod 13 7
  • H3 6 11 mod 13 66 mod 13 1
  • H 11 7 1

9
Example (contd)
  • Consider the Merkle-Hellmen Cryptosystem.
  • Assume that the
  • simple knapsack (S) 1 3 6
  • multiplier (w) 11
  • modulus (n) 13
  • Encrypt 101 010 011
  • H 11 7 1 11 7 1 11 7 1 (Previous Slide)
  • P 1 0 1 0 1 0 0 1 1
  • C 110112 0707 0718
  • C 12 7 8

10
Example (contd)
  • Consider the Merkle-Hellmen Cryptosystem.
  • Assume that the
  • simple knapsack (S) 1 3 6
  • multiplier (w) 11
  • modulus (n) 13
  • Compute w-1
  • w w-1 mod n 1 11 ? mod n 1
  • n13 w11 comparisons done
  • 1 0 0
  • 14 11 1
  • 27 22 2
  • 40 33 3
  • 53 44 4
  • 66 55 5
  • 66 6
  • w-1 6

11
Example (contd)
  • Consider the Merkle-Hellmen Cryptosystem.
  • Assume that the
  • simple knapsack (S) 1 3 6
  • multiplier (w) 11
  • modulus (n) 13
  • Compute w-1
  • w-1 ww mod n
  • W-1 1111 mod 13 6
  • w-1 6

12
Example (contd)
  • Consider the Merkle-Hellmen Cryptosystem.
  • Assume that the
  • simple knapsack (S) 1 3 6
  • multiplier (w) 11
  • modulus (n) 13
  • Decrypt 19 18
  • w-1 11-1 mod 13 6
  • w-1 Ci mod n Intermediary Valuei
  • w-1 C 6 19 mod 13 6 18 mod 13
  • 10 4
  • S 1 3 6 1 3 6
  • P 1 1 1 1 1 0
  • (11 31 61) (11 31 60)
  • P 111 110

13
Merkle-Hellman Algorithm (contd)
  • Cryptanalysis
  • Modulus n 200 bits long
  • Si are chosen to be approx. 2200 apart!
  • Knapsack has approx. 200 terms (m 200)
  • Choose m random numbers between 0 and 2200
  • Si 2200i-1 ri
  • Each term is 200 to 400 bits long
  • 1047 years to try 2200 choices for each Si
  • Hard to break for large values of n m

14
Merkle-Hellman Algorithm (contd)
  • Weaknesses
  • Shamir (1980) If modulus n is known, it is
    possible to determine simple knapsack S in
    polynomial time

15
Test Question Example(What you WILL see)
  • Consider the Merkle-Hellmen Cryptosystem.
  • Assume that the
  • simple knapsack (S) 1 3 6
  • multiplier (w) 11
  • modulus (n) 13.
  • Compute H (hard knapsack)
  • Encrypt 101 010 011
  • Compute w-1
  • Decrypt 19 18

16
2nd Test Question
  • This will be for Extra Credit
  • You only have 30 seconds to solve it!
  • Ready!

17
Pick the One that Doesnt Belong
Write a Comment
User Comments (0)
About PowerShow.com