4

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.

Maarten Bodewes
  • 92,551
  • 13
  • 161
  • 313
Xace
  • 59
  • 1

1 Answers1

1

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

Maarten Bodewes
  • 92,551
  • 13
  • 161
  • 313