Is there any way to encrypt the huge amount of data using RSA? I was supposed it is possible but when I read some articles what I saw is that, this is bad practice or they say can only encrypt bit length/8 characters only i.e. if I use 1024 then I could able to encrypt 1024/8 = 128 characters and so on. So if I want to encrypt more data (characters) then my RSA bit length is to be increased.

  • 5
    $\begingroup$ hybrid cryptosystem is what you are looking for $\endgroup$ Jun 12, 2016 at 7:05
  • $\begingroup$ Related: Can RSA (theoretically) be used as a block cipher? $\endgroup$
    – Artjom B.
    Jun 12, 2016 at 13:29
  • $\begingroup$ @RichieFrame would you mind writing a formal answer so we can get this Q off our unanswered questions list? $\endgroup$
    – SEJPM
    Jun 12, 2016 at 13:32
  • $\begingroup$ Evem for textbook RSA you must subtract one bit off the keysize, and textbook RSA is always semantically insecure and in practice often breakable; acceptable schemes subtract about 15-30 bytes. OTOH although factoring hasn't reached 1024 bits yet (at least in the open communiity) it's close enough 1024 is no longer considered safe and practically everybody has switched to at least 2048; for example all RSA certs for Internet SSL/TLS issued since the beginning of 2014 require 2048 (or very rarely more). $\endgroup$ Jun 12, 2016 at 19:57
  • $\begingroup$ If you have really huge data to encrypt, then it would be more time efficient to use RSA to transfer a secret key for a block cipher, e.g. AES, and use that to do the bulk encrpytion. Otherwise, assuming that you have only common sorts of private messages, say each of the order of 10000 characters, then direct encryption with RSA alone without involving any other crypto stuffs is simply more convenient for you. Certainly you wouldn't bother in such cases to reduce the cpu time from, say, 2 sec to 0.02 sec, would you?. (cf. my RSA software in Python s13.zetaboards.com/Crypto/topic/7234475/1/) $\endgroup$ Jun 13, 2016 at 8:50


Browse other questions tagged or ask your own question.