Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

(or substitution boxes), components in many block ciphers used to substitute parts of the data in a non-linear way. While often fixed by the algorithm (like in DES and AES), sometimes they are key-dependent (like in Blowfish).

2
votes
1answer
126 views

AES with linear S-Box

If the AES S-Box is replaced with a linear or affine transformation, for instance the identity mapping $\sigma(x)=x$, does the cipher become entirely affine and hence trivially weak?
1
vote
2answers
69 views

What are some design considerations for S-Boxes?

My studies in cryptography have been quite detailed so far, however, one area that hasn't been explained to me is how S-Boxes are typically designed. Typically, the S-boxes are provided "as is" by the ...
2
votes
3answers
64 views

Calculate the Number of active s boxes

I really want to learn how to calculate the number of active s _boxes for block cipher cryptographic algorithms. I want to do that manually after running each round of an algorithm such as LED ...
2
votes
1answer
76 views

Number of active s boxes

How can I calculate the minimum number of active s_boxes for block cipher algorithms such as present algorithm? I have read in that, but I couldn't understand the meaning of branch number.
2
votes
1answer
90 views

Simplified AES S-box multiplication - calculation error

I have a problem to calculate the S-box in S-AES. The affine transformation is defined: I read that it is a normal matrix multiplication. I chose the bits $0101$ and built the inverse $1011$. $b_0$ ...
4
votes
1answer
102 views

How many primitive cryptography operations are there? [closed]

Every cipher I've encountered seems to be built from slight variations of only three basic operations: the S-box, the P-box, and the XOR. I’m just wondering, are there any others? And if there aren'...
0
votes
1answer
92 views

AES and GOST 28147-89 “Magma” Comparison

I am trying to understand how AES is comparable to GOST 28147-89 "Magma". Like for parameters such as bit shifting and addition of the subkey to the input, which are a part of Magma, what is their ...
0
votes
1answer
107 views

Finding output given an S-box input of 8 bits

I'm given the following table: I'm told to find the output given an hexidecmal input of 2B. I know that 2B in binary = 001 01 011 So I took the first two and ...
1
vote
0answers
69 views

Security Implications of Fixed & Opposite Fixed Points of Sbox

Fixed point means when Sbox Input is equal to Sbox Output whereas Opposite Fixed Point means when Sbox Input is complement of Sbox Output. How does Fixed and Opposite Fixed Point affect the strength/ ...
3
votes
1answer
26 views

Measure Strength of Mix Mode Modular Arithmetic based Confusion Layer

Strength of sboxes is generally measured by different properties eg non linearity, fixed points etc. If confusion is provided by Mixed Mode Modular Arithmetic (eg as in IDEA), how to measure the ...
1
vote
3answers
121 views

Does the DES s-box only provide confusion, or does it also provide an avalanche effect?

In DES, does the s-box provide an avalanche effect or does it only provide confusion in the ciphertext?
3
votes
2answers
102 views

Security of the AES with a Secret S-box

In this paper they change the $AES$ S-box to a uniformly random one and answer the questions: How does the security of AES change when the S-box is changed by a secret S-box? Would it be safe to ...
3
votes
1answer
70 views

Non Linearity of huge Sbox

Sboxes provide confusion in cipher. Non Linearity measures the strength of sbox layer. In order to measure non linearity of sbox, a table is computed to measure distances with its affine functions. If ...
1
vote
1answer
301 views

AES S-box calculation

I am trying to design the s-box for AES. Quoting from Wikipedia, the algorithm for applying affine transformation in AES s-box calculation is ...
0
votes
1answer
53 views

Number of Substitution boxes

How many possible 16 bit S-boxes exist? (AES uses 8 bit substitution boxes) I first taught of calculating 128(keysize in bits)/8(bits) =16, but I believe it's wrong.
3
votes
1answer
296 views

AES s-box – How do I calculate the inverse of this field equation?

