Suppose that the RSA public key $(n, e) = (2491, 1595)$ has been used to encrypt each individual character in a message $m$ (using their ASCII codes), giving the following ciphertext: $$ c = (111, 2474, 1302, 1302, 1587, 395, 224, 313, 1587, 1047, 1302, 1341, 980). $$ Determine the original message $m$ without factoring $n$.
n = 2491
e = 1595
c = [111, 2474, 1302, 1302, 1587, 395, 224, 313, 1587, 1047, 1302, 1341, 980]
Since there are only 128 ASCII characters, we can build a dictionary mapping encryptions to the corresponding codes.
d = {pow(x, e, n): x for x in range(128)}
d
We can now use the dictionary to decrypt each character.
''.join(chr(d[y]) for y in c)