SlideShare a Scribd company logo
CS8792 - Cryptography and
Network Security
vkp
Unit – I INTRODUCTION
• Security trends - Legal, Ethical and
Professional Aspects of Security, Need for
Security at Multiple levels, Security Policies -
Model of network security – Security attacks,
services and mechanisms – OSI security
architecture – Classical encryption techniques:
substitution techniques, transposition
techniques, steganography- Foundations of
modern cryptography: perfect security –
information theory – product cryptosystem –
Model for Network Security
Some Basic Terminology
• Plaintext - original message
• Ciphertext - coded message
• Cipher - algorithm for transforming plaintext to ciphertext
• Key - information used in cipher known only to
sender/receiver
• Encipher (encrypt) - converting plaintext to ciphertext
• Decipher (decrypt) - recovering ciphertext from plaintext
• Cryptography - study of encryption principles/methods
• Cryptanalysis (codebreaking) - study of principles/ methods
of deciphering ciphertext without knowing key
Data Transmission Steps
PT
PT
CT
CT
Encryption
Transmission
DecryptionX – Plain text
Y – Cipher text
K – Key
Y = Ek (X)
X = Dk (Y)
Cryptography
• Characterize cryptographic system by:
– Type of encryption operations used
• Substitution / Transposition / Product
– Number of keys used
• Single-key or Private / Two-key or Public
– Way in which plaintext is processed
• Block / Stream
Cryptanalysis
• Objective to recover key not just message
• General approaches:
– Cryptanalytic attack
• Knowledge of algorithm and some part of plaintext
– Brute-force attack
• Try every possible key on cipher text to get a meaningful
plain text
3-1 INTRODUCTION
Figure 3.1 shows the general idea behind a symmetric-key
cipher. The original message from Alice to Bob is called
plaintext; the message that is sent through the channel is
called the ciphertext. To create the ciphertext from the
plaintext, Alice uses an encryption algorithm and a shared
secret key. To create the plaintext from ciphertext, Bob
uses a decryption algorithm and the same secret key.
3.1.1 Kerckhoff’s Principle
3.1.2 Cryptanalysis
3.1.3 Categories of Traditional Ciphers
Topics discussed in this section:
Figure 3.1 General idea of symmetric-key cipher
3.1 Continued
3.1 Continued
If P is the plaintext, C is the ciphertext, and K is the key,
We assume that Bob creates P1; we prove that P1 = P:
Figure 3.2 Locking and unlocking with the same key
3.1 Continued
3.1.1 Kerckhoff’s Principle
Based on Kerckhoff’s principle, one should always
assume that the adversary, Eve, knows the
encryption/decryption algorithm. The resistance of the
cipher to attack must be based only on the secrecy of the
key.
3.1.2 Cryptanalysis
As cryptography is the science and art of creating secret
codes, cryptanalysis is the science and art of breaking
those codes.
Figure 3.3 Cryptanalysis attacks
3.1.2 Continued
Figure 3.4 Ciphertext-only attack
Ciphertext-Only Attack
3.1.2 Continued
Figure 3.5 Known-plaintext attack
Known-Plaintext Attack
3.1.2 Continued
Figure 3.6 Chosen-plaintext attack
Chosen-Plaintext Attack
3.1.2 Continued
Figure 3.7 Chosen-ciphertext attack
Chosen-Ciphertext Attack
Classical Encryption
Techniques
1. Substitution Techniques
2. Transposition Techniques
Substitution Techniques
• Caesar cipher
• Monoalphabetic cipher
• Play fair cipher
• Hill cipher
• Polyalphabetic cipher
• One time pad
Classical Substitution Ciphers
• Letters of plaintext are replaced by other
letters or by numbers or symbols
• If plaintext is viewed as a sequence of bits,
then substitution involves replacing plaintext
bit patterns with cipher text bit patterns
3-2 SUBSTITUTION CIPHERS
A substitution cipher replaces one symbol with another.
Substitution ciphers can be categorized as either
monoalphabetic ciphers or polyalphabetic ciphers.
3.2.1 Monoalphabetic Ciphres
3.2.2 Polyalphabetic Ciphers
Topics discussed in this section:
A substitution cipher replaces one
symbol with another.
Note
3.2.1 Monoalphabetic Ciphers
In monoalphabetic substitution, the
relationship between a symbol in the
plaintext to a symbol in the ciphertext is
always one-to-one.
Note
3.2.1 Continued
The following shows a plaintext and its corresponding ciphertext.
The cipher is probably monoalphabetic because both l’s (els) are
encrypted as O’s.
Example 3.1
3.2.1 Continued
The simplest monoalphabetic cipher is the additive cipher. This
cipher is sometimes called a shift cipher and sometimes a Caesar
cipher, but the term additive cipher better reveals its
mathematical nature.
Additive Cipher
Figure 3.8 Plaintext and ciphertext in Z26
Figure 3.9 Additive cipher
3.2.1 Continued
When the cipher is additive, the
plaintext, ciphertext, and key are
integers in Z26.
Note
3.2.1 Continued
Use the additive cipher with key = 15 to encrypt the message
“hello”.
Example 3.3
We apply the encryption algorithm to the plaintext, character by
character:
Solution
3.2.1 Continued
Use the additive cipher with key = 15 to decrypt the message
“WTAAD”.
Example 3.4
We apply the decryption algorithm to the plaintext character by
character:
Solution
3.2.1 Continued
Historically, additive ciphers are called shift ciphers. Julius Caesar
used an additive cipher to communicate with his officers. For this
reason, additive ciphers are sometimes referred to as the Caesar
cipher. Caesar used a key of 3 for his communications.
Shift Cipher and Caesar Cipher
Additive ciphers are sometimes referred
to as shift ciphers or Caesar cipher.
Note
3.2.1 Continued
Eve has intercepted the ciphertext “UVACLYFZLJBYL”. Show
how she can use a brute-force attack to break the cipher.
Example 3.5
Eve tries keys from 1 to 7. With a key of 7, the plaintext is “not
very secure”, which makes sense.
Solution
3.2.1 Continued
Table 3.1 Frequency of characters in English
Table 3.2 Frequency of diagrams and trigrams
3.2.1 Continued
Multiplicative Ciphers
In a multiplicative cipher, the plaintext
and ciphertext are integers in Z26; the
key is an integer in Z26*.
Note
Figure 3.10 Multiplicative cipher
3.2.1 Continued
What is the key domain for any multiplicative cipher?
Example 3.7
The key needs to be in Z26*. This set has only 12 members: 1, 3, 5,
7, 9, 11, 15, 17, 19, 21, 23, 25.
Solution
We use a multiplicative cipher to encrypt the message “hello” with
a key of 7. The ciphertext is “XCZZU”.
Example 3.8
3.2.1 Continued
Affine Ciphers
Figure 3.11 Affine cipher
3.2.1 Continued
The affine cipher uses a pair of keys in which the first key is from
Z26* and the second is from Z26. The size of the key domain is
26 × 12 = 312.
Example 3.09
Use an affine cipher to encrypt the message “hello” with the key
pair (7, 2).
Example 3.10
3.2.1 Continued
Use the affine cipher to decrypt the message “ZEBBW” with the
key pair (7, 2) in modulus 26.
Example 3.11
Solution
The additive cipher is a special case of an affine cipher in which
k1 = 1. The multiplicative cipher is a special case of affine cipher in
which k2 = 0.
Example 3.12
3.2.1 Continued
Because additive, multiplicative, and affine ciphers have small key
domains, they are very vulnerable to brute-force attack.
Monoalphabetic Substitution Cipher
A better solution is to create a mapping between each plaintext
character and the corresponding ciphertext character. Alice and
Bob can agree on a table showing the mapping for each character.
Figure 3.12 An example key for monoalphabetic substitution cipher
3.2.1 Continued
We can use the key in Figure 3.12 to encrypt the message
Example 3.13
The ciphertext is
3.2.2 Polyalphabetic Ciphers
In polyalphabetic substitution, each occurrence of a
character may have a different substitute. The
relationship between a character in the plaintext to a
character in the ciphertext is one-to-many.
Autokey Cipher
3.2.2 Continued
Assume that Alice and Bob agreed to use an autokey cipher with
initial key value k1 = 12. Now Alice wants to send Bob the message
“Attack is today”. Enciphering is done character by character.
Example 3.14
Playfair Cipher
• Not even the large number of keys in a
monoalphabetic cipher provides security
• One approach to improving security was to
encrypt multiple letters
• Playfair Cipher is an example
Playfair Key Matrix
• 5X5 matrix of letters based on a keyword
• Fill in letters of keyword (sans duplicates)
• Fill rest of matrix with other letters
• Eg. using the keyword MONARCHY
Encrypting and Decrypting
Plaintext is encrypted two letters at a time
1. If a pair is a repeated letter, insert filler like 'X’
2. If both letters fall in the same row, replace each with
letter to right (wrapping back to start from end)
3. If both letters fall in the same column, replace each
with the letter below it (again wrapping to top from
bottom)
4. Otherwise each letter is replaced by the letter in the
Playfair Key Matrix
• Eg. Using the keyword MONARCHY
• Encrypt: Ballon -> Ba lx lo nx
• Cipher: IB SU PM AW
M O N A R
C H Y B D
E F G I/J K
L P Q S T
U V W X Z
3.2.2 Continued
Playfair Cipher
Figure 3.13 An example of a secret key in the Playfair cipher
Let us encrypt the plaintext “hello” using the key in Figure 3.13.
Example 3.15
Security of Playfair Cipher
• Much improved over monoalphabetic
• Since have 26 x 26 = 676 digrams
• Would need a 676 entry frequency table to analyse
(verses 26 for a monoalphabetic)
• Correspondingly more ciphertext
• Was widely used for many years
– eg. by US & British military in WW1
• It can be broken, given a few hundred letters
Vigenère Cipher
• Simplest polyalphabetic substitution cipher
• Effectively multiple caesar ciphers
• Key is multiple letters long K = k1 k2 ... kd
• ith letter specifies ith alphabet to use
• Use each alphabet in turn
• Repeat from start after d letters in message
• Decryption simply works in reverse
3.2.2 Continued
Vigenere Cipher
We can encrypt the message “She is listening” using the 6-
character keyword “PASCAL”.
Example 3.16
3.2.2 Continued
Using Example 3.18, we can say that the additive cipher is a
special case of Vigenere cipher in which m = 1.
Example 3.18
Table 3.3
A Vigenere Tableau
3.2.2 Continued
Hill Cipher
Figure 3.15 Key in the Hill cipher
The key matrix in the Hill cipher needs to
have a multiplicative inverse.
Note
3.2.2 Continued
One of the goals of cryptography is perfect secrecy. A
study by Shannon has shown that perfect secrecy can be
achieved if each plaintext symbol is encrypted with a key
randomly chosen from a key domain. This idea is used in
a cipher called one-time pad, invented by Vernam.
One-Time Pad
3.2.2 Continued
Rotor Cipher
Figure 3.19 A rotor cipher
3.2.2 Continued
Enigma Machine
Figure 3.20 A schematic of the Enigma machine
3-3 TRANSPOSITION CIPHERS
A transposition cipher does not substitute one symbol for
another, instead it changes the location of the symbols.
3.3.1 Keyless Transposition Ciphers
3.3.2 Keyed Transposition Ciphers
3.3.3 Combining Two Approaches
Topics discussed in this section:
A transposition cipher reorders symbols.
Note
3.3.1 Keyless Transposition Ciphers
Simple transposition ciphers, which were used in the
past, are keyless.
A good example of a keyless cipher using the first method is the
rail fence cipher. The ciphertext is created reading the pattern row
by row. For example, to send the message “Meet me at the park”
to Bob, Alice writes
Example 3.22
She then creates the ciphertext “MEMATEAKETETHPR”.
3.3.1 Continued
Alice and Bob can agree on the number of columns and use the
second method. Alice writes the same plaintext, row by row, in a
table of four columns.
Example 3.23
She then creates the ciphertext “MMTAEEHREAEKTTP”.
3.3.1 Continued
The cipher in Example 3.23 is actually a transposition cipher. The
following shows the permutation of each character in the plaintext
into the ciphertext based on the positions.
Example 3.24
The second character in the plaintext has moved to the fifth
position in the ciphertext; the third character has moved to the
ninth position; and so on. Although the characters are permuted,
there is a pattern in the permutation: (01, 05, 09, 13), (02, 06, 10,
13), (03, 07, 11, 15), and (08, 12). In each section, the difference
between the two adjacent numbers is 4.
3.3.2 Keyed Transposition Ciphers
The keyless ciphers permute the characters by using
writing plaintext in one way and reading it in another
way The permutation is done on the whole plaintext to
create the whole ciphertext. Another method is to divide
the plaintext into groups of predetermined size, called
blocks, and then use a key to permute the characters in
each block separately.
3.3.2 Continued
Alice needs to send the message “Enemy attacks tonight” to Bob..
Example 3.25
The key used for encryption and decryption is a permutation key,
which shows how the character are permuted.
The permutation yields
3.3.3 Combining Two Approaches
Example 3.26
Figure 3.21
Figure 3.22 Encryption/decryption keys in transpositional ciphers
3.3.3 Continued
Keys
In Example 3.27, a single key was used in two directions for the
column exchange: downward for encryption, upward for
decryption. It is customary to create two keys.
Figure 3.23 Key inversion in a transposition cipher
3.3.3 Continued
3.3.3 Continued
Using Matrices
We can use matrices to show the encryption/decryption process for
a transposition cipher.
Figure 3.24 Representation of the key as a matrix in the transposition cipher
Example 3.27
Figure 3.24 Representation of the key as a matrix in the transposition cipher
3.3.3 Continued
Figure 3.24 shows the encryption process. Multiplying the 4 × 5
plaintext matrix by the 5 × 5 encryption key gives the 4 × 5
ciphertext matrix.
Example 3.27
3.3.3 Continued
Double Transposition Ciphers
Figure 3.25 Double transposition cipher
CS8792 - Cryptography and Network Security

