Creating cryptographic algorithms at runtime Would it be possible to create a program with which to create a cryptographic algorithm (i.e. encryption or hash) using well-known elements of other algorithms in the same way that algorithms "reuse" systems such as Feistel's structure? That is, eventually decide to use an algorithm that combines the Rijndael KeySchedule, and the Pseudo-Hadamard Transform. All this correctly applying the concepts of diffusion and confusion of Shannon.

The objective of this would be during a communication to change cryptosystem repeatedly, so that if you want to do cryptanalysis of the messages you have to do cryptanalysis on several different algorithms. In this way a kind of PFS (Perfect Forward Secrecy) would also be obtained.

EDIT: I wasn't proposing the use of security by obscurity, in fact I thought the negotiation of the new cryptosystem as public, in the same way the negotiation of the cryptosystem in TLS is public, and only the key is confidential (being shared using a well-known key distribution algorithm, like DH or RSA). On the other hand I know the definition of Forward Secrecy, that's why I said "a kind of". I was referring to the scenario in which an attacker discovers a vulnerability in a previous algorithm, but because currently is being used another totally different, the cryptanalysis is different now, and the information transmitted before and after the broken algorithm would remain unrevealed, similar to the concept of PFS.

Regarding the use of algorithms already used (and therefore proven in theory their safety), I do not plan to create a new system that is adopted worldwide (or even on a small scale), I only played with the possibility of creating a system like this so that, for example, the AES is found to be ineffective, not all communications made since the adoption of the AES (or any other algorithm) are disclosed. I mean, I propose the possibility of not trusting a single algorithm, and given the problem of the existence of infinity of communications, the solution would be to generate infinity of algorithms.
This doesn't add new security as much as it just shifts it.

Encryption algorithms are carefully studied.  Hmm... I didn't make that emphatic enough.  Encryption algorithms are C A R E F U L L Y studied.   There. That's better.

There are all sorts of tiny nuances to be had when designing an algorithm.  A famous example were some of the  S-Boxes in DES which were developed in a classified environment.  Many thought they were a NSA backdoor.  Several years later, differential cryptoanalysis was "discovered," and suddenly we found that these S-Boxes were the thing that prevented such an attack (thus the NSA had clearly known about these attacks for some while).  This was not a "just got lucky by combining the right bits" thing.  It was carefully thought out.

So the likelihood that your mix-and-match algorithm is breakable is far greater than any of the carefully studied algorithms.  Far greater.  Its basically guaranteed that a dedicated attacker will break your algorithm.  The thing you have bought is anonymity.  By using a publicly accepted algorithm, you are using an algorithm that provides great value to attackers to break.  If they get access to your little secrets, they also get access to things like bank mainframes.

So you make yourself weaker against a reasonably determined attacker while making yourself a bit stronger against a very strong attacker like a state.  Or do you?

A final issue to deal with is that you're mixing and matching known algorithmic pieces, and from your comments the pieces you choose are know in public.  These algorithms were carefully studied, as I said before.  This also means the attacks that these algorithms had to be tuned against are also well known.  So all one needs to do is identify which basic pattern you are using, pull up a list of known attacks against it, and find out what attacks work.  Which puts you in a strange corner where an AI might actually have enough data available to it in a convenient enough form to take your encryption on.

And that would be something a highly skilled attacker would be able to do, so you didn't really solve anything.