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

Filter by
Sorted by
Tagged with
0 votes
3 answers
61 views

Generalizing AES s-box circular shifts in bigger GF

According to wikipedia: https://en.wikipedia.org/wiki/Rijndael_S-box AES is doing interesting thing (where $<<<$ is circular shift): $s = b \oplus (b <<< 1) \oplus (b <<< 2) ...
user avatar
  • 795
1 vote
1 answer
45 views

Does inserting an entry of 32/64-bits into a Feistel S-box would consume the same cycles per byte as inserting a single byte?

Blowfish splits a 32-bit word into 4 bytes and insert each byte as an entry in a S-box. Let's suppose I do the same but with an entire word, 32 or 64-bits. MARS block cipher does the same with 32-bit ...
user avatar
0 votes
0 answers
18 views

Fast implementations in c++ to find linearity of 16! sboxes?

I have to analize 16! of 16 bytes sboxes but my code is to slow to handle it. Anyone have any fast implementation on that? Thank you.
user avatar
0 votes
0 answers
30 views

Entering a word in a S-Box (like Feistel ciphers do) and keeping the S-Box secret: Could this be called encryption?

Let's suppose I take a data block of 64-bits and use it as an entry in a (big) S-box, and keep the S-box secret. S-box would be the "key". For "decryption" I just enter the result ...
user avatar
0 votes
0 answers
46 views

Security of Blowfish with secret S-boxes

There are similar questions about secret S-box(es), but none of them about secret Blowfish (or any other canonical Feistel cipher) S-Boxes, only about secret AES S-Box. Let's suppose that instead of ...
user avatar
1 vote
1 answer
39 views

16-bit entry in a S-Box of a SPN block cipher: Would it have the same speed/performance than a 8-bit entry?

I learned that in Substitution–permutation block ciphers, the maximum size of S-Box set to receive an entry from a data is the max numeric count of the data, for example, if the entry is 8-bits the S-...
user avatar
1 vote
1 answer
122 views

Is it possible to use words of bits as entries in S-Boxes bigger than 4/8 bits and achive similar security/speed in SPN block ciphers?

Blowfish splits a 32-bit word into 4 sets of 8-bits (1 byte) and use them as entries in its S-Boxes. Kuznyechick splits two 64-bits words in many nibbles (4-bits chunks), use them as entries in its S-...
user avatar
0 votes
1 answer
34 views

If keeping the S-Boxes secret in SPN ciphers increase they security, does using one different S-Box set per round in them increases even more? [duplicate]

I read in this paper that keeping the S-boxes secret in AES raise its security from 128-256-bits to 1812-1940-bits. Let's suppose I use one different S-Boxes set per single round. /\ Does this ...
user avatar
0 votes
1 answer
41 views

If converting a SPN Block Cipher to a version with larger block size, should its S-boxes be enlarged too?

Let's suppose I want to convert a Substitution-permutation network block cipher like Kuznyechik to a version with a larger block size. Should its S-boxes be enlarged too in order to achieve similar ...
user avatar
2 votes
2 answers
140 views

How to calculate/generate the inverse S-box of Kuznyechik block cipher?

Let's suppose I want to modify Kuznyechik block cipher by choosing a random S-box (taken from /dev/random for example). How can I calculate/generate the inverse S-box? Does anyone know the formula or ...
user avatar
4 votes
1 answer
660 views

Why is this function bijective?

I cannot seem to understand why the function $F$ defined in Theorem 7.1 of the paper “Permutation rotation-symmetric Sboxes, liftings and affine equivalence” is described as “a bijection on $\mathbb{F}...
user avatar
2 votes
1 answer
85 views

DES SBOX Output with Bitslice

I am not understanding how to compute the output bits of a 6-to-4-SBOX with bitslice technique in DES. Matthew Kwan made a brief recap in his paper "Reducing the Gate Count of Bitslice DES" ...
user avatar
1 vote
1 answer
87 views

How to solve this S Box?

I have performed the XOR and the result comes as 1001. Now my confusion is that in standard S-Box (DES) the input is 6 bit where the first and last bit together specifies row and 4-middle bits column. ...
user avatar
  • 113
-1 votes
1 answer
98 views

What is the time and space complexity of the AES S-boxes? [closed]

What are the time and space complexity of the AES S-boxes? Could someone please explain how these are determined?
user avatar
0 votes
0 answers
61 views

How is the polynomial multiplicative inverse calculated here? [duplicate]

How is the multiplicative inverse calculated in the following? Please explain with details. Note: I understood how polynomial value 283 is calculated.
user avatar
1 vote
1 answer
226 views

How does this code calculating AES S-Box work?

How does this code calculating the AES S-Box work? I don't understand the overall calculation procedure. Code is attached below: ...
user avatar
2 votes
1 answer
133 views

