# How many primitive cryptography operations are there? [closed]

Every cipher I've encountered seems to be built from slight variations of only three basic operations: the S-box, the P-box, and the XOR. I’m just wondering, are there any others? And if there aren't (keep in mind I'm not counting XNOR here, since it's semantically the same as XOR), is there any way to prove that those three operations are the only ones that have the desired entropy properties needed for cryptography?

## closed as too broad by Squeamish Ossifrage, fkraiem, otus, yyyyyyy, e-sushiJun 8 '18 at 14:30

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• Subtract-and-branch-if-negative is all you need to make a Turing machine, but that knowledge doesn't help you much to design and engineer computer systems. What are you really trying to get at with this question? – Squeamish Ossifrage May 26 '18 at 23:42
• Look into the general operations behind Feistel networks, Substitution Permutation networks, Add-Rotate-XOR, and the Lai-Massey scheme. Those will cover pretty much all the types of operations you're likely to see. But still, this is a very broad question. – forest May 27 '18 at 0:59
• This is an open ended question. And that's especially bad because there are arguably infinitely many operations one could use in cryptography. And then it's not clear how many of those are useful, practical, or simple enough to give a name nor how one would draw distinctions between similar operations. Quick answer: There is no answer because no one has published a proof that puts bounds on the number of things cryptographers might decide to call a primitive. Best we can do is play a game of "list the names of however many things you can think of". – Future Security May 27 '18 at 6:48

If you consider all primitives and not just ciphers, Keccak hash uses a quite elegant permutation of bits in it's $\pi$ permutation which isn't like a traditional P box as it does not distribute active bits between multiple S boxes. Whirlpool hash uses Galois field multiplication to achieve diffusion, as does Rijndael /AES.