0

I've been searching for a few days in different forums trying to find an example of DES that gives the key/output values for all 16 layers. I found one that gives the encryption which helped me fix that part, but my decryption isn't working correctly. It's easier to debug if I know what I'm aiming for.

Is there someplace that has all the encryption/decryption round outputs that I can look at?

Should they be the same only backward? Decryption round 1 output = encryption round 16 output?

Thank you for any help you can give.

  • https://crypto.stackexchange.com/questions/65996/64-des-full-example-with-all-the-stages/66095#66095 –  Apr 08 '21 at 00:17

2 Answers2

1

Should they be the same only backward? Decryption round 1 output = encryption round 16 output?

Yes, that is correct; the decryption subkeys are exactly the encryption subkeys in the opposite order.

I don't have the per-round test vectors you were asking for, but I can make this suggestion: if you have DES working in the encrypt direction, you can generate the test vector yourself; recording the state of the block after each round. Then, when you attempt to decrypt the block, the per-round block state is supposed to traverse the same path backwards; for example, if the block state after encryption round 15 was X, then the block after after decryption round 1 should also be X. If decryption isn't working, then somewhere during the cipher it went wrong; by looking at the per-round states, you should be able to narrow it down to a specific round.

poncho
  • 147,019
  • 11
  • 229
  • 360
1

Page 155-156 of https://academic.csuohio.edu/yuc/security/Chapter_06_Data_Encription_Standard.pdf seems to have a full set of round on round data for one example.

There’s another example at the end of this page: https://www.geeksforgeeks.org/data-encryption-standard-des-set-1/

Daniel S
  • 23,716
  • 1
  • 29
  • 67