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$
2
  • 3
    $\begingroup$ John would have to decrypt Y (and not Z) with his private key to get X. $\endgroup$
    – ckamath
    Commented Aug 31, 2017 at 15:23
  • $\begingroup$ I corrected the typo $\endgroup$
    – Guut Boy
    Commented Sep 22, 2017 at 9:35

2 Answers 2

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$
1
  • $\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
    Commented Sep 1, 2017 at 5:22
0
$\begingroup$

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

$\endgroup$
1
  • $\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$ Commented Sep 6, 2017 at 13:49

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.