# Questions tagged [s-boxes]

(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).

160 questions
496 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?
53 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 ...
324 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$ (...
151 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 (...
96 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-...
521 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?
56 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 ...
747 views

197 views

### Bit slice format of 4x4 s-boxes?

I have studied bit-sliced implementation in SERPENT block cipher and I need to use this technique to implement some 4x4 s-boxes. I couldn't find any procedure to obtain bit-sliced format in any paper ...
585 views

### Construction of S-box in AES

In my introductory cryptography class. There is a line describe the construction of S-box in AES "The S-box of AES is constructed by combining a function $h(x)=x^{254}$ defined on $GF(256)$ with an ...
346 views

### How are Rijndael's S-Boxes generated?

Wikipedia: Rijndael's Forward S-box I'm writing C Code to generate S-boxes but I'm stuck. Would you mind explaining one entry of the S-box? (say for x = 0x2). ...
988 views

### AES vs DES S-boxes

I understand from the literature that the DES S-boxes were very carefully designed with the process involving exhaustive search, trial and error, and an anticipation (by 15 years) of "differential ...
90 views

### Are non bijective sboxes weaker (on feistel networks)?

I have heard it anecdotically that non-bijective sboxes are potentially weaker to be used in designs like feistel networks. (since by design, it is allowed for the sbox to be non-reversible) Is that ...
170 views

### Full diffusion or Partial diffusion between s-box applications?

In regards to maximizing active s-boxes: is it advantageous to apply the non-linear layer after complete diffusion of the state, rather after then partial diffusion? Using AES as an example, with ...
91 views

### What is Global Avalanche Criteria(GAC)

GAC consists of absolute indicator and sum of square indicator. Please help me in understanding what are these indicators? How to calculate GAC for Sbox? What is confusion Coefficient Variance of an ...
56 views

### Does this approach on MEDP take into account the multiple differential trails?

I was reading this (chapter 3.1) paper, and the author proposed this method to calculate the MEDP on 2-round AES: I cannot fully understand what he is doing but it seems like it iterating over all ...
182 views

### AES s-box representation

I have seen in various papers like in this one page 4, that the AES s-box equation is: $S=A \circ φ^{-1}(φ(x)^{254})$ where $φ$ is the isomorphism from $\mathbb{F}_2^{8}$ to $\mathbb{F}_{2^{8}}$ with ...
167 views

### Can we have Rijndael s-boxes constructed using reducible polynomials?

Is it necessary for the Rijnael polynomial to be irreducible? Can we have s-boxes constructed using reducible polynomials? If not what is the mathematical property that is obstructing to do so?
833 views

### Is it necessary for the Rijndael polynomial to be primitive?

I am working on selecting a S-box for my Cipher (Similar to AES). I found out there are 30 irreducible polynomials and over 16 primitive polynomials of degree 8. Is it necessary to choose a primitive ...
920 views

### S-boxes are not linear

I am reading about S-boxes. By looking for the reason why the S-boxes are not linear, I found the following: The mappings $B \mapsto S(B)$ are all non-linear, since it holds $S(000000) \neq 0000$ ...
259 views

### Alternatives to sbox's for diffusion?

Are there any other alternatives to Sbox's or SP networks to provide diffusion preferably more basic alternatives which still provide a good degree of security?
137 views

### Function to polynomial equation in GF(2)

Let F(a,b,c,d,e) be a function that returns the ith bit of 0x3A5C742E, where ...
239 views

### How is an AES S-Box cyclically shifted to the left?

I'm trying to an implement an enhanced version of AES which was proposed recently. The link to the paper is here: http://sdiwc.net/digital-library/enhancing-aes-using-novel-block-key-generation-...
427 views

### Linear Approximation and Linear Probability of Camellia Sbox

In this article,Analysis of Camellia (para 2. Differential and linear cryptanalysis, page 3), it says The maximum bias of a linear approximation through one S-box is $2^{-4}$ , which gives a ...
117 views

### Camellia Sbox - Linear Approximation Probability [duplicate]

One Page 7, of Document Camellia Design and Analysis The author says, In the case of Camellia, the maximum diferential/linear probabilities of s-boxes are $2^{-6}$. Since Camellia S-boxes are ...
168 views

### Why Camellia has 4 Sbox

I asked a question about using 16 different Sboxes in AES each for one state byte instead of using same One Sbox for substituting 16 state bytes (See the Question Increase in AES SBox). The answers i ...
97 views

### Number of terms in Balanced boolean functions?

I know that balanced boolean functions are required for creating S-boxes. I want to create four balanced Boolean functions for 4X4 Sbox and as far as I’ve understood, the maximum order of the balanced ...
298 views

### FEAL-4 Linear Cryptanalysis - Prevention

currently, I prepare for an exam about cryptanalysis. In class, we talked about linear cryptanalysis for FEAL-4. We constructed four linear equations, extended them to equations for three rounds and ...
420 views

### How constant value 0x63 in affine transformation is chosen or generated while AES Substitution Box is formed?

Me and one of my friends are working on AES algorithm. We have understood how multiplicative inverse table is generated. Rijndael AES algorithm shows us how S-Box is generated through the affine ...
286 views

### Reverse Fixed Points in Kalyna S-Boxes and Reverse Engineering the S-Boxes

I was examining the S-Boxes of Kalyna Cipher and found that 3 of the 4 S-Boxes have Reverse Fixed Points i.e S[x] = (255 - x). Is this an exploitable weakness. I was not able to find any open ...
39 views

### Finding Linear Redundancy by counting the number of distinct frequency distributions of absolute walsh transform

I am writing a program to find linear redundancy in 4x4 s boxes. Is the number of distinct frequency distributions of absolute walsh transform a direct measure of linear redundancy in s boxes? byte[] ...
190 views

### Is order of Correlation Immunity of AES S_box Zero?

I am working on AES S_box and trying to find out its properties like Correlation Immunity, Balancedness , Algebraic Degree , ANF form etc. These Papers 1, 2 give a nice definitions to above said ...
579 views

### How does one practically calculate the non-linearity of a multi-output boolean function like the AES s-box?

I am working on multi-output boolean function i.e. a function that takes an $n$-bit input and gives an $m$-bit output for all possible inputs (i.e. $2^n$ inputs). To be more exact: I am trying to do ...
1k views

### Why DES s-box non-linear? Why it makes the cracking of the cypher more difficult?

I know that if we have a cypher which makes only linear transformations (let's say a bunch of $XOR$'s), we break it simply writing a system of equations with $\oplus$ operation starting from the ...
1k views

### substitution Box(s-box) for AES

can anyone suggest me any fast searching method or algorithm to find best S-Box among a big number of S-boxes?for example ; if i have 100 different s-boxes. i want to pick any one which is secured ...
1k views

### Is the difference distribution table of AES S-box uniform?

I am studying about various block ciphers and their weaknesses, so I have a doubt about AES S-boxes, Is the difference distribution table of AES uniform ?
722 views

### What makes an open source encryption algorithm safe?

Take for example the popular AES algorithm where we have a combination of substitution, shift row, mix column, and add key steps involved in encrypting plain test. All of the mathematical operations ...
213 views

### Last Sbox of a block cipher for Linear Cryptanalysis

I figured I should try to learn about linear cryptanalysis with a super simple cipher with only one Sbox. The problem is that with that approach the last subkey bits seem to be involved in the linear ...
283 views

### Is this a better involution S-Box for the Anubis cipher?

After swapping random indexes of trivial involution $S[x] = ¬x$, I found the following involution S-Box with a non-linearity of $98$ and a differential uniformity of $6$. Is there an upper limit to ...
604 views

### Number of Sbox in a Cipher

Camellia has 4 SBOX and so does the TwoFish(key dependent 4 Sboxes). Where as AES uses only one. Would it have made AES more secure if AES had 4 or more SBOX too? Does using more Sbox with similar ...
291 views

### Do key-dependent S-boxes make efficient constant-time software implementations almost impossible?

It seems to me that algorithms like Blowfish and Twofish with key-dependent S-boxes are almost impossible to implement without table lookups, and thus are almost impossible to implement in software ...
155 views

### What is the security gain of applying Two S-boxes in Different Ways?

In a 128-bits Feistel Cipher: I need suggestions about two variations of the Round Function Variation-1 $64$ bit input is divided into $8$ bytes Byte $0,1,2,3$ are substituted with Sbox1 Byte \$4,5,...