Download presentation

Presentation is loading. Please wait.

Published byHolly Brett Modified over 3 years ago

1
The Secure Hill Cipher Jeff Overbey MA464-01 Dr. Jerzy Wojdyło April 29, 2003 Based on S. Saeednia. How to Make the Hill Cipher Secure. Cryptologia 24 (2000) 353–360. HILL

2
The Scenario

3
Alice

4
The Scenario Bob

5
The Scenario Oscar

6
The Scenario

7
Nosy NeighborSender Recipient Insecure Channel

8
Hill Cipher Beforehand… Alice and Bob privately share matrix K, invertible over Z m Alice and Bob privately share matrix K, invertible over Z m To encrypt a matrix X over Z m … Compute Y = KX Compute Y = KX Send Y Send Y To decrypt Y… Compute X = K –1 Y Compute X = K –1 Y

9
Why the Hill Cipher Isn’t Secure Nosy NeighborSender Recipient Insecure Channel

10
Why the Hill Cipher Isn’t Secure Nosy NeighborSender Recipient Insecure Channel “Hey Bob, wassup?”

11
Why the Hill Cipher Isn’t Secure Nosy NeighborSender Recipient Insecure Channel

12
Why the Hill Cipher Isn’t Secure Nosy NeighborSender Recipient Insecure Channel

13
Why the Hill Cipher Isn’t Secure Nosy NeighborSender Recipient Insecure Channel Y = KX

14
Why the Hill Cipher Isn’t Secure Nosy NeighborSender Recipient Insecure Channel

15
Why the Hill Cipher Isn’t Secure Nosy NeighborSender Recipient Insecure Channel HEYBOBWAS Known Plaintext

16
Why the Hill Cipher Isn’t Secure Nosy NeighborSender Recipient Insecure Channel HEYBOBWAS Known Plaintext

17
Why the Hill Cipher Isn’t Secure Nosy NeighborSender Recipient Insecure Channel HEY BOB, WASSUP? hahahaHAHAHAHA… KNOWN PLAINTEXT ATTACK

18
Hill Cipher Beforehand… Alice and Bob privately share matrix K, invertible over Z m Alice and Bob privately share matrix K, invertible over Z m To encrypt a matrix X over Z m … Compute Y = KX Compute Y = KX Send Y Send Y To decrypt Y… Compute X = K –1 Y Compute X = K –1 Y Secure Hill Cipher Beforehand… Alice and Bob privately share matrix K, invertible over Z m Alice and Bob privately share matrix K, invertible over Z m To encrypt a matrix X over Z m … Choose a vector t over Z m Choose a vector t over Z m Form permutation matrix P t Form permutation matrix P t Compute K t = P t –1 KP t Compute K t = P t –1 KP t Compute Y = K t X and u = K t Compute Y = K t X and u = K t Send ( Y, u ) Send ( Y, u ) To decrypt (Y, u )… Compute t = K –1 u Compute t = K –1 u Compute P t Compute P t Compute K t –1 = P t –1 K –1 P t Compute K t –1 = P t –1 K –1 P t Compute X = K t –1 Y Compute X = K t –1 Y K t ) –1 = K –1 ) t Note that ( K t ) –1 = ( K –1 ) t

19
Permutation Matrices 1000 0100 0010 0001 I =

20
Permutation Matrices 1000 0100 0010 0001 I =10000010 0100 0001 P 23 =

21
Permutation Matrices 1000 0100 0010 0001 I =10000010 0100 0001 P 23 =01000010 1000 0001 P 12,23 = A permutation matrix is a matrix with exactly one 1 in each row and column and zeros elsewhere.

22
Permutation Matrices

23
Vector Representation 1000 0010 0100 0001 P 23 =01000010 1000 0001 P 12,23 =13 2 4 23 1 4

