0% found this document useful (0 votes)
23 views5 pages

CNS C

This document discusses multiple encryption techniques including double DES and triple DES. It provides the following key points: 1. Double DES encrypts plaintext twice using two different keys, increasing the key size to 112 bits but is vulnerable to meet-in-the-middle attacks. 2. A meet-in-the-middle attack on double DES works by encrypting the plaintext with all possible first keys and decrypting the ciphertext with all possible second keys to find a matching pair. 3. Triple DES applies the DES algorithm three times using three 64-bit keys (192 bits total) and is more secure than double DES against meet-in-the-middle and brute force attacks.

Uploaded by

MORTAL
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)
23 views5 pages

CNS C

This document discusses multiple encryption techniques including double DES and triple DES. It provides the following key points: 1. Double DES encrypts plaintext twice using two different keys, increasing the key size to 112 bits but is vulnerable to meet-in-the-middle attacks. 2. A meet-in-the-middle attack on double DES works by encrypting the plaintext with all possible first keys and decrypting the ciphertext with all possible second keys to find a matching pair. 3. Triple DES applies the DES algorithm three times using three 64-bit keys (192 bits total) and is more secure than double DES against meet-in-the-middle and brute force attacks.

Uploaded by

MORTAL
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/ 5

Multiple E

3-2 Encryption and Security 3-3


Triple DES
Network

and Nework Security and


Cyptography aphy Multiple Encryption and Triple DES
CIYP
GTU: Winter-17, 19, DES have
3 . 1 Double DES Summe Attacks on DES typically been brute force
attacks. Here is the double
blocks of 64 bits.
and enciphers
encryption:

112-bit key
Double DES has a
p E(K1,P)> E(K2,E(K1,p)) = C
K2 in this algorithm. Jt.
Double DES uses two keys to say Ki and kirst perfoms 1sing all
using 236
all 2
possible keys and store the results. The stored
to get the encrypted text in cru Encrypt p results will
DES on the original plain text using Ki nclude all possib encryptions p> E(K1,p).
Phy
the encrypted text but this time with th
Here, it again performs
DES on
other ke Then decrypt
C using all possible keys.
K in this algorithm. pK2,C) DK2,E({K2,EK1,p)) ECK1,p) ->

is the encryption encrypted text with the oriod


of
Firstly, the final output Pa A f t e r decrypting witn eacn key, check for a match with the stored outputs of the
different
twice with
two keys shown in the structur
text encrypted given 56 possible encryptions. When we have a match, we have located a possibly
below correct pair of keys. Now, perhaps more than one pair of keys will result in a
C ExalExP) match, but the number of pairs of keys that return matches should be small.
T=ExiP) ExalExP)
ExP Temporary Final Cipher
Original piaintext Encrypt
(P) Encrypt Cipher text (T) text(C)
University Questions

1. What is meant by meet in - the middle attack in double DES ? Explain the same in brief.
K2
K1
GTU Winter-17, Marks 4
Fig. 3.1.1
double DES?
2. How meet in the
middle attnck is performed on
GTU: Summer-19, Marks 4
Using two encryption stages
and two keys. 3. What is a meet-in-the-middle attack in double DES? GTU: Winter-19, Marks 4
is follows,
A) The plain text to iphertext
as

the 3.2 Triple DES GTU: Summer-17, 18


C Ex(Ex,(P)) where K and K2 are key.
follows, .Triple DES is simply another mode of DES operation. It takes three 64-bit keys, for
B) Ciphertext plain text is
to as
an overall key length of 192 bits.
P DxDx, (C) The procedure for encryption is exactly the same as regular DES, but it is repeated
Meet-in-the-middle attack is the drawback of
double DES in this. Mainly, th
matching three times. Hence the name triple DES.
from the other and
attack involves encryption from one end, decryption Triple DES uses 2 or 3 keys.
theresults in the middle hence the name in the message. Ihe data is encrypted with the first key (K), decrypted with the second key (K2),
and Hellman m
Meet-in-the-middle attack was first introduced by Diffie resof and
it is generic method to analyze high-level structu finally encrypted again with the third key (K3).
cryptanalysis of DES and a
in many products including
e DES with three keys is used quite extensively
cryptographic algorithms. into PGP and S/MIME.
I t s fundamental idea is the target algorithm can be decompoSed
that if master

involves portio1,l Brute force search impossible on Triple DES.


