Tags: cryptography-rsa 

Rating: 0

This was very straightforwards RSA. n is easily factored (I used the ECM factoring applet [here](https://www.alpertron.com.ar/ECM.HTM). Then just textbook decrypt.

```
from Arithmetic import *

p = '338 924256 021210 389725 168429 375903 627261'.replace(' ','')
q = '338 924256 021210 389725 168429 375903 627349'.replace(' ','')

p = int(p)
q = int(q)

c = 102692755691755898230412269602025019920938225158332080093559205660414585058354

n = p*q

e = 113

phi = (p-1)*(q-1)
d = modinv(e,phi)

print hex(pow(c,d,n))[2:-1].decode('hex')
```

atooom – April 29, 2019, 6:55 a.m.

Why do you have to use replace() if you can remove the spaces manually in p and q variables?