More Related Content

What's hot

One Time Pad Encryption Technique
One Time Pad Encryption TechniqueOne Time Pad Encryption Technique
One Time Pad Encryption Technique
John Adams
 
DES (Data Encryption Standard) pressentation
DES (Data Encryption Standard) pressentationDES (Data Encryption Standard) pressentation
DES (Data Encryption Standard) pressentation
sarhadisoftengg
 
Flow control and error control
Flow control and error controlFlow control and error control
Flow control and error control
BHUVIJAYAVELU
 
Cs8792 cns - unit v
Cs8792   cns - unit vCs8792   cns - unit v
Cs8792 cns - unit v
ArthyR3
 
Message digest 5
Message digest 5Message digest 5
Message digest 5
Tirthika Bandi
 
Data Encryption Standard (DES)
Data Encryption Standard (DES)Data Encryption Standard (DES)
Data Encryption Standard (DES)
Haris Ahmed
 
Transport Layer Services : Multiplexing And Demultiplexing
Transport Layer Services : Multiplexing And DemultiplexingTransport Layer Services : Multiplexing And Demultiplexing
Transport Layer Services : Multiplexing And Demultiplexing
Keyur Vadodariya
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniques
Dr.Florence Dayana
 
Block Ciphers Modes of Operation
Block Ciphers Modes of OperationBlock Ciphers Modes of Operation
Block Ciphers Modes of Operation
Roman Oliynykov
 
