Bài giảng môn Cryptography and network security - Chapter 2: Classical encryption techniques - Nguyễn Đức Thái
Cryptography and Network Security
2. Classical Encryption
Techniques
Lectured by
Nguyễn Đức Thái
Outline
. Symmetric Encryption
. Substitution Techniques
. Transposition Techniques
. Steganography
2
Learning Objectives
After studying this chapter, you should be able to:
. Present an overview of the main concepts of symmetric
cryptography.
. Explain the difference between cryptanalysis and brute-
force attack.
. Understand the operation of a monoalphabetic
substitution cipher.
. Understand the operation of a polyalphabetic cipher.
. Present an overview of the Hill cipher.
. Describe the operation of a rotor machine.
3
Classical Encryption Techniques
. There are two requirements for secure use of
conventional encryption:
• We need a strong encryption algorithm.
• Sender and receiver must have obtained copies of the
secret key in a secure fashion and must keep the key
secure. If someone can discover the key and knows
the algorithm, all communication using this key is
readable.
4
Symmetric Cipher Model
5
Symmetric Encryption: Requirements
. Two requirements for secure use of symmetric
encryption:
a strong encryption algorithm
a secret key known only to sender / receiver
. Mathematically have:
Y = E(K, X) = EK(X) = {X}K
X = D(K, Y) = DK(Y)
. Assume encryption algorithm is known
Kerckhoff’s Principle: security in secrecy of key alone, not
in obscurity of the encryption algorithm
. Implies a secure channel to distribute key
Central problem in symmetric cryptography
6
Cryptography
. Cryptographic systems are characterized by:
type of encryption operations used
o
o
o
substitution
transposition
product: involve multiple stages of substitutions and transpositions.
number of keys used
o
single-key or private
two-key or public
o
way in which plaintext is processed
o
block
o
stream
7
Model of Symmetric Cryptosystem
8
Cryptographic Systems
The type of operations
The number of keys
used for transforming
used
The way in which the
plaintext is processed
plaintext to ciphertext
Symmetric, single-
key, secret-key,
Substitution
Block cipher
conventional
encryption
Asymmetric, two-
key, or public-key
encryption
Transposition
Stream cipher
9
Cryptanalysis and Brute-Force Attacks
Cryptanalysis
Brute-force attack
• Attack relies on the nature of the
algorithm plus some knowledge of the
general characteristics of the plaintext
• Attack exploits the characteristics of
the algorithm to attempt to deduce a
specific plaintext or to deduce the key
being used
• Attacker tries every possible key on
a piece of ciphertext until an
intelligible translation into plaintext
is obtained
• On average, half of all possible keys
must be tried to achieve success
10
Cryptanalysis Attacks
11
Cipher Strength
. Unconditionally secure
• no matter how much computer power or time is available,
the cipher cannot be broken since the ciphertext provides
insufficient information to uniquely determine the
corresponding plaintext
. Computationally secure
• given limited computing resources (e.g. time needed for
calculations is greater than age of universe), the cipher
cannot be broken
12
Brute-Force Attacks
Involves trying every possible key until an intelligible
translation of the ciphertext into plaintext is obtained
On average, half of all possible keys must be tried to
achieve success
To supplement the brute-force approach, some
degree of knowledge about the expected plaintext
is needed, and some means of automatically
distinguishing plaintext from garble is also needed
13
Substitution Technique
. Is one in which the letters of plaintext are replaced
by other letters or by numbers or symbols
. If the plaintext is viewed as a sequence of bits, then
substitution involves replacing plaintext bit patterns
with ciphertext bit patterns
14
Transposition Techniques
. All the techniques examined so far involve the
substitution of a ciphertext symbol for a plaintext
symbol.
. A very different kind of mapping is achieved by
performing some sort of permutation on the
plaintext letters.
. This technique is referred to as a transposition
cipher.
15
Transposition Techniques – Rail Fence
. The simplest such cipher is the rail fence technique,
in which the plaintext is written down as a sequence
of diagonals and then read off as a sequence of
rows.
. For example, to encipher the message “meet me
after the toga party” with a rail fence of depth 2, we
write the following:
m e m a t r h t g p r y
e t e f e t e o a a t
. The encrypted message is:
MEMATRHTGPRYETEFETEOAAT
16
Caesar Cipher
. Simplest and earliest known use of a substitution
cipher
. Used by Julius Caesar
. Involves replacing each letter of the alphabet with
the letter standing three places further down the
alphabet
. Alphabet is wrapped around so that the letter
following Z is A
. plain: meet me after the toga party
. cipher: PHHW PH DIWHU WKH WRJD SDUWB
17
Caesar Cipher Algorithm
. Can define transformation as:
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
. Mathematically give each letter a number
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
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
. Algorithm can be expressed as:
c = E(3, p) = (p + 3) mod (26)
• A shift may be of any amount, so that the general
Caesar algorithm is:
C = E(k, p) = (p + k) mod 26
. Where k takes on a value in the range 1 to 25; the
decryption algorithm is simply:
p = D(k, C) = (C - k) mod 26
18
Sample of Compressed Text
19
Monoalphabetic Ciphers
. Permutation
• Of a finite set of elements S is an ordered sequence of all
the elements of S, with each element appearing exactly
once
• If the “cipher” line can be any permutation of the 26
alphabetic characters, then there are 26! possible
keys
• This is 10 orders of magnitude greater than the key space
for DES
• Approach is referred to as a monoalphabetic substitution
cipher because a single cipher alphabet is used per
message
20
Tải về để xem bản đầy đủ
Bạn đang xem 20 trang mẫu của tài liệu "Bài giảng môn Cryptography and network security - Chapter 2: Classical encryption techniques - Nguyễn Đức Thái", để tải tài liệu gốc về máy hãy click vào nút Download ở trên
File đính kèm:
bai_giang_mon_cryptography_and_network_security_chapter_2_cl.pdf

