4
$\begingroup$

I have encrypted a file using -des -cfb and now I want to view how many blocks it contains once I decrypt it.

I have done this on the Linux terminal. I know that 9 blocks will be effected if there is an error in the ciphertext.

I need to show proof that this is true. But I'm unsure how to do this in a Linux terminal.

$\endgroup$
  • $\begingroup$ Where does the 9 come from? $\endgroup$ – Paul Uszak May 16 '18 at 10:16
  • $\begingroup$ If there is an error in the ciphertext transmission c1 9 blocks will be corrupted during the decyption . How can I show that it is 9. (64/8 = 8, +1 = 9) $\endgroup$ – Xace May 16 '18 at 10:21
  • $\begingroup$ @PaulUszak This seems to come from a course on crypto, see my answer for a link to a previous question. $\endgroup$ – Maarten Bodewes May 16 '18 at 11:27
1
$\begingroup$

Block size = 1 byte for CFB thus 9 bytes are affected. Why this is true has been answered before. Even for CFB8 it takes 8 shifts to shift the wrong ciphertext value out of the buffer.

To proof this is true just change a single byte of a binary output file using a hex editor (hexedit) and then decrypt. Count the number of differing number of bytes (diff). If you get 8 bytes then the last byte refused to budge - it may regenerate the same value by chance. Redo from start, multiple times if you want "statistical proof".

$\endgroup$
  • $\begingroup$ Ugh, did I write "statistical proof"? Help, I'm turning alpha! $\endgroup$ – Maarten Bodewes May 16 '18 at 11:32
  • $\begingroup$ Note that this is an assignment and that this is not a Unix Q/A site, I have left out the explicit commands that you're required to perform. $\endgroup$ – Maarten Bodewes May 16 '18 at 11:58

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.