X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=docs%2Fszyfrow%2Findex.html;fp=docs%2Fszyfrow%2Findex.html;h=e27a80f029216165a9c52fa103c28baa628c3545;hb=b535d9d75e69cc395e8de28c99e38564655e5ac9;hp=0000000000000000000000000000000000000000;hpb=f19a021eabb3222709b9d513839a14c01cfdfd38;p=szyfrow.git diff --git a/docs/szyfrow/index.html b/docs/szyfrow/index.html new file mode 100644 index 0000000..e27a80f --- /dev/null +++ b/docs/szyfrow/index.html @@ -0,0 +1,202 @@ + + + + + + +szyfrow API documentation + + + + + + + + + + + +
+
+
+

Package szyfrow

+
+
+

Simple ciphers, enciphering, deciphering, and breaking.

+

The ciphers implemented here are mostly ones that predate mechanical cipher +systems. The most complex cipher is the Enigma of World War II.

+

Each cipher is presented with functions to encipher, decipher, and +automatically break messages with that cipher.

+

Most of the time, messages are broken by brute-force trying each possible key +and scoring the resulting deciphered message using a bag-of-words probability +measure (or a bag-of-bigrams, or a bag-of-trigrams).

+

You can find more information on the ciphers and how they are implemented in +the codes and ciphers area of my blog.

+

Ciphers work on messages encoded with the 26 letters of the Latin alphabet, +without accents (the letters contained in the string.ascii_letters constant). +Most of the ciphers convert letters to lowercase, strip accents from letters, +and drop all other characters (such as spaces and punctuation).

+

szyfrow.support.text_prettify contains functions to make the output easier +to read, such as automatically recovering word boundaries.

+

The name comes from the Polish cipher bureau, the Biuro Szyfrów, who were +breaking Enigma ciphers by hand before World War II.

+
+ +Expand source code + +
"""Simple ciphers, enciphering, deciphering, and breaking.
+
+The ciphers implemented here are mostly ones that predate mechanical cipher
+systems. The most complex cipher is the Enigma of World War II.
+
+Each cipher is presented with functions to encipher, decipher, and 
+automatically break messages with that cipher.
+
+Most of the time, messages are broken by brute-force trying each possible key
+and scoring the resulting deciphered message using a bag-of-words probability
+measure (or a bag-of-bigrams, or a bag-of-trigrams).
+
+You can find more information on the ciphers and how they are implemented in
+the [codes and ciphers area of my blog](https://work.njae.me.uk/tag/codes-and-ciphers/).
+
+Ciphers work on messages encoded with the 26 letters of the Latin alphabet,
+without accents (the letters contained in the `string.ascii_letters` constant).
+Most of the ciphers convert letters to lowercase, strip accents from letters,
+and drop all other characters (such as spaces and punctuation).
+
+`szyfrow.support.text_prettify` contains functions to make the output easier
+to read, such as automatically recovering word boundaries.
+
+The name comes from the Polish cipher bureau, the Biuro Szyfrów, who were 
+breaking Enigma ciphers by hand before World War II.
+"""
+
+
+
+

Sub-modules

+
+
szyfrow.affine
+
+

Enciphering and deciphering using the affine cipher. +Also attempts to break messages that use an …

+
+
szyfrow.amsco
+
+

Enciphering and deciphering using the Amsco cipher. +Also attempts to break messages that use …

+
+
szyfrow.autokey
+
+

Enciphering and deciphering using the Autokey cipher. +Also attempts to break messages that use a …

+
+
szyfrow.bifid
+
+

Enciphering and deciphering using the Bifid cipher. +Also attempts to break messages that use a Bifid …

+
+
szyfrow.bombe
+
+

A simulator for Bombe machines …

+
+
szyfrow.cadenus
+
+

Enciphering and deciphering using the Cadenus cipher. +Also attempts to break messages that use a …

+
+
szyfrow.caesar
+
+

Enciphering and deciphering using the Caesar cipher. +Also attempts to break messages that use a Caesar …

+
+
szyfrow.column_transposition
+
+

Enciphering and deciphering using the Column transposition cipher. +Also attempts to break messages that …

+
+
szyfrow.enigma
+
+

A simulator for Enigma machines …

+
+
szyfrow.keyword_cipher
+
+

Monoalphabetic substitution ciphers, mainly done by keyword. Enciphering +and deciphering, and a couple of ways to break these ciphers.

+
+
szyfrow.language_model_files
+
+

Descriptions of English, used for building language models …

+
+
szyfrow.playfair
+
+

Enciphering and deciphering using the Playfair cipher. +Also attempts to break messages that use a …

+
+
szyfrow.pocket_enigma
+
+

The Pocket Enigma machine, a simple example that illustrates the mechanisms +of the Enigma machine. See [a …

+
+
szyfrow.polybius
+
+

Simple digraph substitution cipher, using the +Polybius square. Enciphering +and deciphering, and a …

+
+
szyfrow.railfence
+
+ +
+
szyfrow.support
+
+

Support utilities for ciphers …

+
+
szyfrow.vigenere
+
+

Vigenère polyalphabetic substitution ciphers, +mainly done by keyword. Also does Beaufort …

+
+
+
+
+
+
+
+
+
+
+ +
+ + + \ No newline at end of file