# Show number of affected blocks using CFB DES decryption of altered ciphertext

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.

• Where does the 9 come from? – Paul Uszak May 16 '18 at 10:16
• 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) – Xace May 16 '18 at 10:21
• @PaulUszak This seems to come from a course on crypto, see my answer for a link to a previous question. – Maarten Bodewes May 16 '18 at 11:27

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".