Probably the simplest cipher is the xor cipher with a single integer. One can extend this to use more than one integer by several means. I'm wondering if there is any benefit to doing more than this:
Let $x_n$ be the $n$th data byte to encrypt and $p_k$ be the data stream (password or whatever) to encrypt with and $p_k$ is cylical.
Then the "standard" way of doing the encryption is
$$\large y_n = x_n \small\oplus\large\; p_k$$
But for certain functions $f,g,h$
$$\large y_n = x_{h(n)} \small\oplus\large\; f(p_{g(k,n)},n)$$
is invertible.
My question is:
Without knowing what formula and functions are used, would such a method make it much more difficult to "crack" an encryption? (Basically is there any real benefit to using a more complex formula. Ofcourse, if anyone has any theoretical insight in how these modifications "enhance" the encryption then by all means ;) My guess is that it is too difficult, mathematically, to understand in general. For example, if invertibility exists and f,g, and h have certain properties, do we end up with a more secure encryption than the standard xor cipher(which is easily attacked using frequency analysis)?)
Assume $f,g$ and $h$ are the best possible functions in whatever way is needed.
What I have noticed is that such complex formula seem to increase the "randomness" of the output over the standard method.
It would seem that if $f,g$ and $h$ are completely known to the cracker then it is equivalent to simply using a different $p_k$ and $x_n$ and equivalent to the standard method.