2

my cryptography professor gave us this problem for extra credit a while back and I attempted it but I didn't get it correct. I have gone back to it, but I'm even more lost now than I was the first time (HEADS UP: my professor gave us some long numbers to work with)

Let N=

 217480967426598493570186980401996167920452820950992854687035132
 726376073118953668642571927853352339590583090604658684239518232
 853572979131254064492477407811878270605929141044977950456991658
 882119063692415321357447387047198644556238539408419478596527501
 23329821235383771649185149402914522002819011319590369529


 And e=65537 be a public key for the RSA cryptosystem

The ciphertext is:

503502864628940396744635609090061402472498491194463969923479322
089849770618612322621019979098961384995354204702163333139805707
759660081519394083069273037638282947420860920004667666344095765
710257079484209928467972889843783133155796096794854080979925590
2703014867201045003016001267189341232653910252303505881

And we determine that:

 phi(n)=
 217480967426598493570186980401996167920452820950992854687035132
 726376073118953668642571927853352339590583090604658684239518232
 853572979131254064492477381836798664822705327075966772445783246
 838640744314191496615629393761046078697812048683249333166663641
 55001553295827687037711471146642763970634674131635418276

I was supposed to decode the message (The message was converted into a number by writing it in base 256 using the ASCII codes for the individual characters)

If anyone could provide a step by step explanation of how I go about doing this, I would greatly appreciate it.

mikeazo
  • 38,563
  • 8
  • 112
  • 180
Jok3r
  • 129
  • 1
  • 2
  • 9
  • @CodesInChaos: How would I do that with the large numbers? – Jok3r Oct 30 '14 at 20:17
  • Use a big integer library, most programming languages either contain one (at least C# and Python do) or have a readily available third party implementation. (unfortunately the wolfram alpha link above doesn't work, it truncated phi) – CodesInChaos Oct 30 '14 at 20:19
  • @CodesInChaos: Once I've done the calculations, how do I use d and m to decrypt? – Jok3r Oct 30 '14 at 20:22
  • Well, do you understand how RSA encryption and decryption work? – pg1989 Oct 31 '14 at 01:14
  • I warmly suggest to use ipython or, if you're a mathematician, Pari/GP or Sage. You can do most of cryptography computation very easily, as it was you pocket calculator. – ddddavidee Oct 31 '14 at 06:42
  • If this is more about programming side, you need to ask more explicitly about manipulating large numbers in Stack Overflow, not here. – Ray Nov 01 '14 at 18:15