Public Key Cryptography
Public Key CryptographyPublic Key Cryptography
Public Key Cryptography
Gopal Sakarkar
 
Key management and distribution
Key management and distributionKey management and distribution
Key management and distribution
Riya Choudhary
 
Secure Socket Layer
Secure Socket LayerSecure Socket Layer
Secure Socket Layer
Naveen Kumar
 
block ciphers
block ciphersblock ciphers
block ciphers
Asad Ali
 
5. message authentication and hash function
5. message authentication and hash function5. message authentication and hash function
5. message authentication and hash function
Chirag Patel
 
Block Cipher and its Design Principles
Block Cipher and its Design PrinciplesBlock Cipher and its Design Principles
Block Cipher and its Design Principles
SHUBHA CHATURVEDI
 
CS8792 - Cryptography and Network Security
CS8792 - Cryptography and Network SecurityCS8792 - Cryptography and Network Security
CS8792 - Cryptography and Network Security
vishnukp34
 
SHA- Secure hashing algorithm
SHA- Secure hashing algorithmSHA- Secure hashing algorithm
SHA- Secure hashing algorithm
Ruchi Maurya
 
Product Cipher
Product CipherProduct Cipher
Product Cipher
SHUBHA CHATURVEDI
 
Cryptography and Information Security
Cryptography and Information SecurityCryptography and Information Security
Cryptography and Information Security
Dr Naim R Kidwai
 
