john sal wrote:I am facing a problem while decrypting a file.
The decryption process is too slow. The algorithm i am using is RSA public key encryption. Which is toooooo slow while decrypting the file.
It looks to me like you have a far bigger problem than it just being too slow. The whole encryption/decryption process looks flawed. How badly flawed can only be ascertained after seeing the whole code.
P.S. It is not normal to use RSA directly on files. It is more normal to use a hybrid approach using RSA to encrypt some random bytes that are used to create a session key for use in a symmetric algorithm such as AES.
Retired horse trader.
Note: double-underline links may be advertisements automatically added by this site and are probably not endorsed by me.
David Newton wrote:Oh, okay. I don't like that name.
You are not the first and certainly won't be the last to voice your dislike of that method name. There are various overloaded update() methods which can be called repeatedly until one has finish encrypting/decrypting and then one calls one of the overloaded doFinal() methods. To my mind, if one is going to have doFinal() methods then one should have doUpdate() methods and not update() methods. But it ain't going to be changed now!
Joined: Jul 30, 2010
I think there is one hybrid approach in which data is encrypted using symmetic algo while the key is encrypted using RSA ... Can somebody let me know what exactly that approach is?