1
$\begingroup$

Given that the plain text(P) and the ciphertext is known, and there's a random string(8 bytes)(S) concatenated to the plain text(P || S), how to go about figuring out the random string. Querying of black box is unlimited.

$\endgroup$
  • $\begingroup$ So the ciphertext is the ECB encryption of P||S for a 64-bit value of S; the ciphertext C is known; and you want to find S? Are we to assume that the key is unknown? (Otherwise, it's easy...) $\endgroup$ – a CVn Mar 7 '17 at 12:31
  • 1
    $\begingroup$ Can you please specify exactly what the black box will be doing to the given input? $\endgroup$ – SEJPM Mar 7 '17 at 12:33
  • $\begingroup$ The key will be unknown. And the black box will be encrypting the plaintext ( P || S) with the key to produce the ciphertext. $\endgroup$ – xLang Mar 7 '17 at 12:58
  • $\begingroup$ For DES another option is to simply brute force DES until you find the key and, therefore, S. Not recommended on a general purpose CPU though, unless you want to heat your room. $\endgroup$ – Maarten Bodewes Mar 7 '17 at 15:25
  • $\begingroup$ This is actually a well known crypto challenge by the way. $\endgroup$ – Maarten Bodewes Mar 7 '17 at 15:35
2
$\begingroup$

Suppose you've let the box encrypt 'AAAAAAAx' for all byte values of x. (It will be the first block of the total output). Then send AAAAAAA and see what the first block is. You know now what last byte is and it's the first one of S. Now you know one byte. Think and iterate.

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