Professional Documents
Culture Documents
Cryptography
UOB
Bill Figg 1
What is a network?
A network consists of two or more
devices that are linked in order to share
resources or allow communications.
2
Computer Networks
Send in
homework
Download
music
facebook
INTERNET
chat
3
Phone Networks
business
Text
call
messaging
call
friend
call
mum Transmitter
tower
Transmitter
tower
Text
messaging
call
friend
call
Text business
daughter
messaging call 4
Satellite
Networks
Dish network
6
Why do we need network
security
bad guy
INTERNET listens to the
communication
data
i ti ve
sens
email
Name: ALICE JACK
Address: 1 BALL STR
Phone Number: 888-9191
DOB: 01/21/1993
SSN: 999-111-2323
Credit Card No:. 9988 5321
School Nurse
Medical Records, Test scores
7
Why do we need
network security?
9
Introduction
• computers require confidentiality,
integrity, and availability. The
implementation of these requirements,
however, is different and more
challenging. During the last two
decades, computer networks created a
revolution in the use of information.
10
• Information is now distributed. Authorized
people can send and retrieve information
from a distance using computer networks.
Although the three above-mentioned
requirements
confidentiality, integrity, and availability have
not changed,
•
11
• they now have some new dimensions.
Not only should information be
confidential when it is stored in a
computer; there should also be a way to
maintain its confidentiality when it is
transmitted from one computer to
another
12
SECURITY GOALS
• Let us first discuss three security goals:
confidentiality, integrity, and availability
13
•Computer data often travels from one
computer to another, leaving the safety of its
protected physical surroundings. Once the data
is out of hand, people with bad intention could
modify or forge your data, either for amusement
or for their own benefit. 14
• Cryptography can reformat and
transform our data, making it safer on
its trip between computers. The
technology is based on the essentials
of secret codes, augmented by
modern mathematics that protects our
data in powerful ways.
15
Computer Security - generic name for the
collection of tools designed to protect data and
to thwart hackers.
Network Security - measures to protect data
during their transmission.
Internet Security - measures to protect data
during their transmission over a collection of
interconnected networks.
16
Security Attacks, Services
and Mechanisms
• To assess the security needs of an
organization effectively, the manager
responsible for security needs some
systematic way of defining the requirements
for security and characterization of
approaches to satisfy those requirements.
One approach is to consider three aspects of
information security: 17
• Security attack – Any action that compromises
the security of information owned by an
organization.
• Security mechanism – A mechanism that is
designed to detect, prevent or recover from a
security attack.
18
What is Cryptography?
19
Encryption
• In a simplest form, encryption is to convert
the data in some unreadable form. This helps
in protecting the privacy while sending the
data from sender to receiver. On the receiver
side, the data can be decrypted and can be
brought back to its original form.
20
Decryption
• Decryption is the process of converting
an encrypted message back to its original
(readable) format.
21
22
23
Types of Cryptography
• Cryptography is further classified into three
different categories:
1. Symmetric Key Cryptography (Private/Secret
Key Cryptography)
2. Asymmetric Key Cryptography (Public Key
Cryptography)
3. Hash Function
24
Types of operations
• Type of operations used for transforming plain
text to cipher text
• All the encryption algorithms are based on two
general principles: substitution, in which each
element in the plaintext is mapped into
another element, and transposition, in which
elements in the plaintext are rearranged.
25
The number of keys used
• If the sender and receiver uses same key then
it is said to be symmetric key (or) single key
(or) conventional encryption.
• If the sender and receiver use different keys
then it is said to be public key encryption.
• The way in which the plain text is processed
• A block cipher processes the input and block of
elements at a time, producing output block for
each input block. 26
28
History of Cryptography
29
30
Classical ciphers
1. Caesar Cipher
2. Monoalphabetic Ciphers
3. Playfair Cipher
4. Hill Cipher
5. Polyalphabetic Ciphers
6. One-Time Pad 31
Cryptography
Cryptography
– The process of converting a message into a
secret code called CIPHER TEXT, and changing
the encoded message back to regular text called
PLAIN TEXT.
(1) Encryption
– The conversion of the original message into a
secret code or CIPHER TEXT using a key.
(2) Decryption
– The conversion of the encoded message or
PLAIN TEXT back to the original message using
the same key.
32
Its All About Keys !!!
My name is
Alice Jack.
Encryption Wi
Wixkwo
xkwosc
sckvsmo
kvsmotkmu
tkmu
cypher text
Plain text key
key
Wi My name is
Wixkwo
xkwosc
sckvsmo
kvsmotkmu
tkmu Decryption Alice Jack.
33
Alphabets
37
Caesar cipher
51
• 4.The encrypted message is now
“KHOOR”.
• To decrypt the message, you simply need
to shift each letter back by the same
number of positions. In this case, you
would shift each letter in “KHOOR” back
by 3 positions to get the original message,
“HELLO”.
52
• E_n(x)=(x+n)mod\ 26
• (Encryption Phase with shift n)
• D_n(x)=(x-n)mod\ 26
• (Decryption Phase with shift n)
53
54
• Examples :
• Text :
ABCDEFGHIJKLMNOPQRSTUVWXYZ
• Shift: 23
• Cipher:
XYZABCDEFGHIJKLMNOPQRSTUVW
55
Example 2
• Text : ATTACKATONCE
• Shift: 4
• Cipher: EXXEGOEXSRGI
56
Advantages:
Easy to implement and use thus, making suitable for
beginners to learn about encryption.
Can be physically implemented, such as with a set of
rotating disks or a set of cards, known as a scytale, which
can be useful in certain situations.
Requires only a small set of pre-shared information.
Can be modified easily to create a more secure variant,
such as by using a multiple shift values or keywords
57
Disadvantages:
It is not secure against modern decryption
methods.
Vulnerable to known-plaintext attacks, where
an attacker has access to both the encrypted
and unencrypted versions of the same
messages.
58
The small number of possible keys means
that an attacker can easily try all possible
keys until the correct one is found, making it
vulnerable to a brute force attack.
It is not suitable for long text encryption as it
would be easy to crack.
It is not suitable for secure communication as
it is easily broken.
Does not provide confidentiality, integrity, and
authenticity in a message. 59
60
Rules for the Caesar Cipher:
61
62
Playfair
• The Playfair cipher was the first practical
digraph substitution cipher. The scheme was
invented in 1854 by Charles
Wheatstone but was named after Lord
Playfair who promoted the use of the cipher.
63
In playfair cipher unlike traditional cipher we
encrypt a pair of alphabets(digraphs) instead of a
single alphabet.
It was used for tactical purposes by British forces
in the Second Boer War and in World War I and
for the same purpose by the Australians during
World War II. This was because Playfair is
reasonably fast to use and requires no special
equipment
64
Encryption Technique
67
68
69
70
71
72
Hill cipher
• Hill cipher is a polygraphic substitution
cipher based on linear algebra.Each letter
is represented by a number modulo 26.
Often the simple scheme A = 0, B = 1, …,
Z = 25 is used, but this is not an essential
feature of the cipher.
73
• To encrypt a message, each block of n letters
(considered as an n-component vector) is
multiplied by an invertible n × n matrix, against
modulus 26. To decrypt the message, each
block is multiplied by the inverse of the matrix
used for encryption.
• The matrix used for encryption is the cipher
key, and it should be chosen randomly from the
set of invertible n × n matrices (modulo 26)
74
Vigenere Cipher
• The vigenere cipher is an algorithm that is
used to encrypting and decrypting the text.
The vigenere cipher is an algorithm of
encrypting an alphabetic text that uses a
series of interwoven caesar ciphers. It is
based on a keyword's letters.
75
• It is an example of a polyalphabetic
substitution cipher.
• This algorithm is easy to understand and
implement.
• This algorithm was first described in 1553 by
Giovan Battista Bellaso. It uses a Vigenere
table or Vigenere square for encryption and
decryption of the text. The vigenere table is
also called the tabula recta.
76
• Example: The plaintext is "JAVATPOINT",
and the key is "BEST".
77
78
• Ciphertext = KENTUTGBOX
79