# Why is the payload size is restricted when using RSA

Doing some research about cryptography, I've read many times that, when using RSA 1024 and PKCS#1, the size of the payload cannot be bigger than 117 bytes.

This payload cannot be bigger than the modulus size, which is the key size in bits / 8 (1024/8 = 128 - bytesFromPKCS1 = 117).

But why does this limitation exist? Is it in the formula? if so, why?

In order to recover your plaintext, you will compute \begin{align*} c^d \mod n &= m^{e*d}\mod n\\ & = m \mod n \end{align*} You can see that if $m > n$, i.e. if $m$ is more than 128 bytes (in case of RSA 1024), the result will not be $m$, hence the size limitation.