0% found this document useful (0 votes)
58 views7 pages

Untitled

Uploaded by

Anish Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
58 views7 pages

Untitled

Uploaded by

Anish Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 7
Classical Cryptography One of the earliest known uses of cryptography was by Julius Caesar. He made messages secret by shifting each letter three letters forward in the alphabet (sending the last three letters of the alphabet to the first three). For instance, using this scheme the letter B is sent to E and the letter X issentto A. This is an example of encryption, that is, the process of making a message secret. To express Caesar's encryption process mathematically, first replace each letter by an ele- ment of Z2g, that is, an integer from 0 to 25 equal to one less than its position in the alphabet. For example, replace A by 0, K by 10, and Z by 25. Caesar’s encryption method can be represented by the function f that assigns to the nonnegative integer p, p < 25, the integer f(p) in the set (0, 1,2,..., 25) with f(p) = (p +3) mod 26. In the encrypted version of the message, the letter represented by p is replaced with the letter represented by (p + 3) mod 26. What is the secret message produced from the message “MEET YOU IN THE PARK” using the Caesar cipher? Solution: First replace the letters in the message with numbers. This produces 124419 241420 8131974 1501710. Now replace each of these numbers p by f(p) = (p + 3) mod 26. This gives 157722 11723 1116-22107 183.2013. Translating this back wo laters produces the encrypted message “PHHIW BRX LQ WKH SDUN” ‘To recover the original message from a secret message encrypted by the Caesar cipher, the function f~', the inverse of f. is used. Note that the function f—' sends an integer p irom Z26. 10 f~'(p) = (p — 3) mod 26. In other words, to find the original message, each letter is shifted back three letters in the alphabet, with the first three letters sent to the last three letters of the alphabet. The process of determining the original message from the encrypted message is called decryption. ‘There are various ways to generalize the Caesar cipher. For example, instead of shifting the ‘numerical equivalent of each letter by 3, we can shift the numerical equivalent of each letter by ‘A, So that S(p) = (p +k) mod 26, Such a cipher is called a shift cipher. Note that decryption can be carried out using F7'(P) = (7 — 8) mod 26. Here the integer k is called a key. We illustrate the use of a shift cipher in Examples 2 and 3. Encrypt the plaintext message “STOP GLOBAL WARMING” using the shifi cipher with shift k=11 Solurion: To encrypt the message “STOP GLOBAL WARMING” we first translate each letier to the corresponding element of Zog, This produces the string 18191415 611141011 22017128 136. ‘We now apply the shift fp) = (p + LL) mod 26 to each number in this string. We obtain 34250 172225121122 711223192417. ‘Translating this last string back to letters, we obtain the ciphertext “DEZA RWZMLW HLCX- TYR" 4 ‘Decrypt the ciphertext message “LEWLYPLUIL PZ H NYLHA ALHJOLY” that was en: ceypied withthe shift cipher with shit k = 7. Solution’ To decrypt the ciphertext “LEWLYPLUIL PZ H NYLHA ALIUOLY” we first ‘anslale the letters back to elements of Zag. We obtain 142211 24151120911 1525-7 -13241170 011791411 24. ‘Next, we shift each of these numbers by —k = —7 modulo 26 to obtain 42315417841324 818 0 6174019 194027417. Finally, we translate these_numbers back to letters to obtain the plaintext. We obtain “EXPERIENCE IS A GREAT TEACHER.” < ‘We can generalize shift ciphers further to slightly enhance security by using a function of the form, F(p) = (ap +b) mod 26, where a and b are integers, chosen so that f is a bijection. (The function f(p) = (ap + b) mod 26 is a bijection if and only if gcd(a, 26) = 1.) Such a mapping is called an affine transformation, and the resulting cipher is called an affine cipher. ‘What letter replaces the letter K when the function f(p) = (7p +3) mod 26 is used for en- cryption? Solution: First, note that 10 represents K. Then, using the encryption function specified, it follows that f(10) = (7-10 +3) mod 26 = 21. Because 21 represents V, K is replaced by V in the encrypted message. We will now show how to decrypt messages encrypted using an affine cipher. Suppose that c= (ap +b) mod 26 with ged(a, 26) = 1. To decrypt we need to show how to express p in terms of c. To do this, we apply the encrypting congruence c = ap + b(mod 26), and solve it for p. To do this, we first subtract b from both sides, to obtain c — b = ap (mod 26). Because ged(a, 26) = 1, we know that there is an inverse Z of a modulo 26. Multiplying both sides of the last equation by Z gives us @(c — b) = Zap (mod 26). Because Za = 1 (mod 26), this tells us that p = @(c —b) (mod 26). This determines p because p belongs to Zs.

You might also like