SlideShare une entreprise Scribd logo
1  sur  25
Télécharger pour lire hors ligne
Teaching the Group Theory of Permutation Ciphers 
Joshua Holden 
Rose-Hulman Institute of Technology 
http://www.rose-hulman.edu/~holden 
Joshua Holden (RHIT) Group Theory of Permutation Ciphers 1 / 13
A historical example 
Taj ad-Din Ali ibn ad-Duraihim (1312–1361), worked and taught in 
Damascus and Cairo. 
In a book that was considered lost until the late 20th century, ibn 
ad-Duraihim described 24 variations of transposition ciphers. 
Example 
plaintext: dr in kt ot he ro se 
ciphertext: RD NI TK TO EH OR ES 
Joshua Holden (RHIT) Group Theory of Permutation Ciphers 2 / 13
So what? 
We are seeing the first explicit example of a permutation cipher. 
Definition 
A permutation is a bijection from a finite set to itself. 
Example 
plaintext: dr in kt ot he ro se 
ciphertext: RD NI TK TO EH OR ES 
Ibn ad-Duraihim’s permutation is 
 
1 2 
2 1 
 
: 
Joshua Holden (RHIT) Group Theory of Permutation Ciphers 3 / 13
Another example 
Example 
plaintext: ruby wine 
ciphertext: UYBR IENW 
This is a cipher based on the permutation 
 
1 2 3 4 
2 4 3 1 
 
: 
Note 
Some people prefer to use a notation based on where the letters go. 
We will use one based on where they come from. 
Joshua Holden (RHIT) Group Theory of Permutation Ciphers 4 / 13
Keys and keywords 
Clearly the key to a permutation cipher is the permutation. 
We can choose and remember a permutation by a keyword. 
Example 
TALE is a keyword for the permutation 
 
1 2 3 4 
2 4 3 1 
 
: 
plaintext: thep aper andt hepe nllu 
Joshua Holden (RHIT) Group Theory of Permutation Ciphers 5 / 13
Keys and keywords 
Clearly the key to a permutation cipher is the permutation. 
We can choose and remember a permutation by a keyword. 
Example 
TALE is a keyword for the permutation 
 
1 2 3 4 
2 4 3 1 
 
: 
keyword: TALE TALE TALE TALE TALE 
plaintext: thep aper andt hepe nllu 
Joshua Holden (RHIT) Group Theory of Permutation Ciphers 5 / 13
Keys and keywords 
Clearly the key to a permutation cipher is the permutation. 
We can choose and remember a permutation by a keyword. 
Example 
TALE is a keyword for the permutation 
 
1 2 3 4 
2 4 3 1 
 
: 
4132 4132 4132 4132 4132 
keyword: TALE TALE TALE TALE TALE 
plaintext: thep aper andt hepe nllu 
Joshua Holden (RHIT) Group Theory of Permutation Ciphers 5 / 13
Keys and keywords 
Clearly the key to a permutation cipher is the permutation. 
We can choose and remember a permutation by a keyword. 
Example 
TALE is a keyword for the permutation 
 
1 2 3 4 
2 4 3 1 
 
: 
4132 4132 4132 4132 4132 
keyword: TALE TALE TALE TALE TALE 
plaintext: thep aper andt hepe nllu 
ciphertext: HPET PREA NTDA EEPH LULN 
Joshua Holden (RHIT) Group Theory of Permutation Ciphers 5 / 13
Keys and keywords 
Clearly the key to a permutation cipher is the permutation. 
We can choose and remember a permutation by a keyword. 
Example 
TALE is a keyword for the permutation 
 
1 2 3 4 
2 4 3 1 
 
: 
4132 4132 4132 4132 4132 
keyword: TALE TALE TALE TALE TALE 
plaintext: thep aper andt hepe nllu 
ciphertext: HPET PREA NTDA EEPH LULN 
HPETP REANT DAEEP HLULN 
Joshua Holden (RHIT) Group Theory of Permutation Ciphers 5 / 13
Deciphering 
In order to decipher, you need to take the inverse of the permutation. 
The inverse of 
 
1 2 3 4 
2 4 3 1 
 
is 
 
1 2 3 4 
4 1 3 2 
 
. 
Note 
We saw the numbers 4132 earlier! 
Equivalently, alphabetize the keyword and read off the plaintext in 
original keyword order: 
Example 
ciphertext: HBET TLTA ADNE HSET ODRW 
Joshua Holden (RHIT) Group Theory of Permutation Ciphers 6 / 13
Deciphering 
In order to decipher, you need to take the inverse of the permutation. 
The inverse of 
 
1 2 3 4 
2 4 3 1 
 
is 
 
1 2 3 4 
4 1 3 2 
 
. 
Note 
We saw the numbers 4132 earlier! 
Equivalently, alphabetize the keyword and read off the plaintext in 
original keyword order: 
Example 
keyword: AELT AELT AELT AELT AELT 
ciphertext: HBET TLTA ADNE HSET ODRW 
Joshua Holden (RHIT) Group Theory of Permutation Ciphers 6 / 13
Deciphering 
In order to decipher, you need to take the inverse of the permutation. 
The inverse of 
 
