0
$\begingroup$

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.

$\endgroup$
1
1
$\begingroup$

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.

$\endgroup$
1
  • $\begingroup$ Thank you. I appreciate your explanation. I'll use that and the links above to fix it. $\endgroup$ Apr 5 at 14:36
1
$\begingroup$

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/

$\endgroup$
1
  • $\begingroup$ Thank you! I appreciate the links. (SE changed my name/account an isn't counting my upvotes.) $\endgroup$ Apr 5 at 14:34

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.