# Is a Shift Cipher with Random Insertions Unbreakable?

Imagine an Encryption Algorithm which applies a classic Shift Cipher (also called Caesar or ROT-X) to a text (with only lowercase [a-z] and the space ' ' character), but has one parameter r (randomness) to decide if in each round/iteration attempting to encrypt one char c, it encrypts the character c+key, or if it inserts a completely random character rchar and repeats next iteration with the same non-encrypted yet character c.

For example, with a plaintext ptext=hello, r=0.20, and key=1, the encryption algorithm will output ctext=ifrmmp where every char was shifted by 1 position but 1 new random character was added (since 20% is 1 of each 5, and hello has 5 chars, I assume only one time the condition of adding a random char was true).

Now imagine that you have a dictionary dict of U=10 plaintexts of length L=500, and you need to decide, from a ciphertext input ctext, which one of the plaintext ptext from the dictionary dict corresponds to the given ciphertext.

A regular approach would be to do Frequency Analysis, but with a high value of r (>10/15 %) the results are not consistent.

Is this encryption algorithm unbreakable? Or is there a way to consistently guess the correct plaintext?

If your system is to introduce a random character with probability $$p$$ and the plaintext frequency of a given letter is $$q$$, then the ciphertext frequency of its shift will be $$(1-p)q+p/26$$ and if $$q\neq 1/26$$ this is still distinguishable from uniform. In particular, common letter will continue to have a frequency above 1/26 and uncommon letters a frequency below 1/26.
There is the added complication that it is not clear that you system is able to be decrypted unambiguously. How should I interpret a message that after unshifting reads ICATNOFFENRYOUSOMEVICEWICTHYOURGINABNDTONXIC?