Upload
aim-nd
View
216
Download
0
Embed Size (px)
Citation preview
7/31/2019 T209B_S4 lecture
1/57
Information and Communication Technologies
Arab Open University - AOU
T209Information and Communication
Technologies: People and Interactions
Fourth Session
1 Prepared by: Eng. Ali H. ElayweRevised by: Dr. Hassan SALTI
7/31/2019 T209B_S4 lecture
2/57
Information and Communication Technologies
Reference Material
This session is based on the following references: Module 5: Security, Book S: Security
Module 5: Security, Book N: Numeracy Skills
Module 5: Security, Book E: Experiments Module 5: Security, (Text Book) Monograph: Security
Techniques in Digital Systems
More references: http://www.cacr.math.uwaterloo.ca/hac/
http://en.wikipedia.org/wiki/Cryptography
2
http://www.cacr.math.uwaterloo.ca/hac/http://en.wikipedia.org/wiki/Cryptographyhttp://en.wikipedia.org/wiki/Cryptographyhttp://www.cacr.math.uwaterloo.ca/hac/7/31/2019 T209B_S4 lecture
3/57
Information and Communication Technologies
Topics to be covered (1/2)
Part 2 (Encryption) of Book S 1. (S.2.3.1) Encryption using modular arithmetic
Part 3 (Modular arithmetic) of Book N 2. (N.3.1) Introduction
3. (N.3.2) Modular addition
(N.3.2.1) Performing addition in modular arithmetic
(N.3.2.2) The properties of modular addition (N.3.2.3) Summary of section 3.2
3
7/31/2019 T209B_S4 lecture
4/57
Information and Communication Technologies
Chapter 2 (Encryption) of Book M(Monograph) 4. (M.2.1) Mathematics
(M.2.1.1) The Caesar code
(M.2.1.2) A numerical version
(M.2.1.3) A mathematicians view
(M.2.1.4) Using a key
(M.2.1.5) Decrypting the Caesar code
(M.2.1.6) The properties of a Group
4
Topics to be covered (2/2)
7/31/2019 T209B_S4 lecture
5/57
Information and Communication Technologies
You should read the following from Books N, E and theMonograph:
1. Book N: Numeracy:
Work through all ofSection 3.1 Introduction and Section 3.2Modular addition in Book N
2. Book E: Experiments:
In Book E work through Part 3 up to the end of Section 3.4.These sections introduce you to some software tools that will
assist your study ofmodular arithmetic. One of these tools (theModular Powers Checker) wont actually be used until later, soskim through it
Topic 1: (S.2.3.1) Encryption usingmodular arithmetic (1/2)
5
7/31/2019 T209B_S4 lecture
6/57
Information and Communication Technologies
3. Monograph:
Read from the start ofChapter 2 Encryption, to the end ofSection 2.1 Mathematics. In this reading Monk introduces thepotential ofmodular arithmetic for deriving an algorithm for asimple encryption scheme
6
Topic 1: (S.2.3.1) Encryption usingmodular arithmetic (2/2)
7/31/2019 T209B_S4 lecture
7/57
Information and Communication Technologies
Other names for modular arithmetic:
It is also referred to as modulo arithmetic, clock arithmeticorremainder arithmetic. It usually involves concept of full
rotation (circular) as will be clear later on Set:
A set is a collection of objects
Modulus:
The size (that is, the number of, say, integers a set contains) isknown as the modulus
Topic 2: (N.3.1) Introduction to themodular arithmetic (1/2)
7
7/31/2019 T209B_S4 lecture
8/57
Information and Communication Technologies
Modulo n:
Modulus ofn means that the members of the set are the first (n)integers starting from zero {0, 1, 2, 3, , (n-1)}
When we manipulate a set of this kind then we are working inmodulon
Example:
When the set contains the integers 0, 1, 2, 3 and 4, the modulus is5 and we say we are working in modulo 5
In modulus 8, the integers are 0, 1, 2, 3, 4, 5, 6 and 7
The results of operations performed in modular arithmeticdisplay some interesting properties. You will look at operationsusing modular addition,modular multiplicationand modularexponentiation
8
Topic 2: (N.3.1) Introduction to themodular arithmetic (2/2)
7/31/2019 T209B_S4 lecture
9/57
Information and Communication Technologies
Consider a simple addition of two integers: say 5 and 8. Inconventional arithmeticwe could use a number linedemonstrated in Figure 1. We would start at 5, count 8 places
along to the right and read off the result (13)
Topic 3 : (N.3.2) Modular additionSub-Topic 3.1: (N.3.2.1) Performing addition in
modular arithmetic (1/9)
9
Figure 1 Simple addition in conventional arithmetic
7/31/2019 T209B_S4 lecture
10/57
Information and Communication Technologies
Figure 2Addition in modulo 9
10
Imagine we are working in modulo 9. Here the highest numberwe can use is an eight, so the conventional method of using anumber line isnt going to work for this calculation. One way ofdealing with this is to repeat the same limited set of integersalong the number line, as shown in Figure 2, and to use the samemethod of starting at 5 and counting forward 8 places
The result of adding 8 to 5 in modulo 9 arithmetic is 4
Sub-Topic 3.1: (N.3.2.1) Performing addition inmodular arithmetic (2/9)
7/31/2019 T209B_S4 lecture
11/57
Information and Communication Technologies
Circles for modular arithmetic (clock arithmetic):
Since in modular arithmetic the numbers on the numberline are repeated, its easier to just join the ends of the
line together into a circle and count places round thecircle instead
The circles for modulo 4 and modulo 6 are shown inFigure 3.
11
Sub-Topic 3.1: (N.3.2.1) Performing addition inmodular arithmetic (3/9)
7/31/2019 T209B_S4 lecture
12/57
Information and Communication Technologies
Figure 3 Circles for modular arithmetic
12
Sub-Topic 3.1: (N.3.2.1) Performing addition inmodular arithmetic (4/9)
We can use these to work out addition in the same way as weused the number line, but we must always move in a
clockwise direction(I expect now you can see why modular
arithmetic is also referred to asclock arithmetic !!)
7/31/2019 T209B_S4 lecture
13/57
Information and Communication Technologies
Activity 19 (self-assessment) Using the clock faces in Figure 3 calculate the following:
(a) 3 + 9 in modulo 4
0 modulo 4 (b) 5 + 8 in modulo 6
1 modulo 6
(c) 4 + 11 in modulo 6
3 modulo 6
(d) 2 + 6 in modulo 40 modulo 4
13
Sub-Topic 3.1: (N.3.2.1) Performing addition inmodular arithmetic (5/9)
7/31/2019 T209B_S4 lecture
14/57
Information and Communication Technologies
Residue Method (remainder arithmetic): The above could be a tedious method of calculation
especially when you need to go round the circle more than
once!
Another way of performing the same arithmetic is to add the
two integers together in the conventional way, divide the
result by the modulus and express the answer as the remainder,or residueas it is often known
14
Sub-Topic 3.1: (N.3.2.1) Performing addition inmodular arithmetic (6/9)
7/31/2019 T209B_S4 lecture
15/57
Information and Communication Technologies
Example of Residue Method of calculation: Calculate 3 + 5 in modulo 6
Solution: First add the two integers together in the conventional way:
3 + 5 = 8 Then divide the result by 6:
8 6 = 1 remainder 2
Express the answer as the remainder (or residue)
The answer is 2
The conventional way of writing this calculation is: 3 + 5 2 mod 6
Note the use of the symbol which is read as is congruent
to rather than the symbol = which is read as is equal to
15
Sub-Topic 3.1: (N.3.2.1) Performing addition inmodular arithmetic (7/9)
I f i d C i i T h l i
7/31/2019 T209B_S4 lecture
16/57
Information and Communication Technologies
Congruence:
Two integers a and b are said to be congruentmodulo n if
(a mod n) = (b mod n)
If this is the case then the remainder is identical
when both a and b are divided by n. We write
this as:
a b mod n
16
Sub-Topic 3.1: (N.3.2.1) Performing addition inmodular arithmetic (8/9)
I f i d C i i T h l i
7/31/2019 T209B_S4 lecture
17/57
Information and Communication Technologies
Activity 20 (self-assessment)
State which if any of the following pairs are congruentmodulo 7:
(a) 10, 3
10 7 = 1 remainder 3, 3 7 = 0 remainder 3so 10 and 3 are congruent modulo 7
(b) 12, 512 7 = 1 remainder 5, 5 7 = 0 remainder 5
so 12 and 5 are congruent modulo 7
(c) 14, 6
14 7 = 2 remainder 0, 6 7 = 0 remainder 6so 14 and 6 are not congruent modulo 7
(d) 26, 1226 7 = 3 remainder 5, 12 7 = 1 remainder 5
so 26 and 12 are congruent modulo 7
17
Sub-Topic 3.1: (N.3.2.1) Performing addition inmodular arithmetic (9/9)
I f ti d C i ti T h l i
7/31/2019 T209B_S4 lecture
18/57
Information and Communication Technologies
Addition Tables: Figure 4shows a set of addition tables for modulus 4, 5, 6 and 7.
These tables give the result of adding together any two
numbers less than the modulus To use the tables, find the first number in the top horizontal
number line, and the second number in the left vertical number
line. The result of modular addition is in the matrix where the
column and row of the numbers intersect
Sub-Topic 3.2: (N.3.2.2) The properties ofmodular addition (1/16)
18
I f ti d C i ti T h l i
7/31/2019 T209B_S4 lecture
19/57
Information and Communication Technologies
Figure 4Addition tables for modulo 4, 5, 6 and 7
19
Sub-Topic 3.2: (N.3.2.2) The properties ofmodular addition (2/16)
I f ti d C i ti T h l i
7/31/2019 T209B_S4 lecture
20/57
Information and Communication Technologies
Activity 21 (self-Assessment) Using the modular addition tables in Figure 4, find the results
of the following:
(a) 5 + 3 mod 75 + 3 mod 7 1 mod 7
(b) 1 + 3 mod 4
1 + 3 mod 4 0 mod 4
(c) 3 + 2 mod 6
3 + 2 mod 6 5 mod 6
(d) 4 + 4 mod 5
4 + 4 mod 5 3 mod 5
20
Sub-Topic 3.2: (N.3.2.2) The properties ofmodular addition (3/16)
I f ti d C i ti T h l gi
7/31/2019 T209B_S4 lecture
21/57
Information and Communication Technologies
1- Concept of Group (Group Theory): A set and a particular operation are together called a group if they
possess certain properties
One such property is that ofclosure; another is the property of
identity
2- Closure Property: In modular arithmetic the result of any operation involving
members of a group must give a result that is a member of thesame set (the result should not be some number outside the set).
This is known as closure
21
Sub-Topic 3.2: (N.3.2.2) The properties ofmodular addition (4/16)
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
22/57
Information and Communication Technologies
Activity 22 (exploratory) Look again at the tables in Figure 4 to satisfy yourself that
they do indeed demonstrate the property of closure
The members of each set modulo n contain all the integers from 0
to (n 1). You will see from the tables in Figure 4 that combiningany members of the same set by modular arithmetic produces a
result that is itself also a member of the set. The tables therefore
indicate that modular addition has this property ofclosure
22
Sub-Topic 3.2: (N.3.2.2) The properties ofmodular addition (5/16)
Figure 4
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
23/57
Information and Communication Technologies
3- Identity element:
Where there is one element (which we will call e) of a setwhich, when combined mathematically with any other
element (which we shall call a), returns a result ofa,then the element e is known as the identity of the group
This can be expressed generally as:
a ea mod n or e aa mod n
where the symbol denotes any mathematical operation
In the case of is the modular addition, the identityelement will always be e=0
23
Sub-Topic 3.2: (N.3.2.2) The properties ofmodular addition (6/16)
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
24/57
Information and Communication Technologies
4- The additive inverse property: For any element (which we will call a) in the group, there is
another element (which we will call ) in the group which,when combined by addition, returns a result equal to theidentity of the group
This can be expressed mathematically as: a + e or + a e
is the additive inverseof a
24
Sub-Topic 3.2: (N.3.2.2) The properties ofmodular addition (7/16)
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
25/57
Information and Communication Technologies
Activity 23 (exploratory) Look again at the modulo 7 table in Figure 4. Are there any
two members in this set which, when combined underaddition, result in the identity (0) for modular arithmetic?
Yes. In fact, as well as the obvious 0 + 0, there are three pairs ofnumbers that would result in the identity. These are: 1 + 6; 2 +5; and 3 + 4
25
Figure 4
Sub-Topic 3.2: (N.3.2.2) The properties ofmodular addition (8/16)
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
26/57
Information and Communication Technologies
Activity 24 (self-assessment) What pairs of numbers (other than 0 + 0) form additive
inverses with each other:
(a) in modulo 4 arithmetic?
1 and 3; 2 and 2 (b) in modulo 5 arithmetic?
1 and 4; 2 and 3
(c) in modulo 6 arithmetic?
1 and 5; 2 and 4; 3 and 3
(d) in modulo 10 arithmetic?1 and 9; 2 and 8; 3 and 7; 4 and 6; 5 and 5
26
Sub-Topic 3.2: (N.3.2.2) The properties ofmodular addition (9/16)
Note that any two members of a set, which together add up to themodulus, form an additive inverse pair!
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
27/57
Information and Communication Technologies
Finding solutions: In a generalized form we say that find x given a and b such that:
a + x b mod n
where a and b can be any element within the group
Single solution (In modular addition): In fact, any equation of the form a + xb mod n produces a
single solution for x
27
Sub-Topic 3.2: (N.3.2.2) The properties ofmodular addition (10/16)
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
28/57
Information and Communication Technologies
Activity 25 (self-assessment) Using the modular addition tables in Figure 4, find solutions for
x for the following:
(a) 2 + x 4 mod 5
x = 2
(b) 3 + x 5 mod 6
x = 2
(c) 6 + x 4 mod 7
x = 5
(d) 1 + x 3 mod 4 x = 2
28
Sub-Topic 3.2: (N.3.2.2) The properties ofmodular addition (11/16)
Figure 4
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
29/57
Information and Communication Technologies
5- The associative property:
If, when two or moreoperations are carried out in modulararithmetic, the order in which the operations are performed
does not affect the result, this is known as the associativeproperty
This can be expressed generally as:
(a b) c mod n a (b c) mod n where the symbol denotes any mathematical operation
29
Sub-Topic 3.2: (N.3.2.2) The properties ofmodular addition (12/16)
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
30/57
Information and Communication Technologies
Example: Imagine we want to perform the calculation 2 + 3 + 4 in modulo 5: it
doesnt matter in which order I add the elements, the result willalways be the same
First well try (2 + 3) + 4 mod 5: 2 + 3 mod 5 0 mod 5
0 + 4 mod 5 4 mod 5
Next well try 2 + (3 + 4) mod 5:
3 + 4 mod 5 2 mod 5
2 + 2 mod 5 4 mod 5
The result of the calculation is independent of the order inwhich the operations are performed
30
Sub-Topic 3.2: (N.3.2.2) The properties ofmodular addition (13/16)
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
31/57
Information and Communication Technologies
6- The commutative property:
If, when an operation is carried out in modular arithmetic, the
order in which the integers are placed does not affect theresult, this is known as the commutative property
This can be expressed generally as:
(a b) mod n (b a) mod n
where the symbol denotes any mathematical operation
31
Sub-Topic 3.2: (N.3.2.2) The properties ofmodular addition (14/16)
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
32/57
Information and Communication Technologies
Conventional Maths: Addition is commutative but subtraction is not
4 3 3 - 4
Multiplication is commutative, so
43 = 34
but division is not commutative, so
4 3 3 4
32
Sub-Topic 3.2: (N.3.2.2) The properties ofmodular addition (15/16)
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
33/57
Information and Communication Technologies
Note: (Activity 26) When working with a modulus ofn you should discover that
taking a number y and adding it to another number a gives youa result that is y + a mod n. Later you can add , the additive
inverse ofa, and you could predict the result would be y + a + y + 0 y mod n
However, with these three numbers it does not matter in whatorder you perform the addition: you always get the result y.For example, given a+y+ y+a+ mod n, the property of
commutativity allows us to swap a and y without changing theresult, so
a + y + y + a + mod n
which we know gives the result y
33
Sub-Topic 3.2: (N.3.2.2) The properties ofmodular addition (16/16)
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
34/57
Information and Communication Technologies
Definition of congruence:
Two integers a and b are said to be congruentmodulo n if (amod n) = (b mod n). This is written as a b mod n
Working in modular addition:
Any operation carried out on the group results in closure
The group has one element, the identitye, such that a + e a,or e + a a. For modular addition the identity e is 0.
Every element a in the group has an additive inverse such that
a + e mod n = 0 mod n Modular addition is associative: (a + b) + c mod n a + (b + c)
mod n
Modular addition is commutative: a + b mod n b + a mod n
Sub-Topic 3.3: (N.3.2.3) Summary ofSection (N.3.2)
34
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
35/57
Information and Communication Technologies
Encryption methods are thoroughly analyzed by long-established mathematical processes
Mathematicians not only produce results that areuseful for code makers they also have ways of
identifying mathematical problems that are veryhard to do
The task of coding data can then be reformulated tobe a way of processing the data so that a potential
cracker is faced with a mathematical problem that isvery hard to solve
Topic 4: (M.2.1) Mathematics
35
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
36/57
Information and Communication Technologies
In Table 1 the alphabet in the bottom row has been movedup three places; the alphabet in the lower row thereforestarts with the letter D and continues in alphabetical orderuntil the letter Z is written under the letter W
Sub-Topic 4.1: (M.2.1.1) The Caesar code(1/3)
36
Table 1 An encryption table for the Caesar code
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
37/57
o at o a d Co u cat o ec olog es
Table 2 An encryption table for the Caesar code highlighting the
encrypted letters C, A and T
37
Example:To encrypt a message like the sequence of lettersCAT, each letter of the message is found in the upper row andthen the corresponding letter of the lower row is written down.The C in CAT, for instance, corresponds to the letter F in thelower row as highlighted in the copy of the encryption table inTable 2. CAT is hence encrypted as FDW.
Sub-Topic 4.1: (M.2.1.1) The Caesar code(2/3)
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
38/57
g
Table 3 A decryption table for the Caesar code of Table 2. Theletters F, D and W have been picked out (CAT is decrypted from
FDW)
38
Sub-Topic 4.1: (M.2.1.1) The Caesar code(3/3)
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
X Y Z A B C D E F G H I J K L M N O P Q R S T U V W
Example:To decrypt a message, a decryption table should bedrawn (Table 3). Each letter of the encrypted message is found inthe upper row and then the corresponding decrypted letter of thelower row is written down
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
39/57
g
The message CAT would then be coded as thenumerical sequence 2 0 19 simply by substituting thenumbers that correspond to the letters in Table 4. Thisoriginal message in its alphabetic or numeric form is
often called the plaintext Table 5 provides an operation that adds an element of
confusion; it is a version ofTable 2 but with the lettersre-coded as numbers
Table 5 is chosen to generate an unconventional re-coding of the alphabet. It is a re-coding designed toconfuse, and is referred to as encryption (orenciphering)
Sub-Topic 4.2: (M.2.1.2) A numericalversion (1/3)
39
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
40/57
g
Table 4 A possible numerical coding scheme for the alphabet
Table 5 An encryption scheme for numerical codes
40
Sub-Topic 4.2: (M.2.1.2) A numericalversion (2/3)
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2
Encryption example:The plaintext word CAT represented by the
numerical sequence 2 0 19 is encrypted using Table 5 first by taking thenumber 2 in the numerical sequence of the message and noting that a 2 in theupper row corresponds to the number 5 in the lower row of the table and so on.The whole encrypted sequence is 5 3 22
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
41/57
g
Using a decryption table (Table 6) in exactly the sameway as Table 5 was used, the numerical version of theciphertext 5 3 22 translates to the sequence 2 0
19, which is the numerical version of the originalplaintext CAT (using Table 4)
41
Sub-Topic 4.2: (M.2.1.2) A numericalversion (3/3)
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
Table 6 A decryption table for the encryption operation shown
in Table 5
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
42/57
g
Group Theory: It works with a fixed number of things, like the letters in the
alphabet or a limited collection of numbers
A collection of whole numbers, the integers, that we areworking with would be denoted by Z and to indicate that weare dealing with twenty six numbers from 0 to 25 we can usethe suffix 26 and write Z26
A Group, in Group Theory, has a number of distinctiveproperties
One of the properties requires that the results of operationsthat can be performed on a Group always end up being in theGroup. These kinds of operations, it is said, guarantee closure
Sub-Topic 4.3: (M.2.1.3) A mathematiciansview (1/3)
42
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
43/57
The operation described by Table 5, for instance, guaranteesclosure since it can only be applied to integers taken from Z26 andthe results are all in Z26
To satisfy the closure property of a Group, mathematicians adopta special way of performing addition called modulo 26 addition(modulo n in general)
For the Z26 that we are dealing with, numbers are added in theusual way and:
1. If the result is between 0 and 25 then the result stands
2. If the result is 26 or over then 26 is subtracted
3. If the result is still 26 or more then 26 is subtracted again and thisis repeated until the result is in Z26, in other words the result is anumber from 0 to 25
43
Sub-Topic 4.3: (M.2.1.3) A mathematiciansview (2/3)
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
44/57
The Caesar code using Modulo n Maths (instead oftables and graphs etc): The encryption operation in Table 5 can now be summed up in a
formula:
c p + 3 mod 26 where p is a numerically encoded plaintext letter and c is the
corresponding numerically encoded ciphertext
The 3 in the above formula represents the shift of 3associated with Caesar code
The encrypted version of the plaintext word CAT, which isnumerically coded as 2 0 19, is:
2 + 3 5 mod 26, 0 + 3 3 mod 26, 19 + 3 22 mod 26
giving the sequence5 3 22, which can be interpreted usingTable 4 as the cryptogramFDW
44
Sub-Topic 4.3: (M.2.1.3) A mathematiciansview (3/3)
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
45/57
The secrecy in the Caesar code is linked to thealphabet shift i.e. 3and it is generally called a Key
Specifying the encryption operation in terms of
modulo 26 arithmetic makes it unnecessary toconstruct the encryption table
Using modulo 26 arithmetic encryption involvesperforming the calculation implied by the formula:
c p + Kmod 26
Where, in the examples so far, we have replaced Kby3
Sub-Topic 4.4: (M.2.1.4) Using a key(1/3)
45
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
46/57
General value for K: Changing the value that we substitute for K is equivalent to
shifting the alphabet up by different amounts. Thus shifting thealphabet by nineteen places implies setting Kto 19 so
encryption operation becomes: c p + 19 mod 26
The plaintext word CAT is still represented by the sequence2 0 19 but its encrypted version is different. Using the rulesof modulo 26 addition the encrypted result is given by:
2 + 19 21 mod 26, 0 + 19 19 mod 26,
19 + 19 38 38 26 12 mod 26
46
Sub-Topic 4.4: (M.2.1.4) Using a key(2/3)
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
47/57
The outcome is the sequence 211912, which when translatedback into letters using Table 4gives the ciphertext VTM
Clearly the value ofK affects the outcome of the encryptionprocess and provides the key to decryption
Without knowing the value of K, the key, eavesdroppers might findit difficult to work out what the ciphertext said
People interested in obfuscating their messages might use thisversion of the Caesar code but they would need to keep K secretto make it more difficult for others to interpret their ciphertext
47
Sub-Topic 4.4: (M.2.1.4) Using a key(3/3)
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
48/57
Sub-Topic 4.5: (M.2.1.5) Decrypting theCaesar code (1/8)
48
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
49/57
49
Sub-Topic 4.5: (M.2.1.5) Decrypting theCaesar code (2/8)
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
50/57
50
Sub-Topic 4.5: (M.2.1.5) Decrypting theCaesar code (3/8)
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
51/57
Summary: Encrypting by using the Caesar code and shifting the alphabet
up by 3 is equivalent to using the formula:
c p + 3 mod 26
Decryptingmessages that have been encrypted using theCaesar code and shifting the alphabet three places isequivalent to using the formula:
p c + 23mod 26
51
Sub-Topic 4.5: (M.2.1.5) Decrypting theCaesar code (4/8)
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
52/57
Example: The word CAT that was encrypted using a key ofK = 3 produced
the ciphertext5 3 22 and using the decryption key of 23 isdecrypted as:
5 + 23 28 2mod 26, 3 + 23 26 0 mod 26,22 + 23 45 19mod 26
Which gives the result 2 0 19 to spell the original plaintext word CAT
Decryption of the Caesar code, therefore, can be carried out usingthe same operation as encryption but using a different key
The decryption key however must be chosen so that it
complements the encryption key. In the case of the Caesar code,someone who is expected to decrypt the message either needs toknow the decryption key or to know how to perform the decryptionoperation given the encryption key
52
Sub-Topic 4.5: (M.2.1.5) Decrypting theCaesar code (5/8)
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
53/57
53
Sub-Topic 4.5: (M.2.1.5) Decrypting theCaesar code (6/8)
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
54/57
54
Sub-Topic 4.5: (M.2.1.5) Decrypting theCaesar code (7/8)
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
55/57
Symmetric and Asymmetric Cipher:( Important )1- Schemes where the sender and the receiver both work fromtheir knowledge of the encryption key are called symmetric
2- Schemes where the sender knows an encryption key and thereceiver knows the complementary decryption key are said tobe asymmetric
55
Sub-Topic 4.5: (M.2.1.5) Decrypting theCaesar code (8/8)
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
56/57
There are five principal characteristics of a Group:
Firstly, a Group consists of a number ofelements and anoperation that can be performed on those elements ( e.g.,
modulo addition) Secondly, the closure property
Thirdly, the identity property
Fourthly, the existence of the inverse operation
Fifthly, the associative property
End of section 2.1 from the Monograph studymaterial
Sub-Topic 4.6: (M.2.1.6) The properties of aGroup
56
Information and Communication Technologies
7/31/2019 T209B_S4 lecture
57/57
Continue reading about Module 5:
1- Part 2 (Encryption) of Book S
(S.2.3.2) Breaking a code
2- Chapter 2 (Encryption) of Book M (Monograph)
(M.2.2) Working with codes
The due date ofTMA01 is 10 May
Topic 5: Preparation for next session