Module 4: Cyborg

Download Report

Transcript Module 4: Cyborg

Information and Communication
Technologies:
People and Interaction
Module 5: Security
Lecture 4
Prepared by
Ms. Haifa’ Qattan
1. Encryption
Prepared by
Ms. Haifa’ Qattan
1.1. Introduction
 The
requirement for sending
information secretly is as old as
civilization
 Governments & individuals have been
sending msgs that they don’t wish to
b seen
1.2. Keeping Things Secret
 Imagine
u wana send some written
info (msg)
 1 way: Hiding the msg, so no 1 aware
of its existence
 Such as
 Using
invisible ink
 Hiding individual words or letters
1.2. Keeping Things Secret
(Continued)
 e.g.
“My earnest endeavours to appease
the miserable infant did not
immediately gain her trust”, this msg
loox innocent enough, but extract all
the first letters of each word and
string them together
 Throughout history, human has
devised many effective ideas of hiding
msgs
1.2. Keeping Things Secret
(Continued)
 Simple
methods (msg on shaved
head)
 Technical methods (shrinking msg to
size of a dot)
 Steganography: Greek word (stegos=
covered, graphos= writing)
 It’s the whole science of concealing
the existence of a msg
1.2. Keeping Things Secret
(Continued)
 Once
a hidden msg is discovered, no
mechanism 4 preventing it from being
read
 A more secure method, to obfuscate
its meaning instead (Cryptography)
1.3. Codes & Ciphers
 A Code:
is the replacement of
symbols, or group of symbols, or
groups of symbols, with alternative
symbols, or group of symbols
 To decode the coded msg, it’s
necessary to have some sort of what
we call a dictionary
 Dictionary: provides a list of
replacements 4 all possible symbols,
such a list is called codebook
1.3. Codes & Ciphers
(Continued)
 The
use of a code doesn’t always
imply a requirement 4 secrecy
 Often it’s done cz the transmission
medium used cannot convey the msg
in its original form
 Or cz a code might enable the info 2 b
transmitted more efficiently
 Activity 2.1.
give some exp where codes r used
4 reasons other than secrecy
1.3. Codes & Ciphers
(Continued)
 A Cipher:
is a code in which the
original symbols or groups of symbols
r replaced by alternatives
 In this case, the intention is to
obscure the original msg
 So the list of substitutions is created
by some procedure that has a secret
element
1.4. A Simple Cipher
 Exp:
The Wheel: is made up of 2 discs,
1 smaller than the other.. etc
 Any letter on the outer wheel can b
aligned w any letter on the inner
wheel
 To encode a msg, the sender &
recipient first agree on the relative
displacement of the disks
Figure 1. (Cipher Wheel)
1.4. A Simple Cipher
(Continued)
 Exp:
displacement of 7
 The recipient reverses the action to
decode the msg
 Caeser Cipher: a code that uses any
straightforward alphabetic shift
 An Algorithm: is an encryption method
that can b carried out systematically
by following some sort of procedure
1.4. A Simple Cipher
(Continued)
 A Key:
is the algorithm that include a
variable that can b altered to produce
a different outcome
 For the simple cipher wheel: the
algorithm is the direction of rotation of
the disks & the key is the number of
shifts
1.5. Mathematical Concepts
 Breaking
the Cipher (Cracking): In
general, ciphers easy to use r also
easy to decrypt, even by someone
who has no knowledge of the
algorithm used or of the key
 Since the main purpose of
cryptography is to keep things secret,
some extremely complex ciphers
have been developed to minimize the
possibility of them being broken
1.5. Mathematical Concepts
(Continued)
 However,
the result of this that these
ciphers become very difficult and
time-consuming to carry out by hand,
and they also become more prone to
human error during the encryption
and decryption processes
 Warfare inevitably increases the need
for secret comm
1.5. Mathematical Concepts
(Continued)
during the 2nd war various cipher
machines were employed to provide
ways of rapidly encrypting &
decrypting msgs using ciphers that
would have been time-consuming to
carry out accurately by hand
 Not only did these machines provide
a much quicker method of producing
encrypted msgs, they also reduced
the risk of error
&
1.5. Mathematical Concepts
(Continued)
 When,
at the end of the war, the
electronic computer began to emerge
as a practical machine, it provided
both cryptographers and
cryptanalysts (those who break
codes) with the tools to work with
increasingly more convoluted
algorithms
1.5. Mathematical Concepts
(Continued)
 Before
mathematical machines can
perform the computational tasks of
encryption & decryption, they need to
have a logical and unambiguous
mathematical description of the
encryption algorithm
 Modular arithmetic is a particular
branch of mathematics that u will
need to b familiar with in order to
follow the encryption techniques used
1.5. Mathematical Concepts
(Continued)
 “Using
the windows calculator” in
Book E Part 2
1.6. The language of Numbers
 Natural
numbers (Counting numbers):
r the whole positive numbers > 0
 Mathematically
1,2,3, … , n
 Where the three dots (…) mean a
continuing sequence up to n
 For the natural numbers n has no
upper limit
1.6. The language of Numbers
(Continued)
n
is a symbol commonly used in
mathematics to indicate any arbitrary
value
 When we define numbers in this way
it is useful to refer to them as a set of
numbers
 Natural numbers r the set of whole
numbers > 0
1.6. The language of Numbers
(Continued)
 Integers
r the set of negative and
positive whole numbers including zero
 Mathematically we write
-n, … , -3, -2, -1, 0, 1, 2, 3, … , n
 Where n has no upper limit and –n
