0
$\begingroup$

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.

$\endgroup$
9
  • 1
    $\begingroup$ Would randomized padding have been used? $\:$ $\endgroup$
    – user991
    Apr 28, 2013 at 6:12
  • $\begingroup$ It is optional?! Isn't it the default when using crypto libraries? $\endgroup$
    – H M
    Apr 28, 2013 at 6:14
  • $\begingroup$ No, ..., which is why I found the last part of your post strange. $\:$ $\endgroup$
    – user991
    Apr 28, 2013 at 6:18
  • $\begingroup$ @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). $\endgroup$
    – H M
    Apr 28, 2013 at 6:34
  • 1
    $\begingroup$ I would certainly hope so. $\:$ $\endgroup$
    – user991
    Apr 28, 2013 at 7:21

1 Answer 1

1
$\begingroup$

The answer to your question is "yes, RSA will encrypt the same cleartext to the same ciphertext every time." And yes, this is a known property of RSA. That's why every standard that uses RSA, such as PKCS or CMS, specifies the use of randomized padding.

$\endgroup$
0

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.