I'm not into cryptography, but I read a bit about it.
I wonder:
AFAIK all encryption (decryption) and hashing routines are built using some very primitive functions (let's name them "atoms" for now) with specific properties.
As the set of atoms is probably rather small, a suitable algorithm consists of "combining" such "atoms" to (let's name them) "molecules" in a way that produces "suitable" molecules.
Maybe there are also additional "glue" functions that are used to combine "atoms" to "molecules", but for simplicity, let's assume there is just one set of "atoms".
Now I wonder:
Is building arbitrarily large "suitable molecules" a science, or is it an art?
I mean: If it's science, is there an algorithm to build arbitrarily large "suitable molecules" from a given set of "atoms" (and "glue")? Such an algorithm would also find out if it's not possible, of course.
However, if it's an art, there is some genius needed who provides a "molecule" (using "atoms" and "glue"), claiming (until proven otherwise) that it has the properties demanded.
Currently, it seems to be an art; otherwise, it would be so easy to construct better and safe algorithms, right?
(I'm not sure whether I should have replaced "science" with "mathematics" in this question, because "science" may also include some "intuitive" components, that mathematical solutions do not need)
I also wonder whether the strength of a cryptographic algorithm has to do with the fact (I think) that there is no reasonable (means: not "trial and error") algorithm to build arbitrarily strong algorithms automatically.
Would such an algorithm (if it existed) mean that breaking such functions is just as easy?
If not, what part of the maths make the difference?