I am doing encrypting decrypting of any type files using My RSA+private key ,public key alogorithm in java.
My issue is whenever i enctyprt any .tar files the size of the encrypted file is larger than the original .tar file.
But encryption is ok and decryption also ok. This should support all types of file.
Issue is encryption decryption is working fine but file size is getting increased after encryption.
By how much is the file size increasing? Depending on how you do the actual encryption, it can easily grow a bit due to varying headers and some padding, but it shouldn't be a significant part of the file size if the file is reasonably big.
If, however, the file size grows by some significant factor (say your output is 2 time the size of the input), then there is some problem that you should look into.