1 2 3 4 
2 4 3 1 
 
is 
 
1 2 3 4 
4 1 3 2 
 
. 
Note 
We saw the numbers 4132 earlier! 
Equivalently, alphabetize the keyword and read off the plaintext in 
original keyword order: 
Example 
2431 2431 2431 2431 2431 
keyword: AELT AELT AELT AELT AELT 
ciphertext: HBET TLTA ADNE HSET ODRW 
Joshua Holden (RHIT) Group Theory of Permutation Ciphers 6 / 13
Deciphering 
In order to decipher, you need to take the inverse of the permutation. 
The inverse of 
 
1 2 3 4 
2 4 3 1 
 
is 
 
1 2 3 4 
4 1 3 2 
 
. 
Note 
We saw the numbers 4132 earlier! 
Equivalently, alphabetize the keyword and read off the plaintext in 
original keyword order: 
Example 
2431 2431 2431 2431 2431 
keyword: AELT AELT AELT AELT AELT 
ciphertext: HBET TLTA ADNE HSET ODRW 
plaintext: theb attl eand thes word 
Joshua Holden (RHIT) Group Theory of Permutation Ciphers 6 / 13
How many keys? 
The number of keys for a permutation cipher on n letters is the number 
of permutations, n!. 
But one of them gives the trivial cipher: 
Example 
plaintext: ruby wine 
Joshua Holden (RHIT) Group Theory of Permutation Ciphers 7 / 13
How many keys? 
The number of keys for a permutation cipher on n letters is the number 
of permutations, n!. 
But one of them gives the trivial cipher: 
Example 
keyword: ABCD ABCD 
plaintext: ruby wine 
Joshua Holden (RHIT) Group Theory of Permutation Ciphers 7 / 13
How many keys? 
The number of keys for a permutation cipher on n letters is the number 
of permutations, n!. 
But one of them gives the trivial cipher: 
Example 
1234 1234 
keyword: ABCD ABCD 
plaintext: ruby wine 
Joshua Holden (RHIT) Group Theory of Permutation Ciphers 7 / 13
How many keys? 
The number of keys for a permutation cipher on n letters is the number 
of permutations, n!. 
But one of them gives the trivial cipher: 
Example 
1234 1234 
keyword: ABCD ABCD 
plaintext: ruby wine 
ciphertext: RUBY WINE 
Joshua Holden (RHIT) Group Theory of Permutation Ciphers 7 / 13
Double encipherment? 
Can we improve the security of a permutation cipher by using two 
different keys? 
Example 
4132 4132 4132 4132 4132 
keyword: TALE TALE TALE TALE TALE 
plaintext: thep aper andt hepe nllu 
first ciphertext: HPET PREA NTDA EEPH LULN 
4312 4312 4312 4312 4312 
keyword: POEM POEM POEM POEM POEM 
first ciphertext: hpet prea ntda eeph luln 
second ciphertext: ETPH EARP DATN PHEE LNUL 
Joshua Holden (RHIT) Group Theory of Permutation Ciphers 8 / 13
But look: 
Example 
plaintext: thep aper andt hepe nllu 
second ciphertext: ETPH EARP DATN PHEE LNUL 
This is the same as if you had just used the key 
 
. 
 
1 2 3 4 
3 1 4 2 
The combination of two ciphers is called a product cipher. 
In fact: 
 
 
1 2 3 4 
2 4 3 1 
 
 
 
1 2 3 4 
3 4 2 1 
= 
 
: 
 
1 2 3 4 
3 1 4 2 
Note 
Not everyone writes permutation products in the same order, either. 
Joshua Holden (RHIT) Group Theory of Permutation Ciphers 9 / 13
Noncommutativity 
Note that  
 
1 2 3 4 
2 4 3 1 
 
 
1 2 3 4 
3 4 2 1 
 
is not the same as 
 
1 2 3 4 
3 4 2 1 
 
 
 
1 2 3 4 
2 4 3 1 
 
