0% found this document useful (0 votes)
4 views

lec-5

The document provides an overview of encryption and decryption processes, defining encryption as the transformation of original information into an unclear format for transmission, and decryption as the reverse process. It classifies encryption methods into conventional (symmetric) and public-key (asymmetric) encryption, detailing their principles and requirements for secure use. Additionally, it discusses various encryption techniques, including substitution, transposition, and symbol-level encryption, as well as the role of firewalls in network security.

Uploaded by

abdoalsenaweabdo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

lec-5

The document provides an overview of encryption and decryption processes, defining encryption as the transformation of original information into an unclear format for transmission, and decryption as the reverse process. It classifies encryption methods into conventional (symmetric) and public-key (asymmetric) encryption, detailing their principles and requirements for secure use. Additionally, it discusses various encryption techniques, including substitution, transposition, and symbol-level encryption, as well as the role of firewalls in network security.

Uploaded by

abdoalsenaweabdo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Encryption

Dr. Mahmoud Y. Shams


Encryption & Decryption
(Definition)
 Encryption:
It means that the sender transforms the original
information into another form and sends the
resulting message, which is unclear, over the
network.
 Decryption:

It is the reverse of the encryption process, where


the encrypted message is converted back to its
original form.
Encryption & Decryption
(Principles)
Ke
Kd

Encryption Decryption
Sender Network Receiver
Algorithms Algorithms

Plaintext Cipher text Plaintext

The sender uses encryption algorithms and a key to


transform the original message (Plaintext) into an
encrypted message (Cipher text), and the receiver
uses a decryption algorithm and a key to transform
the encrypted text back into the original text.
Encryption & Decryption
(Classification)
 Encryption and decryption processes can be classified
into two types based on the keys used:
 Conventional Encryption
The sender and receiver use the same key, and
this type is called symmetric encryption, single-
key encryption, or secret-key encryption.
 Public-Key Encryption
The sender and receiver each use a different key,
and this type is called asymmetric encryption or
public-key encryption.
Principles of Conventional
Encryption
 Ke = Kd
(Key of Encryption = Key of Decryption)
This is called symmetric encryption.

 Components of Conventional Encryption:


 Plaintext
 Encryption Algorithm
 Secret Key
 Cipher text
 Decryption Algorithm
Principles of Conventional
Encryption
A secret key A secret key
shared between shared between
the sender and the sender and
the recipient the recipient

Encryption Decryption
Sender Network Receiver
Algorithms Algorithms

Plaintext Plaintext
Cipher text
(input) (output)
There are Two Requirements for
The Secure Use of Conventional
Encryption
 A strong encryption algorithm is needed so
that the cost of breaking the cipher exceeds
the value of the information, and breaking
the cipher takes longer than the useful
lifetime of the information.
 The sender and receiver must securely share
the same secret key, and it must remain
confidential.
Classification of Conventional
Encryption Methods
 Character-level Encryption:
 Substitution
 Transposition

 Symbol-level Encryption:
 In this type, data such as text and images is
divided into blocks of symbols, and the symbols
are changed either by:
 Encoding
 Shuffling
 Swapping
 Rotation
Substitution
 In this method, each letter in the message is replaced
by another letter using a simple and easy rule, known
as the Caesar Cipher or Monoalphabetic Cipher.

Caesar

ABCDEFGHIJKLMNOPQRSTUVWXYZ
DEFGHIJKLMNOPQRSTUVWXYZAB C

Kd=Ke = 3
Single-letter Substitution Cipher

Sender Receiver

Ke=3 Kd=3

Encryption Decryption
Algorithms Algorithms

Add Ke Subtract Kd

Plaintext: (input) Cipher text: Sender Plaintext: (output)


DEAR DEAR FRIEND GHDU GHDU IULHQG DEAR DEAR FRIEND
Transposition Encryption
 This method is more secure as the letters
remain the same as in the original text, but
their positions are changed to create the
encrypted text. The text is arranged in a two-
dimensional table, and the columns are
swapped according to the key used.

 It is possible to decrypt using trial and error by


an experienced person.
Transposition Encryption
Encryption 1 2 3 4 5 6 7 8 9 1 1 Decryption
Sender 0 1 Receiver
6 7 3 8 5 1 1 9 2 4 1
0 1

Ke = Kd
Encryption Decryption
Algorithms Algorithms

Switching Switching
Plaintext Plaintext
1 2 3 4 5 6 7 8 9 1 1 1 2 3 4 5 6 7 8 9 1 1
0 1 0 1
Cipher text
A G O O D G O O D A GOOD G O OD
1 2 3 4 5 6 7 8 9 1 1
F R I E N D I S 0 1 F R I END I S

B E T T E R T H A N D G G O A O O O D B E T T E R T H AN
D I I N F S R E A T R EA S U R E
A T R E A S U R E
R T T E B A H E T N
A S T U E A E R R
Symbol-level Encryption
 Encoding:
A number n of symbols are input, and the
decoder changes them into 2n symbols, each
containing the symbol once, with its position
determined by the input.

The encoder then converts them back into n


symbols, restoring them to their original form.
Encoding Process
Input Output Input Output
00  0001 0001  00
01  0010 0010  01
10  0100 0100  10
11  1000 1000  11

Input Input

2x4 Decoder
4x2 Encoder

Output
Output
XOR Process
 It is a good method for symbol-level encryption,
where a XOR process is done to the data with an
encryption key to produce an encrypted set that can
only be decrypted by knowing the key.
Synchronization

Key of Encryption Key of Encryption

0 1 1 0 0 1 0 0 1 1 0 0 1 0

Data Data

1 0 1 1 0 0 1 1 0 1 1 0 0 1
Encryption Decryption
Rotation
 A method of rotating the symbols to the right
or left, where the key is the number of symbols
to be rotated.
Plaintext 01100011 Before

10110001 After 1 Iteration

Cipher text 11011000 After 2 Iterations


Firewalls
 Firewalls:
Firewalls refer to forcing all connection attempts in a
network to pass through an electronic gateway known
Packet
as a firewall. Packet Application Gateway Filtering
Filtering Router
Router

Enterprise
Network Firewall
Internal External
Security
LAN LAN
Firewalls
 A firewall consists:
 Two Routers: They perform filtering and
sorting of data packets.
 Application Gateway

 Every packet must pass through both


routers and the application gateway when
entering or exiting, with no alternative route
available.
Packet Filter
 It is a standard router that is configured to inspect
all incoming and outgoing packets.
 Packets that meet the criteria are allowed to pass,
while those that fail are discarded and do not pass
through.
 Packet filters are managed by the system
administrator using tables that contain lists of
acceptable sources and directions, as well as
sources and directions that are forbidden, along
with rules that govern how to handle incoming or
outgoing packets to other devices.
Application Gateway
 The application gateway operates at the
application layer, where it combines
encryption, packet filtering, and application
testing.

You might also like