0
$\begingroup$

Sorry for the newby question but would this work: Alice encrypts a message X with John's public key to form Y. Alice then encrypts Y with Bob's public key to form Z. Alice then sends Z to Bob and John.

Would I be correct in assuming that to decrypt Z, Bob would have to use his private key on Z to get Y. After this John would have to decrypt Y with his private key to get X?

Thanks

$\endgroup$
  • 3
    $\begingroup$ John would have to decrypt Y (and not Z) with his private key to get X. $\endgroup$ – Occams_Trimmer Aug 31 '17 at 15:23
  • $\begingroup$ I corrected the typo $\endgroup$ – Guut Boy Sep 22 '17 at 9:35
1
$\begingroup$

No. Alice encrypted X by John's public key to have Y. e.g. Enc(key_John, X)= Y. So the only work that John is able to do is decrypting Y by his private key to have X.

Generaly, first Alice here has encrypted X by John's key, then encrypted the result by Bob's key. Therefore both Bob and John have recieved: Enc(key_Bob, Enc(key_John, X))

So to get X again from Z, you must first achieve Y from Z( by decrypting Z via Bob's key), then achieve X from Y ( by decrypting computed Y via John's key). which means:

Dec(key_John, Dec(key_Bob, Enc(key_Bob, Enc(key_John, X)))

Note that each person only can decrypt the message which is encrypted by his key.

$\endgroup$
  • $\begingroup$ Thanks for the detailed description. As I said to Squeamish Ossifrage below, there was a typo on my part. Glad that you stepped through the logic though -- nice answer! $\endgroup$ – Steve Sep 1 '17 at 5:22
0
$\begingroup$

Yes, assuming you made a typo and meant ‘John would have to decrypt Y’.

$\endgroup$
  • $\begingroup$ The answer is simply ‘yes’. The rest was there only because e-sushi asked me to elaborate and there are limits on the brevity of an answer. If the problem is that the question was fundamentally a yes-or-no question, that's not my fault! $\endgroup$ – Squeamish Ossifrage Sep 6 '17 at 13:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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