Pries: 360 Mathematics of Information Security Sample Final Solutions. Warm-up:

advertisement
Pries: 360 Mathematics of Information Security
Sample Final Solutions.
Warm-up:
1. Review the major topics we’ve covered: Euclidean algorithm, primes and factorization,
φ function, modular arithmetic, multiplicative inverses, Chinese remainder theorem,
Fermat, Euler, dot products, binary numbers, primitive roots, order, discrete logs,
linear recurrence relations, finite fields, error-correcting codes.
2. What is φ(24) and what does it mean? Answer: 8 because there are 8 numbers
{1, 5, 7, 11, 13, 17, 19, 23} between 1 and 24 which do not share any factors with 24.
3. Find a number x so that 0 ≤ x ≤ 23 and x ≡ 99 mod 24. Answer: x = 9.
4. Use the table on page 137 of the handout to find 223 mod 37. Answer: 5.
5. Decrypt Caesar’s shift message: KSSHPYGO! Answer: GoodLuck!
Earlier Material:
1. For how many choices of a with 0 ≤ a ≤ 604 is the affine cipher x → ax + b mod 605
not 1-to-1? Answer: 165.
2. Let a1 = 3 mod 13, a2 = 2 · 3 mod 13, a3 = 4 · 3 mod 13, a4 = 8 · 3 mod 13, etc.
What is the period of the sequence a1 , a2 , a3 , a4 , . . .? Answer: 12.
3. What are the last three digits of 6803 ? Answer: 216.
4. Use the table on page 137 of the handout to find all solutions to 4x3 ≡ 13 mod 37.
Answer: x = 6, 8, 23.
5. Use the table on page 137 of the handout to find a primitive root g mod 37 (other
than g = 2) and to find the order of 25 mod 37. Answer: the primitive roots are
{2, 5, 13, 15, 17, 18, 19, 20, 22, 24, 32, 35}. Answer: the order is 18.
Recent Material:
1. Find a polynomial f (x) ∈ Z/2[x] of degree 4 which factors mod 5 but does not have
a root mod 5. Answer: any product of two irreducible degree 2 polynomials. For
example, f (x) = x4 + 4x2 + 4.
2. Find a polynomial in Z/2[x] with degree smaller than 3 which is the same as f (x) =
x5 + x3 + x mod g(x) = x3 + x + 1 (and mod 2). Answer: f (x) = x2 + x.
3. Find the order of β in the finite field F8 with the relations β 3 + β + 1 = 0 and 2 = 0.
Answer: 7.
4. Find a basis for the ISBN code. In other words, find 9 codewords so that every
possible ISBN codeword can be found by adding together scalar multiples of these 9.
One possible answer is:
c1 = (1000000001)
c2 = (0100000002)
c3 = (0010000003)
c4
c5
c6
c7
c8
c9
= (0001000004)
= (0000100005)
= (0000010006)
= (0000001007)
= (0000000108)
= (0000000019)
5. Look at the linear code which is the set of vectors (a1 , a2 , a3 , a4 , a5 ) where each ai is 0
or 1 and a4 = a2 + a3 mod 2 and a5 = a1 + a2 mod 2.
A. What is the length n? Answer: n = 5.
B. What is the dimension k? Answer: k = 3.
C. What is the information rate? Answer: k/n = 3/5.
D. What is the distance d and the relative minimum distance? Answer: d = 2 and
d/n = 2/5.
E. How many errors can this code detect? Answer: 1
F. How many errors can this code correct? Answer: 0.
Ideas and proofs:
1. Be able to briefly and clearly describe the following topics and their importance in
cryptography: shift cipher, affine cipher, Vigenere cipher, substitution cipher, frequency analysis, diffusion, confusion, one-time pads, public key cryptosystem, RSA
cryptosystem, El Gamal cryptosystem, signature scheme, hash function, DES and Reijdael.
2. Review encryption and decryption with the affine cipher, Vigenere cipher, RSA cryptosystem and El Gamal cryptosystem.
3. Find all primes of the form p = n2 − 1 and explain why you’ve got them all.
Proof: The number p = n2 − 1 = (n − 1)(n + 1) always factors.
So if n2 − 1 is prime, then one factor must equal 1.
So if n2 − 1 is prime, then n − 1 = 1 or n = 2.
Thus p = 3 is the only prime of the form p = n2 − 1.
4. If p ≡ 3 mod 4, prove that (p − 1)/2 is odd. Include every detail! Proof 1: If p ≡
3 mod 4, then p = 4k + 3 for some integer k.
So (p − 1)/2 = 2k + 1. So (p − 1)/2 is not a multiple of 2. So 2 does not divide (p − 1)/2
and thus (p − 1)/2 is odd.
5. Use the previous problem to show that −1 = x2 mod p has no solution if p is a prime
and p ≡ 3 mod 4.
Proof: If −1 = x2 mod p, then (−1)(p−1)/2 = (x2 )(p−1)/2 = xp−1 mod p.
By Fermat’s Little Theorem, xp−1 = 1 mod p.
By the previous problem, if p = 3 mod 4 then (p − 1)/2 = 2k + 1 is odd.
So (−1)(p−1)/2 = (−1)(2k+1) = −1.
It follows that −1 = 1 mod p which is only possible if p = 2.
Since p 6= 2, there is a contradiction, and so no solution to −1 = x2 mod p exists.
Download