4 <title>Breaking the pocket enigma
</title>
5 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8"/>
6 <style type=
"text/css">
15 h1 { font-size:
3em; }
16 h2 { font-size:
2em; }
17 h3 { font-size:
1.6em; }
19 text-decoration: none;
22 -moz-border-radius:
5px;
23 -web-border-radius:
5px;
31 text-shadow:
0 0 20px #
333;
37 text-shadow:
0 0 20px #
333;
51 <textarea id=
"source">
53 # Breaking the Pocket Enigma
55 ![centre-aligned Pocket Engima](pocket-enigma-small.jpg)
63 .indexlink[[Index](index.html)]
67 # Breaking the Pocket Enigma
69 A _crib_ is a piece of plaintext we believe to be in the enciphered message.
71 This is the way Enigma messages were broken in WWII.
73 There are many keys, and doing the naïve Bayes analysis was too expensive.
75 The possible keys were filtered by finding the ones that could have produced the crib. These filtered keys could then be checked manually.
77 At Bletchley Park, the filtering was done by the Bombes.
84 Given a message, a wheel spec, a crib, and the location of that crib:
85 Go through each key in turn
86 If the plaintext matches the crib:
87 Add it to the list of possible keys
88 Return the possible keys
93 pocket_enigma_break_by_crib('kzpjlzmoga',
1, 'l',
3)
97 Using wheel
1, the `j` (`ciphertext[
3]`) could become `l` if the wheel starts the message on a, j, or n.
100 <script src=
"http://gnab.github.io/remark/downloads/remark-0.6.0.min.js" type=
"text/javascript">
103 <script type=
"text/javascript"
104 src=
"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&delayStartupUntil=configured"></script>
106 <script type=
"text/javascript">
107 var slideshow = remark.create({ ratio:
"16:9" });
112 skipTags: ['script', 'noscript', 'style', 'textarea', 'pre']
115 MathJax.Hub.Queue(function() {
116 $(MathJax.Hub.getAllJax()).map(function(index, elem) {
117 return(elem.SourceElement());
118 }).parent().addClass('has-jax');
120 MathJax.Hub.Configured();