smaller parts and the computation of each part only
then we can investigate the security level of each part separately a Cet-in-middle attacks need 256 Plaintext-Ciphertext pairs per key.
keys,
combinethe results from both sides. Cupher text is produced EKa 1Dx2 lEK1
S u m e t h a t we
as C
Let's assu
This attack requires knowing some plaintext/ciphertext pairs. P
the
Fig. 3.2.1 shows the 3DES method with three key.
have a plaintext/ciphertext pair; i.e., we know the plaintext if
corresponding ciphertext C.
riple DES runs three times slower than standard DES, but
is much more secure

used properly.

-An up thrust for knowledgo ECHNICAL PUBLICATIONS- An up thrust for knowiedge


TECHNICAL PUBLICATIONS
Multiple yption and
Network Security
4
Triple t Nefwork Security 3-5
Ciyptography and araphy and
Plaintext
Multiple ncryption and Triple I
ECR and CBC mode works
.Where on block
Key 1 works on
block ciphe acting as stream
ciphers, and CFB and
OFB mode
DES Encryption ciphers.
1Ged
. E C B is used for transmitting sirngle value in secure
a

DES Encryption
Key 2
encty
ina blocks of text
authentication, CFB is used formanner, CBC is used for
data
authentication, OFB is used for transmitting encrypted
4ata. CTR is used for transmitting block-oriented transmitting encrypted stream of
DES Encryption
- Key 3
o s of operation enable the
applications.
repeated and secure use of block a
single A block cipher by itselt allows cipher under a

Ciphertext of the cipher's block length. encryption only of a single data block
method
Fig. 3.2.1 3DES with three key
When targeting a variable-1ength message, the data must
is the same as the cenarate cipher blocks. Typically, the last block must also
first be partitioned into
.The procedure for decrypting something procedure for be extended to match
encryption, except it is
executed in reverse. cipher's block length using suitable padding scheme.
the a

Like DES, data is encrypted and decrypted


in 64-bit chunks. Modes of operation have primarily been defined for encryption and authentication.
While modes of operation are
commonly associated with
.Thereare some weak keys that one should be aware of: If all three keys, the fri symmetric encryption,
and second keys, or the second and third keys are the same, then the encrypton they may also be applied to
public-key encryption primitives such RSA in as

procedure is essentially the same as standard DES. This sihuation is to be avoided principle.
because it is the same as using a really slow version of regular DES.
3.3.1 Electronic Code Book (ECB)
The input key for DES is 64-bits long; the actual key used by DES is only 56-bis
A block of plaintext encrypts into block of Block size is 64-bits. Each
in length. The least significant (right-most) bit in each byte is a parity
bit, and a
Ciphertext.
should be set so that there are always an odd number of 1s in every byte. These block is encrypted independently.
bits are ignored, so only the seven most
parity bits of each byte ar
significant Plaintext patterns are not concealed since identical blocks of plaintext give
used, resulting in a key length of 56-bits. This means that the effective key identical blocks of ciphertext. It is not necessary to encrypt the file linearly.
strength for Triple DES is actually 168-bits because each of the three keys contais
8 parity bits that are not used
during the encryption process.
User
naly
can
encrypt the 10 blocks in the middle first, then the blocks
the blocks in the beginning. Because of this, encrypted files are accessed
at the end, and

randomly like a data base.


University Questions It 1s
very easy to parallelize the process. Pad the last block with some regular
1. Explain triple DES with two Pattern 1.e. zeros, ones to make it a complete block.
keys.
GTU:Summer-17, Marks 4
2 Explain double and triple DES. End of file character is used to denote the final plaintext byte before padding
GTU: Summer-18, Marks
LB method is ideal for a short amount of data, such as an encryption key.
3.3 Block
Cipher Mode Operation GTO Summer-17, 18, 19, Winter-1 1 9
Fig. 3.3.1 shows ECB mode.
The modes of operation of block allow
n of 64 bits.
ciphers are configuration methods that
Ode, the plain block where each block is
text is divided into
large data streams, without the risk of coP in Th a
those ciphers to work with
is used for the encryption
the provided security Dlock is encrypted separately. The same key makes the block of
the key and
E a c h block is encrypted using
There ciphertext.
Code

are five types of operations in


