0

My understanding is that the output size of RSA 2048 bit encryption is 256 bytes. However, when testing this with jsencrypt its outputting 344 characters every time. Can someone help me understand why this is the case?

Online jsencrypt tool used: http://travistidwell.com/jsencrypt/demo/

Scoota P
  • 2,573
  • 7
  • 27
  • 45

1 Answers1

3

It is base64, which has the inflation factor of 4/3 (plus optional padding).

If you divide it by 4/3 you would get 258 (which is 2 bytes more than what you're after due to padding).

zerkms
  • 230,357
  • 57
  • 408
  • 498