IP Security
IP SecurityIP Security
IP Security
Dr.Florence Dayana
 

What's hot (20)

One Time Pad Encryption Technique
One Time Pad Encryption TechniqueOne Time Pad Encryption Technique
One Time Pad Encryption Technique
 
DES (Data Encryption Standard) pressentation
DES (Data Encryption Standard) pressentationDES (Data Encryption Standard) pressentation
DES (Data Encryption Standard) pressentation
 
Flow control and error control
Flow control and error controlFlow control and error control
Flow control and error control
 
Cs8792 cns - unit v
Cs8792   cns - unit vCs8792   cns - unit v
Cs8792 cns - unit v
 
Message digest 5
Message digest 5Message digest 5
Message digest 5
 
Data Encryption Standard (DES)
Data Encryption Standard (DES)Data Encryption Standard (DES)
Data Encryption Standard (DES)
 
Transport Layer Services : Multiplexing And Demultiplexing
Transport Layer Services : Multiplexing And DemultiplexingTransport Layer Services : Multiplexing And Demultiplexing
Transport Layer Services : Multiplexing And Demultiplexing
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniques
 
Block Ciphers Modes of Operation
Block Ciphers Modes of OperationBlock Ciphers Modes of Operation
Block Ciphers Modes of Operation
 
Public Key Cryptography
Public Key CryptographyPublic Key Cryptography
Public Key Cryptography
 
Key management and distribution
Key management and distributionKey management and distribution
Key management and distribution
 
Secure Socket Layer
Secure Socket LayerSecure Socket Layer
Secure Socket Layer
 
block ciphers
block ciphersblock ciphers
block ciphers
 
5. message authentication and hash function
5. message authentication and hash function5. message authentication and hash function
5. message authentication and hash function
 
Block Cipher and its Design Principles
Block Cipher and its Design PrinciplesBlock Cipher and its Design Principles
Block Cipher and its Design Principles
 
CS8792 - Cryptography and Network Security
CS8792 - Cryptography and Network SecurityCS8792 - Cryptography and Network Security
CS8792 - Cryptography and Network Security
 
SHA- Secure hashing algorithm
SHA- Secure hashing algorithmSHA- Secure hashing algorithm
SHA- Secure hashing algorithm
 
Product Cipher
Product CipherProduct Cipher
Product Cipher
 
Cryptography and Information Security
Cryptography and Information SecurityCryptography and Information Security
Cryptography and Information Security
 
IP Security
IP SecurityIP Security
IP Security
 

Similar to CS8792 - Cryptography and Network Security

2 Unit 1. Traditional Symmetric Ciphers.pdf
2 Unit 1. Traditional Symmetric Ciphers.pdf2 Unit 1. Traditional Symmetric Ciphers.pdf
2 Unit 1. Traditional Symmetric Ciphers.pdf
NandiniLokanath1
 
traditional cliphers 7-11-12.ppt
traditional cliphers 7-11-12.ppttraditional cliphers 7-11-12.ppt
traditional cliphers 7-11-12.ppt
MikialeTesfamariam
 
Chapter_02-1.ppt
Chapter_02-1.pptChapter_02-1.ppt
Chapter_02-1.ppt
ArpanSoni16
 