I want to implement AES algorithm,instead of LUT based S-box, but I’m stuck at point creating "Inverse of equation" during implementation. In creation of S-box I am using the following steps: ($...
0
votes
1answer
53 views

Affine of Inverse Sboxes

"All 8x8 s-boxes created using Galois Field inversion plus an Affine Transform have the same non-linearity, as the Affine Transform does not change the linear or differential properties" is what this ...
2
votes
1answer
40 views

AES S-Box: Possible options for constant to calculate S-Box values

To calculate the values of S-Box in AES, I came across a lot of resources where constant {63} was chosen. It is said that {63} satisfies the condition of S-Box that it should not have any fixed points ...
1
vote
1answer
66 views

AES S-Box: How is value for 01 mapped to 7c?

If irreducible polynomial $m(x) = x^8+x^4+x^3+x+1$ is chosen, or even for any other value, the multiplicative inverse will not exist for $01$, as $0000 0001$ will perfectly divide $m(x) = 100011011$ ...
0
votes
1answer
98 views

number of active s-boxes in a block cipher?

How can we find the minimum number of differentially active s-boxes in a block cipher (actually a Feistel network with several input cells) in a truncated characteristic form? In a recursive ...
1
vote
2answers
273 views

AES S-Box Lookup Table Hardcoded?

From what I've looked up on various AES projects, the impression I get is the lookup table is hardcoded with the values from this Wikipedia entry page: https://en.wikipedia.org/wiki/Rijndael_S-box ...
4
votes
2answers
85 views

Building large S-Boxes from smaller ones

I would like to make an exhaustive list of all relevant techniques that have been studied in order to build a large S-Box from smaller ones. As far as I known, three structures are usually preferred: ...
0
votes
0answers
127 views

How to find an S-box inverse value using an alternative equation for the AES S-box?

In the AES S-box look-up table we find $S[95]=2A$. And using:$$b'_i = b_i \oplus b_{(i+4)\bmod8} \oplus b_{(i+5)\bmod8} \oplus b_{(i+6)\bmod8}\oplus b_{(i+7)\bmod8} \oplus c_i$$ with $\boldsymbol{b} = ...
0
votes
0answers
67 views

Can the S-Boxes and the P-Box commute?

Consider an SPN operating on blocks of size $m\ell$ bits. Suppose that each round consists of adding the round key (bitwise xor), applying $m$ S-boxes (so that each S-box operates on $\ell$ bits), and ...
0
votes
0answers
103 views

Why are binary operations used instead of S-boxes in the nonlinear F function?

Why are binary operations - such as AND, OR, XOR - used instead of S-boxes in the nonlinear F function? What would happen if a structure like the DES F function were used instead of the current ...
0
votes
0answers
64 views

How to calculate number of active S-Boxes in AES?

As mentioned in AES for four rounds it has minimum 25 active S-Boxes. According to this I have written a C program to find the number of active S-Boxes and after varying two plaintexts upto 8 bits, I ...
0
votes
0answers
68 views

Turning an S-box into a keyed S-box

Assume that $S(x): \{0, 1\}^{n} \rightarrow \{0, 1\}^{n}$ is a good S-box. Is there anyway we can construct a keyed S-box $T(k, x): \{0, 1\}^{n} \times \{0, 1\}^{n} \rightarrow \{0, 1\}^{n}$ from it ...
-1
votes
1answer
82 views

Explain the fast Walsh–Hadamard transform in simple steps or pseudocode

I've read that the fast Walsh–Hadamard transform is a way to efficiently calculate the linearity/non-linearity of an S-box. Can I get a description of it in simple steps or pseudocode that is ...
2
votes
1answer
154 views

Relying on a 4-bit S-box instead of an 8-bit one

I've discovered that generating good S-boxes with only modular addition, bitwise XOR, bitwise AND, bitwise OR, bitwise NOT, rotations, and, shifts is difficult. I figure that using them to make a good ...
0
votes
1answer
51 views

How are calculated input S-box?

a) if input 1011 = 0 1 1 1 b) if input 0110 = 1 1 0 0 my answer right?
0
votes
1answer
77 views

S-box and Side Channel Attacks

