1
$\begingroup$

If the 48-bit input to the S-box is 0xAAAAAAAAAAAA, what are the first four bits emitted by S-box 1?

Answer: 0110

I know that an S-Box takes n inputs and give m outputs and that n != m, but I really don't see how they got that answer.

Since a S-Box takes 3 bits and maps it to 2 bits how can you predict what AAA will be?

$\endgroup$
  • $\begingroup$ About which S-Box are we talking here? $\endgroup$ – SEJPM Mar 27 '16 at 16:25
  • $\begingroup$ The DES S-Box and I assume the one at the end means it is a one dimensional S-box. $\endgroup$ – Bob Mar 27 '16 at 16:29
  • 1
    $\begingroup$ Actually, $n \ne m$ is not a requirement on sboxes; consider the AES sbox, which has $n = m = 8$ $\endgroup$ – poncho Mar 27 '16 at 17:06
0
$\begingroup$

DES has a total of 8 s-boxes which takes 6-bit input (say $b_1b_2 ... b_6$) and produces 4-bit output. The s-boxes are the 2-dimensional array of size 4x16. The bits $b_1b_6$ determine the row of the s-box and bits $b_2b_3b_4b_5$ determine the column. The value of 6-bit input is substituted with the value at cell $S_i[b_1b_6][b_2b_3b_4b_5]$.
In your given question the output of 1st s-box will be the value of $S_1[3][15]$

For reference, you can Cryptography: Theory and Practice, Third Edition (Discrete Mathematics and Its Applications) page 97.

$\endgroup$

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.