Chap1. Introduction Number Theory and Basic Cryptography
Chap1. Introduction Number Theory and Basic Cryptography
Security types
Security Goals
Attacks
Services and Mechanism
Modular arithmetic
Classic encryption techniques
Substitution
Transposition
Computer
Security
Network
types
Internet
Prof. Kanchan K. Doke
Computer Security 4
Securityintended to
keep networks, web
browsers, web apps,
websites, and other
connected devices safe
as well as user activity
Confidentiality
Data confidentiality: Protection of data from unauthorized access and disclosure
Privacy : Secure private information from unauthorized people
Eg: Bank details
Integrity
Data integrity : Programs and information are only changed in ways that are
authorized and defined
System integrity :The system operates as intended
Eg. patient information
Availability
Ensure that systems are operational and running quickly
Eg. authentication service Prof. Kanchan K. Doke
OSI (Open Systems Interconnection) 10
Security Architecture
Security Service:
is a service available for maintaining the
security and safety of an organization
Security Mechanism:
is design to detect, prevent or recover from
security attack
Prof. Kanchan K. Doke
Security Attack 12
Security
Attack
Passive Active
attacks attacks
The release
Traffic Modification Denial of
of message Masquerade Repudiation Replay
analysis of messages Service
content
Attacker
learn or make use of the messages and copy them contents of
messages without altering or destroying it
These attacks are difficult to detect because they do not involve any
alteration of the data.
Traffic analysis –
Focuses on observing the exchange of information between two entities to extract valuable
information.
Can’t read the message but only understand the pattern and length of encryption
Information used by attackers to discover the geographical location and the identities of the
communicating entities, along with details regarding the frequency and duration of the
exchanged messages.
Active
Attacks
Masquerade
Message Modification
Replay
DOS attack
Prof. Kanchan K. Doke
Active Attack: Masquerade 18
Types
Username and password masquerade
IP address masquerade
Website masquerade
Email masquerade
Attacker save a copy of the data originally present on that particular network and later
on use this data for personal uses.
Once the data is corrupted or leaked it is insecure and unsafe for the users.
It is a type of attack in which hackers modify It is an attack in which hackers do not modify
Definition the information or the data. the information or the data.
It is a danger to the Integrity and availability of the data. Confidentiality of the data.
Security Services
Data Non-
Data integrity Authentication Access control
Confidentiality repudiation
Prof. Kanchan K. Doke
Security Services (ITU-T) 26
Access Control:
Isthe ability to limit and control the access to host systems and
applications via communications links
The prevention of unauthorized use of a resource (i.e., this service
controls who can have access to a resource, under what conditions
access can occur, and what those accessing the resource are Prof. Kanchan K. Doke
Security Mechanism 31
Security
Mechanism
Encipherment:
This is the process of using mathematical algorithms to transform data into a
form that is not readily intelligible.
Digital Signature:
Data or cryptographic transformation of a data unit is appended to the data,
so that the recipient of the data unit is convinced of the source and integrity of
the data unit and this can also serve to protect the data against forgery (e.g.,
by the recipient).
Access Control:
A variety of mechanisms are available that enforce access rights to resources.
Data Integrity:
A variety of mechanisms may be used to assure the integrity of a data unit or
stream of data units.
Prof. Kanchan K. Doke
Security Mechanism 33
Authentication Exchange:
This is a mechanism intended to ensure the identity of an entity by means of
information exchange
Traffic Padding:
The insertion of bits into gaps in a data stream is called traffic padding. This
helps to prevent traffic analysis attempts.
Routing Control:
Routing control enables selection of particular physically secure routes for
certain data transmission and allows routing changes, especially when a
breach of security is suspected.
Notarization:
This is the use of a trusted third party to assure certain properties of a data
exchange.
Prof. Kanchan K. Doke
Attackers and Risks types 35
Attackers
Hacker: The one who is only interested in penetrating into your system. They
do not cause any harm to your system they only get satisfied by getting
access to your system.
Intruders:These attackers intend to do damage to your system or try to
obtain the information from the system which can be used to attain
financial gain.
Risks
Information threat: This kind of threats modifies data on the user’s behalf to
which actually user should not access. Eg.: enabling some crucial permission
in the system.
Service threat: This kind of threat disables the user from accessing data on
the system. Prof. Kanchan K. Doke
Network security model 36
Modular Arithmetic
Greatest Common Divisor (GCD) 43
(GCD)…examples
Eg. GCD(12,33)=? 12 33
Divisors 1,2,3,4,6,12 1,3,11,33
Common Divisors 1,3
Greatest Common Divisor
3
(GCD)
Find GCD(50,12)
Solution:
Here a=50 and b=12
GCD(a,b) =GCD(b, a mod b)
GCD(50,12)= GCD(12, 50%12) = GCD(12, 2)
GCD(12, 2) = GCD(2, 12%2) = GCD(2, 0) =2
GCD(50,12) =2
Find GCD(83,19)
Solution:
Here a=83 and b=19
GCD(a,b) =GCD(b, a mod b)
GCD(83,19)= GCD(19, 83%19) = GCD(19, 7)
GCD(19, 7) = GCD(7, 19%7) = GCD(7, 5)
GCD(7,5) = GCD(5, 7%5) = GCD(5, 2)
GCD(5, 2) = GCD(2, 5%2) = GCD(2, 1)
GCD(2, 1) = GCD(1, 2%1) = GCD(1, 0)=1
GCD(83,19) =1
Find GCD(3084,1424)
Solution:
Here a=3084and b=1424
GCD(a,b) =GCD(b, a mod b)
GCD(3084,1424)= GCD(1424, 3084%1424) = GCD(1424, 236)
GCD(1424, 236) = GCD(236, 1424%236) = GCD(236, 8)
GCD(236,8) = GCD(8, 236%8) = GCD(8, 4)
GCD(8, 4) = GCD(4, 8%4) = GCD(4, 0) =4
GCD(3084,1424) = 4
Definition
Given an integer n, (n) = | Zn*| is the number of all numbers a
such that 0 < a < n and a is relatively prime/coprime to n
(i.e., gcd(a, n)=1).
Prime numbers: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71,
73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173,
179, 181, 191, 193, 197, 199
Eg:
Find (35)
n=35…n is the product of two prime numbers 5 and 7
So p=5 and q=7
(n)=(p-1)*(q-1) (i.e. (p) * (q))
(35)=(5-1)*(7-1)
(35)=4*6
(35)=24
There are 24 numbers that are lesser than 35 and relatively prime to 35
Find (15) and (9)
Prof. Kanchan K. Doke
Euler’s Totient Function….Phi function 56
Find (1000)
Find (7000)
For every positive integer ‘a’ and ‘n’ which are said to be
relatively prime
then aφ(n) ≡ 1 mod n.
eg.1 Does Euler’s Theorem hold true for a=3 and n=10
aφ(n) ≡ 1 mod n.
3φ(10) ≡ 1 mod 10 .
φ(10)= φ(2)* (5)=(1*4)=4 ….. (n)=(p-1)*(q-1) (i.e. (p) * (q))
34 ≡ 1 mod 10
81=1 mod 10
Therefore , Euler’s Theorem hold true for a=3 and n=10
Prof. Kanchan K. Doke
Euler’s Theorem 59
eg. 2 Does Euler’s Theorem hold true for a=2 and n=10
aφ(n) ≡ 1 mod n.
2φ(10) ≡ 1 mod 10 .
φ(10)= φ(2)* (5)=(1*4)=4 ….. (n)=(p-1)*(q-1) (i.e. (p) * (q))
24 ≡ 1 mod 10
16=1 mod 10
Therefore , Euler’s Theorem does hold true for a=2 and
n=10
Prof. Kanchan K. Doke
Euler’s Theorem 60
Eg. 2
P = an integer Prime number a = an integer which is not multiple
of P
Let a = 2 and P = 6
According to Fermat's little theorem
ap−1=1(mod p)
ap ≡ a (mod p).
26-1 ≡ 1 mod(6)
OR 26 ≡ 2 mod(6)
25 ≡ 1 mod(6) 64= 2 mod(6)
32 = 1 mod(6)
Therefor Format’s theorem does not holds true for a = 2 and P = 5
Eg.
P = an integer Prime number a = an integer
which is not multiple of P
Let a = 2 and P = 17
According to Fermat's little theorem
217-1 ≡ 1 mod(17) ap ≡ a (mod p).
216 ≡ 1 mod(17) OR 217 ≡ 2 mod(17)
131072= 2 mod(17)
65536= 1 mod (17)
Therefor Format’s theorem holds true for a = 2 and P = 17
Ans:
Similarly,
5x2≡1(mod 7)
15x2≡3(mod 7)
x2=3
Finally,
N=N1x1a1+N2x2a2
7×3×3+5×5×3=138
⇒138(mod 35)
⇒33(mod 35)
Prof. Kanchan K. Doke
72
encoding information
Components
Plane text: original data fed as input to the algorithm
Encryption algorithm: performs substitution and transformation on plaintext fed to it.
E(x, k) = y
Secrete key : It is a value/string/text file used by the encryption and decryption
algorithm to encode and decode the plain text to cipher text and vice-versa
respectively.
Cipher Text : It is the formatted form of the plain text (x) which is unreadable for
humans, hence providing encryption during the transmission. It is completely
dependent upon the secret key provided to the encryption algorithm. Each unique
secret key produces a unique cipher text.
Decryption Algorithm : It performs reversal of the encryption algorithm at the recipient’s
side. It also takes the secret key as input and decodes the cipher text received from the
sender based on the secret key. It produces plain text as output.
D(y, k) = x
Encryption Algorithm:
There is a need for a very strong encryption algorithm that
produces cipher texts in such a way that the attacker should be
unable to crack the secret key even if they have access to one or
more cipher texts.
Secure way to share Secret Key:
There must be a secure and robust way to share the secret key
between the sender and the receiver. It should be leak-proof so
that the attacker cannot access the secret key.
Y=E(K,X)
One key is used for both encryption and decryption in symmetric encryption.
The algorithm and key combine to encrypt the original sensitive information by
converting plaintext into ciphertext.
Advantages
Easier to use and implement
Fast compared to asymmetric encryption
Less resource utilization
Disadvantages
Sharing encryption keys safely is more
difficult
Since it is unsuitable for different users, symmetric is not very scalable
Key lengths 128 or 256-bit key size. RSA 2048-bit or higher key size.
Less secured due to use a single key for Much safer as two keys are involved in
Security
encryption. encryption and decryption.
Symmetric encryption uses a single key for Asymmetric encryption uses two keys
Number of keys
encryption and decryption. for encryption and decryption
Techniques It is an old technique. It is a modern encryption technique.
Two keys separately made for
A single key for encryption and decryption
Confidentiality encryption and decryption that
has chances of key compromised.
removes the need to share a key.
Asymmetric encryption is slower in
Speed Symmetric encryption is fast technique
terms of speed.
Algorithms RC4, AES, DES, 3DES, and QUAD. RSA, Diffie-Hellman, ECC algorithms.
Prof. Kanchan K. Doke
Cryptography 91
Classical
Encryption
techniques
Substitution Transposition
Ciphers Cipher
Substitution Ciphers
Classical Substitution Ciphers 94
A A
B B
C C
. .
. .
Y Y
Z Z
Substitution Ciphers
Monoalphabetic Polyalphabetic
Substitution Ciphers
Monoalphabetic Polyalphabetic
The following shows a plaintext and its corresponding ciphertext.The cipher is not
monoalphabetic because each l’s(el) is encrypted by a different character.
Substitution Ciphers
Monoalphabetic Polyalphabetic
Eg. 1: Use the additive cipher with key = 15 to encrypt the message “HELLO”
Solution
Apply the encryption and decryption algorithm to the plaintext, character by character:
The formula of encryption is: E (C) = (P + K) mod 26 The formula of decryption is: D (P) = (C – K) mod 26
Plaintext: H → 07 E: (07 + 15) mod 26 Ciphertext: 22 → W Ciphertext: W → 22 D: (22 - 15) mod 26 Plaintext: 07 → H
Plaintext: E → 04 E: (04 + 15) mod 26 Ciphertext: 19 → T Ciphertext: T → 19 D: (19 - 15) mod 26 Plaintext: 04 → E
Plaintext: L → 11 E: (11 + 15) mod 26 Ciphertext: 00 → A Ciphertext: A → 00 Dn: (00 - 15) mod 26 Plaintext: 11 → L
Plaintext: L → 11 E: (11 + 15) mod 26 Ciphertext: 00 → A Ciphertext: A → 00 D: (00 - 15) mod 26 Plaintext: 11 → L
Plaintext: O → 14 E: (14 + 15) mod 26 Ciphertext: 03 → D Ciphertext: D → 03 D: (03 - 15) mod 26 Plaintext: 14 → O
The encrypted message of this plain text is "WTAAD". The decrypted message is "HELLO".
Eg. 2: Example: 1 Use the Caesar cipher to encrypt and decrypt the message
"JAVATPOINT," and the key (shift) value of this message is 3.
Solution
The formula of encryption is: E (C) = (P + K) mod 26 The formula of decryption is:D (P) = (C – K) mod 26
Plaintext: J → 09 En: (09 + 3) mod 26 Ciphertext: 12 → M Ciphertext: M → 12 Dn: (12 - 3) mod 26 Plaintext: 09 → J
Plaintext: A → 00 En: (00 + 3) mod 26 Ciphertext: 3 → D Ciphertext: D → 03 Dn: (03 - 3) mod 26 Plaintext: 0 → A
Plaintext: V → 21 En: (21 + 3) mod 26 Ciphertext: 24 → Y Ciphertext: Y → 24 Dn: (24 - 3) mod 26 Plaintext: 21 → V
Plaintext: A → 00 En: (00 + 3) mod 26 Ciphertext: 3 → D Plaintext: A → 00 En: (00 + 3) mod 26 Ciphertext: 3 → D
Plaintext: T → 19 En: (19 + 3) mod 26 Ciphertext: 22 → W Plaintext: T → 19 En: (19 + 3) mod 26 Ciphertext: 22 → W
Plaintext: P → 15 En: (15 + 3) mod 26 Ciphertext: 18 → S Plaintext: P → 15 En: (15 + 3) mod 26 Ciphertext: 18 → S
Plaintext: O → 14 En: (14 + 3) mod 26 Ciphertext: 17 → R Plaintext: O → 14 En: (14 + 3) mod 26 Ciphertext: 17 → R
Plaintext: I → 08 En: (08 + 3) mod 26 Ciphertext: 11 → L Plaintext: I → 08 En: (08 + 3) mod 26 Ciphertext: 11 → L
Plaintext: N → 13 En: (13 + 3) mod 26 Ciphertext: 16 → Q Plaintext: N → 13 En: (13 + 3) mod 26 Ciphertext: 16 → Q
Plaintext: T → 19 En: (19 + 3) mod 26 Ciphertext: 22 → W Plaintext: T → 19 En: (19 + 3) mod 26 Ciphertext: 22 → W
The encrypted message of this plain text is The decrypted message is " JAVATPOINT ".
"MDYDWSRLQW". Prof. Kanchan K. Doke
Multiplicative Ciphers 102
Each letter that is present in the plaintext is replaced by a corresponding letter of the
ciphertext, according to a fixed multiplication key.
Use a large prime number as a multiplication key . i.e 1, 3, 5,7, 9, 11, 15, 17, 19, 21, 23, 25
Encryption process :
Multiplying the numerical value of each letter in the plaintext by the key and then taking the result
modulo the key.
Decryption process :
Multiplying the numerical value of each letter in the ciphertext by key inverse and then taking the
result modulo of the key
q r1 r2 r t1 t2 t
3 26 7 5 0 1 -3
1 7 5 2 1 -3 4
2 5 2 1 -3 4 -11
2 2 1 0 4 -11 26
1 0 -11 26
q r1 r2 r t1 t2 t
2 26 11 4 0 1 -2
2 11 4 3 1 -2 5
1 4 3 1 -2 5 -7
3 3 1 0 5 -7 26
1 0 -7 26
Eg. 1 use a multiplicative cipher to encrypt the message “hello” with key=7
The formula of decryption is:D (P) = (C * K-1) mod 26
The formula of encryption is: E (C) = (P * K) mod 26 The multiplicative inverse of 7 =15.
Plaintext: L → 11 E: (11 *7) mod 26 Ciphertext: 25 → Z Ciphertext: Z → 25 Dn: (25 *15) mod 26 Plaintext: 11 → L
Plaintext: L → 11 E: (11 *7) mod 26 Ciphertext: 25 → Z Ciphertext: Z → 25 D: (25 *15) mod 26 Plaintext: 11 → L
Plaintext: O → 14 E: (14 *7) mod 26 Ciphertext: 20 → U Ciphertext: U → 20 D: (20 *15) mod 26 Plaintext: 14 → O
The encrypted message of this plain text is The decrypted message is "HELLO".
“XCZZU".
We can combine additive & multiplicative ciphers to get what is called the affine cipher.
A combination of both ciphers with pair of keys.
The first key is used with the multiplicative cipher the second key is used with the additive
cipher.
Encryption C=(P×K1+K2) mod 26
Decryption P=((C-K2)×K1-1)mod 26
Eg. 1 use a Affine cipher to encrypt the message “hello” with key pair=(7,2) in modulus 26
The formula of decryption is: P=((C-K2)×K1-1)mod 26
The formula of encryption is: C=(P×K1+K2) mod 26 The multiplicative inverse of 7 = 15.
Plaintext: E → 04 E: (04 *7+2) mod 26 Ciphertext: 4 → E Ciphertext: 4 → E D;((2 -2)*15) mod 26 Plaintext: 04 → E
Plaintext: L → 11 E: (11 *7+2) mod 26 Ciphertext: 1 → B Ciphertext: 1 → B D: ((25 -2)*15) mod 26 Plaintext: 11 → L
Plaintext: L → 11 E: (11 *7+2) mod 26 Ciphertext: 1 → B Ciphertext: 1 → B D: ((25 -2)*15) mod 26 Plaintext: 11 → L
Plaintext: O → 14 E: (14 *7+2) mod 26 Ciphertext: 22→ W Ciphertext: 22→ W D: ((20 -2)*15)mod 26 Plaintext: 14 → O
The encrypted message of this plain text is The decrypted message is "HELLO".
“ZEBBW".
Substitution Ciphers
Monoalphabetic Polyalphabetic
Encryption:
𝐶𝑖 = 𝑃𝑖 + 𝐾𝑖 𝑚𝑜𝑑 26
Decryption:
𝑃𝑖 = 𝐶𝑖 − 𝐾𝑖 𝑚𝑜𝑑 26
Prof. Kanchan K. Doke
Autokey Cipher 110
The first subkey: a predetermined value secretly agreed upon by
parties.
Eg. 𝑲=12; 𝑷=“attack is today” The second subkey: is the value of the first plaintext character
(between 0 and 25).
Encryption: 𝐶𝑖 = (𝑃𝑖 + 𝐾𝑖 ) 𝑚𝑜𝑑 26 The third subkey: the value of the second plaintext and so on.
Plaintext a t t a c k i s t o d a y
P Value 0 19 19 00 2 10 8 18 19 14 3 0 24
Key 12 00 19 19 00 2 10 8 18 19 14 3 0
C Value 12 19 12 19 02 12 18 0 11 7 17 3 24
Ciphertext m t m t c m s a l h r d y
The Playfair Cipher was the first practical digraph substitution cipher.
Manual Symmetric encryption technique
Multiple letter encryption cipher
The Playfair Cipher Encryption Algorithm:
Generate the key Square(5×5)
Grid of alphabets that acts as the key for encrypting the plaintext.
Each of the 25 alphabets must be unique and if the plaintext contains J, then it is replaced by I. (as
the table can hold only 25 alphabets)
M O N A E M O N A R
C H Y C H Y B D
E F G I/J K
L P Q S T
U V W X Z
Diagrams=RSSRDE
Diagrams=ONTSML
Plaintext J A V A T P O I N T
Plaintext value (P) 09 00 21 00 19 15 14 08 13 19
Key B E S T B E S T B E
Key value (K) 01 04 18 19 01 04 18 19 01 04
Ciphertext value (C) 10 04 13 19 20 19 06 01 14 23
Ciphertext K E N T U T G B O X
Ciphertext: KENTUTGBOX
Ciphertext K E N T U T G B O X
Ciphertext value (C) 10 04 13 19 20 19 06 01 14 23
Key B E S T B E S T B E
Key value (K) 01 04 18 19 01 04 18 19 01 04
Plaintext value (P) 09 00 21 00 19 15 14 08 13 19
Plaintext J A V A T P O I N T
Plaintext: JAVATPOINT
C1=(P1K11+P2K21+P3K31) mod 26
C2=(P1K12+P2K22+P3K32) mod 26
C3=(P1K13+P2K23+P3K33) mod 26 Prof. Kanchan K. Doke
Hill Cipher 129
C1=(K11P1+K12P2+K13P3) mod 26
C2=(K21P1+K22P2+K23P3) mod 26
C3=(K31P1+K32P2+P3K33) mod 26 Prof. Kanchan K. Doke
Hill Cipher 130
17 17 5
Eg. Encrypt “pay more money” using Hill cipher with key 21 18 21
2 2 19
E(P,K)=C = (P*K) mod 26
p a y m o r e m o n e y
15 0 24 12 14 17 4 12 14 13 4 24
PT= pay mor emo ney
pay
17 17 5
(C1,C2,C3)=(15 0 24) 21 18 21 mod 26
2 2 19
p a y m o r e m o n e y
15 0 24 12 14 17 4 12 14 13 4 24
PT= pay mor emo ney
mor
17 17 5
(C1,C2,C3)=(12 14 17) 21 18 21 mod 26
2 2 19
p a y m o r e m o n e y
15 0 24 12 14 17 4 12 14 13 4 24
PT= pay mor emo ney
emo
17 17 5
(C1,C2,C3)=(4 12 14) 21 18 21 mod 26
2 2 19
p a y m o r e m o n e y
15 0 24 12 14 17 4 12 14 13 4 24
PT= pay mor emo ney
ney
17 17 5
(C1,C2,C3)=(13 4 24) 21 18 21 mod 26
2 2 19
p a y m o r e m o n e y
15 0 24 12 14 17 4 12 14 13 4 24
PT= pay mor emo ney
ney
17 17 5
(C1,C2,C3)=(13 4 24) 21 18 21 mod 26
2 2 19
Eg. 2 Encrypt the plaintext message "short example" using the keyword hill
Eg. 2 Encrypt the plaintext message "short example" using the keyword hill
Eg. 2 Encrypt the plaintext message "short example" using the keyword hill
Eg. 2 Encrypt the plaintext message "short example" using the keyword hill
Eg. 2 Encrypt the plaintext message "short example" using the keyword hill
Eg. 2 Encrypt the plaintext message "short example" using the keyword hill
Eg. 2 Encrypt the plaintext message "short example" using the keyword hill
Transposition Cipher
Transposition Ciphers 143
Transposition
Cipher
Keyed
Keyless Keyed Double Vernam
Columnar
Transposition Transposition Transposition Transposition
Transposition
Prof. Kanchan K. Doke
Keyless Transposition Ciphers 144
Simple transposition ciphers, which were used in the past, are keyless.
Methods:
1. Rail Fence Cipher : write the plaintext in a zig-zag pattern in two rows and form the
ciphertext by reading off the letters from the first row followed by the second.
Algorithm:
First write down plain text message as a sequence of diagonals.
Read the plain text written in first step as a sequence of rows.
2. Simple Columnar Transposition: the message is written into the table rows of fixed
length and then read out column by column
Algorithm:
Write the plain text message row by row in a rectangle of predefinedsize.(length of key)
Read the message column by column according t the selected orderthus obtained message is a
cipher text.
Prof. Kanchan K. Doke
Keyless Transposition Ciphers 145
Simple transposition ciphers, which were used in the past, are keyless.
Methods:
1. Rail Fence Cipher : write the plaintext in a zig-zag pattern in two rows and form the
ciphertext by reading off the letters from the first row followed by the second.
Algorithm:
First write down plain text message as a sequence of diagonals.
Read the plain text written in first step as a sequence of rows.
Simple transposition ciphers, which were used in the past, are keyless.
Methods:
2. Simple Columnar Transposition: the message is written into the table rows of fixed
length and then read out column by column
Algorithm:
Write the plain text message row by row in a rectangle of predefined size.(length of key)
Read the message column by column according t the selected order thus obtained message is a
cipher text.
Divide the plaintext into groups of predetermined size, called blocks, and then use a key to permute
the characters in each block separately
If in the grouping a block falls short of character then add ‘z’
Eg. Plain text: “enemy attacks tonight” block size 5 and key is 31452
enemy attac kston ightz
Encrypt 3 1 4 5 2
Decrypt
1 2 3 4 5
s h e t u
r n e d m
e i n t o
a n e w r
i g o t b
e t t e r
Prof. Kanchan K. Doke
Double Transposition Ciphers 152
W I T C H C H I T W
1 2 3 4 5 4 5 2 3 1
_______________________________________________ ___________________________________________
s h e t u t u h e s
r n e d m d m n e r
e i n t o t o i n e
a n e w r w r n e a
i g o t b t b g o i
e t t e r e r t t e
C H I T W
4 5 2 3 1
___________________________________________
t u h e s
d m n e r
t o i n e
w r n e a
t b g o i
e r t t e
Prof. Kanchan K. Doke
Double Transposition Ciphers 154
C H I T W F L O A T
4 5 2 3 1 1 2 3 4 5
___________________________________________ ________________________________________________
t u h e s t d t w t
d m n e r e u m o r
t o i n e b r h n i
w r n e a n g t e e
t b g o i n e o t s
e r t t e
r e a i e Prof. Kanchan K. Doke
Double Transposition Ciphers 155
F L O A T A F L O T
1 2 3 4 5 4 1 2 3 5
________________________________________________
___________________________
t d t w t w t d t t
e u m o r o e u m r
b r h n i n b r h i
n g t e e e n g t e
n e o t s t n e o s
r e a i e i r e a e Prof. Kanchan K. Doke
Double Transposition Ciphers 156
Call the plaintext stream P, the ciphertext stream C, and the key stream K.
In a block cipher, a group of plaintext symbols of size m (m > 1) are encrypted together creating a
group of ciphertext of the same size. A single key is used to encrypt the whole block even if the key is
made of multiple values.
Eg.
Playfair ciphers are block ciphers. The size of the block is m = 2. Two characters are encrypted together.
From the definition of the block cipher, it is clear that every block cipher is a polyalphabetic cipher because
each character in a ciphertext block depends on all characters in the plaintext block. Prof. Kanchan K. Doke