As described in the thread you mentioned and also in this topic, the total number of input bytes processed may not be more than k-11, where k is the RSA key's modulus size in bytes. That limits the message size to 117 bytes for RSA 1024 and 245 bytes for RSA 2048, respectively.
pidcrypt's rsa.encrypt() performs a BASE64 encoding of the clear text before the actual encryption, in order to ensure 8bit characters. BASE64-encoding of an 87 bytes string results in 117 bytes, while an 88 bytes string already yields 121 bytes.
If you want to skip the BASE64 encoding prior to encryption you can use pidcrypt's rsa.encryptRaw()
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Why the text to encrypt max lenght for Rsa is 87 and not 117 how explained qui: http://goo.gl/vkkmJ ?
How to calc this lenght?
As described in the thread you mentioned and also in this topic, the total number of input bytes processed may not be more than k-11, where k is the RSA key's modulus size in bytes. That limits the message size to 117 bytes for RSA 1024 and 245 bytes for RSA 2048, respectively.
pidcrypt's rsa.encrypt() performs a BASE64 encoding of the clear text before the actual encryption, in order to ensure 8bit characters. BASE64-encoding of an 87 bytes string results in 117 bytes, while an 88 bytes string already yields 121 bytes.
If you want to skip the BASE64 encoding prior to encryption you can use pidcrypt's rsa.encryptRaw()
ty, really interesting.