# DES/AES invertibility

My professor has posted a couple of practice questions that so far I haven't been able to find the answer for and I was hoping you could help.

DES would remain invertible—it would still be ablockcipher—even if its S-boxes were arbitrarily changed (the number of input and outputbits remaining the same).

AES would remain invertible—it would still be ablockcipher—even if its S-boxes were arbitrarily changed (the number of input and outputbits remaining the same).

I've been trying to figure out the "how" and "why", mostly.

• Take a look at this DES implementation in excel, and see if it helps you : nayuki.io/page/des-cipher-internals-in-excel – John Deters Feb 15 '19 at 4:25
• While we are happy to help with homework, we require that you have at least attempted to answer the questions yourself. We will not do your homework for you. – schroeder Feb 15 '19 at 10:53
• Its not homework but thank you for the snarkyness. – user3712347 Feb 17 '19 at 23:21

## 1 Answer

DES is a Feistel cipher where the round function doesn't need to be invertible. Therefore, when designing a Feistel cipher you will have invertible and non-invertible S-box options.

In contrast, AES is a substitution-permutation network where the structure is completely different. If AES operations are not invertible, you will not be able to decrypt anything. So, the second claim is wrong.

• the note about the input and output bits remaining the same implies the new s-box would be bijective and thus invertible – Richie Frame Feb 19 '19 at 0:20
• @RichieFrame The number of output bits doesn't guarantee that the S-Box will be an onto function. It just defines the range of the S-Box. We can design, though won't be secure, S-Box's that only output even, or similar properties. There are $n!$ one to one functions, and there is a total of $n^n$ functions from $n \to n$. – kelalaka Feb 19 '19 at 9:33
• Let's maybe not just answer homework (or non-homework practice) questions outright? One can suggest hints that don't spoil the problem by thoughtlessly revealing the answer. – Squeamish Ossifrage Feb 20 '19 at 5:53