Question 3 Using the Vigenere cipher with the encryption table shown in Figure 3.1 and the key computersecurity: Figure 3.1 (a) Encrypt the message "Today is a good day." with an explanation of your method. [10%] (b) Decrypt the message "Icas fngb omvb kpx czoy." with an explanation of your method. [10%] (c) Discuss how you would improve the Vigenere cipher to make sure it implements both [10%] confusion and diffusion in the ciphertext.
Added by Jason C.
Close
Step 1
1. Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 82 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Table below: Relative letter frequency of the English language Letter Frequency A 0.0817 B 0.0150 C 0.0278 D 0.0425 E 0.1270 F 0.0223 G 0.0202 H 0.0609 I 0.0697 J 0.0015 K 0.0077 L 0.0403 M 0.0241 N 0.0675 O 0.0751 P 0.0193 Q 0.0010 R 0.0599 S 0.0633 T 0.0906 U 0.0276 V 0.0098 W 0.0236 X 0.0015 Y 0.0197 Z 0.0007
Akash M.
For this question, we consider the Hill cipher given in the textbook on an alphabet A consisting of 26 English characters (A-Z), 10 numeric characters (0-9) and the following special characters: : ; < = [ which corresponds to integers 0 to 40. Here the plaintext is processed successively in blocks of size m. The encryption algorithm takes a block with m plaintext digits and transforms into a cipher block of size m using a key matrix of size m x m by the linear transformation, which is given by: c1 = (k1,1p1 + k1,2p2 + ... + k1,mpm) mod 41 c2 = (k2,1p1 + k2,2p2 + ... + k2,mpm) mod 41 ... cm = (km,1p1 + km,2p2 + ... + km,mpm) mod 41 Note: For this question, correspondence between plaintext and number modulo 41 are as follows "A" <-> 0, "B" <-> 1, "C" <-> 2, ..., "Z" <-> 25, "0" <-> 26, "1" <-> 27, "2" <-> 28, ..., "9" <-> 35, ":" <-> 36, ";" <-> 37, "<" <-> 38, "=" <-> 39, "[" <-> 40 (a) The following is ciphertext where the encryption method described above has been employed: OANJASCDOP7A4R82YQR[N11Z;AXCJNV9<ROAZX UO[06;;2U4;ZXWKW:V2BMV:9264:DGOPJSB=9L9:EF where the key matrix is: 29 1 5 0 26 28 17 38 25 8 37 40 1 26 14 40 33 31 34 14 31 23 29 12 23 Find the corresponding plaintext. (b) How many different keys are possible in this system described by the Question? What if we disallowed the symbols "[", "=", "<" so as to only consider an alphabet with 38 characters? In other words, now considering a Hill cipher working mod 38, how many possible keys are there? (c) We return now to the full alphabet A. This cipher is easily broken with a known plaintext attack. An adversary discovers the following ciphertext is encrypted using this cipher with m = 5 (55 characters in total, no spaces): A8VS3XRDEON6JEVXGJID13C07L4C1R4Q965XWRA5DQGYWTNHYO4ND8Z If the following combination of plaintext and ciphertext is given (please replace both "?????" by the last five digits of your student number), decrypt the cipher by giving the plaintext as well as both encryption and decryption keys. Plaintext: XY[LER5HI;:LMOPQR?????SBJ Ciphertext: [WQ:9BOA?????CUQ<ANY1IMTD You need to show step-by-step details of your working. Make sure to include the details of any package, functions used, and/or programs developed. Simply showing the final result and/or a program would not receive marks.
(1 point) This question concerns block cipher modes. We will use a simple affine cipher, which can be expressed in C as follows. char cipher(unsigned char block, char key) { return (key+11*block)%256; } The inverse of this cipher is shown below. char inv_cipher(unsigned char block, char key) { // 163 is the inverse of 11 mod 256 return (163*(block-key+256))%256; } Note that the block size is 8 bits, which is one byte (and one ASCII character). We will work with the fixed key 0x08. We now decrypt various ciphertexts using modes for this cipher. In every case in which the mode requires an IV, the IV will be 0xAA. In the case of CTR mode, we use a (nonce || counter) arrangement in which the nonce is the left 5 bits of 0xAA and the counter is a 3 bit counter that begins at 0. In all of the problems given below, one character is one block. Each character of the plaintext should be regarded as its corresponding ASCII code. The ciphertext is given in hexadecimal. a) Decrypt the ciphertext "303E24110012" using CTR mode. Please enter your answer in ASCII characters (aka words). b) Decrypt the ciphertext "80338BEEF9" using ECB mode. Please enter your answer in ASCII characters (aka words). c) Decrypt the ciphertext "3BF8D72D83" using CFB mode. Please enter your answer in ASCII characters (aka words). d) Decrypt the ciphertext "5BE1595A0D3B" using CBC mode. Please enter your answer in ASCII characters (aka words). e) Decrypt the ciphertext "37CD6733" using OFB mode. Please enter your answer in ASCII characters (aka words).
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD