Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Math 480 - Homework DUE 2016-05-27: Number Theoretic Public-Key Cryptography
Due 6pm on May 27, 2016
(Authors of this homework: John Jeng, Jonathon Lee, William Stein)
There are five problems. All problems have equal weight.
Problem 1 -- Large Exponents
Part A: Let be the next prime after and the next prime after .
A.1. What are the last 5 digits of ?
A.2. What is ?
A.3. How many decimal digits does have?
A.4. What is ?
Part B: Let be the next prime after and the next prime after .
B.1. What are the last 5 digits of ?
B.2. How many decimal digits does have?
B.3. How does the number of decimal digits of compare to typical estimates for the number of atoms in the universe?
Problem 2 -- (Un)Friendly Primes
The following integer is a product of two primes that are very close to each other. Find and .
Hint: Look up the Fermat factorization method or (really slow but it will work) compute and use a for loop to search for a prime of that is close to .
Problem 3 -- Good Ol' Quadratic Formula
The following integer is a product of two primes:
Also,
Find and .
Hint: Use the quadratic formula! You know that , you know , and you also know .
Problem 4 -- Not so Random
"We performed a large-scale study of RSA and DSA cryptographic keys in use on the Internet and discovered that significant numbers of keys are insecure due to insufficient randomness. We found that 5.57% of TLS hosts and 9.60% of SSH hosts share public keys in an apparently vulnerable manner..." -- see https://factorable.net/
The following two integers and are RSA moduli that were randomly generated by Obama and Hillary. It turnes out they weren't random enough in choosing and , so both and ended up with the same prime (ie. and ). Factor both and .
Problem 5 -- "Year-old bug ruined crypto!"
The article "Socat slams backdoor, sparks thrilling whodunit -- Year-old bug ruined crypto" is about a potential backdoor in some networking software called Socat, in which "the SSL implementation uses a non-prime number as its Diffie-Hellman -parameter". See also Socat? What? (timeline of events).
Let be the Diffie-Hellman parameter actually used in socat.
5.a Use the
is_prime
function to show that is not prime.5.b Use the
trial_division
function to find a divisor of , and let (in Sage, typep2=p//d
orp2=ZZ(p/d)
to get an integer rather than a rational number). Verify that is not prime.5.c Use the
trial_division
function to find a divisor of , and let . Verify that is not prime.5.d As far as I can tell searching online (e.g., here), further factoring of is an unsolved problem. How many binary bits does the number have? How does this compare to the number of bits of the current world record RSA factorization (which you can find here, by Sage developer Paul Zimmerman)?
5.e Let be the set of prime numbers that are obtained from by changing exactly one decimal digit. How many elements are in ? (Exclude changing the first digit to 0.)