



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




E-320: Teaching Math with a Historical Perspective Oliver Knill, 2015
In this worksheet we crack a Caesar cypher using statistical analysis. Letter Percentage E 11. A 8. R 7. I 7. O 7. T 6. N 6. S 5. L 5. C 4. U 3. D 3. P 3.
Letter Percentage M 3. H 3. G 2. B 2. F 1. Y 1. W 1. K 1. V 1. X 0. Z 0. J 0. Q 0. The frequency of letters is relevant for designing keyboards. The Qwerty keyboard for example has ESER and OI in prominent places. The ’top twelve’ letters help with about 80 percent of the text. You can remember the first 8 with the memnonic
”A SIN TO ERR”.
An other thing to look for: The top pairs which appear are
TH HE AN RE ER IN ON AT ND ST ES EN OF TE ED OR TI HI AS TO
The most frequent double letters are
Example
We aim to decrypt the following text:
Decoding: Count the number of letters which occur. Since we have not much time, the 8 most frequent letters are listed in this text. Can you figure out the text?
Now it is your turn
We want to understand the basic mechanism for RSA encryption.
Ron Rivest, Adi Shamir and Len Adleman.
An RSA public key is a pair (n, a) where n is an integer with secret factorization n = pq and where a < (p − 1)(q − 1) is such that there exists b with ab = 1 mod (p − 1)(q − 1). Ana publishes this pair. If Bob wants to send a secrete message to Ana, he transmits to Ana the message
y = xa^ mod n.
Ana can read the email by computing yb^ mod n.
Why does it work? We use the Fermat’s little theorem which tells that xp−^1 − 1 is is divisible by p and xq−^1 − 1 is divisible by q. But this assumes p, q to be prime. For n = pq, we have x(p−1)(q−1)^ − 1 divisible by pq.
Problem 1) Take p = 3 and q = 5 Verify that 2(p−1)(q−1)^ − 1 is divisible by n = pq.
Because yb^ = xab^ = x(p−1)(q−1)^ = x modn, Ana gets the message, Bob has sent. But Eve has no chance to read it, because the only thing Eve can see is y and (n, a). It is believed that without the factorization of n, the message can not be read.
Let (55, 13) be the public key of Ana. Assume Ana has the message x = 4 to submit. She com- putes y = 4^13 mod 55 = 9. Because 55 = 11 ∗ 5 = pq, Ana knows (p − 1)(q − 1) = 40 and can obtain b = 37. With x = 9^37 mod 55 she gets back 4.
Problem 2) Assume (n, a) = (15, 2) is the public key of Ana. You are Bob. Send the message x = 7 to Ana.