Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

CompSec 4035 Chapter 3 Lesson 2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

Cipher Techniques

Substitution… Vigenere Cypher


Example
Encrypt the given plaintext letter using Vigenère
Cipher, use keyword deceptive
plaintext:
we are discovered save yourself
plaintext:
we are discovered save your self
Key:
de cep tivedecept ived ecep tive
Ciphertext:
zi cvt wqngrzgvtw avzh cqyg lmgj
Chapter Three - Lesson 2

Cryptography and Encryption Techniques


Cipher Techniques
Transposition Cipher
All the techniques examined so far involve the
substitution of a ciphertext symbol for a plaintext
symbol.
A very different kind of Ciphertext mapping is achieved
by performing or applying some sort of permutation on
the plaintext letters
This technique is referred to as a transposition cipher
Positions held by units of plaintext (which are
commonly characters or groups of characters) are
shifted according to a regular system
Can be single or double transposition
Cipher Techniques
Transposition Cipher
It uses an encryption algorithm to rearrange
the letters of a plaintext message, forming the
ciphertext message.
The letters or words of the plaintext are
reordered in some way, fixed by a given rule
(the key).
The decryption algorithm simply reverses the
encryption transformation to retrieve the
original message
Cipher Techniques
Transposition Cipher
Two kind of Transposition cipher
Simple Transpositional Cipher:
 used to simply reverse the letters of the
message.
 ⇒ Call it Reverse Transposition cipher.
Eg. ”Transpositional” → ”lanoitisopsnart”
Columnar Transposition Cipher
 ⇒ Refered as Scytale transposition
Cipher Techniques
Transposition Cipher
Types of Columnar Transposition
Cipher Techniques:
 Spartans cipher
 Rail fence cipher
 Simple Columnar Transposition
 Route cipher
 Book cipher/running key cipher
/read by your self/
Cipher Techniques
Transposition Cipher - Spartans cipher
Spartans cipher , fifth century B.C.
Start the war today

Encryption: rearrange the text in 3 columns

S t a
r t t
h e w
a r t Rewrite it by reading down
o d a
y Srhaoytterdatwta
Cipher Techniques
Transposition Cipher - Rail Fence
Rail Fence
The simplest of such (Transposition) ciphers 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 GOOD PARTY” with a rail fence of
depth 2 (number of rows, which is the key), we write
the following

The ciphertext is MEMATRHGOPRYETEFETEODAT


Cipher Techniques
Transposition Cipher - Rail Fence
Rail Fence
The Same example with depth of 3

The ciphertext is
MMTHORETEFETEODATEARGPY
To decrypt the cypher
 Arrange by rows and read by columns
Cipher Techniques
Transposition Cipher- Simple Columnar
Simple Columnar Transposition
Write the message in rows of a fixed
length, and then read out again column by
column.
The columns are chosen in some
scrambled order.
Both the length of the rows and the
permutation of the columns are usually
defined by a keyword.
Cipher Techniques
Transposition Cipher - Simple Columnar
How does the Simple Columnar Transposition
works ?
First step is to take the letters of the keyword
and number them in alphabetical order.
The first appearance of the letter A receives
the value 1; the second appearance is
numbered 2. and so on.
E.g. P = ”Computer Security and
Information System” with a key ”section”.
Cipher Techniques
Transposition Cipher - Simple Columnar
How does the Simple Columnar Transposition works ?
 The key is Section
 C takes value 1
 E takes value 2
 I takes value 3
 N takes value 4
 O takes value 5
 S takes value 6
 T takes value 7
Cipher Techniques
Transposition Cipher - Simple Columnar
Computer Security and Information System
S E C T I O N
C O M P U T E
R S E C U R I
T Y A N D I N
F O R M A T I
O N S Y S T E
M
 Finally, the sender enciphers the message by reading down each
column;
 The order in which the columns are read corresponds to the
numbers assigned in the first step.
 Cipher text = MEARSOSYONUUDASEINIETRITTCRTFOM
