tags:

views:

108

answers:

2

http://en.wikipedia.org/wiki/S-box

I can't understand where the extra bits are coming from in this article about s-boxes. Why doesn't the s-box take in the same number of bits for input as output?

A: 

What extra bits? They are going from 6 to 4.

EDIT: Whoops! I'm an idiot. This is kinda like a 2nd grade multiplication table. They strip the outer bits off of the 6-bit block to be encypted, and leave the middle 4. Just like a table for an arithmatic operation, they go down one side, and find the outer bit sequence, then across the top and find the middle ones. To answer your question, it could input and output the same number of bits, but this s-box is just set up to do it the way it does. Its arbitrary.

Ed
+2  A: 

It is the way s-boxes work. They can be m * n ==> m bit input , n bit output. For example, in the AES S-box the number of bits in input is equal to the number of bits in output.

In DES, m=6 and n=4.

The input is expanded from 32 to 48 bits in the first stages of DES. So it is be reduced to 32 bits again by applying one round of S-box substitution. Thus no information is lost here.

The Wikipedia article on itself can be a bit confusing. It will make people think that information is lost. You should read the article in conjuncture with implementation details of some encryption algorithm using s-boxes.

Niyaz