# How does DES decryption work? Is it the same as encryption or the reverse? [duplicate]

If DES decryption is the same as encryption done in reverse order, then how can the reversed S-Box convert 4 bits into 6 bits?

As you can see, even though one half of the ciphertext is passed through the one-way function, there's always a copy of it remaining. In this case, $L_{n + 1}$ goes through the one-way function to mask $R_{n + 1}$, but still becomes one half of the ciphertext, which lets you use it again during decryption to undo the XOR operation you used to mask the other half of the ciphertext.
• @orange DES decryption works the same way as encryption, just with the round key order reversed (IP -> 16 rounds with $k_{16} .. k_1$ -> FP). Note that in DES, after the last (or before the first) round $L_i$ and $R_i$ are not swapped, making the entire structure easily reversible. The key scheduling algorithm can also be easily reversed. – Lukas Dec 4 '14 at 8:23