From b2bff955d11597f85c5e1935165a44fb0e5e487e Mon Sep 17 00:00:00 2001 From: Neil Smith Date: Tue, 15 Jul 2014 10:58:37 +0100 Subject: [PATCH] Copied over updated slide layout from presentation-slides --- slides/affine-break.html | 11 +++++++++ slides/affine-encipher.html | 18 ++++++++++++--- slides/aims.html | 13 ++++++++++- slides/alternative-plaintext-scoring.html | 11 +++++++++ slides/caesar-break.html | 28 ++++++++++++++++++++++- slides/caesar-encipher.html | 11 +++++++++ slides/further-work.html | 12 ++++++++++ slides/index.html | 5 ++++ slides/keyword-break.html | 11 +++++++++ slides/keyword-encipher.html | 13 ++++++++++- slides/pocket-enigma-break.html | 11 +++++++++ slides/pocket-enigma-encipher.html | 11 +++++++++ slides/transposition-break.html | 11 +++++++++ slides/transposition-encipher.html | 11 +++++++++ slides/word-segmentation.html | 11 +++++++++ 15 files changed, 182 insertions(+), 6 deletions(-) diff --git a/slides/affine-break.html b/slides/affine-break.html index ddd8170..8a07978 100644 --- a/slides/affine-break.html +++ b/slides/affine-break.html @@ -36,6 +36,11 @@ color: #ff6666; text-shadow: 0 0 20px #333; padding: 2px 5px; + } + .indexlink { + position: absolute; + bottom: 1em; + left: 1em; } .float-right { float: right; @@ -53,6 +58,12 @@ b | e | h | k | n | q | t | w | z | c | f | i | l | o | r | u | x | a | d | g | --- +layout: true + +.indexlink[[Index](index.html)] + +--- + # Duplicate and extend your `caesar_break()` function * How to cycle through all the keys? diff --git a/slides/affine-encipher.html b/slides/affine-encipher.html index 30f3900..c0f30cb 100644 --- a/slides/affine-encipher.html +++ b/slides/affine-encipher.html @@ -36,6 +36,11 @@ color: #ff6666; text-shadow: 0 0 20px #333; padding: 2px 5px; + } + .indexlink { + position: absolute; + bottom: 1em; + left: 1em; } .float-right { float: right; @@ -56,9 +61,16 @@ An extension of Caesar ciphers * Count the gaps in the letters. --- + +layout: true + +.indexlink[[Index](index.html)] + +--- + # How affine ciphers work -_ciphertext_letter_ =_plaintext_letter_ × a + b +.ciphertext[_ciphertext_letter_] =.plaintext[_plaintext_letter_] × a + b * Convert letters to numbers * Take the total modulus 26 @@ -83,11 +95,11 @@ This is not always defined in modular arithmetic. For instance, 7 × 4 = 28 = 2 Result from number theory: only numbers coprime with _n_ have multiplicative inverses in arithmetic mod _n_. -Another result from number theory: for non-negative integers _a_ and _n_, and there exist unique integers _x_ and _y_ such that _ax_ + _ny_ = gcd(_a_, _b_) +Another result from number theory: for non-negative integers _m_ and _n_, and there exist unique integers _x_ and _y_ such that _mx_ + _ny_ = gcd(_m_, _n_) Coprime numbers have gcd of 1. -_ax_ + _ny_ = 1 mod _n_. But _ny_ mod _n_ = 0, so _ax_ = 1 mod _n_, so _a_ = _x_-1. +_mx_ + _ny_ = 1 mod _n_. But _ny_ mod _n_ = 0, so _mx_ = 1 mod _m_, so _m_ = _x_-1. Perhaps the algorithm for finding gcds could be useful? diff --git a/slides/aims.html b/slides/aims.html index fcf0c70..1d1da36 100644 --- a/slides/aims.html +++ b/slides/aims.html @@ -37,18 +37,29 @@ text-shadow: 0 0 20px #333; padding: 2px 5px; } + .indexlink { + position: absolute; + bottom: 1em; + left: 1em; + }