: 
(I.e., permutation products are not commutative.) 
If you don’t believe it, try encrypting our plaintext using the keyword 
POEM first and then the keyword TALE. 
Joshua Holden (RHIT) Group Theory of Permutation Ciphers 10 / 13
Bad keys 
Some ciphers have bad keys — they don’t decrypt properly. 
Example 
 
 
1 2 3 4 
looks like a permutation, but... 
4 1 1 3 
plaintext: garb agei ngar bage outx 
Joshua Holden (RHIT) Group Theory of Permutation Ciphers 11 / 13
Bad keys 
Some ciphers have bad keys — they don’t decrypt properly. 
Example 
 
 
1 2 3 4 
looks like a permutation, but... 
4 1 1 3 
plaintext: garb agei ngar bage outx 
ciphertext: BGGR IAAE RNNA EBBG XOOT 
Joshua Holden (RHIT) Group Theory of Permutation Ciphers 11 / 13
Bad keys 
Some ciphers have bad keys — they don’t decrypt properly. 
Example 
 
 
1 2 3 4 
looks like a permutation, but... 
4 1 1 3 
plaintext: garb agei ngar bage outx 
ciphertext: BGGR IAAE RNNA EBBG XOOT 
plaintext: g?rb a?ei n?ar b?ge o?tx 
It’s a function but not a permutation — it doesn’t have an inverse. 
Joshua Holden (RHIT) Group Theory of Permutation Ciphers 11 / 13
Group theory 
Okay, what about the math? So far we’ve actually covered: 
An example of a group, the permutation (cipher)s on n letters. 
(Actually, infinitely many groups!) 
The order of the group (number of keys). 
The group identity, the trivial permutation (cipher). 
Inverses in the group, i.e. decryption. 
The group operation, permutation (cipher) products. 
Noncommutativity — permutations are not commutative, and 
neither are permutation ciphers. 
A set which contains a group, but is not a group, because it is not 
closed under inverses, i.e. functions. 
Joshua Holden (RHIT) Group Theory of Permutation Ciphers 12 / 13
HNAT SOFK LSIR EINT GZXN 
NOJET EHYET EMNSG IEOUA 
Joshua Holden (RHIT) Group Theory of Permutation Ciphers 13 / 13

Contenu connexe

Tendances

Logic and Reasoning in the Semantic Web
Logic and Reasoning in the Semantic WebLogic and Reasoning in the Semantic Web
Logic and Reasoning in the Semantic WebFulvio Corno
 
Chemistry Enabling Chinese, Japanese and Korean Patents
Chemistry Enabling Chinese, Japanese and Korean PatentsChemistry Enabling Chinese, Japanese and Korean Patents
Chemistry Enabling Chinese, Japanese and Korean PatentsNextMove Software
 
Theory of Computation Lecture Notes
Theory of Computation Lecture NotesTheory of Computation Lecture Notes
Theory of Computation Lecture NotesFellowBuddy.com
 
Parts of Speect Tagging
Parts of Speect TaggingParts of Speect Tagging
Parts of Speect Taggingtheyaseen51
 
ITU - MDD - Textural Languages and Grammars
ITU - MDD - Textural Languages and GrammarsITU - MDD - Textural Languages and Grammars
ITU - MDD - Textural Languages and GrammarsTonny Madsen
 
Presentation at NLDB 2012
Presentation at NLDB 2012Presentation at NLDB 2012
Presentation at NLDB 2012maartenmarx
 
Introduction to ci with jenkins
Introduction to ci with jenkinsIntroduction to ci with jenkins
Introduction to ci with jenkinsEric Hogue
 
Parsing Expression Grammars and Treetop
Parsing Expression Grammars and TreetopParsing Expression Grammars and Treetop
Parsing Expression Grammars and TreetopJuan Lulkin
 
Threading Is Not A Model
Threading Is Not A ModelThreading Is Not A Model
Threading Is Not A Modelguest2a5acfb
 
Lecture 7: Definite Clause Grammars
Lecture 7: Definite Clause GrammarsLecture 7: Definite Clause Grammars
Lecture 7: Definite Clause GrammarsCS, NcState
 
Handling ambiguities and unknown words in named entity recognition using anap...
Handling ambiguities and unknown words in named entity recognition using anap...Handling ambiguities and unknown words in named entity recognition using anap...
Handling ambiguities and unknown words in named entity recognition using anap...ijcsa
 
Context Free Grammar
Context Free GrammarContext Free Grammar
Context Free GrammarAkhil Kaushik
 
“Epenthetic vowels” in Nahuatl: Are they really epenthetic?
“Epenthetic vowels” in Nahuatl: Are they really epenthetic?“Epenthetic vowels” in Nahuatl: Are they really epenthetic?
“Epenthetic vowels” in Nahuatl: Are they really epenthetic?Mitsuya Sasaki
 
Rule-based reasoning in the Semantic Web
Rule-based reasoning in the Semantic WebRule-based reasoning in the Semantic Web
Rule-based reasoning in the Semantic WebFulvio Corno
 

Tendances (17)

Logic and Reasoning in the Semantic Web
Logic and Reasoning in the Semantic WebLogic and Reasoning in the Semantic Web
Logic and Reasoning in the Semantic Web
 
Ceis 8
Ceis 8Ceis 8
Ceis 8
 
Unit v
Unit vUnit v
Unit v
 
Chemistry Enabling Chinese, Japanese and Korean Patents
Chemistry Enabling Chinese, Japanese and Korean PatentsChemistry Enabling Chinese, Japanese and Korean Patents
Chemistry Enabling Chinese, Japanese and Korean Patents
 
Theory of Computation Lecture Notes
Theory of Computation Lecture NotesTheory of Computation Lecture Notes
Theory of Computation Lecture Notes
 
Parts of Speect Tagging
Parts of Speect TaggingParts of Speect Tagging
Parts of Speect Tagging
 
Unit ii
Unit iiUnit ii
Unit ii
 
ITU - MDD - Textural Languages and Grammars
ITU - MDD - Textural Languages and GrammarsITU - MDD - Textural Languages and Grammars
ITU - MDD - Textural Languages and Grammars
 
