1 / 34

Shannon ’ s theory

Shannon ’ s theory. Ref. Cryptography: theory and practice Douglas R. Stinson. Shannon ’ s theory. 1949, “ Communication theory of Secrecy Systems ” in Bell Systems Tech. Journal. Two issues: What is the concept of perfect secrecy ? Does there any cryptosystem provide perfect secrecy?

Télécharger la présentation

Shannon ’ s theory

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Shannon’s theory Ref. Cryptography: theory and practice Douglas R. Stinson

  2. Shannon’s theory • 1949, “Communication theory of Secrecy Systems” in Bell Systems Tech. Journal. • Two issues: • What is the concept of perfect secrecy? Does there any cryptosystem provide perfect secrecy? • It is possible when a key is used for only one encryption • How to evaluate a cryptosystem when many plaintexts are encrypted using the same key?

  3. Outline • Introduction • One-time pad • Elementary probability theory • Perfect secrecy • Entropy • Spurious keys and unicity distance

  4. Categories of cryptosystem (1) • Computational security: • The best algorithm for breaking a cryptosystem requires at least N operations, where N is a very large number • No known practical cryptosystem can be proved to be secure under this definition • Study w.r.t certain types of attacks (ex. exhaustive key search) does not guarantee security against other type of attack

  5. Categories of cryptosystem (2) • Provable security • Reduce the security of the cryptosystem to some well-studied problems that is thought to be difficult • Ex. RSA  integer factoring problem • Unconditional security • A cryptosystem cannot be broken, even with infinite computational resources

  6. One-Time Pad • Unconditional security !!! • Described by Gilbert Vernam in 1917 • Use a random key that was truly as long as the message, no repetitions For ciphertext

  7. Example: one-time pad • Given ciphertext with Vigenère Cipher: ANKYODKYUREPFJBYOJDSPLREYIUNOFDOIUERFPLUYTS Decrypt by hacker 1: Ciphertext: ANKYODKYUREPFJBYOJDSPLREYIUNOFDOIUERFPLUYTS Key: pxlmvmsydofuyrvzwc tnlebnecvgdupahfzzlmnyih Plaintext: mr mustard with the candlestick in the hall Decrypt by hacker 2: Ciphertext: ANKYODKYUREPFJBYOJDSPLREYIUNOFDOIUERFPLUYTS Key: pftgpmiydgaxgoufhklllmhsqdqogtewbqfgyovuhwt Plaintext: miss scarlet with the knife in the library Which one?

  8. a b c d e f g h i j k l m n o p q r s t u v w x y z ? A B C D E F G H I J K L M N O P Q R S T U V W X Y Z ? B C D E F G H I J K L M N O P Q R S T U V W X Y Z ? A C D E F G H I J K L M N O P Q R S T U V W X Y Z ? A B D E F G H I J K L M N O P Q R S T U V W X Y Z ? A B C E F G H I J K L M N O P Q R S T U V W X Y Z ? A B C D F G H I J K L M N O P Q R S T U V W X Y Z ? A B C D E G H I J K L M N O P Q R S T U V W X Y Z ? A B C D E F H I J K L M N O P Q R S T U V W X Y Z ? A B C D E F G I J K L M N O P Q R S T U V W X Y Z ? A B C D E F G H J K L M N O P Q R S T U V W X Y Z ? A B C D E F G H I K L M N O P Q R S T U V W X Y Z ? A B C D E F G H I J L M N O P Q R S T U V W X Y Z ? A B C D E F G H I J K M N O P Q R S T U V W X Y Z ? A B C D E F G H I J K L N O P Q R S T U V W X Y Z ? A B C D E F G H I J K L M O P Q R S T U V W X Y Z ? A B C D E F G H I J K L M N P Q R S T U V W X Y Z ? A B C D E F G H I J K L M N O Q R S T U V W X Y Z ? A B C D E F G H I J K L M N O P R S T U V W X Y Z ? A B C D E F G H I J K L M N O P Q S T U V W X Y Z ? A B C D E F G H I J K L M N O P Q R T U V W X Y Z ? A B C D E F G H I J K L M N O P Q R S U V W X Y Z ? A B C D E F G H I J K L M N O P Q R S T V W X Y Z ? A B C D E F G H I J K L M N O P Q R S T U W X Y Z ? A B C D E F G H I J K L M N O P Q R S T U V X Y Z ? A B C D E F G H I J K L M N O P Q R S T U V W Y Z ? A B C D E F G H I J K L M N O P Q R S T U V W X Z ? A B C D E F G H I J K L M N O P Q R S T U V W X Y ? A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z ?

  9. Problem with one-time pad • Truly random key with arbitrary length? • Distribution and protection of long keys • The key has the same length as the plaintext! • One-time pad was thought to be unbreakable, but there was no mathematical proof until Shannon developed the concept of perfect secrecy 30 years later.

  10. Preview of perfect secrecy (1) • When we discuss the security of a cryptosystem, we should specify the type of attack that is being considered • Ciphertext-only attack • Unconditional security assumes infinite computational time • Theory of computational complexity × • Probability theory ˇ

  11. Preview of perfect secrecy (2) • Definition: A cryptosystem has perfect secrecy if Pr[x|y] = Pr[x] for allxP, yC • Idea: Oscar can obtain no information about the plaintext by observing the ciphertext Bob Alice y x Oscar

  12. Outline • Introduction • One-time pad • Elementary probability theory • Perfect secrecy • Entropy • Spurious keys and unicity distance

  13. Discrete random variable (1) • Def: A discrete random variable, say X, consists of a finite setX and a probability distribution defined on X. • The probability that the random variable X takes on the value x is denoted Pr[X=x] or Pr[x] • 0≤Pr[x] for all xX,

  14. Discrete random variable (2) • Ex. Consider a coin toss to be a random variable defined on {head, tails} , the associated probabilities Pr[head]=Pr[tail]=1/2 • Ex. Throw a pair of dice. It is modeled by Z={(1,1), (1,2), …, (2,1), (2,2), …, (6,6)} where Pr[(i,j)]=1/36 for all i, j. sum=4 corresponds to {(1,3), (2,2), (3,1)} with probability 3/36

  15. Joint and conditional probability • X and Y are random variables defined on finite sets X and Y, respectively. • Def: the joint probability Pr[x, y] is the probability that X=x and Y=y • Def: the conditional probability Pr[x|y] is the probability that X=x given Y=y Pr[x, y] =Pr[x|y]Pr[y]= Pr[y|x]Pr[x]

  16. Bayes’ theorem • If Pr[y] > 0, then • Ex. Let X denote the sum of two dice. Y is a random variable on {D, N}, Y=D if the two dice are the same. (double)

  17. Outline • Introduction • One-time pad • Elementary probability theory • Perfect secrecy • Entropy • Spurious keys and unicity distance

  18. Definitions • Assume a cryptosystem (P,C,K,E,D) is specified, and a key is used for one encryption • Plaintext is denoted by random variable x • Key is denoted by random variable K • Ciphertext is denoted by random variable y Ciphertext Plaintext y x K

  19. Perfect secrecy • Definition: A cryptosystem has perfect secrecy if Pr[x|y] = Pr[x] for allxP, yC • Idea: Oscar can obtain no information about the plaintext by observing the ciphertext Bob Alice y x Oscar

  20. Relations among x, K, y • Ciphertext is a function of x and K • y is the ciphertext, given that x is the plaintext

  21. Relations among x, K, y • x is the plaintext, given that y is the ciphertext

  22. Ex. Shift cipher has perfect secrecy (1) • Shift cipher: P=C=K=Z26 , encryption is defined as • Ciphertext:

  23. Ex. Shift cipher has perfect secrecy (2) • Pr[y|x] • Apply Bayes’ theorem Perfect secrecy

  24. Perfect secrecy when |K|=|C|=|P| • (P,C,K,E,D) is a cryptosystem where |K|=|C|=|P|. • The cryptosystem provides perfect secrecy iff • every keys is used with equal probability 1/|K| • For every xP, yC, there is a unique key K such that • Ex. One-time pad in Z2

  25. Outline • Introduction • One-time pad • Elementary probability theory • Perfect secrecy • Entropy • Spurious keys and unicity distance How about the security when many plaintexts are encrypted using one key?

  26. Preview (1) • We want to know: the average amount of ciphertext required for an opponent to be able to uniquely compute the key, given enough computing time Ciphertext Plaintext yn xn K

  27. Preview (2) • We want to know: How much information about the key is revealed by the ciphertext = conditional entropy H(K|Cn) • We need the tools of entropy

  28. Entropy (1) • Suppose we have a discrete random variable X • What is the information gained by the outcome of an experiment? • Ex. Let X represent the toss of a coin, Pr[head]=Pr[tail]=1/2 • For a coin toss, we could encode head by 1, and tail by 0 => i.e. 1 bit of information

  29. Entropy (2) • Ex. Random variable X with Pr[x1]=1/2, Pr[x2]=1/4, Pr[x3]=1/4 • The most efficient encoding is to encode x1 as 0, x2 as 10, x3 as 11. • Notice: probability 2-n => n bits p => -log2 p • The average number of bits to encode X

  30. Entropy: definition • Suppose X is a discrete random variable which takes on values from a finite set X. Then, the entropy of the random variable X is defined as

  31. Entropy : example • Let P={a, b}, Pr[a]=1/4, Pr[b]=3/4. K={K1, K2, K3}, Pr[K1]=1/2, Pr[K2]=Pr[K3]= 1/4. encryption matrix: H(P)= H(K)=1.5, H(C)=1.85

  32. Conditional entropy • Known any fixed value y on Y, information about random variable X • Conditional entropy: the average amount of information about X that is revealed by Y • Theorem: H(X,Y)=H(Y)+H(X|Y)

  33. Theorem (1) • Let (P,C,K,E,D) be a cryptosystem, then H(K|C) = H(K) + H(P) – H(C) • Proof: H(K,P,C) = H(C|K,P) + H(K,P) Since key and plaintext uniquely determine the ciphertext H(C|K,P) = 0 H(K,P,C) = H(K,P) = H(K) + H(P) Key and plaintext are independent

  34. Theorem (2) • We have • Similarly, • Now, H(K,P,C) = H(K,P) = H(K) + H(P) H(K,P,C) = H(K,C) = H(K) + H(C) H(K|C)= H(K,C)-H(C) = H(K,P,C)-H(C) = H(K)+H(P)-H(C)

More Related