Score:0

In SPN block cipher, is each bit of the ciphertext dependent on each bit of the S-boxes set?

pf flag

In substitution–permutation network block ciphers like AES, when encrypting a plaintext into a ciphertext, will each bit of the ciphertext be associated to each bit of the S-boxes set in the cipher?

I have seen the Kuznyechik reference implementation and I have doubts if each bit of the ciphertext will be associated with each bit of the S-boxes set:

#define LS(x1,x2,t1,t2) { \
        t1 = T[0][(byte)(x1)][0] ^ T[1][(byte)(x1 >> 8)][0] ^ T[2][(byte)(x1 >> 16)][0] ^ T[3][(byte)(x1 >> 24)][0] ^ T[4][(byte)(x1 >> 32)][0] ^ T[5][(byte)(x1 >> 40)][0] ^ \
            T[6][(byte)(x1 >> 48)][0] ^ T[7][(byte)(x1 >> 56)][0] ^ T[8][(byte)(x2)][0] ^ T[9][(byte)(x2 >> 8)][0] ^ T[10][(byte)(x2 >> 16)][0] ^ T[11][(byte)(x2 >> 24)][0] ^ \
            T[12][(byte)(x2 >> 32)][0] ^ T[13][(byte)(x2 >> 40)][0] ^ T[14][(byte)(x2 >> 48)][0] ^ T[15][(byte)(x2 >> 56)][0]; \
        t2 = T[0][(byte)(x1)][1] ^ T[1][(byte)(x1 >> 8)][1] ^ T[2][(byte)(x1 >> 16)][1] ^ T[3][(byte)(x1 >> 24)][1] ^ T[4][(byte)(x1 >> 32)][1] ^ T[5][(byte)(x1 >> 40)][1] ^ \
            T[6][(byte)(x1 >> 48)][1] ^ T[7][(byte)(x1 >> 56)][1] ^ T[8][(byte)(x2)][1] ^ T[9][(byte)(x2 >> 8)][1] ^ T[10][(byte)(x2 >> 16)][1] ^ T[11][(byte)(x2 >> 24)][1] ^ \
            T[12][(byte)(x2 >> 32)][1] ^ T[13][(byte)(x2 >> 40)][1] ^ T[14][(byte)(x2 >> 48)][1] ^ T[15][(byte)(x2 >> 56)][1]; \
    }
kelalaka avatar
in flag
Have you ever heard the avalanche criteria? [Desirable S-box properties](https://crypto.stackexchange.com/q/1297/18298), [How to assess the strength of the avalanche effect for AES?](https://crypto.stackexchange.com/q/35323/18298) The answer is: it depends on the key and the current input to the cipher.
kelalaka avatar
in flag
That is why we have permutation and rounds...
phantomcraft avatar
pf flag
@kelalaka I have been seeing that you are very experienced in cryptography, and I have a litlle questin: Kuznyechick splits the plaintext into 2 64-bits words (two halves), it processes by "S-boxing" the two halves and applies the permutation. Let's take the first bits of 128-bits block (two halves), will this little single bit influences all the other bits? (I mean, if the bit is "1", but if changing to "0", would this changing influences all the other bits in the block). -- Sorry for my English.
kelalaka avatar
in flag
My advice read the twofish and AES book, which will enlighten on your process...
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.