Presentation at NLDB 2012
Presentation at NLDB 2012Presentation at NLDB 2012
Presentation at NLDB 2012
 
Introduction to ci with jenkins
Introduction to ci with jenkinsIntroduction to ci with jenkins
Introduction to ci with jenkins
 
Parsing Expression Grammars and Treetop
Parsing Expression Grammars and TreetopParsing Expression Grammars and Treetop
Parsing Expression Grammars and Treetop
 
Threading Is Not A Model
Threading Is Not A ModelThreading Is Not A Model
Threading Is Not A Model
 
Lecture 7: Definite Clause Grammars
Lecture 7: Definite Clause GrammarsLecture 7: Definite Clause Grammars
Lecture 7: Definite Clause Grammars
 
Handling ambiguities and unknown words in named entity recognition using anap...
Handling ambiguities and unknown words in named entity recognition using anap...Handling ambiguities and unknown words in named entity recognition using anap...
Handling ambiguities and unknown words in named entity recognition using anap...
 
Context Free Grammar
Context Free GrammarContext Free Grammar
Context Free Grammar
 
“Epenthetic vowels” in Nahuatl: Are they really epenthetic?
“Epenthetic vowels” in Nahuatl: Are they really epenthetic?“Epenthetic vowels” in Nahuatl: Are they really epenthetic?
“Epenthetic vowels” in Nahuatl: Are they really epenthetic?
 
Rule-based reasoning in the Semantic Web
Rule-based reasoning in the Semantic WebRule-based reasoning in the Semantic Web
Rule-based reasoning in the Semantic Web
 

En vedette

1 2 3
1 2 31 2 3
1 2 3wfke
 
Charged aerosol detector in HPLC.ppt
Charged aerosol detector in HPLC.pptCharged aerosol detector in HPLC.ppt
Charged aerosol detector in HPLC.pptsas3333
 
Mo permutation-and-combination
Mo permutation-and-combinationMo permutation-and-combination
Mo permutation-and-combinationKathleen Ong
 
Ionic Liquids : Green solvents for the future
Ionic Liquids : Green solvents for the futureIonic Liquids : Green solvents for the future
Ionic Liquids : Green solvents for the futureMrudang Thakor
 
Permutation and combination - Math Statistic
Permutation and combination - Math StatisticPermutation and combination - Math Statistic
Permutation and combination - Math StatisticPrincess is Ntxhais
 
Counting Technique, Permutation, Combination
Counting Technique, Permutation, CombinationCounting Technique, Permutation, Combination
Counting Technique, Permutation, CombinationChie Pegollo
 
Introduction to finite element method(fem)
Introduction to finite element method(fem)Introduction to finite element method(fem)
Introduction to finite element method(fem)Sreekanth G
 
Permutations & Combinations
Permutations & CombinationsPermutations & Combinations
Permutations & Combinationsrfant
 

En vedette (13)

Circular Permutation
Circular PermutationCircular Permutation
Circular Permutation
 
1 2 3
1 2 31 2 3
1 2 3
 
Chapter 4 Cyclic Groups
Chapter 4 Cyclic GroupsChapter 4 Cyclic Groups
Chapter 4 Cyclic Groups
 
A Comparative Analysis of Semiconductor Electroplating Bath Additives by Cali...
A Comparative Analysis of Semiconductor Electroplating Bath Additives by Cali...A Comparative Analysis of Semiconductor Electroplating Bath Additives by Cali...
A Comparative Analysis of Semiconductor Electroplating Bath Additives by Cali...
 
Charged aerosol detector in HPLC.ppt
Charged aerosol detector in HPLC.pptCharged aerosol detector in HPLC.ppt
Charged aerosol detector in HPLC.ppt
 
Mo permutation-and-combination
Mo permutation-and-combinationMo permutation-and-combination
Mo permutation-and-combination
 
HPLC Detectors
HPLC DetectorsHPLC Detectors
HPLC Detectors
 
Ionic Liquids : Green solvents for the future
Ionic Liquids : Green solvents for the futureIonic Liquids : Green solvents for the future
Ionic Liquids : Green solvents for the future
 
Permutation and combination - Math Statistic
Permutation and combination - Math StatisticPermutation and combination - Math Statistic
Permutation and combination - Math Statistic
 
Detectors hplc
Detectors hplcDetectors hplc
Detectors hplc
 
Counting Technique, Permutation, Combination
Counting Technique, Permutation, CombinationCounting Technique, Permutation, Combination
Counting Technique, Permutation, Combination
 
Introduction to finite element method(fem)
Introduction to finite element method(fem)Introduction to finite element method(fem)
Introduction to finite element method(fem)
 
Permutations & Combinations
Permutations & CombinationsPermutations & Combinations
Permutations & Combinations
 

Plus de Joshua Holden

The Interplay Between Art and Math: Lessons from a STEM-based Art and Math co...
The Interplay Between Art and Math: Lessons from a STEM-based Art and Math co...The Interplay Between Art and Math: Lessons from a STEM-based Art and Math co...
The Interplay Between Art and Math: Lessons from a STEM-based Art and Math co...Joshua Holden
 
