Thursday, April 2, 2009

Java - RSA encryption 117 Bytes limitation

There is a limitation on RSA encryption with large files and strings. That is, Java RSA has a encryption size limit of 117 bytes for PKCS v1.5 padding. This limitation is fine as RSA operation is computationally intensive and should be used for key exchange.

But, if you really want to perform RSA encryption on large file, you will have to break the file into small block, ie, byte[100]. That is encrypt in 100 bytes and decrypt in 128 bytes

See http://www.aviransplace.com/2004/10/12/using-rsa-encryption-with-java/3/

1 comment:

  1. I will do remember this point. I will also check the link to learn more about the solution you have suggested. Thank you.
    digital signature software

    ReplyDelete