Take the 2-minute tour ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

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?

share|improve this question
add comment

migrated from stackoverflow.com Jul 8 '13 at 13:08

This question came from our site for professional and enthusiast programmers.

1 Answer

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.

EDIT

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

share|improve this answer
    
"Complexity" is a bad word choice IMO, since it's usually seen as undesirable property. –  CodesInChaos Jul 8 '13 at 19:12
    
@CodesInChaos I see your point. Exchanged "complexity" with "a cryptographic problem", which should be more correct. –  e-sushi Jul 8 '13 at 19:15
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.