I'm trying to learn exactly how RSA works. Currently I have a very, very simplictic overview that goes like this.
- Having the public key allows you to encrypt things. Encrypting the same message "Hello" on two different computers using the same public key will produce the same resulting encrypted message.
- Having the private key allows you to decrypt the message.
However, if you have access to the public key, could you not simply do a dictionary attack, encrypt all 5 letter words with the key until you find a matching encrypted message and then you know that it was "Hello" that was stored.
In a sense, is it not as easy to brute force RSA encryption of passwords as it is to brute force hashing of passwords?
I know that RSA is usually used for longer messages making it unfeasible to enumerate them all, but is there any advantage to using RSA encryption over hashing if you don't actually want to decrypt the password?