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