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;
46 <textarea id=
"source">
48 # Breaking the Pocket Enigma
50 ![centre-aligned Pocket Engima](pocket-enigma-small.jpg)
56 # Breaking the Pocket Enigma
58 A _crib_ is a piece of plaintext we believe to be in the enciphered message.
60 This is the way Enigma messages were broken in WWII.
62 There are many keys, and doing the naïve Bayes analysis was too expensive.
64 The possible keys were filtered by finding the ones that could have produced the crib. These filtered keys could then be checked manually.
66 At Bletchley Park, the filtering was done by the Bombes.
73 Given a message, a wheel spec, a crib, and the location of that crib:
74 Go through each key in turn
75 If the plaintext matches the crib:
76 Add it to the list of possible keys
77 Return the possible keys
82 pocket_enigma_break_by_crib('kzpjlzmoga',
1, 'l',
3)
86 Using wheel
1, the `j` (`ciphertext[
3]`) could become `l` if the wheel starts the message on a, j, or n.
89 <script src=
"http://gnab.github.io/remark/downloads/remark-0.6.0.min.js" type=
"text/javascript">
92 <script type=
"text/javascript"
93 src=
"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&delayStartupUntil=configured"></script>
95 <script type=
"text/javascript">
96 var slideshow = remark.create({ ratio:
"16:9" });
101 skipTags: ['script', 'noscript', 'style', 'textarea', 'pre']
104 MathJax.Hub.Queue(function() {
105 $(MathJax.Hub.getAllJax()).map(function(index, elem) {
106 return(elem.SourceElement());
107 }).parent().addClass('has-jax');
109 MathJax.Hub.Configured();