ch-03.ppt
ch-03.pptch-03.ppt
ch-03.ppt
Manoj R. Kharde
 
Network security
Network securityNetwork security
Network security
Sisir Ghosh
 
Traditional symmetric-key cipher
Traditional symmetric-key cipherTraditional symmetric-key cipher
Traditional symmetric-key cipher
Vasuki Ramasamy
 
Computer Network Unit-5 (Part-1).pdf
Computer Network Unit-5 (Part-1).pdfComputer Network Unit-5 (Part-1).pdf
Computer Network Unit-5 (Part-1).pdf
ParshantYadav13
 
Cryptography
CryptographyCryptography
Cryptography
fsl khan
 
Ch02...1
Ch02...1Ch02...1
Ch02...1
nathanurag
 
4.Cryptography handout 2.pptx
4.Cryptography  handout 2.pptx4.Cryptography  handout 2.pptx
4.Cryptography handout 2.pptx
MikiAbera
 
02 Information System Security
02  Information System Security02  Information System Security
02 Information System Security
Shu Shin
 
Crypt
CryptCrypt
Crypt
Mir Majid
 
Enhancing security of caesar cipher using different
Enhancing security of caesar cipher using differentEnhancing security of caesar cipher using different
Enhancing security of caesar cipher using different
eSAT Publishing House
 
Enhancing security of caesar cipher using different
Enhancing security of caesar cipher using differentEnhancing security of caesar cipher using different
Enhancing security of caesar cipher using different
eSAT Journals
 
classicalencryptiontechniques.ppt
classicalencryptiontechniques.pptclassicalencryptiontechniques.ppt
classicalencryptiontechniques.ppt
utsavkakkad1
 
unit 2.ppt
unit 2.pptunit 2.ppt
unit 2.ppt
HetaDesai13
 
Jaimin chp-8 - network security-new -use this - 2011 batch
Jaimin   chp-8 - network security-new -use this -  2011 batchJaimin   chp-8 - network security-new -use this -  2011 batch
Jaimin chp-8 - network security-new -use this - 2011 batch
Jaimin Jani
 
Unit i
Unit iUnit i
Unit i
tamil arasan
 
Cryptography
CryptographyCryptography
Cryptography
IGZ Software house
 
Cryptography 387 © David Lippman Creative Commons BY-.docx
  Cryptography   387 © David Lippman  Creative Commons BY-.docx  Cryptography   387 © David Lippman  Creative Commons BY-.docx
Cryptography 387 © David Lippman Creative Commons BY-.docx
robert345678
 

Similar to CS8792 - Cryptography and Network Security (20)

2 Unit 1. Traditional Symmetric Ciphers.pdf
2 Unit 1. Traditional Symmetric Ciphers.pdf2 Unit 1. Traditional Symmetric Ciphers.pdf
2 Unit 1. Traditional Symmetric Ciphers.pdf
 
traditional cliphers 7-11-12.ppt
traditional cliphers 7-11-12.ppttraditional cliphers 7-11-12.ppt
traditional cliphers 7-11-12.ppt
 
Chapter_02-1.ppt
Chapter_02-1.pptChapter_02-1.ppt
Chapter_02-1.ppt
 
ch-03.ppt
ch-03.pptch-03.ppt
ch-03.ppt
 
Network security
Network securityNetwork security
Network security
 
Traditional symmetric-key cipher
Traditional symmetric-key cipherTraditional symmetric-key cipher
Traditional symmetric-key cipher
 
Computer Network Unit-5 (Part-1).pdf
Computer Network Unit-5 (Part-1).pdfComputer Network Unit-5 (Part-1).pdf
Computer Network Unit-5 (Part-1).pdf
 
Cryptography
CryptographyCryptography
Cryptography
 
Ch02...1
Ch02...1Ch02...1
Ch02...1
 
4.Cryptography handout 2.pptx
4.Cryptography  handout 2.pptx4.Cryptography  handout 2.pptx
4.Cryptography handout 2.pptx
 
02 Information System Security
02  Information System Security02  Information System Security
02 Information System Security
 
Crypt
CryptCrypt
Crypt
 
Enhancing security of caesar cipher using different
Enhancing security of caesar cipher using differentEnhancing security of caesar cipher using different
Enhancing security of caesar cipher using different
 
Enhancing security of caesar cipher using different
Enhancing security of caesar cipher using differentEnhancing security of caesar cipher using different
Enhancing security of caesar cipher using different
 
classicalencryptiontechniques.ppt
classicalencryptiontechniques.pptclassicalencryptiontechniques.ppt
classicalencryptiontechniques.ppt
 
unit 2.ppt
unit 2.pptunit 2.ppt
unit 2.ppt
 
Jaimin chp-8 - network security-new -use this - 2011 batch
Jaimin   chp-8 - network security-new -use this -  2011 batchJaimin   chp-8 - network security-new -use this -  2011 batch
Jaimin chp-8 - network security-new -use this - 2011 batch
 
Unit i
Unit iUnit i
Unit i
 
Cryptography
CryptographyCryptography
Cryptography
 