24
Hill Cipher Beforehand… Alice and Bob privately share matrix K, invertible over Z m Alice and Bob privately share matrix K, invertible over Z m To encrypt a matrix X over Z m … Compute Y = KX Compute Y = KX Send Y Send Y To decrypt Y… Compute X = K –1 Y Compute X = K –1 Y Secure Hill Cipher Beforehand… Alice and Bob privately share matrix K, invertible over Z m Alice and Bob privately share matrix K, invertible over Z m To encrypt a matrix X over Z m … Choose a vector t over Z m Form permutation matrix P t Form permutation matrix P t Compute K t = P t –1 KP t Compute K t = P t –1 KP t Compute Y = K t X and u = K t Compute Y = K t X and u = K t Send ( Y, u ) Send ( Y, u ) To decrypt (Y, u )… Compute t = K –1 u Compute t = K –1 u Compute P t Compute P t Compute K t –1 = P t –1 K –1 P t Compute K t –1 = P t –1 K –1 P t Compute X = K t –1 Y Compute X = K t –1 Y

25
The Easy Way to Encrypt Require t to be the vector representation of a permutation matrix Require t to be the vector representation of a permutation matrix N.B.: This is for example only—it is not practical “in the field.” N.B.: This is for example only—it is not practical “in the field.”

26
An Example “Hey Bob, wassup?”

27
An Example Choose a permutation vector: Form permutation matrix P t : 3 rows, since K is 3×3

28
An Example Find P t –1 : Compute K t = P t –1 KP t :

29
An Example Find P t –1 : Compute K t = P t –1 KP t : Permutation of K

30
An Example Compute Y = K t X: Compute u = Kt:

31
An Example Compute Y = K t X: Compute u = Kt:

32
An Example Send (Y,u) to Bob

33
The Scenario Nosy NeighborSender Recipient

34
The Scenario Nosy NeighborSender Recipient

35
The Scenario Nosy NeighborSender Recipient

36
The Scenario Nosy NeighborSender Recipient

37
An Example Receive (Y,u):

38
An Example Compute K –1 : Compute t = K –1 u and derive P t :

39
An Example Compute K t –1 = P t –1 K –1 P t : Compute X = K t –1 Y:

40
An Example Compute K t –1 = P t –1 K –1 P t : Compute X = K t –1 Y: “Hey Bob, wassup?”

41
An Example But that was just a regular Hill cipher with a fancy key… KNOWN PLAINTEXT ATTACK

42
The Actual Really Secure Hill Cipher Jeff Overbey MA464-01 Dr. Jerzy Wojdyło April 29, 2003 Based on S. Saeednia. How to Make the Hill Cipher Secure. Cryptologia 24 (2000) 353–360. HILL

43
The Actual Really Secure Hill Cipher or How to Secure the Secure Hill Cipher HILL

44
Ensuring Security X should have two columns X should have two columns Why? Suppose K is n × n and X is n × s. Why? Suppose K is n × n and X is n × s. If s n… If s n… If 2 < s < n… If 2 < s < n… If s = 2… If s = 2… P t should be different for each encryption P t should be different for each encryption Theoretically, this can be ensured by choosing a different t for each encryption Theoretically, this can be ensured by choosing a different t for each encryption We did this by requiring t to be a vector representation of a permutation matrix, but this is not the best solution. We did this by requiring t to be a vector representation of a permutation matrix, but this is not the best solution.

45
The Function Let n denote the set of n × n permutation matrices. : Z m n n Ideally, is onto is onto is 1-1 is 1-1

46
The Function Let n denote the set of n × n permutation matrices. : Z m n n Is it possible? Z m n = m n Z m n = m n n = n ! n = n ! Z m n n Z m n n y = 26 n y = n ! An “ideal” function DNE.

47
The Function Ideas? Awkward silence…

48
Apologies for the horrible background image pun.

Similar presentations

OK

15-499Page 1 15-499:Algorithms and Applications Cryptography I – Introduction – Terminology – Some primitives – Some protocols.

15-499Page 1 15-499:Algorithms and Applications Cryptography I – Introduction – Terminology – Some primitives – Some protocols.

© 2018 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google