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 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.

share|improve this question
1  
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
1  
I would certainly hope so. $\:$ –  Ricky Demer Apr 28 '13 at 7:21
show 4 more comments

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

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

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