5
$\begingroup$

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?

$\endgroup$
  • $\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$ – poncho Aug 18 '15 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$ – KDVCS Aug 21 '15 at 18:29
1
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.