Supposing a rotor machine of the 1940s or 50s, with 36 characters instead of 26. Would the encryption of the ten additional characters as the most frequent bigrams or trigrams weaken the code? What better use of these (or any) additional characters would there be?
-
$\begingroup$ Obvious question: suppose that 'th' was one of your frequent bigrams; then suppose you encrypt the three character plaintext string 'sup' as the two letters 't' 'h' and the bigram 'th'. How would the decryptor then know that the ciphertext 'thth' consisted of three symbols 't', 'h', 'th', and not any of the other 3 ways to lex it? $\endgroup$– ponchoCommented Aug 18, 2015 at 18:17
-
2$\begingroup$ Thank you, but the situation is opposite. Suppose that I have the plaintext "The operation was canceled", and will encrypt the bigrams TH, RA and ED, and the trigrams ION and CAN. Assuming that they correspond to 1, 2, 3, 4 and 5, I will have "1eope2t4was5cel3" (without spaces), and the ciphertext, say, "kx5wq8b7h3xqd8ap". In the long run (rotor machine, years), would this create patterns and weaken the code? $\endgroup$– KDVCSCommented Aug 21, 2015 at 18:29
1 Answer
What you essentially do is compressing the plaintext before encrypting it. If the rotor machine offers a secure encryption, it should be secure for any type of input, including the compressed one. There is, however, a caveat: The ciphertext leaks the length of the plaintext and if you compress the plaintext, you change its length and therefore change what is leaked. Depending on how the encryption is used, this can actually cause problems. See this question.