[JoGu]

Cryptology

Running-Text Ciphers

a7Hzq .#5r<
kÜ\as TâÆK$
ûj(Ö2 ñw%h:
Úk{4R f~`z8
¤˜Æ+Ô „&¢Dø

Method

Assume we have a plaintext of length r. We could encrypt it with the BELASO cipher (and the TRITHEMIUS table). But instead of choosing a keyword and periodically repeating this keyword we use a keytext of the same length r as the plaintext.

Then we add plaintext and keytext letter for letter (using the table).

If the key itself is a meaningful text in the plaintext language, say a section from a book, then we call this a running-text cipher.


Example

  Plaintext:   i a r r i v e t o m o r r o w a t t e n o c l o c k
  Keytext:     I F Y O U C A N K E E P Y O U R H E A D W H E N A L [L ABOUT YOU ...]
               ---------------------------------------------------
  Ciphertext:  Q F P F C X E G Y Q S G P C Q R A X E Q K J P B C V

A Perl program is here.


Practical Background

To avoid a period in a polyalphabetic substitution we choose a key that is (at least) as long as the plaintext.

On the other hand we need a key that is easily remembered or transferred to a communication partner.

A common method of defining such a key is taking a book and beginning at a certain position. The effective key is the number triple (page, line, letter). This kind of encryption is sometimes called a book cipher. But note that there are also other ways to use a book for encryption.

A modern version could use the contents of a CD beginning with a certain position.

Exercise: How large is the keyspace of this cipher, when the attacker knows which CD was used?


Author: Klaus Pommerening, 2000-Jan-14; last change: 2014-Aug-06.