Discrete Mathematics · Divisibility, modular arithmetic, and elementary number theory
RSA decryption needs Euler, and Euler needs a coprime message
Problem
Let $p=5$ and $q=13$, and set $n=pq=65$. Let $e=5$. 1. Compute $\varphi(n)$ from the product formula, and prove that $\gcd(e,\varphi(n))=1$. Find the unique $d$ with $1\le d<\varphi(n)$ and \[ ed\equiv 1\pmod{\varphi(n)}. \] Do not invert $e$ modulo $n$. 2. Prove Euler's theorem: if $\gcd(a,n)=1$, then $a^{\varphi(n)}\equiv 1\pmod n$. Your proof should use that multiplication by $a$ permutes $(\mathbb Z/n\mathbb Z)^\times$. 3. Let $m$ be an integer with $\gcd(m,n)=1$, and set $c\equiv m^e\pmod n$. Using only Euler's theorem and the congruence $ed\equiv 1\pmod{\varphi(n)}$, prove \[ c^d\equiv m\pmod n. \] Then, for the plaintext $m=11$, compute the ciphertext $c\equiv 11^e\pmod n$ and verify $c^d\equiv 11\pmod n$. Record both residues in $\{0,1,\ldots,n-1\}$. 4. Let $m'=10$. Compute $\gcd(m',n)$ and prove that Euler's theorem does not apply to $m'$ modulo $n$, by showing $ (m')^{\varphi(n)}\not\equiv 1\pmod n$. Explain why quoting Euler on $m'$ cannot justify RSA decryption of $m'$, even if some other argument (not requested here) might still recover $m'$. Also explain why the private exponent must be an inverse of $e$ modulo $\varphi(n)$ rather than modulo $n$. Do not treat $n$ as prime, do not replace $\varphi(n)$ by $n-1$, and do not skip the coprime-message hypothesis.
Hint
$\varphi(65)=4\cdot 12=48$. The inverse of $5$ modulo $48$ satisfies $5d=48k+1$; try $k=3$.
Check your work
Work the problem yourself first. Then open it in Training to check your answer and read the full worked solution.
The answer check and full solution for this problem come with ProofAnvil Practice membership ($19 USD monthly). See membership. Or start with the free Discrete Mathematics sample problem: Try the free sample problem.
More Discrete Mathematics practice problems
- Let p, q, and r be propositionsPropositional and predicate logic with proof methods
- Let A={1,2,3,4} and B={3,4,5,6}Propositional and predicate logic with proof methods
- Let R be a relation on a set ASets, functions, relations, and equivalence classes
- Use strong induction to prove that every positive integer n can be written as n=2^k m…Sets, functions, relations, and equivalence classes
- (Honors) Let u_n be defined by u_0=0, u_1=1, and u_n=4u_(n-1)-4u_(n-2)+n for n≥ 2Induction, recursion, and invariants
- [Honors] Using inclusion-exclusion, find the number of permutations π of {1,2,…,9} such…Induction, recursion, and invariants
- Let n be a positive integerRecurrences, generating functions, and discrete asymptotics
- Four labs sharing ten hours cannot exceed a per-lab capCombinatorics and inclusion-exclusion
- BFS two-coloring is the certificate that no odd cycle existsGraphs, trees, connectivity, and matchings