What is RSA encryption output size when using 2048 bit key (using pkcs1padding). Is it always 256 bytes independent of input size? how can i calculate it for other key sizes?
Yes, it is.
The output-size should always equals the size of the
Modulus (part of the key), so:
2048 bit Modulus -> 2048 bit output 1024 bit Modulus -> 1024 bit output ...
If it is not, there exist numerous attacks on RSA, see here for basic information about that.
So to guarantee that the output is
2048 bit even when the input to encrypt is, let's say
a padding must always be applied!