Small e

If ee is sufficiently small, the exponent is ineffective at encrypting mm.

Let's say me<Nm^e<N; in this case, we can simply take the eeth root of cc. For example, if e=3e=3, then we can calculate m=c3m = \sqrt[3]c.

If me>Nm^e > N then this is a bit more secure, but we can progressively add more multiples of NN until the cube root gives us a valid answer:

m=c+kn3m = \sqrt[3]{c + kn}

Python

In Python we can use the gmpy3 iroot function:

from gmpy2 import iroot

m = iroot(ct, e)

Last updated