S-boxes with non-linearity greater than 112 are considered prone to side channel attacks. If a non-linear S- box with non- linearity greater than 112 (excluding bent functions with non-linearity of ...
2
votes
1answer
73 views

Are SHA-2's $\mathit{Maj}$ and $\mathit{Ch}$ functions non-linear?

SHA-2 has two functions: $\mathit{Maj}(x, y, z) = (x \land y) \oplus (y \land z) \oplus (x \land z)$ $\mathit{Ch}(x, y, z) = (x \land y) \lor (\neg x \land z)$ Are these two functions non-linear? ...
0
votes
0answers
60 views

How to apply Lagrange interpolation to create AES S-box using Sage

This question comes an earlier question. Thanks to the answers I have already received I know the Sage code for the AES S-box is: I can see that polynomial $m$ is the irreducible polynomial used in ...
0
votes
0answers
49 views

S-box Brute Force Space

For an 8x8 S-box, as per my calculations, there can be $2^{259}$ possible substitution boxes. I am not considering S-boxes with certain properties, I am only calculating the entire space possible (...
1
vote
1answer
59 views

Identification of Confusion Component in a Cipher

Confusion is a necessary component of any encryption algorithm. S-boxes play an important role in ensuring confusion. If an encryption algorithm does not use any S-box (rather some other Operations/...
4
votes
1answer
368 views

Non-Linearity of an Sbox

Non-Linearity of an Sbox affects its resistance towards Linear Cryptanalysis. What happens, if an Sbox has low non-linearity (specially with respect to Linear Cryptanalysis)?
1
vote
1answer
68 views

Degree of a big S-box

Assume we have a big S-box (i.e. $15*15$). We have truth table of it. (so $2^{15}$ output). How can we find its degree without using Algebraic Normal Form of its Boolean functions. Or with ANF, can ...
2
votes
2answers
364 views

AES: How to create the S-box with Sage

The $Sage$ code for the AES $S-box$ is below and a link is here: Polynomial representation of the affine part of the AES S-box. An online version of $Sage$ to test this is here. I understand most of ...
1
vote
2answers
258 views

Why don't table lookups run in constant time?

The Wikipedia article on big O notation says that performing a lookup is a constant time operation. So why are lookup tables susceptible to timing attacks?
0
votes
0answers
47 views

Security of an S-box based on modular multplicative inverse

The construction of Rijndael's S-box starts with the multiplicative inverses of each number over a finite field. It seems like this is the main source of its non-linearity. I figured that modular ...
4
votes
2answers
256 views

How can we create the AES S-box using a different irreducible polynomial?

The substitution-value of input byte $\mathtt{C2}$ is $S[\mathtt{C2}]=\mathtt{2F}$. This comes from applying the Euclidean algorithm to $A(x)A^{-1}(x)\equiv 1\pmod{p(x)}$, where $A(x) = x^7+x^6+x$ (...
2
votes
2answers
124 views

What rule(s) for a good S-box is this one violating and how does it relate to non-linearity etc.?

I generated this single-cycle substitution box and I want to post it as an example for understanding what a good S-box would be like. I get the feeling that this particular one is weak. Here it is (...
1
vote
1answer
91 views

Are there any security flaws in using an involutive S-box?

I know that it is difficult to answer these questions without knowing the full scheme it would be used in, but are there any problems that could be introduced into a block cipher if an involutive S-...
2
votes
1answer
352 views

AES S-Box implementation: from a byte-by-byte to 2-bytes-by-2bytes?

The S-Box in AES encryption is a byte substitution step. Is it possible to perform the substitution 2 bytes at a time, rather than 1 byte? What are the challenges/trade-offs involved?
0
votes
0answers
41 views

active s-boxes of 5 rounds of Fides AE cipher

it is mention in the paper , the number of active S-boxes of Fides cipher is 22 over 5 rounds but my result shows it is 25((9-3-1-3-9)), I applied the same concept used in midori (same almost MDS ...
0
votes
1answer
453 views

How are S-box calculated in S-AES?

Read the Reference for Simplified AES ( S-AES ) Q1 Explain how the S- box is constructed taking example $b_0b_1b_2b_3=1010$ What I did $\begin{bmatrix} 1 &0 &1 &1 \\ 1 &...
0
votes
0answers
59 views

$n\times 2^n$ S-Box coding $log2(n)$ bits through $2*n$ bits with only 1 bit flip

I am trying to construct a 8$\times$256 sbox that allows to decode 3 bits (8 different values) using the last 2 LSB of 4 bytes, depending only on a single bit flip in only one of those LSB bits. I ...
-1
votes
2answers
151 views

How can AES-like block cipher without non-linear component be broken?

I am taking a course on block ciphers and recently I have faced up with such an exercise: if an original AES's highly non-linear Sbox is replaced by a linear substitution (see example below), how one ...
3
votes
1answer
317 views

How can one construct the weakest S-box ever?

Is it possible to come up with an NxN S-box which would have a difference distribution table with N entries of 100% probability? I am studying the properties of S-boxes and I don't quite understand ...
15
votes
2answers
1k views

Why do we keep designing new static s boxes?

As I understand s box properties, they primarily need high non linearity and low auto correlation. But most importantly for this question, they're not secret. There are many questions on this site ...