2
$\begingroup$

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? Can they be used in place of S-boxes in block ciphers?

$\endgroup$
2
  • 1
    $\begingroup$ Write them out as arithmetic in GF(2): $x \land y = x \cdot y$ (since $(0, 0) \mapsto 0$, $(0, 1) \mapsto 0$, $(1, 0) \mapsto 0$, $(1, 1) \mapsto 1$), $a \oplus b = a + b$, etc. Does that help answer your question? $\endgroup$ Dec 10, 2017 at 18:49
  • $\begingroup$ @SqueamishOssifrage No. $\endgroup$
    – Melab
    Dec 10, 2017 at 19:09

1 Answer 1

2
$\begingroup$

Theses are the "Majority" and "Choose" Boolean functions, respectively; they are linear functions by definition. Since there is no multiplicative or exponential element in the formulae then any linear combination of these would also be linear.

As for their applicability to S-Block "Substitution" block ciphers, if you design an algorithm using the functions to generate ciphertext characters based upon plaintext, keycode and substitution alphabet inputs then, yes, they could be used.

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.