Between the Two Cultures: Teaching Math and Art to Engineers (and Scientists ...
Between the Two Cultures: Teaching Math and Art to Engineers (and Scientists ...Between the Two Cultures: Teaching Math and Art to Engineers (and Scientists ...
Between the Two Cultures: Teaching Math and Art to Engineers (and Scientists ...Joshua Holden
 
Statistics for fixed points of x ↦ x^x mod p
Statistics for fixed points of x  ↦ x^x mod pStatistics for fixed points of x  ↦ x^x mod p
Statistics for fixed points of x ↦ x^x mod pJoshua Holden
 
Granny’s Not So Square, After All: Hyperbolic Tilings with Truly Hyperbolic C...
Granny’s Not So Square, After All: Hyperbolic Tilings with Truly Hyperbolic C...Granny’s Not So Square, After All: Hyperbolic Tilings with Truly Hyperbolic C...
Granny’s Not So Square, After All: Hyperbolic Tilings with Truly Hyperbolic C...Joshua Holden
 
Stitching Graphs and Painting Mazes: Problems in Generalizations of Eulerian ...
Stitching Graphs and Painting Mazes: Problems in Generalizations of Eulerian ...Stitching Graphs and Painting Mazes: Problems in Generalizations of Eulerian ...
Stitching Graphs and Painting Mazes: Problems in Generalizations of Eulerian ...Joshua Holden
 
A statistical look at maps of the discrete logarithm
A statistical look at maps of the discrete logarithmA statistical look at maps of the discrete logarithm
A statistical look at maps of the discrete logarithmJoshua Holden
 
Mapping the discrete logarithm
Mapping the discrete logarithmMapping the discrete logarithm
Mapping the discrete logarithmJoshua Holden
 
Fixed points and two-cycles of the self-power map
Fixed points and two-cycles of the self-power mapFixed points and two-cycles of the self-power map
Fixed points and two-cycles of the self-power mapJoshua Holden
 
Braids, Cables, and Cells II: Representing Art and Craft with Mathematics and...
Braids, Cables, and Cells II: Representing Art and Craft with Mathematics and...Braids, Cables, and Cells II: Representing Art and Craft with Mathematics and...
Braids, Cables, and Cells II: Representing Art and Craft with Mathematics and...Joshua Holden
 
A Good Hash Function is Hard to Find, and Vice Versa
A Good Hash Function is Hard to Find, and Vice VersaA Good Hash Function is Hard to Find, and Vice Versa
A Good Hash Function is Hard to Find, and Vice VersaJoshua Holden
 
How Do You Say 'Cryptography' in Romanian?
How Do You Say 'Cryptography' in Romanian?How Do You Say 'Cryptography' in Romanian?
How Do You Say 'Cryptography' in Romanian?Joshua Holden
 
Braids, Cables, and Cells: An intersection of Mathematics, Computer Science, ...
Braids, Cables, and Cells: An intersection of Mathematics, Computer Science, ...Braids, Cables, and Cells: An intersection of Mathematics, Computer Science, ...
Braids, Cables, and Cells: An intersection of Mathematics, Computer Science, ...Joshua Holden
 
Braids, Cables, and Cells I: An Interesting Intersection of Mathematics, Comp...
Braids, Cables, and Cells I: An Interesting Intersection of Mathematics, Comp...Braids, Cables, and Cells I: An Interesting Intersection of Mathematics, Comp...
Braids, Cables, and Cells I: An Interesting Intersection of Mathematics, Comp...Joshua Holden
 
How to Paint Your Way out of a Maze
How to Paint Your Way out of a MazeHow to Paint Your Way out of a Maze
How to Paint Your Way out of a MazeJoshua Holden
 
Blackwork embroidery and algorithms for maze traversals
Blackwork embroidery and algorithms for maze traversalsBlackwork embroidery and algorithms for maze traversals
Blackwork embroidery and algorithms for maze traversalsJoshua Holden
 
Mathematical Cryptography
Mathematical CryptographyMathematical Cryptography
Mathematical CryptographyJoshua Holden
 
Understanding the Magic: Teaching Cryptography with Just the Right Amount of ...
Understanding the Magic: Teaching Cryptography with Just the Right Amount of ...Understanding the Magic: Teaching Cryptography with Just the Right Amount of ...
Understanding the Magic: Teaching Cryptography with Just the Right Amount of ...Joshua Holden
 
Modular Arithmetic and Trap Door Ciphers
Modular Arithmetic and Trap Door CiphersModular Arithmetic and Trap Door Ciphers
Modular Arithmetic and Trap Door CiphersJoshua Holden
 
The Pohlig-Hellman Exponentiation Cipher as a Bridge Between Classical and Mo...
The Pohlig-Hellman Exponentiation Cipher as a Bridge Between Classical and Mo...The Pohlig-Hellman Exponentiation Cipher as a Bridge Between Classical and Mo...
The Pohlig-Hellman Exponentiation Cipher as a Bridge Between Classical and Mo...Joshua Holden
 

Plus de Joshua Holden (20)

The Interplay Between Art and Math: Lessons from a STEM-based Art and Math co...
The Interplay Between Art and Math: Lessons from a STEM-based Art and Math co...The Interplay Between Art and Math: Lessons from a STEM-based Art and Math co...
The Interplay Between Art and Math: Lessons from a STEM-based Art and Math co...
 
Between the Two Cultures: Teaching Math and Art to Engineers (and Scientists ...
Between the Two Cultures: Teaching Math and Art to Engineers (and Scientists ...Between the Two Cultures: Teaching Math and Art to Engineers (and Scientists ...
Between the Two Cultures: Teaching Math and Art to Engineers (and Scientists ...
 
Statistics for fixed points of x ↦ x^x mod p
Statistics for fixed points of x  ↦ x^x mod pStatistics for fixed points of x  ↦ x^x mod p
Statistics for fixed points of x ↦ x^x mod p
 
Granny’s Not So Square, After All: Hyperbolic Tilings with Truly Hyperbolic C...
Granny’s Not So Square, After All: Hyperbolic Tilings with Truly Hyperbolic C...Granny’s Not So Square, After All: Hyperbolic Tilings with Truly Hyperbolic C...
Granny’s Not So Square, After All: Hyperbolic Tilings with Truly Hyperbolic C...
 
Stitching Graphs and Painting Mazes: Problems in Generalizations of Eulerian ...
Stitching Graphs and Painting Mazes: Problems in Generalizations of Eulerian ...Stitching Graphs and Painting Mazes: Problems in Generalizations of Eulerian ...
Stitching Graphs and Painting Mazes: Problems in Generalizations of Eulerian ...
 
A statistical look at maps of the discrete logarithm
A statistical look at maps of the discrete logarithmA statistical look at maps of the discrete logarithm
A statistical look at maps of the discrete logarithm
 
Mapping the discrete logarithm
Mapping the discrete logarithmMapping the discrete logarithm
Mapping the discrete logarithm
 
Fixed points and two-cycles of the self-power map
Fixed points and two-cycles of the self-power mapFixed points and two-cycles of the self-power map
Fixed points and two-cycles of the self-power map
 
Braids, Cables, and Cells II: Representing Art and Craft with Mathematics and...
Braids, Cables, and Cells II: Representing Art and Craft with Mathematics and...Braids, Cables, and Cells II: Representing Art and Craft with Mathematics and...
Braids, Cables, and Cells II: Representing Art and Craft with Mathematics and...
 
A Good Hash Function is Hard to Find, and Vice Versa
A Good Hash Function is Hard to Find, and Vice VersaA Good Hash Function is Hard to Find, and Vice Versa
A Good Hash Function is Hard to Find, and Vice Versa
 
How Do You Say 'Cryptography' in Romanian?
How Do You Say 'Cryptography' in Romanian?How Do You Say 'Cryptography' in Romanian?
How Do You Say 'Cryptography' in Romanian?
 
Braids, Cables, and Cells: An intersection of Mathematics, Computer Science, ...
Braids, Cables, and Cells: An intersection of Mathematics, Computer Science, ...Braids, Cables, and Cells: An intersection of Mathematics, Computer Science, ...
Braids, Cables, and Cells: An intersection of Mathematics, Computer Science, ...
 
Math in Your Hands
Math in Your HandsMath in Your Hands
Math in Your Hands
 
Braids, Cables, and Cells I: An Interesting Intersection of Mathematics, Comp...
Braids, Cables, and Cells I: An Interesting Intersection of Mathematics, Comp...Braids, Cables, and Cells I: An Interesting Intersection of Mathematics, Comp...
Braids, Cables, and Cells I: An Interesting Intersection of Mathematics, Comp...
 
How to Paint Your Way out of a Maze
How to Paint Your Way out of a MazeHow to Paint Your Way out of a Maze
How to Paint Your Way out of a Maze
 
Blackwork embroidery and algorithms for maze traversals
Blackwork embroidery and algorithms for maze traversalsBlackwork embroidery and algorithms for maze traversals
Blackwork embroidery and algorithms for maze traversals
 
Mathematical Cryptography
Mathematical CryptographyMathematical Cryptography
Mathematical Cryptography
 
Understanding the Magic: Teaching Cryptography with Just the Right Amount of ...
Understanding the Magic: Teaching Cryptography with Just the Right Amount of ...Understanding the Magic: Teaching Cryptography with Just the Right Amount of ...
Understanding the Magic: Teaching Cryptography with Just the Right Amount of ...
 
Modular Arithmetic and Trap Door Ciphers
Modular Arithmetic and Trap Door CiphersModular Arithmetic and Trap Door Ciphers
Modular Arithmetic and Trap Door Ciphers
 
The Pohlig-Hellman Exponentiation Cipher as a Bridge Between Classical and Mo...
The Pohlig-Hellman Exponentiation Cipher as a Bridge Between Classical and Mo...The Pohlig-Hellman Exponentiation Cipher as a Bridge Between Classical and Mo...
The Pohlig-Hellman Exponentiation Cipher as a Bridge Between Classical and Mo...
 

Teaching the Group Theory of Permutation Ciphers

  • 1. Teaching the Group Theory of Permutation Ciphers Joshua Holden Rose-Hulman Institute of Technology http://www.rose-hulman.edu/~holden Joshua Holden (RHIT) Group Theory of Permutation Ciphers 1 / 13
  • 2. A historical example Taj ad-Din Ali ibn ad-Duraihim (1312–1361), worked and taught in Damascus and Cairo. In a book that was considered lost until the late 20th century, ibn ad-Duraihim described 24 variations of transposition ciphers. Example plaintext: dr in kt ot he ro se ciphertext: RD NI TK TO EH OR ES Joshua Holden (RHIT) Group Theory of Permutation Ciphers 2 / 13
  • 3. So what? We are seeing the first explicit example of a permutation cipher. Definition A permutation is a bijection from a finite set to itself. Example plaintext: dr in kt ot he ro se ciphertext: RD NI TK TO EH OR ES Ibn ad-Duraihim’s permutation is 1 2 2 1 : Joshua Holden (RHIT) Group Theory of Permutation Ciphers 3 / 13
  • 4. Another example Example plaintext: ruby wine ciphertext: UYBR IENW This is a cipher based on the permutation 1 2 3 4 2 4 3 1 : Note Some people prefer to use a notation based on where the letters go. We will use one based on where they come from. Joshua Holden (RHIT) Group Theory of Permutation Ciphers 4 / 13
  • 5. Keys and keywords Clearly the key to a permutation cipher is the permutation. We can choose and remember a permutation by a keyword. Example TALE is a keyword for the permutation 1 2 3 4 2 4 3 1 : plaintext: thep aper andt hepe nllu Joshua Holden (RHIT) Group Theory of Permutation Ciphers 5 / 13
  • 6. Keys and keywords Clearly the key to a permutation cipher is the permutation. We can choose and remember a permutation by a keyword. Example TALE is a keyword for the permutation 1 2 3 4 2 4 3 1 : keyword: TALE TALE TALE TALE TALE plaintext: thep aper andt hepe nllu Joshua Holden (RHIT) Group Theory of Permutation Ciphers 5 / 13
  • 7. Keys and keywords Clearly the key to a permutation cipher is the permutation. We can choose and remember a permutation by a keyword. Example TALE is a keyword for the permutation 1 2 3 4 2 4 3 1 : 4132 4132 4132 4132 4132 keyword: TALE TALE TALE TALE TALE plaintext: thep aper andt hepe nllu Joshua Holden (RHIT) Group Theory of Permutation Ciphers 5 / 13
  • 8. Keys and keywords Clearly the key to a permutation cipher is the permutation. We can choose and remember a permutation by a keyword. Example TALE is a keyword for the permutation 1 2 3 4 2 4 3 1 : 4132 4132 4132 4132 4132 keyword: TALE TALE TALE TALE TALE plaintext: thep aper andt hepe nllu ciphertext: HPET PREA NTDA EEPH LULN Joshua Holden (RHIT) Group Theory of Permutation Ciphers 5 / 13
  • 9. Keys and keywords Clearly the key to a permutation cipher is the permutation. We can choose and remember a permutation by a keyword. Example TALE is a keyword for the permutation 1 2 3 4 2 4 3 1 : 4132 4132 4132 4132 4132 keyword: TALE TALE TALE TALE TALE plaintext: thep aper andt hepe nllu ciphertext: HPET PREA NTDA EEPH LULN HPETP REANT DAEEP HLULN Joshua Holden (RHIT) Group Theory of Permutation Ciphers 5 / 13
  • 10. Deciphering In order to decipher, you need to take the inverse of the permutation. The inverse of 1 2 3 4 2 4 3 1 is 1 2 3 4 4 1 3 2 . Note We saw the numbers 4132 earlier! Equivalently, alphabetize the keyword and read off the plaintext in original keyword order: Example ciphertext: HBET TLTA ADNE HSET ODRW Joshua Holden (RHIT) Group Theory of Permutation Ciphers 6 / 13
  • 11. Deciphering In order to decipher, you need to take the inverse of the permutation. The inverse of 1 2 3 4 2 4 3 1 is 1 2 3 4 4 1 3 2 . Note We saw the numbers 4132 earlier! Equivalently, alphabetize the keyword and read off the plaintext in original keyword order: Example keyword: AELT AELT AELT AELT AELT ciphertext: HBET TLTA ADNE HSET ODRW Joshua Holden (RHIT) Group Theory of Permutation Ciphers 6 / 13
  • 12. Deciphering In order to decipher, you need to take the inverse of the permutation. The inverse of 1 2 3 4 2 4 3 1 is 1 2 3 4 4 1 3 2 . Note We saw the numbers 4132 earlier! Equivalently, alphabetize the keyword and read off the plaintext in original keyword order: Example 2431 2431 2431 2431 2431 keyword: AELT AELT AELT AELT AELT ciphertext: HBET TLTA ADNE HSET ODRW Joshua Holden (RHIT) Group Theory of Permutation Ciphers 6 / 13
  • 13. Deciphering In order to decipher, you need to take the inverse of the permutation. The inverse of 1 2 3 4 2 4 3 1 is 1 2 3 4 4 1 3 2 . Note We saw the numbers 4132 earlier! Equivalently, alphabetize the keyword and read off the plaintext in original keyword order: Example 2431 2431 2431 2431 2431 keyword: AELT AELT AELT AELT AELT ciphertext: HBET TLTA ADNE HSET ODRW plaintext: theb attl eand thes word Joshua Holden (RHIT) Group Theory of Permutation Ciphers 6 / 13
  • 14. How many keys? The number of keys for a permutation cipher on n letters is the number of permutations, n!. But one of them gives the trivial cipher: Example plaintext: ruby wine Joshua Holden (RHIT) Group Theory of Permutation Ciphers 7 / 13
  • 15. How many keys? The number of keys for a permutation cipher on n letters is the number of permutations, n!. But one of them gives the trivial cipher: Example keyword: ABCD ABCD plaintext: ruby wine Joshua Holden (RHIT) Group Theory of Permutation Ciphers 7 / 13
  • 16. How many keys? The number of keys for a permutation cipher on n letters is the number of permutations, n!. But one of them gives the trivial cipher: Example 1234 1234 keyword: ABCD ABCD plaintext: ruby wine Joshua Holden (RHIT) Group Theory of Permutation Ciphers 7 / 13
  • 17. How many keys? The number of keys for a permutation cipher on n letters is the number of permutations, n!. But one of them gives the trivial cipher: Example 1234 1234 keyword: ABCD ABCD plaintext: ruby wine ciphertext: RUBY WINE Joshua Holden (RHIT) Group Theory of Permutation Ciphers 7 / 13
  • 18. Double encipherment? Can we improve the security of a permutation cipher by using two different keys? Example 4132 4132 4132 4132 4132 keyword: TALE TALE TALE TALE TALE plaintext: thep aper andt hepe nllu first ciphertext: HPET PREA NTDA EEPH LULN 4312 4312 4312 4312 4312 keyword: POEM POEM POEM POEM POEM first ciphertext: hpet prea ntda eeph luln second ciphertext: ETPH EARP DATN PHEE LNUL Joshua Holden (RHIT) Group Theory of Permutation Ciphers 8 / 13
  • 19. But look: Example plaintext: thep aper andt hepe nllu second ciphertext: ETPH EARP DATN PHEE LNUL This is the same as if you had just used the key . 1 2 3 4 3 1 4 2 The combination of two ciphers is called a product cipher. In fact: 1 2 3 4 2 4 3 1 1 2 3 4 3 4 2 1 = : 1 2 3 4 3 1 4 2 Note Not everyone writes permutation products in the same order, either. Joshua Holden (RHIT) Group Theory of Permutation Ciphers 9 / 13
  • 20. Noncommutativity Note that 1 2 3 4 2 4 3 1 1 2 3 4 3 4 2 1 is not the same as 1 2 3 4 3 4 2 1 1 2 3 4 2 4 3 1 : (I.e., permutation products are not commutative.) If you don’t believe it, try encrypting our plaintext using the keyword POEM first and then the keyword TALE. Joshua Holden (RHIT) Group Theory of Permutation Ciphers 10 / 13
  • 21. Bad keys Some ciphers have bad keys — they don’t decrypt properly. Example 1 2 3 4 looks like a permutation, but... 4 1 1 3 plaintext: garb agei ngar bage outx Joshua Holden (RHIT) Group Theory of Permutation Ciphers 11 / 13
  • 22. Bad keys Some ciphers have bad keys — they don’t decrypt properly. Example 1 2 3 4 looks like a permutation, but... 4 1 1 3 plaintext: garb agei ngar bage outx ciphertext: BGGR IAAE RNNA EBBG XOOT Joshua Holden (RHIT) Group Theory of Permutation Ciphers 11 / 13
  • 23. Bad keys Some ciphers have bad keys — they don’t decrypt properly. Example 1 2 3 4 looks like a permutation, but... 4 1 1 3 plaintext: garb agei ngar bage outx ciphertext: BGGR IAAE RNNA EBBG XOOT plaintext: g?rb a?ei n?ar b?ge o?tx It’s a function but not a permutation — it doesn’t have an inverse. Joshua Holden (RHIT) Group Theory of Permutation Ciphers 11 / 13
  • 24. Group theory Okay, what about the math? So far we’ve actually covered: An example of a group, the permutation (cipher)s on n letters. (Actually, infinitely many groups!) The order of the group (number of keys). The group identity, the trivial permutation (cipher). Inverses in the group, i.e. decryption. The group operation, permutation (cipher) products. Noncommutativity — permutations are not commutative, and neither are permutation ciphers. A set which contains a group, but is not a group, because it is not closed under inverses, i.e. functions. Joshua Holden (RHIT) Group Theory of Permutation Ciphers 12 / 13
  • 25. HNAT SOFK LSIR EINT GZXN NOJET EHYET EMNSG IEOUA Joshua Holden (RHIT) Group Theory of Permutation Ciphers 13 / 13