How to calculate the Inverse of random AES S-BOX (asuming we don't know how the S-BOX built)?

I'm recently studying cryptography, and I have a task for collecting the s-boxes for AES, and then implementing that s-boxes for encrypting & decrypting, but most of the S-boxes I found are not ...
user avatar
  • 23
1 vote
1 answer
51 views

Statistical Cryptanalysis. Would one "reverse" weak key schedule algorithms or peel off each one of internal rounds?

The context is iterated ciphers. Regarding Differential and Linear Cryptanalysis, the methods seem to make a cryptanalyst able to do an educated guess on a partial subkey (e.g. bits from the last ...
user avatar
1 vote
0 answers
31 views

Shark cipher SBox

In the literature, I can’t find the S-Box component of SHARK block cipher. I appreciate if anyone help to find the elements of the S-Box of this cipher.
user avatar
3 votes
1 answer
85 views

Construction of S-Box in PRESENT

I'm currently working on an hardware implementation (with verilog) of PRESENT-80 for research purposes. Due to our goal to strengthen the security of PRESENT-80 with Masking and Error Detection I need ...
user avatar
0 votes
1 answer
35 views

Calculate number of active S-boxes for a cipher where one word observes multiple times overlapped S-box substitution in a single encryption round

There are many ways in which the number of active sboxes of a cipher for one round can be calculated. Like, a manual approach (all possible input differential are applied in the two plaintexts $P_0, ...
user avatar
  • 157
2 votes
1 answer
160 views

Why key reuse is not an issue in a Feistel cipher?

I have a good understanding of stream ciphers and one time pad. I also know the dangers of using the same key in a PRG for a stream cipher. However as far as I can tell, the Feistel block cipher uses ...
user avatar
0 votes
2 answers
56 views

Implementing the sbox components using lookup tables

Does it is possible to implement the components of a SBOX tables using lookup_tables. For example for a 4-bit SBOX it is possible to obtain the component 3 using SAGE in the following way ...
user avatar
  • 2,571
0 votes
2 answers
68 views

Algebraic Normal Form of a function in $\operatorname{GF}(2^{n})$

Consider the function $f(x)=x^{2k+1}$ in $\operatorname{GF}(2^{n})$ for $n$ odd and $\gcd(k,n)=1$, which is differentially 2-uniform function. For $n=3$, $k=1$, I want to find the Algebraic Normal ...
user avatar
  • 13
-1 votes
1 answer
58 views

LAT of sboxes, sum of coloms and rows

let we have sbox s: Vn -> Vn. If we make LAT table for s, fix any row and get a sum by columns, that sum would be $+-2^{n-1}$. And vice versa, if we fix any column and get a sum by rows, that sum ...
user avatar
  • 1
1 vote
1 answer
111 views

Why is it not possible to attack an AES by creating a function to model the substitution that occurs in a s-box?

I realise that s boxes are able to make the transformations done in AES non-linear. However I am unsure how this makes AES secure. For instance if we had no s box then it is possible to calculate the ...
user avatar
  • 11
2 votes
1 answer
91 views

How to use sagemath to find nonlinear invariants of S-box?

I read a paper about a nonlinear invariant attack that is "Nonlinear Invariant Attack: Practical Attack on Full SCREAM, iSCREAM, and Midori64" And I've found a website of sagemath : https://...
user avatar
0 votes
0 answers
21 views

Non-linear phase that's Side channel attack proof

I'm designing a cipher and I'm looking for a Non-linear phase in my cipher that is side channel attack proof, I know that Sboxes are vulnerable to to that because of accessing the cache. I'm thinking ...
user avatar
1 vote
1 answer
51 views

Quadratic Equations to Describe SBox

I am using a 8 bit Sbox having 16 entries with a lookup table of 4x4 in cryptographic algorithm. Sbox is constructed on subgroup of galois field 2^8. I want to calculate number of quadratic equations ...
user avatar
  • 11
8 votes
3 answers
542 views

What is this AES SBOX triplet property?

While playing around with the AES SBOX, I found out that there are 85 unordered triplets (a, b, c) that have the following characteristics: ...
user avatar
  • 181
4 votes
1 answer
145 views

Division property table of SBox

In Table 12 (page 23) of the GIFT paper, the "Division property" table is given. I could not understand how it has been computed. My questions: May I have an algorithm on how to compute the ...
user avatar
  • 593
2 votes
1 answer
136 views

Building a 4-bit S-box with a 4-uniform DDT

I am looking for a 4-bit S-box which has only 4s in its difference distribution table (except the top left corner) but I was not able to find one in the literature. Has such an S-box been already ...
user avatar
  • 2,674
0 votes
0 answers
56 views

SHA3_512 as dynamic SBOX generator

I'm creating a substitution-permutation cipher (for learning purposes only of course) and I'd like to implement dynamic SBOXs. The cipher will have a block size of 128, and 32 rounds. These SBOXs will ...
user avatar
  • 421
2 votes
0 answers
53 views

What does "the input difference of each Sbox should be zero" mean?

While going through the article, The MALICIOUS Framework: Embedding Backdoors into Tweakable Block Ciphers. I came across this statement in order to have a deterministic differential characteristic ...
user avatar
2 votes
2 answers
177 views

AES with other SBoxes

I'm not a cryptologist, just an interested engineer (& now retired). I used to design hardware with AES en/decryption blocks & generate test vectors using my own Tcl script using the embedded ...
user avatar
  • 71
3 votes
2 answers
182 views

Why is the nonlinearity of this Boolean function evaluating to $\frac12$?

I am using the method presented in this paper to find the nonlinearity of the function $$ f: \mathbb{F}^1_2 \to \mathbb{F}^1_2 \\ f(x) = x$$ The truth table is $f = [0 \space \space 1]$. Now, I read ...
user avatar
  • 175
0 votes
2 answers
186 views

Differential and Linear Cryptanalysis on Random Sbox

Assume that we use the key to perform a uniform permutation to generate a sbox. The literature is rich supporting the statement that a random Sbox can make any cryptographic scheme weaker. I have ...
user avatar
  • 157
1 vote
1 answer
69 views

Is it possible to use an S-box similar to the one used in DES in AES? How would this work?

I'm reviewing some questions given to me by a professor and am stumped on this one. My initial guess is that yes, this is possible, but I do not know how to explain it, specifically for a function $\{...
user avatar
2 votes
1 answer
70 views

Problems on ANF equation?

I tried to solve SBox as given in this link I am trying to understand this paper SBox. In this on page no.4 the correct equation of given SBox is mentioned. I am not getting how to design ANF equation ...
user avatar
3 votes
1 answer
396 views

AES-CTR security if S-boxes substituion is omitted?

I understand why s-boxes are needed in general especially when ECB mode is used(because of using the same key for encryption of other blocks)but I wonder if it's ...
user avatar
  • 373
1 vote
0 answers
70 views

Generate ANF equation? [duplicate]

Given an SBox, how can I generate its component equations (in ANF)? given in this link: https://en.wikipedia.org/wiki/Algebraic_normal_form For example, let's say I have this SBox: $$\{1, a, 4, c ,6 ,...
user avatar
3 votes
1 answer
99 views

LAT of an SBox, values are even

This is probably a silly question, but I could not find any reference. For the DDT of an SBox, it is easy to see why all the values are even. Is there any related result for LAT (i.e., all its values ...
user avatar
  • 593
7 votes
0 answers
219 views

How to implement arbitrary s-box in a side-channel-free way in C?

This could be a question for CodeReview.SE, but I thought it might require non-trivial cryptographic knowledge to merit it on-topic here. The C language is chosen as it's a common language for ...
user avatar
  • 6,541
1 vote
1 answer
276 views

Is AES S-Box resistant to side-channel attacks?

I know that implemntations with T-tables such as Golang's are prone to side-channel attacks, but is AES's S-Box wihtout any additional table also insecure ?
user avatar
2 votes
1 answer
66 views

Is ShiftRows(SubtBytes(x)) = SubtBytes(ShiftRows(x)) the same for the same entry : in AES

Is ShiftRows(SubtBytes(x)) = SubtBytes(ShiftRows(x)) the same for the same entry : in AES It seems like these two are equal, can someone explain in theoretically?
user avatar
  • 35
2 votes
1 answer
161 views

Cryptanalysis of a feedback shift reigister with an S-box

I’m just getting started on learning cryptography and here is a problem from exercises about which I'm totally confused: This is a 32-bit feedback shift register to encrypt some message. The register ...
user avatar
0 votes
0 answers
70 views

S-box for byte substitution where the s-box values are multiplicative inverses of 257

The title basically says it. We have a 16 by 16 s-box, $256$ entries total. And the first value is the multiplicative inverse of $257$, so $1 \times k \bmod 257, \space k = 1$. $2 \times k \bmod ...
user avatar
1 vote
1 answer
106 views

What are the standard properties of an S-Box [duplicate]

Apart form the following, what are the other properties of a good cryptographic Substitution box or the S-Box: Changing one input bit should change about half of the output bits. Each output bit ...
user avatar
  • 111
0 votes
0 answers
40 views

AES S_BOX Generator additive constants

I try to generate other S_BOX for AES but I don't realize how to choose additive constants for S_BOX from decryption if for encryption it is 0x63 why is ...
user avatar
3 votes
1 answer
172 views

Inversion in $GF(2^{10})$ Using Composite Fields

I'm designing a circuit that uses many $GF(2^{10})$ inverters. Normally for this sort of thing I use lookup tables. (Itoh-Tsujii is not efficient for these smaller fields.) This application is for ...
user avatar
  • 124

1
2 3 4 5