Jim Belk Cornell University

Homework 7

Due Date: Friday, April 1

A text message was converted to (8-bit) ASCII and then the digits were concatenated to form a long binary number. This was encoded using the RSA cryptosystem, resulting in the following ciphertext:

7014063581513644174655584972332551078024266141287986002648300214173575
7684473244752735220017243937187140291993662559210409962823639463530244
3685212931291675947845515345843732106176818939627436251256347983016058
6966991951662300272230128931777433015961007948159107399876981617297502
6713226665893761283473047146671341892252704919141665797631038518966024
5595143032331043898633060313492

Given that the RSA modulus is

8451450772216083416758115941619120746809659948308203937833610209061485
9926378780614060463853414050386655231415831126935189238246765659642070
6769445539865919710137544683518466242248747587796091366631790442462944
1629514907546178427894456467100470724188347429767425311424792997097413
3955416121658005104447815053804492696743032591137416388856368978722885
3751922971540177024342722909161

and the public decryption key is

1876296023242675699332183699454987334538240578134198209636991231034310
7896963097567436480618693639276601352207521831800759554600504166466407
6220913291104822547469940649032807996719678796390553229547599158904449
0297906488298066235400985617072933241979457339814961387457125752589383
2223951128087424524995291854321881715234807378279282205967880628899593
014568796700321215899352260391

decipher the original text message.

Hints:

1. You might find the following functions helpful:

2. It might be hard to decipher the long message above on your first try. I recommend that you start by getting RSA encryption and decryption working for short ASCII messages (and smaller moduli and keys), and then try your code on the message above.