Finished affine ciphers
[cipher-training.git] / slides / keyword-encipher.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Affine ciphers</title>
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
6 <style type="text/css">
7 /* Slideshow styles */
8 body {
9 font-size: 20px;
10 }
11 h1, h2, h3 {
12 font-weight: 400;
13 margin-bottom: 0;
14 }
15 h1 { font-size: 3em; }
16 h2 { font-size: 2em; }
17 h3 { font-size: 1.6em; }
18 a, a > code {
19 text-decoration: none;
20 }
21 code {
22 -moz-border-radius: 5px;
23 -web-border-radius: 5px;
24 background: #e7e8e2;
25 border-radius: 5px;
26 font-size: 16px;
27 }
28 .plaintext {
29 background: #272822;
30 color: #80ff80;
31 text-shadow: 0 0 20px #333;
32 padding: 2px 5px;
33 }
34 .ciphertext {
35 background: #272822;
36 color: #ff6666;
37 text-shadow: 0 0 20px #333;
38 padding: 2px 5px;
39 }
40 .float-right {
41 float: right;
42 }
43 </style>
44 </head>
45 <body>
46 <textarea id="source">
47
48 # Keyword ciphers
49
50 a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u | v | w | x | y | z
51 --|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|--
52 k | e | y | w | o | r | d | a | b | c | f | g | h | i | j | l | m | n | p | q | s | t | u | v | x | z
53
54 * Taking a more Pythonic approach
55
56 ---
57
58 # The cipher
59
60 * Still character-by-character substitution, still monosubstitution.
61
62 Ciphertext alphabet: start with a keyword, write out the rest of the alphabet, removing duplicates.
63
64 ## Three variants
65
66 Write out the rest of the alphabet...
67
68 1. ...starting from 'a' (keywordabcf...)
69 2. ...starting from the last unique letter of the keyword (keywordfgh...)
70 3. ...starting from the largest letter of the keyword (keywordzabc...)
71
72 </textarea>
73 <script src="http://gnab.github.io/remark/downloads/remark-0.6.0.min.js" type="text/javascript">
74 </script>
75
76 <script type="text/javascript"
77 src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&delayStartupUntil=configured"></script>
78
79 <script type="text/javascript">
80 var slideshow = remark.create({ ratio: "16:9" });
81
82 // Setup MathJax
83 MathJax.Hub.Config({
84 tex2jax: {
85 skipTags: ['script', 'noscript', 'style', 'textarea', 'pre']
86 }
87 });
88 MathJax.Hub.Queue(function() {
89 $(MathJax.Hub.getAllJax()).map(function(index, elem) {
90 return(elem.SourceElement());
91 }).parent().addClass('has-jax');
92 });
93 MathJax.Hub.Configured();
94 </script>
95 </body>
96 </html>