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

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

6
votes
3answers
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?
0
votes
0answers
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 ...
4
votes
2answers
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$ (...
2
votes
2answers
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 (...
1
vote
1answer
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-...
2
votes
1answer
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?
0
votes
0answers
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 ...
0
votes
1answer
747 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
60 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
192 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
450 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 ...
3
votes
0answers
92 views

Can a stream cipher with a big S-box create ASIC-resistance?

For a proof of work system a hash algorithm generates one pseudorandom index each round, in the same manner as RC4 and Spritz do. And it uses a bigger S-box, e.g. 2^20 numbers. The actual hash would ...
17
votes
2answers
2k views

S-box basic question

I'm trying to understand DES and a bunch of other cryptographic systems using S-Boxes. I have now a quite basic question about how Sboxes work in general. For DES, Sboxes are substituting a 6-bits ...
1
vote
0answers
74 views

How many Affine function can be made from $4 \times 4$ and $8 \times 8$ S-boxes?

The nonlinearity of an S-Box is defined as the non-linearity of its vectorial Boolean Function. Let $F$ be the hamming distance between the set of all non-constant linear combinations of component ...
10
votes
2answers
404 views

Generate ANF from SBox

Given an SBox, how can I generate its component equations (in ANF)? For example, let's say I have this SBox: 6, 4, 7, 8, 0, 5, 2, 10, 14, 3, 13, 1, 12, 15, 9, 11 Then, the equations are: $y_0 =...
2
votes
0answers
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 ...
4
votes
1answer
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 ...
2
votes
1answer
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). ...
6
votes
2answers
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 ...
4
votes
1answer
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 ...
5
votes
1answer
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 ...
1
vote
0answers
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 ...
3
votes
0answers
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 ...
6
votes
1answer
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 ...
6
votes
1answer
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?
7
votes
1answer
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 ...
4
votes
1answer
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$ ...
0
votes
1answer
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?
4
votes
1answer
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 ...
4
votes
2answers
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-...
3
votes
1answer
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 ...
2
votes
0answers
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 ...
4
votes
1answer
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 ...
5
votes
1answer
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 ...
5
votes
1answer
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 ...
5
votes
1answer
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 ...
6
votes
2answers
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 ...
1
vote
1answer
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[] ...
3
votes
1answer
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 ...
6
votes
1answer
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 ...
5
votes
2answers
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 ...
1
vote
2answers
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 ...
5
votes
2answers
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 ?
1
vote
2answers
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 ...
3
votes
1answer
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 ...
5
votes
1answer
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 ...
5
votes
2answers
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 ...
5
votes
1answer
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 ...
-2
votes
1answer
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,...