Crypto Slides 14 PK Tutor.1x1 PDF
Crypto Slides 14 PK Tutor.1x1 PDF
Crypto Slides 14 PK Tutor.1x1 PDF
2. Compute n = pq.
We compute n = pq = 11 · 13 = 143.
3. Randomly choose an odd number e in the range 1 < e < ϕ(n) which is
∗
coprime to ϕ(n) (i.e., e ∈ Zϕ(n) ).
ϕ(n) = ϕ(p) · ϕ(q) = 10 · 12 = 120.
∗
Thus, we choose e = 7 (e ∈ Z120 ).
The ciphertext c (0 ≤ c < nA) can be sent to A, and only A can decrypt.
Encrypt m = 3:
Decrypt c = 42:
Decrypt c = 2:
DA(c) ≡ cdA ≡ 2103 ≡ 63 (mod 143)
Proof:
EA(m1) ≡ me1A (mod nA)
EA(m2) ≡ me2A (mod nA)
and,
EA(m1 · m2) ≡ (m1 · m2)eA ≡ me1A · me2A ≡ EA(m1) · EA(m2) (mod nA)
QED
4. If xeA ≡ meA z eA (mod nA) then output x · z −1 (mod nA) and finish.
For z ∈ Zn∗
{z · x : x ∈ Zn} = z · Zn = Zn
because if for x1, x2 we have:
z · x1 ≡ z · x2 (mod n)
which implies
x1 ≡ z −1 · z · x1 ≡ z −1 · z · x2 ≡ x2 (mod n)
t log ≤ log
100 2
Thus, t ≥ 69 suffices.
E(α) · m ≡ αe · m (mod n)
we get:
• The bank asks Alice to reveal 99 of the α’s. Denote the remaining α by
αk .
thus,
βje ≡ αje · mj · m0−1
j (mod n)
or
βj ≡ αj · mdj · m0−d
j (mod n)
Which means we can find (mj · m0−1 d
j ) .
Show that if two users, i and j, for which gcd(ei, ej ) = 1, receive the same
message m, it is possible to reconstruct m by using n, ei, ej , mei , mej .
Solution:
gcd(ei, ej ) = 1 ⇒ ∃x, y xei + yej = 1
Thus,
(mei )x · (mej )y ≡ mxei+yej ≡ m (mod n)
Exercise: Show that even one user can reconstruct a message m without
cooperation of any other user.
c Eli Biham - May 3, 2005
405 Tutorial on Public Key Cryptography – RSA (14)
Examples (cont.)
Question:
Let p and q be prime, n = pq.
Alice wishes to send messages to Bob using the RSA cryptosystem. Unwisely
she does not choose her own keys, but allows Eve to choose them for her. The
only precaution that Alice takes is to check that e 6= 1 (mod ϕ(n)).
Show that Eve can still choose a pair of keys e, d such that encryption and
decryption can be accomplished, but me ≡ m (mod n), for every m ∈ Zn∗.
and
m`+1 ≡ mb(q−1)+1 ≡ 1b · m = m (mod q)
thus by the Chinese reminder theorem