If I am not mistaken, plaintext RSA is not secure. So, I have read that padding and hashing is needed to make the RSA algorithm secure. However, I am confused on what does padding or armoring mean in this context. What does RSA-padding mean, how does it work?

For instance here I have read about this, but I do not really understand the meaning behind the notion of padding. Can anyone enlighten mean about this?


1 Answer 1


Padding in cryptography means adding a (mostly secret) random set of data to the cryptographic functionality.

In practice and when done correctly, cryptographic padding adds a cryptographic problem and thereby reduces attack vectors because (theoretically) it reduces the success in “guessing” intermediate or final states of the encryption and/or decryption functionality.

Two notes:

  1. The reason why I wrote “when done correctly” is that one of the disadvantages of cryptographic padding is that it could make the plain text of the message susceptible to padding oracle attacks.

  2. Note that I wrote "(theoretically)" as some algorithms were weakened and even broken due to incorrect or missing implementations of cryptographic padding, but there are also ample cryptographic algorithms that can do without cryptographic padding as they use cryptographic approaches that differ from RSA's.

If you want to dive deeper into RSA-related cryptographic padding, take a look at this question and especially it's accepted answer which dives into the practice a bit more.


Note that there's also a nice and more broad description of cryptographic padding available at http://en.wikipedia.org/wiki/Padding_%28cryptography%29


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.