Teaching Inverse Functions with Cryptography

Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Teaching Inverse Functions with Cryptography
An Interactive Approach
Lisa Harden1
Leandro Junes2
1 St.
Louis CC - Meramec
Kirkwood, MO.
[email protected]
2 University
of South Carolina-Sumter
Sumter, SC.
[email protected]
2011 AMATYC Conference
November 11
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
1
Caesar Cipher
2
Ciphers
3
Ciphers from Bijective Functions
Dictionary
An Example
4
Preview of the software
5
Group Activity
6
References
7
Questions
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Codes in Ancient Roman Battle
If Julius Caesar wished to call his
troops home, he may have sent a
message such as
-Uhwxuq wr Urph.
Can be deciphered if person knows the
key.
Secrecy maintained if a person does
not know the key. Picture taken from [2].
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Codes in Ancient Roman Battle
To obtain the encoded message “Uhwxuq wr Urph" each letter
of the original message was simply replaced with the letter
three places to the right.
- “Caesar Cipher”
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Codes in Ancient Roman Battle
“Uhwxuq wr Urph”
decodes to
“Return to Rome”
Picture taken from [2]
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
How does this relate to functions?
Instead of thinking “Shift each letter 3 places to the right” we
can think of functions with input and output.
− Input: a number that represents a letter.
− Output: the number plus 3.
Input: x.
Output: x + 3
f (x) = x + 3
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Ciphers
A cipher is a method for creating secret messages.
The purpose of using a cipher is to exchange information
securely.
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Dictionary
An Example
Associate each Letter to a Number
a
0
b
1
c
2
d
3
e
4
f
5
g
6
h
7
i
8
j
9
k
10
l
11
m
12
n
13
o
14
p
15
q
16
r
17
s
18
t
19
u
20
v
21
w
22
x
23
y
24
z
25
A
26
B
27
C
28
D
29
E
30
F
31
G
32
H
33
I
34
J
35
K
36
L
37
M
38
N
39
O
40
P
41
Q
42
R
43
S
44
T
45
U
46
V
47
W
48
X
49
Y
50
Z
51
?
52
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Dictionary
An Example
Each Integer Correspond to a Letter
If n is any integer, then the remainder r of n ÷ 53 is a number
in {0, 1, . . . , 52}.
This correspondence is not injective.
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Dictionary
An Example
Each Integer Correspond to a Letter
a
0
53
..
.
K
36
89
..
.
b
1
54
..
.
c
2
55
..
.
d
3
56
..
.
e
4
57
..
.
f
5
58
..
.
g
6
59
..
.
h
7
60
..
.
i
8
61
..
.
j
9
62
..
.
k
10
63
..
.
l
11
64
..
.
m
12
65
..
.
n
13
66
..
.
o
14
67
..
.
p
15
68
..
.
q
16
69
..
.
r
17
70
..
.
t
19
72
..
.
u
20
73
..
.
v
21
74
..
.
w
22
75
..
.
x
23
76
..
.
y
24
77
..
.
z
25
78
..
.
A
26
79
..
.
B
27
80
..
.
C
28
81
..
.
D
29
82
..
.
E
30
83
..
.
F
31
84
..
.
G
32
85
..
.
H
33
86
..
.
I
34
87
..
.
J
35
88
..
.
X
49
102
..
.
Y
50
103
..
.
L
37
90
..
.
M
38
91
..
.
N
39
92
..
.
O
40
93
..
.
P
41
94
..
.
Q
42
95
..
.
R
43
96
..
.
S
44
97
..
.
L. Harden and L. Junes
T
45
98
..
.
U
46
99
..
.
V
47
100
..
.
W
48
101
..
.
Z
51
104
..
.
s
18
71
..
.
?
52
105
..
.
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Dictionary
An Example
Each Integer Modulo 53 Corresponds to a Letter
a
0
b
1
c
2
d
3
e
4
f
5
g
6
h
7
i
8
j
9
k
10
l
11
m
12
n
13
o
14
p
15
q
16
r
17
s
18
t
19
u
20
v
21
w
22
x
23
y
24
z
25
A
26
B
27
C
28
D
29
E
30
F
31
G
32
H
33
I
34
J
35
K
36
L
37
M
38
N
39
O
40
P
41
Q
42
R
43
S
44
T
45
U
46
V
47
W
48
X
49
Y
50
Z
51
?
52
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Dictionary
An Example
All non-zero Integers Modulo 53 have Multiplicative Inverses
Examples
1
= 17.
25
1
Since 4 × 40 = 160 and 160 ÷ 53 leaves remainder 1, = 40.
4
Since 25 × 17 = 425 and 425 ÷ 53 leaves remainder 1,
Theorem
If p is a prime number, then every non-zero integer module p has a
multiplicative inverse.a
a For
a proof see [1, Fraleigh]
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Dictionary
An Example
All Integers Modulo 53 have “Exact” Cubic Roots
Definition
We say that
√
3
x = y , if y 3 = x.
Examples
Since 13 = 1,
√
3
1 = 1.
Since 183 = 5832 and 5832 ÷ 53 leaves remainder 2,
√
3
2 = 18.
Theorem
If p is a prime number of the form 3k + 2, then every integer
√
module p has a unique cubic root. That is, 3 x is a unique integer
module p.
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Dictionary
An Example
An Example
In 47 BC, Julius Caesar conquered Pharnaces II of Pontus in the
city of Zela in present day Turkey. He claimed to have done so in 4
hours. Caesar decides to send an encrypted message back to the
Senate in Rome.
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Dictionary
An Example
An Example
Before Caesar leaves, they decide to use the linear function
f (x) = 3x + 1 to encrypt/decrypt all comunications.
Caesar
Senate
f (x) = 3x + 1
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Dictionary
An Example
An Example
Caesar is now gone.
Caesar
Senate
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Dictionary
An Example
An Example
Caesar wants to send the Senate a message.
Caesar
Senate
Veni, vidi, vici
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Dictionary
An Example
An Example
f (x) = 3 x + 1
Text
x
V
47
e
4
n
13
i
8
v
21
L. Harden and L. Junes
Veni, vidi, vici
i
8
d
3
i
8
v
21
i
8
c
2
i
8
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Dictionary
An Example
An Example
f (x) = 3 x + 1
Text V e n i
x 47 4 13 8
f (x) = 3 x + 1 142 13 40 25
L. Harden and L. Junes
Veni, vidi, vici
v i d i
21 8 3 8
64 25 10 25
v i c i
21 8 2 8
64 25 7 25
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Dictionary
An Example
An Example
f (x) = 3 x + 1
Text
x
f (x) = 3 x + 1
Modulo 53
V
47
142
36
e
4
13
13
n
13
40
40
i
8
25
25
L. Harden and L. Junes
Veni, vidi, vici
v
21
64
11
i
8
25
25
d
3
10
10
i
8
25
25
v
21
64
11
i
8
25
25
c
2
7
7
i
8
25
25
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Dictionary
An Example
An Example
Text
x
f (x) = 3 x + 1
Modulo 53
Cipher Text
f (x) = 3 x + 1 Veni, vidi, vici
V e n i
v i d i
47 4 13 8 21 8 3 8
142 13 40 25 64 25 10 25
36 13 40 25 11 25 10 25
K n O z
l z k z
L. Harden and L. Junes
v
21
64
11
l
i
8
25
25
z
c
2
7
7
h
i
8
25
25
z
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Dictionary
An Example
An Example
Caesar
Veni, vidi, vici
KnOz, lzkz, lzhz
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Dictionary
An Example
An Example
Caesar
KnOz, lzkz, lzhz
L. Harden and L. Junes
Senate
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Dictionary
An Example
An Example
Caesar
Senate
Enemy
KnOz, lzkz, lzhz
L. Harden and L. Junes
−→
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Dictionary
An Example
An Example
Caesar
Senate
Enemy
KnOz, lzkz, lzhz
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Dictionary
An Example
An Example
Senate
f (x) = 3 x + 1
Cipher Text K n O z
x 36 13 40 25
L. Harden and L. Junes
KnOz, lzkz, lzhz
l z k z
11 25 10 25
l z h z
11 25 7 25
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Dictionary
An Example
An Example
Senate
f −1 (x) =
1
1
x−
3
3
Cipher Text K n O z
x 36 13 40 25
L. Harden and L. Junes
KnOz, lzkz, lzhz
l z k z
11 25 10 25
l z h z
11 25 7 25
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Dictionary
An Example
An Example
1
= 18 modulo 53 because 18 × 3 = 54 that leaves
3
residue 1 when divided by 53. Thus,
We know that
Senate
f −1 (x) = 18 x − 18
Cipher Text K n O z
x 36 13 40 25
L. Harden and L. Junes
KnOz, lzkz, lzhz
l z k z
11 25 10 25
l z h z
11 25 7 25
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Dictionary
An Example
An Example
Senate
f −1 (x) = 18 x − 18
KnOz, lzkz, lzhz
Cipher Text K n O z
l z k z
l z h z
x 36 13 40 25 11 25 10 25 11 25 7 25
f −1 (x) = 18 x − 18 630 216 702 432 180 432 162 432 180 432 108 432
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Dictionary
An Example
An Example
Senate
f −1 (x) = 18 x − 18
Cipher Text
x
−1
f (x) = 18 x − 18
Module 53
K
36
630
47
n
13
216
4
O
40
702
13
L. Harden and L. Junes
KnOz, lzkz, lzhz
z
l z k
25 11 25 10
432 180 432 162
8 21 8 3
z
l z h
25 11 25 7
432 180 432 108
8 21 8 2
z
25
432
8
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Dictionary
An Example
An Example
Senate
f −1 (x) = 18 x − 18
Cipher Text
x
f −1 (x) = 18 x − 18
Module 53
Text
K
36
630
47
V
n
13
216
4
e
O
40
702
13
n
L. Harden and L. Junes
KnOz, lzkz, lzhz
z
l z k
25 11 25 10
432 180 432 162
8 21 8 3
i
v i d
z
l z h
25 11 25 7
432 180 432 108
8 21 8 2
i
v i c
z
25
432
8
i
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Dictionary
An Example
isn’t this too much for students to do?
Our software simplifies the process by handling all minor detail
computations (software computes everything modulo 53).
Students only need to know how to compute the inverse of a
function. They do NOT need to know arithmetic modulo 53.
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Dictionary
An Example
isn’t this too much for students to do?
Our software simplifies the process by handling all minor detail
computations (software computes everything modulo 53).
Students only need to know how to compute the inverse of a
function. They do NOT need to know arithmetic modulo 53.
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Preview of the software
Function Name
Linear Function
Rational Function
Cubic Function
Cubic Root Function
Algebraic Form
a
c
f (x) = x +
b
d
f (x) =
ax +b
53c x + d
a 3 c
x +
b
d
r
a
c
f (x) = 3 x +
b
d
f (x) =
Restrictions
a, b and d cannot
be multiples of 53.
a and d cannot be
multiples of 53.
a, b and d cannot
be multiples of 53.
a, b and d cannot
be multiples of 53.
All numbers a, b, c and d must be integers in the interval [−2147483648, 2147483647]
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Preview of the software
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Preview of the software
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Preview of the software
The function f is given by f (x) = 3 x + 1 =
L. Harden and L. Junes
3
1
x+
1
1
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Preview of the software
User needs to know the inverse function at this point. In our case
1
1
f −1 (x) = x −
3
3
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Preview of the software
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Let’s Decrypt Some Messages!
1
In groups, find all four inverse functions.
2
After all inverse functions have been found, send a pair from
your group to the computer to enter one message and its
inverse function.
3
When you receive your decrypted message, copy it on your
paper, copy it on the board for the class to see, and return to
your group.
4
As each pair returns, send out a new pair to decrypt and
record.
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Class Results: Excerpt # 1
What is the name of this poem?
Who is author?
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Class Results: Excerpt # 1
What is the name of this poem?
The Raven.
Who is author?
Edgar Allan Poe.
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Class Results: Excerpt # 2
What is the title of this story?
Who is author?
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Class Results: Excerpt # 2
What is the title of this story?
The Masque of the Red Death.
Who is author?
Edgar Allan Poe.
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Class Results: Excerpt # 3
What is the name of this poem?
Who is author?
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Class Results: Excerpt # 3
What is the name of this poem?
Annabele Lee.
Who is author?
Edgar Allan Poe.
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Class Results: Excerpt # 4
What is the name of this story?
Who is author?
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Class Results: Excerpt # 4
What is the name of this story?
The Gold Bug.
Who is author?
Edgar Allan Poe.
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Poe’s Challenge
See [4].
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Poe’s Challenge
He correctly solve all submissions from December 1839 to May
1840.
- Approximately 34 submissions. See [3].
The Gold Bug.
-Read Poe’s famous story
- Free copy from The Oxford Text Archive at
http://ota.ahds.ac.uk/
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
References
[1]J.B. Fraleigh, A First Course in Abstract Algebra, 7th ed.,
Addison Wesley, NY, USA, 2002, page 181.
[2]http://questgarden.com/62/15/1/080310122438/process.htm, July 2011.
[3]http://oerrecommender.org/visits/13032, July 2011.
[4]C.S. Brigham, Edgar Allan Poe’s Contributions to
Alexander’s Weekly Messenger, American Antiquarian Society,
1943.
L. Harden and L. Junes
Caesar Cipher
Ciphers
Ciphers from Bijective Functions
Preview of the software
Group Activity
References
Questions
Questions?
Any suggestions or comments, please let us know.
Thank you!
[email protected]
[email protected]
L. Harden and L. Junes