block cipher modes, ECB (Electr made
Block) mode, CHC (Cipher Block Chaining)
mode, CFB (Cipher Feedbat
OFE (Output Feedback) mode and CTR (
Counter) mode.
TECHHICAL PUBLICATONS An up thrunt An up thrust for
knowledge
for knowledgo TECHNICAL PUBLICA TIONS
Multiple Encryption and:
3-6 and
Networh Security 3 7
and
Network Security Cnptography
Multiple Encryption and Triple DES
Agrahy Time N
iphertext is als
also decrypted
Time2

Time1 PN block
of using the same key and the result of the
decryption will urill be XOR with the first block of
ciphertext and form the
second
K
Encrypt block of
plain text. same
procedure is used for all the
blocks.
Enct En The plaintext
is XORed with the
previous ciphertext block before it is
mode is iterative mode.
encrypted.
Encryption . The CBC
CN block is
After a plaintext encrypted, the
resulting ciphertext is also stored in a
feedback register.
CN next plaintext block is encrypted, it is XORed
ho
Before with feedback
the next input to the encrypting routine. register to
become

K
Decrypt Decrypt Decrypt ,Theencryption of each block depends on all the previous blocks.

Aeiphertext block is decrypted normally and also saved in a feedback register.


2 Decryption PN Ater the next block is decrypted, it is XORed with the results of
the feedback
P

Fig. 3.3.1 ECB mode register.


divided into a block, each of 64 bits. The Mathematically it is
At the receiver side, the data is
same
key
which is used for encryption is used
for decryption. It takes the 64-bit ciphertov C E eCi-1)
convert the ciphertext into the plain text.
by using key
and the P = Ci-1 D,(C;)
the ECB mode may not be secure.
For lengthy messages, I t hides patterns in the plaintext.
Used in secure transmission of single values i.e. an encryption key.
that there is always some random looking ciphertext to
ECB has security problems that limit its usability.
In order to guarantee
apply to the actual plaintext, the process is started with a block of random bits
Pattens in the plaintext can yield patterns in the ciphertext. called the Initialization Vector (IV).

I t is also easy to modify a ciphertext message by adding, removing or switching Fig. 3.3.2 shows cipher block chaining mode.
encrypted blocks. P1 P2 Co - C2
Synchronization error is unrecoverable.

3.3.2 Cipher Block Chaining Mode (CBC)


Key D Decryption
Cipher block Mode at the sender
side, the plain text is divided into blocks. this Encryption
box

mode IV[nitialization IV is box


Vector) is used which can be a random block of text
used to make the ciphertext of each block Exclusive
IV
unique. OR
The first block of
plain text and IV is combined using the XOR
encrypted the resultant message using the key operation Co PA P2
and form the firsS C2 Po
ciphertext. the first block of ciphertext is used as IV for the second
text. the same
procedure will be bloc Encryption Decryption
followed for all blocks of plain text. Fig. 3.3.2 CBC
At the receiver side, the
ciphertext is divided blocks. The first bloc ciphertext

decrypted using the same key which is into When used in


block
is the
implementations add the IV
to
most CBC
decrypted

result will be XOR with the IV and form used for encryption. n The CEworking messages,
the first block of
second
Deginning of the
message in plaintext.
plain text ** blain text.

TECHNICAL PUBLICATIONS An up thrust TECHNICAL PUBLICATIONS An up thrust for knowledge


for knowledge
and Network Secuity
O y p t o g r a p n Ya n dNetwork 9
Multiple Encryption and Triple DES Multiple Encryption and
Security
3-8 Triple DES
Ciyptography and Network with respect
CFB is self recovering to
block will
atfect that ciphertext
block and all
block synchronization errors as w
bit error in a plaintext
A single
subsequent ciphertext blocks. Advantages

1.
Simplicity

CBC mode is selfrecovering.


Two blocks are affected by an error, but the system recovers and conin
able. used on a byte boundarv.
be
error is unrecoversto
nues Need not
blocks. Synchronization
to the
block cipher is randomized.
work correctly for all subsequent 3. Input
size is the same: size as the plaintext size.
Encryption is not parallelizable. access property.
Cipherte

random
and has a
Decryption is parallelizable Disadvantages

(CFB) is not parallelizable.


Feedback Mode Encryption
3.3.3 Cipher 1.
than a defined block size. Plaintext is somewhat difficult to manipulate.
D a t a is encrypted in units that are smaller 2.

to convert the DES


into stream cipher using cipher feedback mode Feedback Mode
. I tis possible
in the torm of units h e r e each unit is of R 3.3.4 Output
. I n this mode, the data is encrypted
The output feedback (OFB) mode is similar in structure to that
of CFB. Fig. 3.3.4
bits.
shows output feedback mode.
block chaining mode, N is initialized. the IV is kept in the shi#
Like cipher Initialization Vector (V)
register. It is encrypted using the key and
form the ciphertext.
Fig. 3.3.3 shows CFB encryption and decryption process.
Ciphertext Block cipher Block cipher Block cipher
Key- encryptioon Key encryption Key encryption
Shift register Shift register Plaintext Plaintext Plaintext

