## Math 5410/4410 Take-Home Midterm Spring 1998

This exam is due on Thursday, March 12th. The exam totals 100 points. Please show all work as answers alone are not sufficient. All work submitted must be your own.
GOOD LUCK !!
1. Consider the following ciphertext:

EYMHP GZYHH PTIAP QIHPH YIRMQ EYPXQ FIQHI AHYIW ISITK MHXQZ PNMQQ XFIKJ MKXIJ RIKIU XSSXQ ZEPGS ATIHP PSXZY H

a) Calculate the Index of Coincidence and speculate on whether or not this might be a polyalphabetic cipher.

b) Supposing that the cipher is either a transposition or a monoalphabetic substitution (and I am not claiming that it is either of these), examine the frequency distribution and decide which of these two choices is the most likely.

c) Determine the plaintext if you know that the message starts with "What ought ..." (a plaintext attack).

d) Explain how the key was formed.

2. Suppose that n = 1363 in the RSA Cryptosystem, and it has been revealed that (n) = 1288. Use this information to find the factorization of n by solving a quadratic equation.

3. Suppose the Affine Cipher is implemented in Z99.

a) Determine the number of possible keys.

b) If the key is (16,7) (i.e., the encryption function is x (16x + 7) mod 99) determine the decryption function corresponding to this key.

4. Consider the non-linear feedback function f(s0, s1, s2, s3) = s0s1 + s3 + 1.

a) Determine the repeating portion of the sequence obtained by a FSR with this feedback function whose starting state is 0 1 0 1.

b) Find the linear equivalence of this FSR and a LFSR which will produce the same repeating portion.

5. Here is an example of RSA ciphertext:

```11437    6198   16611    2405   18636   2679   12205   24142    6375    2134
16611    2405    9529    7260    7834  15094    4667   24027     762    5878
5206   16683    5359   10888    4168   3536   23229   20351   15580    6704
7977     374    6525    4287   14402    527   12887   21628   11884    9402
15470    1339   10420   18051   23125   7747     135   22007   20049    9984
13199   15176    1379    8313   19574   7989   22869     406   10057   21758
3918   23991   14237    7989    3947  19529   15728    5601    3527    7200
7601   13282   21160    6291   15994   7785    8982    3045    6596   16796
4663    2405   20302   11929   17125  14533   21001    8351   11571   22082
11040    8687    6704    3330    5630  19650   13024
```
The public modulus is n = 24637 and the public encryption exponent is b = 3. Perform the following computations:

a) Factor n by trial and error.

b) Compute the private decryption exponent a using the extended Euclidean algorithm.

c) Decrypt the ciphertext, obtaining the plaintext as a sequence of elements of Z24637 . Use the square-and-multiply algorithm for modular exponentiation.

d) Translate the plaintext into English text, given that each element of Z24637 represents three alphabetic characters, as in the following examples:

DOG 3 × 262 + 14× 26 + 6 = 2398
CAT 2 × 262 + 0× 26 + 19 = 1371
ZZZ 25 × 262 + 25× 26 + 25 = 17575