0
$\begingroup$

Suppose that the file linux.words is used as the "book". This is a publicly available list of just shy of half a million words. And suppose that this book is used, not in its native alphabetic order, but in some randomised order. The number of possible random arrangements is a decimal which is over two million decimal digits long. The cipher text will be a stream of numbers which index into the chosen random arrangement of the "book". Does this approach make for an improved book cipher?

$\endgroup$

1 Answer 1

1
$\begingroup$

From the Wikipedia page on Book ciphers:

Essentially, the code version of a "book cipher" is just like any other code, but one in which the trouble of preparing and distributing the codebook has been eliminated by using an existing text. However this means, as well as being attacked by all the usual means employed against other codes or ciphers, partial solutions may help the cryptanalyst to guess other codewords, or even to break the code completely by identifying the key text. This is, however, not the only way a book cipher may be broken. It is still susceptible to other methods of cryptanalysis, and as such is quite easily broken, even without sophisticated means, without the cryptanalyst having any idea what book the cipher is keyed to.

So you would effectively have a very weird book that would be unknown to the attacker, but that isn't enough to make it secure. In particular, (link)

If you know 1,000 words, you will be between a functional beginner and conversational level in English. In most of the world’s languages, 500 words will be more than enough to get you through any tourist situations and everyday introductions.

Randomizing the word order wouldn't change the frequency clues. Not being able to guess the book would add a small amount of additional security, but not enough to give it any meaningful improvement over a traditional book cipher.

$\endgroup$
4
  • $\begingroup$ Eugene: Thanks for that. One point you missed, and one that I missed. You missed my observation that there are a HUGE number of random sequences. How would an attacker know which sequence of the "book" to use? On the subject of frequency analysis, I forgot to mention that an adequate implementation would take care to ensure that repeated items in the plain text are never represented by the same item in the cipher text...making frequency analysis useless. I'm still not convinced of the futility of book ciphers! $\endgroup$
    – HowieB
    Mar 20, 2020 at 12:13
  • $\begingroup$ Having a lot of keys helps, but not if the attacker can eliminate large numbers of them quickly. For example, mono-alphabetic substitution has the equivalent of a 88-bit key, but is much easier to solve than DES, with its 56-bit key. This is due to the use of frequency analysis - I don't have to determine the value for every word, getting the common ones is enough to partially understand the message. $\endgroup$ Mar 20, 2020 at 14:59
  • $\begingroup$ Response part 2 - Adding duplicates of common words can make frequency analysis harder, but at the cost of making your "book" (i.e., key) larger. Also you haven't said what you plan to do about proper names, numbers, punctuation, and words that don't appear in your book. Finally, what happens if the user wants to encrypt a picture? $\endgroup$ Mar 20, 2020 at 15:11
  • $\begingroup$ Eugene: Someone else has had these questions about book ciphers and the potential problems with punctuation, numbers etc. Whoever they are, they've published a spec and code on Google Drive. Interesting. See: drive.google.com/drive/folders/… $\endgroup$
    – HowieB
    Aug 26, 2020 at 9:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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