Cryptography 387 © David Lippman Creative Commons BY-.docx
  Cryptography   387 © David Lippman  Creative Commons BY-.docx  Cryptography   387 © David Lippman  Creative Commons BY-.docx
Cryptography 387 © David Lippman Creative Commons BY-.docx
 

Recently uploaded

Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
abbyasa1014
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
IJECEIAES
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
MDSABBIROJJAMANPAYEL
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
nooriasukmaningtyas
 
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEMTIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
HODECEDSIET
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
ihlasbinance2003
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
IJECEIAES
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
RadiNasr
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMSA SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
IJNSA Journal
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
co23btech11018
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
Hitesh Mohapatra
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
camseq
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
Casting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdfCasting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdf
zubairahmad848137
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
NidhalKahouli2
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
Dr Ramhari Poudyal
 

Recently uploaded (20)

Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
 
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEMTIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMSA SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
Casting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdfCasting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdf
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
 

CS8792 - Cryptography and Network Security

  • 1. CS8792 - Cryptography and Network Security vkp
  • 2. Unit – I INTRODUCTION • Security trends - Legal, Ethical and Professional Aspects of Security, Need for Security at Multiple levels, Security Policies - Model of network security – Security attacks, services and mechanisms – OSI security architecture – Classical encryption techniques: substitution techniques, transposition techniques, steganography- Foundations of modern cryptography: perfect security – information theory – product cryptosystem –
  • 3. Model for Network Security
  • 4. Some Basic Terminology • Plaintext - original message • Ciphertext - coded message • Cipher - algorithm for transforming plaintext to ciphertext • Key - information used in cipher known only to sender/receiver • Encipher (encrypt) - converting plaintext to ciphertext • Decipher (decrypt) - recovering ciphertext from plaintext • Cryptography - study of encryption principles/methods • Cryptanalysis (codebreaking) - study of principles/ methods of deciphering ciphertext without knowing key
  • 5. Data Transmission Steps PT PT CT CT Encryption Transmission DecryptionX – Plain text Y – Cipher text K – Key Y = Ek (X) X = Dk (Y)
  • 6. Cryptography • Characterize cryptographic system by: – Type of encryption operations used • Substitution / Transposition / Product – Number of keys used • Single-key or Private / Two-key or Public – Way in which plaintext is processed • Block / Stream
  • 7. Cryptanalysis • Objective to recover key not just message • General approaches: – Cryptanalytic attack • Knowledge of algorithm and some part of plaintext – Brute-force attack • Try every possible key on cipher text to get a meaningful plain text
  • 8. 3-1 INTRODUCTION Figure 3.1 shows the general idea behind a symmetric-key cipher. The original message from Alice to Bob is called plaintext; the message that is sent through the channel is called the ciphertext. To create the ciphertext from the plaintext, Alice uses an encryption algorithm and a shared secret key. To create the plaintext from ciphertext, Bob uses a decryption algorithm and the same secret key. 3.1.1 Kerckhoff’s Principle 3.1.2 Cryptanalysis 3.1.3 Categories of Traditional Ciphers Topics discussed in this section:
  • 9. Figure 3.1 General idea of symmetric-key cipher 3.1 Continued
  • 10. 3.1 Continued If P is the plaintext, C is the ciphertext, and K is the key, We assume that Bob creates P1; we prove that P1 = P:
  • 11. Figure 3.2 Locking and unlocking with the same key 3.1 Continued
  • 12. 3.1.1 Kerckhoff’s Principle Based on Kerckhoff’s principle, one should always assume that the adversary, Eve, knows the encryption/decryption algorithm. The resistance of the cipher to attack must be based only on the secrecy of the key.
  • 13. 3.1.2 Cryptanalysis As cryptography is the science and art of creating secret codes, cryptanalysis is the science and art of breaking those codes. Figure 3.3 Cryptanalysis attacks
  • 14. 3.1.2 Continued Figure 3.4 Ciphertext-only attack Ciphertext-Only Attack
  • 15. 3.1.2 Continued Figure 3.5 Known-plaintext attack Known-Plaintext Attack
  • 16. 3.1.2 Continued Figure 3.6 Chosen-plaintext attack Chosen-Plaintext Attack
  • 17. 3.1.2 Continued Figure 3.7 Chosen-ciphertext attack Chosen-Ciphertext Attack
  • 18. Classical Encryption Techniques 1. Substitution Techniques 2. Transposition Techniques
  • 19. Substitution Techniques • Caesar cipher • Monoalphabetic cipher • Play fair cipher • Hill cipher • Polyalphabetic cipher • One time pad
  • 20. Classical Substitution Ciphers • Letters of plaintext are replaced by other letters or by numbers or symbols • If plaintext is viewed as a sequence of bits, then substitution involves replacing plaintext bit patterns with cipher text bit patterns
  • 21. 3-2 SUBSTITUTION CIPHERS A substitution cipher replaces one symbol with another. Substitution ciphers can be categorized as either monoalphabetic ciphers or polyalphabetic ciphers. 3.2.1 Monoalphabetic Ciphres 3.2.2 Polyalphabetic Ciphers Topics discussed in this section: A substitution cipher replaces one symbol with another. Note
  • 22. 3.2.1 Monoalphabetic Ciphers In monoalphabetic substitution, the relationship between a symbol in the plaintext to a symbol in the ciphertext is always one-to-one. Note
  • 23. 3.2.1 Continued The following shows a plaintext and its corresponding ciphertext. The cipher is probably monoalphabetic because both l’s (els) are encrypted as O’s. Example 3.1
  • 24. 3.2.1 Continued The simplest monoalphabetic cipher is the additive cipher. This cipher is sometimes called a shift cipher and sometimes a Caesar cipher, but the term additive cipher better reveals its mathematical nature. Additive Cipher Figure 3.8 Plaintext and ciphertext in Z26
  • 25. Figure 3.9 Additive cipher 3.2.1 Continued When the cipher is additive, the plaintext, ciphertext, and key are integers in Z26. Note
  • 26. 3.2.1 Continued Use the additive cipher with key = 15 to encrypt the message “hello”. Example 3.3 We apply the encryption algorithm to the plaintext, character by character: Solution
  • 27. 3.2.1 Continued Use the additive cipher with key = 15 to decrypt the message “WTAAD”. Example 3.4 We apply the decryption algorithm to the plaintext character by character: Solution
  • 28. 3.2.1 Continued Historically, additive ciphers are called shift ciphers. Julius Caesar used an additive cipher to communicate with his officers. For this reason, additive ciphers are sometimes referred to as the Caesar cipher. Caesar used a key of 3 for his communications. Shift Cipher and Caesar Cipher Additive ciphers are sometimes referred to as shift ciphers or Caesar cipher. Note
  • 29. 3.2.1 Continued Eve has intercepted the ciphertext “UVACLYFZLJBYL”. Show how she can use a brute-force attack to break the cipher. Example 3.5 Eve tries keys from 1 to 7. With a key of 7, the plaintext is “not very secure”, which makes sense. Solution
  • 30. 3.2.1 Continued Table 3.1 Frequency of characters in English Table 3.2 Frequency of diagrams and trigrams
  • 31. 3.2.1 Continued Multiplicative Ciphers In a multiplicative cipher, the plaintext and ciphertext are integers in Z26; the key is an integer in Z26*. Note Figure 3.10 Multiplicative cipher
  • 32. 3.2.1 Continued What is the key domain for any multiplicative cipher? Example 3.7 The key needs to be in Z26*. This set has only 12 members: 1, 3, 5, 7, 9, 11, 15, 17, 19, 21, 23, 25. Solution We use a multiplicative cipher to encrypt the message “hello” with a key of 7. The ciphertext is “XCZZU”. Example 3.8
  • 34. 3.2.1 Continued The affine cipher uses a pair of keys in which the first key is from Z26* and the second is from Z26. The size of the key domain is 26 × 12 = 312. Example 3.09 Use an affine cipher to encrypt the message “hello” with the key pair (7, 2). Example 3.10
  • 35. 3.2.1 Continued Use the affine cipher to decrypt the message “ZEBBW” with the key pair (7, 2) in modulus 26. Example 3.11 Solution The additive cipher is a special case of an affine cipher in which k1 = 1. The multiplicative cipher is a special case of affine cipher in which k2 = 0. Example 3.12
  • 36. 3.2.1 Continued Because additive, multiplicative, and affine ciphers have small key domains, they are very vulnerable to brute-force attack. Monoalphabetic Substitution Cipher A better solution is to create a mapping between each plaintext character and the corresponding ciphertext character. Alice and Bob can agree on a table showing the mapping for each character. Figure 3.12 An example key for monoalphabetic substitution cipher
  • 37. 3.2.1 Continued We can use the key in Figure 3.12 to encrypt the message Example 3.13 The ciphertext is
  • 38. 3.2.2 Polyalphabetic Ciphers In polyalphabetic substitution, each occurrence of a character may have a different substitute. The relationship between a character in the plaintext to a character in the ciphertext is one-to-many. Autokey Cipher
  • 39. 3.2.2 Continued Assume that Alice and Bob agreed to use an autokey cipher with initial key value k1 = 12. Now Alice wants to send Bob the message “Attack is today”. Enciphering is done character by character. Example 3.14
  • 40. Playfair Cipher • Not even the large number of keys in a monoalphabetic cipher provides security • One approach to improving security was to encrypt multiple letters • Playfair Cipher is an example
  • 41. Playfair Key Matrix • 5X5 matrix of letters based on a keyword • Fill in letters of keyword (sans duplicates) • Fill rest of matrix with other letters • Eg. using the keyword MONARCHY
  • 42. Encrypting and Decrypting Plaintext is encrypted two letters at a time 1. If a pair is a repeated letter, insert filler like 'X’ 2. If both letters fall in the same row, replace each with letter to right (wrapping back to start from end) 3. If both letters fall in the same column, replace each with the letter below it (again wrapping to top from bottom) 4. Otherwise each letter is replaced by the letter in the
  • 43. Playfair Key Matrix • Eg. Using the keyword MONARCHY • Encrypt: Ballon -> Ba lx lo nx • Cipher: IB SU PM AW M O N A R C H Y B D E F G I/J K L P Q S T U V W X Z
  • 44. 3.2.2 Continued Playfair Cipher Figure 3.13 An example of a secret key in the Playfair cipher Let us encrypt the plaintext “hello” using the key in Figure 3.13. Example 3.15
  • 45. Security of Playfair Cipher • Much improved over monoalphabetic • Since have 26 x 26 = 676 digrams • Would need a 676 entry frequency table to analyse (verses 26 for a monoalphabetic) • Correspondingly more ciphertext • Was widely used for many years – eg. by US & British military in WW1 • It can be broken, given a few hundred letters
  • 46. Vigenère Cipher • Simplest polyalphabetic substitution cipher • Effectively multiple caesar ciphers • Key is multiple letters long K = k1 k2 ... kd • ith letter specifies ith alphabet to use • Use each alphabet in turn • Repeat from start after d letters in message • Decryption simply works in reverse
  • 47. 3.2.2 Continued Vigenere Cipher We can encrypt the message “She is listening” using the 6- character keyword “PASCAL”. Example 3.16
  • 48. 3.2.2 Continued Using Example 3.18, we can say that the additive cipher is a special case of Vigenere cipher in which m = 1. Example 3.18 Table 3.3 A Vigenere Tableau
  • 49.
  • 50. 3.2.2 Continued Hill Cipher Figure 3.15 Key in the Hill cipher The key matrix in the Hill cipher needs to have a multiplicative inverse. Note
  • 51.
  • 52.
  • 53.
  • 54.
  • 55.
  • 56.
  • 57. 3.2.2 Continued One of the goals of cryptography is perfect secrecy. A study by Shannon has shown that perfect secrecy can be achieved if each plaintext symbol is encrypted with a key randomly chosen from a key domain. This idea is used in a cipher called one-time pad, invented by Vernam. One-Time Pad
  • 58. 3.2.2 Continued Rotor Cipher Figure 3.19 A rotor cipher
  • 59. 3.2.2 Continued Enigma Machine Figure 3.20 A schematic of the Enigma machine
  • 60. 3-3 TRANSPOSITION CIPHERS A transposition cipher does not substitute one symbol for another, instead it changes the location of the symbols. 3.3.1 Keyless Transposition Ciphers 3.3.2 Keyed Transposition Ciphers 3.3.3 Combining Two Approaches Topics discussed in this section: A transposition cipher reorders symbols. Note
  • 61. 3.3.1 Keyless Transposition Ciphers Simple transposition ciphers, which were used in the past, are keyless. A good example of a keyless cipher using the first method is the rail fence cipher. The ciphertext is created reading the pattern row by row. For example, to send the message “Meet me at the park” to Bob, Alice writes Example 3.22 She then creates the ciphertext “MEMATEAKETETHPR”.
  • 62. 3.3.1 Continued Alice and Bob can agree on the number of columns and use the second method. Alice writes the same plaintext, row by row, in a table of four columns. Example 3.23 She then creates the ciphertext “MMTAEEHREAEKTTP”.
  • 63. 3.3.1 Continued The cipher in Example 3.23 is actually a transposition cipher. The following shows the permutation of each character in the plaintext into the ciphertext based on the positions. Example 3.24 The second character in the plaintext has moved to the fifth position in the ciphertext; the third character has moved to the ninth position; and so on. Although the characters are permuted, there is a pattern in the permutation: (01, 05, 09, 13), (02, 06, 10, 13), (03, 07, 11, 15), and (08, 12). In each section, the difference between the two adjacent numbers is 4.
  • 64. 3.3.2 Keyed Transposition Ciphers The keyless ciphers permute the characters by using writing plaintext in one way and reading it in another way The permutation is done on the whole plaintext to create the whole ciphertext. Another method is to divide the plaintext into groups of predetermined size, called blocks, and then use a key to permute the characters in each block separately.
  • 65. 3.3.2 Continued Alice needs to send the message “Enemy attacks tonight” to Bob.. Example 3.25 The key used for encryption and decryption is a permutation key, which shows how the character are permuted. The permutation yields
  • 66. 3.3.3 Combining Two Approaches Example 3.26 Figure 3.21
  • 67. Figure 3.22 Encryption/decryption keys in transpositional ciphers 3.3.3 Continued Keys In Example 3.27, a single key was used in two directions for the column exchange: downward for encryption, upward for decryption. It is customary to create two keys.
  • 68. Figure 3.23 Key inversion in a transposition cipher 3.3.3 Continued
  • 69. 3.3.3 Continued Using Matrices We can use matrices to show the encryption/decryption process for a transposition cipher. Figure 3.24 Representation of the key as a matrix in the transposition cipher Example 3.27
  • 70. Figure 3.24 Representation of the key as a matrix in the transposition cipher 3.3.3 Continued Figure 3.24 shows the encryption process. Multiplying the 4 × 5 plaintext matrix by the 5 × 5 encryption key gives the 4 × 5 ciphertext matrix. Example 3.27
  • 71. 3.3.3 Continued Double Transposition Ciphers Figure 3.25 Double transposition cipher