Re: [math-fun] A Permutation Cipher Text
Brad Klee <bradklee@gmail.com> wrote:
Easy to brute force if you get the gist of the permutation scheme but looks difficult to reverse engineer otherwise.
That looks very familiar. I notice that common letters remain common, that common digrams either remain common or are reversed, and that words and reversed words sometimes appear. I've seen that before, when I played around with taking a block of text and using each successive possible ASCII character in turn as a delimeter and reversing the text between every instance of that character, treating the end as being followed by the beginning (a "necklace"). For instance: reverse [e] revesre [r] rsevere [s] esrerev [v] erersev But I tried that, and it didn't work. Nor did running through the ASCII sequence in reverse order. Maybe another one of the 128! possible orders for seven-bit ASCII. It doesn't help that there are two non-ASCII characters in the text. Some years ago it occurred to me that exclusive-oring a text with a subset of the square roots, in binary, of the first N primes, followed by the above scrambling algorithm (in ASCII order), followed by the same exclusive-oring again, would be a pretty good encryption algorithm. Does anyone disagree?
On Wed, Oct 9, 2019 at 10:05 PM Keith F. Lynch <kfl@keithlynch.net> wrote:
Some years ago it occurred to me that exclusive-oring a text with a subset of the square roots, in binary, of the first N primes, followed by the above scrambling algorithm (in ASCII order), followed by the same exclusive-oring again, would be a pretty good encryption algorithm. Does anyone disagree?
The scrambling is irrelevant if the ciphertext has length N and the square roots of those N primes are GF(2)-linearly independent. Just apply Gaussian elimination and you've reduced the cipher to a one-time pad. If N is less than the length of the ciphertext, then there will likely be exploitable statistical correlations. -- Mike Stay - metaweta@gmail.com http://math.ucr.edu/~mike https://reperiendi.wordpress.com
participants (2)
-
Keith F. Lynch -
Mike Stay