S-box design (input/output) - Programmers Heaven

#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

# S-box design (input/output)

Posts: 3Member
Hello,

On a article of Wikipedia (http://en.wikipedia.org/wiki/Substitution_box ), we can found a example of 6

• Posts: 6,349Member
: Hello,
:
: On a article of Wikipedia
: (http://en.wikipedia.org/wiki/Substitution_box ), we can found a
: example of 6
• Posts: 3Member

In fact I think if a S-box use a input.length < output.length, then it's beacause this S-box use some information about the input and therefore there is a redundancy, so this kind of S-box is not interesting.
That's the reason why I think it's impossible to do, and even if we try to, it's a bad idea.
• Posts: 6,349Member
: Thanks for your answer, but I don't very well understand it.
:
: In fact I think if a S-box use a input.length < output.length, then
: it's beacause this S-box use some information about the input and
: therefore there is a redundancy, so this kind of S-box is not
: interesting.
: That's the reason why I think it's impossible to do, and even if we
: try to, it's a bad idea.
:
Here's an example to clarify:
Take for example this S-box: abcd
and as input the byte 1.
A cypher could perform the following:
output = ((a xor 1) and (b xor 1)) or ((c xor 1) and (d xor 1))
after the output has been determined, the S-box is rotated (becoming cadb) and is ready to process the second byte.
As you can see the output is also 1 byte and the whole S-box (4 bytes) is used in the transformation.
As you also might see, there's no redundancy in the S-box.

Given that blowfish is considered to be a good blockcipher, I tend to disagree with your idea that having a larger S-box than the input is a bad idea.
• Posts: 3Member
: Here's an example to clarify:
: Take for example this S-box: abcd
: and as input the byte 1.
: A cypher could perform the following:
: output = ((a xor 1) and (b xor 1)) or ((c xor 1) and (d xor 1))
: after the output has been determined, the S-box is rotated (becoming