Docsity

Entropy-Computer Security-Lecture Slides, Slides of Computer Security

Partial preview of the text

Download Entropy-Computer Security-Lecture Slides and more Slides Computer Security in PDF only on Docsity!

Computer Security

Entropy

  • Key distribution problem

“ It is impossible to use different key for every message”

Unconditionally Secure Ciphers are not feasible to use for every day encryption requirements such as internet transaction

  • Computationally Secure Ciphers

Not perfectly secure

We are interested in using single small key for multiple messages and for large message encryption

Entropy and Uncertainty (2)

• Let X be the answer of a question as Y/N

 If a person always answers Y then X contains no information  Uncertainty(X) ~ Entropy(X)~ H(X) = 0  In other case (if answer can be Y or N )  Uncertainty(X) ~ Entropy(X)~ H(X) = 1

• H(X) = 1 means one information is provided by X

Formally

Let X be a random variable which takes on a finite set of values xi, with 1 ≤ i ≤ n, and has probability distribution pi = p(X = xi). The entropy of X is defined to be

H X pi pi

k

i

1

( ) log 2

  • Example

 Entropy of answer a question Y/N in a random variable X

 Case-I (A person always answers Y) p1=Probability answer = Y = 1 p2=Probability answer = N = 0

H(X) = - (p1og 2 (p1) – p2log 2 (p2)) = - (1x0 – 1 x 0 ) = 0

 Case-II (A person always answers Y) p1=Probability answer = Y = 1/

p2=Probability answer = N = 1/ H(X) = - (p1og 2 (p1) – p2log 2 (p2)) = 1

Entropy is Compression

  • Entropy can be viewed as the measure of compressibility of a message
  • If we can compress a message of size N to its portion say ε the entropy would be N. ε  Or it contains N. ε bits of information in it
  • Example
  • We can send 8 flags of 1 and 0 using eight bytes or 1 byte

 N= 64 bits  ε = 8/64 = 1/ 8 bits  ε.N = 8 bits of information

Example

P = {a, b, c, d}, K = {k1, k2, k3} C = {1, 2, 3, 4},

Probability of a,b,c,d given by

p(P = a) = 0.25, p(P = b) = p(P = d) = 0.3 and p(P = c) = 0.15, p(K = k1) = p(K = k3) = 0.25 and p(K = k2) = 0.5, p(C = 1) = p(C = 2) = p(C = 3) = 0.2625 and p(C = 4) = 0.2125.

Relevant Entropies

H(P) ≈ 1.9527, H(K) ≈ 1.5, H(C) ≈ 1.9944.

What does this mean?

Theorems

Properties of Entropy

  • Resembles the properties of Probability

 if X and Y are random variables then we define the joint probability distribution as ri,j = p(X = xi and Y = yj)

 For 1 ≤ i ≤ n and 1 ≤ j ≤ m.the joint entropy is defined as

 Joint entropy H(X, Y ) as the total amount of information contained in one observation of (x, y) ∈ X × Y.

H(X, Y ) ≤ H(X) + H(Y )

with equality if and only if X and Y are independent

ij

m

j

ij

n

i

H X Y   r r  

1

2 1

( , ) log

H(K, P,C) = H(P,K) + H(C|P,K) as H(X, Y ) = H(Y ) + H(X|Y )

= H(P,K) as H(C|P,K) = 0

= H(K) + H(P) as K and P are independent

and

H(K, P,C) = H(K,C) + H(P|K,C) as H(X, Y ) = H(Y ) + H(X|Y )

= H(K,C) as H(P|K,C) = 0.

Hence, we obtain

H(K,C) = H(K) + H(P).

and

H(K|C) = H(K,C) − H(C) = H(K) + H(P) − H(C).

  • Our example

H(P) ≈ 1.9527, H(K) ≈ 1.5, H(C) ≈ 1.9944.

Hence H(K|C) ≈ 1.9527 + 1.5 − 1.9944 ≈ 1.4583.

  • So around one and a half bits of information about the key are left to be found, on average, after a single ciphertext is observed
  • Hence, 1.5−1.4593 = 0.042 bits of information about the key are revealed by a single ciphertext.