Cipher Techniques
Transposition Cipher - Simple Columnar
Example: Let the key word be: ZEBRA.
P = WE ARE DISCOVERED FLEEAT ONCE
Z E B R A
W E A R E
Solution D I S C O
V E R E D
F L E E A
T O N C E
The message:
EODAEASRENEIELORCEECWDVFT
Cipher Techniques
Transposition Cipher - Simple Columnar

Key: 4 1 3 6 2 5 Exercise
m e e t m e
a t s q u a
Plaintext: r e g u a r
d e n f o r
g o o d d i
n n e r o k
Ciphertext:

The cipher can be made more secure by performing multiple


rounds of such permutations.
Cipher Techniques
Transposition Cipher - Route Cipher
Route Cipher
The plaintext is first written out in a grid of given
dimensions, then we read it off in a pattern given in the
key.
Example: The key say: read message from top right
corner down and to the left. W D V F T
E I E L O
A S R E N
R C E E C
The message: E O D A E
TONCEADOEFLEEECRVERSADIEW
Cryptanalysis
Cryptanalysis
• comes from the Greek word kryptós, "hidden",
and analýein, "to loosen" or "to untie"

• It is the art of recovering original data (the


plain text) that has been encrypted or turned into
cipher text without having access to the correct
key used in the encryption process

• When new encryption algorithms are


introduced, cryptanalysis determines how hard it is
to break the code (study)
Cipher Techniques

Cryptanalysis
• It is also used to refer to any attempt to avoid the
security of other types of cryptographic
algorithms and protocols in general, and not
just encryption.

• This process is mathematically challenging and


complex as cryptography.

• Cryptanalysis contains various ways to achieve its


goal and uses a number of attack strategies
Cryptanalysis
Typically, the objective of attacking an encryption
system is to recover the key in use rather then
simply to recover the plaintext of a single
ciphertext
General approaches:
Brute-force attack
 Try 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.
Cryptanalysis
Brute force attack: Average time required
Cryptanalysis
Letter frequency analysis attack
 is a cryptanalytic technique that uses the frequency
of letters in a ciphertext to break a cipher
 It is based on the idea that certain letters and letter
combinations appear more often than others in a
given language. For example, in English, the letters
E, T, A, and O are the most common, while Z, Q, and
X are less common
 However, it's not always a viable method for
breaking encryption.
Cryptanalytic attack
 exploits the characteristics of the algorithm
Objective to recover key not just message
Cryptanalysis
Cryptanalytic Attacks can be:

Ciphertext only
The attacker has only the ciphertext
 the goal is to find the corresponding
plaintext

Known plaintext
The attacker has one or more plaintext-
ciphertext pairs formed with the secret key
The goal is to find the key
Cryptanalysis
Cryptanalysis attack can be:
Chosen plaintext
 Plaintext message chosen by cryptanalyst, together
with its corresponding ciphertext generated with the
secret key
 The goal of the attack is to gain information which
reduces the security of the encryption scheme
Chosen ciphertext
 Purported ciphertext chosen by cryptanalyst,
together with its corresponding decrypted plaintext
generated with the secret key
 The goal is to find the secret key (decryption key)
Cryptanalysis
Cryptanalysis attack

A good cryptosystem protects against

all types of attacks.

Attackers use both Mathematics and

Statistics.
Cryptanalysis
Cryptanalysis attack
Intruders/Attackers
 Eavesdropping (listening/spying the message)
An intruder may try to read the message
If it is well encrypted, the intruder will not know the
content
However, just the fact the intruder knows that there is
communication may be a threat (Traffic analysis)
Modification
Modifying a plaintext is easy, but modifying encrypted
messages is more difficult
 Insertion of messages
Inserting new message into a ciphertext is difficult
Cryptanalysis
More Definitions – related concept to Cryptanalysis

Unconditional security (Unconditionally Secure


cryptography)
 if it is impossible for the cryptanalyst to restore

a plaintext regardless of the ciphertext he/she


has
No such algorithm exists
Cryptanalysis
More Definitions – related concept to Cryptanalysis

Computational security (Computationally Secure


Cryptography)
The cost of breaking the cipher exceeds the

value of the encrypted information.


The time required to break the cipher exceeds

the useful lifetime of the information.


Cryptographic systems
… Next Class ⇒ …

You might also like