has no lower limit
1.6. The language of Numbers
(Continued)
 So
natural numbers r a subset of
integers (where a subset is a set
contained within a larger set)
 That is, every natural number is also
an integer
 But, every integer is not always a
natural number
1.6. The language of Numbers
(Continued)
 When
one number divides exactly into
another number leaving no remainder
it is said to be a factor of that number
 Mathematically we can express this
as
a | b (a is a factor of b)
 A natural number may have several
factors
 Exp:
12 has factors 1, 2, 3, 4, 6 and 12
1.6. The language of Numbers
(Continued)
 Activity
5
what r the factors of the following
(9, 15, 17, 32)?
 While working on the Act5
 One
of the factors was always 1
 Every natural number is a factor of itself
 Every natural number has at least 2
factors (1 and itself)
1.6. The language of Numbers
(Continued)
 The
number 1 is a unique in that it has
only the single factor of 1
 A number that has exactly two factors is
known as a prime number (we call it
prime)
 All other numbers r called Compound
Numbers
 Note that 1 is not a prime number since
it has only one factor
1.6. The language of Numbers
(Continued)
 Act
6
what r the first ten prime numbers?
 Sol’n
2, 3, 5, 7, 11, 13, 17, 19, 23, 29
 A prime can be either small or huge
number
 25 primes between 1 and 100
 Only 168 between 101 and 1000
 Only 135 between 1001 and 2000
1.7. Factorization
 Any
number except 1 can b
expressed as a product of two or
more of its factors
 For primes, there will only ever b two
factors
 Exp:
8 can b expressed as
1*8
Or 2 * 4
Or 2 * 2 * 2
1.7. Factorization (Continued)
 Exp
12 can b expressed as:
1 * 12
2*6
2*2*3
 Act 7
express each of the following natural
numbers as the product of 2 or more
of it’s factors (9, 10, 16)
1.7. Factorization (Continued)
9
can b expressed as
1*9
or 3 * 3
 10 can b expressed as
1 * 10
or 2 * 5
 16 can b expressed as.. etc
1.7. Factorization (Continued)
 One
of the answers in Act 7, all the
factors r primes
 Exp: for 9
it is 3 * 3
 Every compound number can b
expressed as a product of prime
factors (Prime Factorization)
1.7. Factorization (Continued)
 So,
there is only one, unique
combination of primes that will
multiply together to give a particular
compound number
 Exp
18 = 2 * 3 * 3
24 = 2 * 2 * 2 * 3
40 = 2 * 2 * 2 * 5
85 = 5 * 17
1.7. Factorization (Continued)
 Act
8
give the prime factor of 8 and 12
 Act 9
which of the following factors r
prime factors
 When we deal with larger numbers, it
becomes more difficult to find out the
prime factors
1.7. Factorization (Continued)
 Imagine
we need to find out the prime
factors of 360
 The method
 Try the same method with 875
 Act 10
find the prime factors of (144, 420,
768, 1215)
 Find our prime numbers of 143
 Sol’n
(11 * 13)
1.8. Highest Common Factors
 The
highest common factors (HCF) of
two or more numbers is the largest
number which will divide into each of
them exactly (without leaving any
remainder)
 The method (find the prime factors
that r common)
1.8. Highest Common Factors
(continued)
 Exp
find the HCF of 48 and 252
48 = 2 * 2 * 2 * 2 * 3
252 = 2 * 2 * 3 * 3 * 8
The common factors r 2 * 2 * 3 = 12
So HCF is 12
1.8. Highest Common Factors
(continued)
 Exp:
find the HCF of 60, 84, 150
 Act 11
what is the HCF of
a. 68 and 128
b. 27 and 90
c. 46 and 72
1.9. Power & Indices
 The
prime factors of
768 = 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 3
 So the prime factors of 768 r eight 2s
and one 3, so to do not make it more
complex with larger numbers, we can
say 28 or 2^8 (2 to the power 8)
 The way of writing a number which is
repeatedly multiplied by itself is called
index notation
1.9. Power & Indices
(Continued)
 the
number 2 at the bottom is called
base
 the number at the top is called the
power or index
 So now I can write the prime factors
of 768 as 28 * 3
 Act 12 (express the prime factors of
the following numbers in index
notation (144, 420, 1215)
1.9. Power & Indices
(Continued)
 Act
13
consider the sequence of numbers
(e.g. 8, 16, 32, 64 …etc) can u say
what’s happening from one number in
the sequence to the next?
1.10. Rules of Indices
 Rule1: A0
=1
 Rule2: A1 = A
 Rule3: Ax * Ay = Ax+y
where x and y can represent any
number
Exp:
104 * 103 =
(10 * 10 * 10 * 10) * (10 * 10 * 10) =
10 * 10 * 10 * 10 * 10 * 10 * 10 = 107
1.10. Rules of Indices
(Continued)
 Rule
4: Ax / Ay = Ax-y
 Exp
 104
/ 103
= (10 * 10 * 10 * 10) / (10 * 10 * 10)
=101
=10
Rule 5: (Ax)y = Ax*y
1.10. Rules of Indices
(Continued)
 Exp
(104)3 = (10 * 10 * 10 * 10) * (10 * 10 *
10 * 10) * (10 * 10 * 10 * 10)
= 10 * 10 * 10 * 10 * 10 * 10 * 10 * 10 *
10 * 10 * 10 * 10= 1012
 Act 16 (use the 5 rules to write the
following
 73
* 74
 4 8 / 46
1.10. Rules of Indices
(Continued)
 (32)3
 54
* 56 / 52
 68 - 6 2