I wonder if it is possible to break the encryption on a password by such encryption:

enter image description here

Where E is the encryption function that uses a known public key of the server.

  • $\begingroup$ Is it homework? What are $k, pwd$, and what does mean <>? $\endgroup$
    – Ievgeni
    Jan 28, 2022 at 10:12

1 Answer 1


I wonder if it is possible to break the encryption on a password

No, it is not possible to recover the value of pwd, unless the public key scheme used by the server is weak (or if you also have the server's private key).

Here is the demonstration of that: suppose you did have a method that, given $< E_s(k), k \oplus pwd >$, would recover $pwd$. Then, here is how you could recover the value $x$ given $E_s(x)$:

  • Select a random $r$

  • Create the pair $< E_s(x), r >$, and give it to your recovery method

  • The recovery method would return the value $x \oplus r$.

  • Since you know $r$, that gives you the original plaintext $x$.

Thus demonstrating that the public key method used by the server was weak.

  • $\begingroup$ Thank you so much! I have another question, suppose I encrypt in this way: <Es(k1 || k2),k1⊕pwd, k2⊕c> while c is a random string and k1, k2 are constants, is it possible now to recover my pwd? $\endgroup$
    – Ruthie
    Jan 25, 2022 at 14:48
  • $\begingroup$ @רותיכהן: if $k_1, k_2$ are constants (that is, exactly the same for each encrypted password), then it would be possible to deduce the passwords given a list of encrypted passwords; given two encrypted passwords, you'd xor $k_1 \oplus pwd$ and $k_1 \oplus pwd'$, resulting in $pwd \oplus pwd'$; from that, you can deduce the various passwords (by relying on the nonuniformity of user-selected passwords) $\endgroup$
    – poncho
    Jan 25, 2022 at 14:55
  • $\begingroup$ first, thx again, about the first question now when I'm thinking about it I'm not sure why it is not possible to recover the pwd. I would be gratful for explanation! thank you again!!! $\endgroup$
    – Ruthie
    Jan 25, 2022 at 15:05

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