11.07.2015 Views

Cryptography - Sage

Cryptography - Sage

Cryptography - Sage

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

in terms of the cryptosystem), then the condidtional entropy H(M|C) is defined to be:H(M|C) = ∑ y∈CP (y)H(M|y)= ∑ y∈C= ∑ y∈CP (y) ∑ x∈MP (x|y) log 2 (P (x|y) −1 )∑P (x, y) log 2 (P (x|y) −1 ).x∈MIf for each x ∈ M and y ∈ C the joint probability P (x, y) is equal to P (x)P (y) (i.e. theplaintext and ciphertext space are independent) and thus P (x|y) = P (x), then the aboveexpression simplifies to:H(M|C) = ∑ ∑P (x)P (y) log 2 (P (x) −1 )x∈M y∈C( ∑ ) ∑= P (y) P (x) log 2 (P (x) −1 )y∈Cx∈M= ∑ x∈MP (x) log 2 (P (x) −1 ) = H(M).Therefore the cryptosystem has perfect secrecy.Entropy of the key spaceIt can be shown that perfect secrecy (or unconditional security) requires the entropy H(K)of the key space K to be at least as large as the entropy H(M) of the plaintext spaceM. If the key space is defined to be the set of N-bit strings with uniform distribution,then the entropy of K is N, and this is the maximum entropy for a space of N-bit strings(see exercise). This implies that in order to achieve perfect secrecy, the number of bits ofstrings in the key space should be at least equal the entropy H(M) of the plaintext space.ExercisesIn order to understand naturally occurring languages, we consider the models for finitelanguages X consisting of strings of fixed finite length N together with a probability functionP which models the natural language. In what follows, for two strings x and y wedenote their concatenation by xy.Exercise 4.1 Show that N is the maximum entropy for a probability function on bit stringsof length N.4.5. Perfect secrecy and one-time pads 35

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!