0
$\begingroup$

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?

Thanks for the answer :)

$\endgroup$

1 Answer 1

4
$\begingroup$

When you're talking about RSA-1024, the "1024" refers to the bit length of n, so n is 128 bytes long. Now let's take a look at RSA decryption process :

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.