CPSC 333 Homework #4 Daniel Jordan daniel_jordan@csu.fullerton.edu R-8.9 In the inverse of the S-box from figure 8.14, what is the substitution for e3, in hexadecimal? The hex substitution for e3 is 4d R-8.12 Bob is arguing that if you use Electronic Codebook (ECB) mode twice in a row to encrypt a long message, M, using the same key each time, that it will be more secure. Explain why Bob is wrong in the case of using a binary one-time pad encryption scheme. By running a message through an ECB twice, using the same key, both cipher blocks will cancel each other out, and return the original plain text message. R-8.14 Compute the multiplicative inverse of 5 in Z21 x = 5-1 mod 21 x = 17 R-8.22 Demonstrate that the hash function H(x) = 5x + 11 mod 19 is not weakly collision resistant, for H(4), by showing how easy it is to find such a collision. H(4): 5x + 11 mod 19 = 12 Using a simple program, I was able to find collisions at x =23, 42, 61, 80, 99. Finding 5 collisions in x<100 shows H(4) is not very collision resistant. It also reveals a pattern of finding a collision every 19 numbers for(var i = 0; i< 100; i++){ var k = (5*i+11)%19; if(k == 12){ console.log(i + " - " + k); } } R-8.25 Explain the strengths and weaknesses of using symmetric encryption, like AES, versus a public-key cryptosystem, like RSA Some strengths of symmetric encryption is that it is much faster, and requires much less processing power than a public-key system like RSA. A disadvantage of symmetric is that both parties must agree on a key beforehand, to encrypt and decrypt the message. This is sometimes not feasible to do. Often times, a public-key system like RSA is used to encrypt an AES key which is used to encrypt the contents of the transmission. C-8.1 What is the plaintext for the following ciphertext, which was encrypted using a simple substitution cipher: CJBT COZ NPON ZJV FTTK TWRTUYTFGT NJ DTN O XJL. Y COZ ZJV CPJVIK DTN O XJL MYUCN SOME SAY THAT YOU NEED EXPERIENCE TO GET A JOB. I SAY YOU SHOULD GET A JOB FIRST B (1) - 1.61% - M C (5) - 8.06%- S D (2) - 3.23% - G F (2) - 3.23% - N G (1) - 1.61% - C I (1) - 1.61% - L J (7) - 11.29% - O K (2) - 3.23% - D L (2) - 3.23% - B M (1) - 1.61% - F N (6) - 9.68% - T Frequency table generated using program from project 1 O (5) - 8.06% - A P (2) - 3.23% - H R (1) - 1.61% - P T (9) - 14.52% - E U (2) - 3.23% - R V (3) - 4.84% - U W (1) - 1.61% - X X (2) - 3.23% - J Y (3) - 4.84% - I Z (4) - 6.45% - Y