# RSA - Ecrypting the same data with the same public key = same ciphertext?

If an adversary knows my public key and guesses what was my plaintext, can he test for it somehow?

The most obvious way is encrypting the guessed plaintext with my public key and the same parameters that he can probably discover from the ciphertext, to see if the result is the same.

-
Would randomized padding have been used? $\:$ –  Ricky Demer Apr 28 '13 at 6:12
It is optional?! Isn't it the default when using crypto libraries? –  H M Apr 28 '13 at 6:14
No, ..., which is why I found the last part of your post strange. $\:$ –  Ricky Demer Apr 28 '13 at 6:18
@Ricky Demer, I think it is considered an important weakness in a cipher that an adversary can discover such thing from the ciphertext, so I guessed it should be somehow prevented by default (but i were not sure so I posted a question about it). –  H M Apr 28 '13 at 6:34
I would certainly hope so. $\:$ –  Ricky Demer Apr 28 '13 at 7:21