Minor documentation updates
[szyfrow.git] / README.md
1 # Szyfow ciphers
2
3 Simple (mainly manual) ciphers, and routines for enciphering, deciphering,
4 and breaking messages created with them.
5
6 The ciphers implemented here are mostly ones that predate mechanical cipher
7 systems. The most complex cipher is the Enigma of World War II.
8
9 Each cipher is presented with functions to encipher, decipher, and
10 automatically break messages with that cipher.
11
12 Most of the time, messages are broken by brute-force trying each possible key
13 and scoring the resulting deciphered message using a bag-of-words probability
14 measure (or a bag-of-bigrams, or a bag-of-trigrams).
15
16 You can find more information on the ciphers and how they are implemented in
17 the [codes and ciphers area of my blog](https://work.njae.me.uk/tag/codes-and-ciphers/).
18
19 Ciphers work on messages encoded with the 26 letters of the Latin alphabet,
20 without accents (the letters contained in the `string.ascii_letters` constant).
21 Most of the ciphers convert letters to lowercase, strip accents from letters,
22 and drop all other characters (such as spaces and punctuation).
23
24 `szyfrow.support.text_prettify` contains functions to make the output easier
25 to read, such as automatically recovering word boundaries.
26
27 The name comes from the Polish cipher bureau, the Biuro Szyfrów, who were
28 breaking Enigma ciphers by hand before World War II.