Key Encrypt Decrypt


Ciphertext Ciphertext Ciphertext

Fig. 3.3.4 Output feedback (OFB) mode encryption


K Select discard
t is the output of the encryption function that is fed back to the shift register in
OFB, whereas in CFB, the ciphertext unit is fed back to the shift register.
P
ne other difference is that the OFB mode operates on full biocks of plaintext and
ciphertext, not on an s-bit subset.
Ciphertext Plaintext
Advantages and Limitations of OFB
Fig. 3.3.3 CFB Modes Needs an Initialization vector which is unique tor
eacn USe
More than one
message can be
encrypted with the same key, ed that Z Bit errors do
not
different initialization vector is used.
3 More vulnerable
propagate
to ation
.CFB speed is the message stream mOu
same as
the block cipher. ender & receiver must
Encryption is not remain in sync
parallelizable, decryption is
parallelizable and has
has a
a
t
random
5.
access property. Only use with full block feedback
TECHNICAL PUBLICATIONS An up thrust
for knowledge ECHNICAL PUBLICATIONS An up thrust for knowiedgs
Multiple Enciyption and Security 3-111
Network Secunty
3-10 Tiple DEs otography
and
Network

Multiple otion and Triplo DES


Cryptography and

University Q u e s t i o n s
3.3.5 Counter Mode
the inn.
in counter mode use sequence
numbers as
nput to the Discuss selectronic code book and cipher feedback mode with neat
Block ciphers diagrams.
algorithm.
be encrypted
with the same key, provided
that
GTU Summer-17, Marks 7
More than one message can a
2 Dis the following block Cipher modes of operation in detail with neat
sketches:
is used. nmode
different initialise vector -Cipher block chaining
manipulate, any change
in ciphertext directly aff - Counter mode
Plaintext is very easy
to the GTU: Winter-17, Marks 7
3.3.5 shows counter mode. mode of DES operation.
plaintext. Fig. Counter 1 3 Explain cipher feedback
Counter GTU: Summer-18, Marks 4
4. Explain counter mode of DES operation. GTUSummer-18, Marks 4
Encrypt EExplain working of ECB. Why ECB (electronic code book) is
rarely used to encrypt message i
Key Encypt Key
GTU: Summer-19, Marks 4
&Whu CFB (cipher feedback nmode) encrypted messages are less subject to tampering than OFB
2 (output feedback mode) ? GTU Summer-19, Marks 3
7. Explain CFB algorithm mode with diagram.
GTU: Winter-19, Marks 3
8. Explain Counter (CTR) algorithm mode with diugram.
GTU: Winter-19, Marks 3
(a) Encryption
3.4 Short Questions and Answers
Counter Counter 1
Q.1 What is triple encryption ?
Ans. The function follows an encrypt decrypt encrypt (EDE) sequence. There is
Key Encrypt Key- Encrypt to the use of
no
cryptographic significance decryption for the second stage.
Q.2 How many keys are used in triple encryption ?
C2 Ans,:
Tuchman proposed a triple encryption method that uses only two keys.
Q.3 Why is the middle portion of 3DES a decryption rather than an encryption ?
P2 AnS. Decryption requires that the keys be applied in reverse order: P=Dkl|[Ekl[P]|.
(b) Decryption This results in a dramatic
increase in cryptographic strengtn.
Fig. 3.3.5 Counter mode
34 Why ECB mode is not secure for lengthy message
Synchronization error is unrecoverable. Ans.
A
ciphertext error affects only the corresponding bit of For lengthy messages, the ECB mode may not be secure because the messageis
plaintext. Striuctured, it may be possible for a cryptanalyst to exploit these regularities.
Encryption: The counter is encrypted and then XORed with the
produce the ciphertext block. plaintext D k to
3.5 Multiple Choice Questions
Q.1
Advantages which is the largest disadvantage of the symmetric encryption
1. Simple to
implement. More complex and therefore more time-consuming calculatonis
2. It Problem of the secure transmission of the Secret Key.
provides confidentiality.
3. Random CLess secure encryption function.
access of block is possible. dIsn't used
Efficiency is same as block any more.
cipher.
TECHNICAL PUBLICATIONS An up thrust for ECHNICAL PUBLICATIONS-An up thrust for knowledge
knowledge

You might also like