exercise in the previous class. Decrypt the following ciphertext .
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Decrypt the following ciphertext.
qiwaufmlyngcmwzyz c mcxaeyoqweocqyaocuwpwoqjwcqkeyogzkmmwe cod vyoqwezlaeqz, yoviyniqiakzcodzajcqiuwqwzlceqynylcqwyo c pceywqfajnamlwqyqyaoz. qiwaufmlyngcmwzicpwnamwqahwewgcedwdczqiwvaeud'zjaewmazqzlaeqznamlwqyqyaoviwewmaewqicoqvaikodewdocqyaozlceqynylcqw. qiwgcmwzcewnkeewoqufiwudwpwefqvafwcez, vyqizkmmwe cod vyoqweaufmlyngcmwzcuqweocqyog, cuqiakgiqiwfannkewpwefjakefwcezvyqiyoqiwyeewzlwnqypwzwczaocugcmwz.
hint: find “typical patterns”of English
use the JAVA applet at;
The Olympic Games is a major international event featuring summer and winter sports, in which thousands of athletes participate in a variety of competitions. The Olympic Games have come to be regarded as the world's foremost sports competition where more than two hundred nations participate. The Games are currently held every two years, with Summer and Winter Olympic Games alternating, although they occur every four years within their respective seasonal games.
a public-key cryptography is a triple of algorithms (G, E, D)
proposed by Rivest, Shamir and Adelman in 1977
e = 3, d = 7, n = 33:
c = m3mod 33
m = c7mod 33
encryption & decryption: (m3 mod 33)7 mod 33 m21 mod 33
How can we choose such numbers?
How to choose e, d and n of the key of RSA:
step 1: choose two prime integersp and q, and let n = pq
step 2: choose e which is coprime (互いに素) with (p – 1)(q – 1)
step 3: determine d such that ed 1 mod (p – 1)(q – 1)
p = 3
q = 11
(p – 1)(q – 1) = 20
a and b are coprimeif gcd(a, b) = 1
ab mod c (a mod c) = (b mod c)
e = 3
d = 7
n = 33
Q1: How can we generate prime numbers?
A1: Generate numbers randomly, and do “primality tests”.
Q2: How can we find dsuch that ed 1 mod (p – 1)(q – 1)?
A2: Use the Euclidian algorithm for computing a gcd.
ai+1 = bi
bi+1 = ai mod bi
bj = 0
gcdof a0 and b0
Use the Euclidian algorithm for = (p – 1)(q – 1) and e.
b0 = e
a1 = e
b1 = a0mod b0 = a0 – k1b0
= – k1e
a2 = b1
b2 = a1 mod b1 = a1 – k2b1
bi= xi+ yie
1 = x+ ye
and e are coprime
ye= –x+ 1
choose d = y mod
ye 1 mod
= 130 – 2×59
= 59 – 4×12 = – 4×130+ 9×59
= 12 – 11 = 5×130– 11×59
1 = x+ ye
1 = 5+ (–11)e
ed = 59×119=7021
= 54×130 +1
ye= –x+ 1
(–11)e= –5+ 1
ed 1 mod
ye 1 mod
(–11)e 1 mod
d = –11 mod 130 = 119
... see the page 25 of the slide of the previous class
3 = 7488 – 1497×5
2 = 5 – 3 = –7488 + 1498×5
1 = 3 – 2 = 2×7488 – 2995×5summarizing example: key generation of RSA
step 1: choose p= 79, q = 97, and we have n= pq = 7663
step 2: choose e = 5, which is coprime with (p– 1)(q – 1) = 7488
step 3: determine d with 5d 1 mod 7488 as follows:
all computation in mod (p – 1)(q – 1)
d= – 2995 mod 7488 = 4493
keys: e = 5, d = 4493, n = 7663
c = m5 mod 7663
m = c4493 mod 7663
= c4096c256c128c8c4c mod 7663
all computation in mod n = pq
We need to show that
(me mod n)d mod n = med mod n = m.
two assisting lemmas...
Fermat’s little theorem:
xp–1 1 mod p for a prime number p and any x with gcd(x, p) = 1
Corollary of Chinese Remainder Theorem[孫子算経]:
If x a mod pand x a mod q, then x a mod pq,
where p and q are different prime numbers.
Theorem: med mod n = m.
med= (mp–1)k(q–1)m m mod p.
that medmod n = m
given an encryption key e and n, and a ciphertextc,
can we find the plaintext m with c = me mod n?
But, can we factor n?
breaking RSA is not more difficult than factoring
theoretically saying, there are more favorable cryptography...
(Rabin is not efficient and not practical, many people consider...)
breaking Rabin cipher
the security of RSA is NOT a mathematically proved fact...
is decrypting RSA silently...
the exhaustive attack is “more difficult”
the ciphertext is “longer” in length
(public encryption keys must be delivered correctly)
hybrid use of public and common-key cryptography is common
We studied very basics of cryptography.
“ad-hoc handicrafts” to “well-defined theory”.
but professionals of information must know it.
download all needed material before the test starts