0
$\begingroup$

Say we have 3 keys $K_1$, $K_2$ and $K_3$, and a piece of data $D$.

If I were to encrypt $D$ with all three keys separately and store them together then discard two of the keys, will it be possible to recover the other keys from it?

My understanding is because we have access to the plain-text via one of the keys, it should be possible for us to figure out the other keys based on all the information we have.

Is that assumption correct? is such a scenario leaking information?

$\endgroup$
  • $\begingroup$ I would not assume that is correct, there are many reasons why that could be impossible in practice $\endgroup$ – Richie Frame Nov 19 '17 at 8:21
2
$\begingroup$

Any good encryption algorithm is resistant to known-plaintext attacks, i.e. an adversary who knows the encryption of certain plaintexts has no advantage in finding the key or even in encrypting other plaintexts or decrypting other ciphertexts. This means, in particular, that the adversary can't find the key. Good encryption algorithms even have stronger properties — even if the adversary can choose the ciphertexts or the plaintexts, they can't reconstruct the key, or encrypt/decrypt other plaintexts/ciphertexts. (That latter property only works for authenticated encryption — with non-authenticated encryption, there are systemic chosen-ciphertext attacks, such as decrypting a prefix of a ciphertext whose decryption is known.)

Barring implementation bugs, having access to the plaintext via one of the keys is of absolutely no help to find the other keys.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thank you - I didn't know this is called known-plaintext attack! $\endgroup$ – LiraNuna Nov 20 '17 at 7:01
1
$\begingroup$

If you are using the one-time pad then yes, you CAN recover the discarded keys very simply. This is just one example of why the "one-time" caveat is critical to secure use of OTP, and why raw OTP is impractical for most real world situations (despite its unusual perfect secrecy.)

| improve this answer | |
$\endgroup$

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.