Sie sind auf Seite 1von 19

ITNE3013

Advanced Network and Infrastructure Security

Tutorial 5-7

Student Name: Seema Thanet


ITNE3013 Advanced Network and Infrastructure Security

Student ID: 40237

TUTORIAL 5

Task 1- Review Questions

1)Why is it important to study the Feistel cipher?

Ans: Feistel cipher using the concept of a product cipher, which is the performing
of two or more basic ciphers in sequence in such a way that the result or product
is cryptographically stronger than any of the component ciphers.

Feistel proposed the use of a cipher that alternates substitutions and


permutations. So Feistel cipher is an important one.

2)What is the difference between diffusion and confusion?

Ans: The terms confusion and diffusion are the properties for making a secure
cipher. Both Confusion and diffusion are used to prevent the encryption key from
its deduction or ultimately for preventing the original message. Confusion is used
for creating clueless ciphertext while diffusion is used for increasing the
redundancy of the plaintext over the major part of the ciphertext to make it
obscure. The stream cipher only relies on confusion. Alternatively, diffusion is
used by both stream and block cipher.

3)Which parameters and design choices determine the actual algorithm of a


Feistel cipher?

Copyright © 2015-2018 VIT, All Rights Reserved. 2


ITNE3013 Advanced Network and Infrastructure Security

Ans: The parameters and design choices which determine the actual algorithm of
a Feistel cipher are given below:

1. Block size: Larger block sizes mean greater security but reduced
encryption/decryption speed. A block size of 64 bits is a reasonable tradeoff
and has been nearly universal in block cipher design.However, the new AES
uses a 128-bit block size.
2. Key size:Larger key size means greater security but may decrease
encryption/decryption speed.Key sizes of 64 bits or less are now widely
considered to be inadequate, and 128 bits has ecome a common size.
3. Number of rounds: The essence of the Feistel cipher is that a single round
offers inadequate security but that multiple rounds offer increasing
security.A typical size is 16 rounds.
Subkey generation algorithm: Greater complexity in this algorithm should
lead to greater difficulty of cryptanalysis.
4. Round function: Again, greater complexity generally means greater
resistance to cryptanalysis.

4)What is the purpose of the S-boxes in DES?

The role of the S-boxes in the function F is that the substitution consists of a set
of eight S-boxes ,each of which accepts 6 bits as input and produces 4 bits as
follows: The first and last bits of the input to box Si form a 2-bit binary number to
select one of four substitutions defined by the four rows in the table for Si. The
middle four bits select one of the sixteen columns. The decimal value in the cell
selected by the row and column is then converted to its 4-bit representation to

Copyright © 2015-2018 VIT, All Rights Reserved. 3


ITNE3013 Advanced Network and Infrastructure Security

produce the output. For example, in S1, for input 011001, the row is 01 and the
column is 1100.The value in row 1, column 12 is 9, so the output is 1001.

5)Explain the avalanche effect.

Ans: The avalanche effect is a desirable property of cryptographic hashing


algorithm.It means that a small change in the input (let’s say one bit) grows and
grows over the time "in" the algorithm until, statistically speaking, it affects half
the bits of the output hash. In noncryptographic hashing algorithm this property
might be desired but not enforced, tolerated or even avoided, the latter is true for
hashing algorithm that must maintain a similar output for similar input. These are
used when looking for similar files, let’s say the same picture scaled up, or a text
with minor changes.

6)What is the difference between differential and linear cryptanalysis?

In cryptography, linear cryptanalysis is a general form of cryptanalysis based on


finding affine approximations to the action of a cipher. Attacks have been
developed for block ciphers and stream ciphers. Linear cryptanalysis is one of the
two most widely used attacks on block ciphers; the other being differential
cryptanalysis.

Copyright © 2015-2018 VIT, All Rights Reserved. 4


ITNE3013 Advanced Network and Infrastructure Security

Whereas Differential cryptanalysis is a general form of cryptanalysis applicable


primarily to block ciphers, but also to stream ciphers and cryptographic hash
functions. In the broadest sense, it is the study of how differences in information
input can affect the resultant difference at the output. In the case of a block
cipher, it refers to a set of techniques for tracing differences through the network
of transformation, discovering where the cipher exhibits non-random behaviour,
and exploiting such properties to recover the secret key (cryptography key)

Task 2 - Practice Questions

1)In one of his cases, Sherlock Holmes was confronted with the following
message.

534 C2 13 127 36 31 4 17 21 41

DOUGLAS 109 293 5 37

BIRLSTONE 26 BIRLSTONE 9 127 171

Although Watson was puzzled, Holmes was able immediately to deduce the
type of cipher. Can you?

Ans: The cipher refers to the words in the page of a book. The first entry 534,
refers to page 534. The second entry, C2, refers to the column two. The remaining
numbers are words in that columns. The names DOUGLAS and BIRLSTONE are
simply words that do not appear on that page.

Copyright © 2015-2018 VIT, All Rights Reserved. 5


ITNE3013 Advanced Network and Infrastructure Security

ITNE 3013

Advanced Network and Information Security

Copyright © 2015-2018 VIT, All Rights Reserved. 6


ITNE3013 Advanced Network and Infrastructure Security

TUTORIALS WEEK – 6

1) What is the purpose of the State array?


a) Ans: A single 128-bit block is depicted as a square matrix of bytes.
This block is copied into the State array, which is modified at each
stage of encryption or decryption. After the final stage, State is
copied to an output matrix
2) How is the S box constructed?

Ans: Each row of a S-box defines a general reversible substitution. It consists of a


set of eight S-boxes, each of which accepts 6 bits as input and produces 4 bits as
output.

3) Briefly describe Sub Bytes.


b) Ans: Sub byte uses an S-box to perform a byte-by-byte substitution
of the block.
The left most 4 bits of the byte are used as row value and the
rightmost 4 bits are used as a column value. These row and column
values serve as indexes into the S-box to select a unique 8-bit value.
4) Briefly describe ShiftRowas
c) Ans: In shift row, a row shift moves an individual byte from one
column to another, which is a linear distance of a multiple of 4 bytes.
In Forward Shift Row, each row perform circular left shift. Second
Row a 1-byte circular left shift is performed.
Third Row a 2-byte circular left shift is performed. For the Fourth Row

Copyright © 2015-2018 VIT, All Rights Reserved. 7


ITNE3013 Advanced Network and Infrastructure Security

a 3-byte circular left shift is performed. In Inverse Shift Row, each


row perform circular right shift.

5) What is the defence between AES decryption algorithm and the


equivalent inverse cipher?
Ans: In AES decryption, we use inverse shift rows inverse sub bytes,
add round key, inverse mix columns. But in equivalent inverse cipher,
we interchange inverse shift rows and inverse sub bytes

Activity

2. Given the plaintext {000102030405060708090A0B0C0D0E0F} and


the key {01010101010101010101010101010101}:

a. Show the original contents of State, displayed as a 4 × 4 matrix.

Copyright © 2015-2018 VIT, All Rights Reserved. 8


ITNE3013 Advanced Network and Infrastructure Security

Ans:

a) b) c) d)

e) 05 09 0D
02 06 0A 0E
03 07 0B 0F

b. Show the value of State after initial AddRoundKey.

Ans:

01 05 09 0D
00 04 08 0C
03 07 0B 0F
02 06 0A 0E

Copyright © 2015-2018 VIT, All Rights Reserved. 9


ITNE3013 Advanced Network and Infrastructure Security

a) c. Show the value of State after SubBytes


Ans:
f) g) h) i)

C B 1 7
j) k) l) m)

3 2 0 E
n) o) p) 76
B 5 B
77 6F 67 AB

d. Show the value of State after ShiftRows.

7C 6B 01 D7
F2 30 FE 63
2B 76 7B C5
AB 77 6F 67

Copyright © 2015-2018 VIT, All Rights Reserved. 10


ITNE3013 Advanced Network and Infrastructure Security

e. Show the value of State after Mix Columns.

Ans:

75 87 0F B2
55 E6 04 22
3E 2E B8 8C
10 15 58 0A

ITNE 3013

Advanced Network and Information Security

TUTORIALS WEEK – 7

1. What is triple encryption?


Ans:
Triple Data Encryption Standard (DES) is a type of computerized
cryptography where block cipher algorithms are applied three times to each
data block. The key size is increased in Triple DES to ensure additional security
through encryption capabilities. Each block contains 64 bits of data. Three keys

Copyright © 2015-2018 VIT, All Rights Reserved. 11


ITNE3013 Advanced Network and Infrastructure Security

are referred to as bundle keys with 56 bits per key. There are three keying options
in data encryption standards:

1. All keys being independent


2. Key 1 and key 2 being independent keys
3. All three keys being identical

1. What is a meet-in-the-middle attack?


Meet-in-the-middle is a known attack that can exponentially reduce the number
of brute force permutations required to decrypt text that has been encrypted by
more than one key. Such an attack makes it much easier for an intruder to gain
access to data.

2. How many keys are used in triple encryption?


Ans:
Three keys are referred to as bundle keys with 56 bits per key. There are three
keying options in data encryption standards:

4. All keys being independent


5. Key 1 and key 2 being independent keys
6. All three keys being identical

3. Explain each mode of block cipher operations. (Use diagrams).

Ans:

a. Electronic Codebook (ECB)

Copyright © 2015-2018 VIT, All Rights Reserved. 12


ITNE3013 Advanced Network and Infrastructure Security

This Electronic Code Book (ECB) is cryptography as a mode of operation for a


block cipher, with the characters the main things that every feasible block of
plaintext or an original text has a corresponding characteristic of ciphertext value
and vice versa. In other words, the same or main plaintext or original value will
always result or work in the same ciphertext value.

b. Cipher Block Chaining (CBC):

Copyright © 2015-2018 VIT, All Rights Reserved. 13


ITNE3013 Advanced Network and Infrastructure Security

Fig: Cipher Block chaining

The CBC encryption mode was invented in IBM in 1976. This mode is about adding
XOR each plaintext block to the ciphertext block that was previously produced.
The result is then encrypted using the cipher algorithm in the usual way. As a
result, every subsequent ciphertext block depends on the previous one. The first
plaintext block is added XOR to a random initialization vector (commonly referred
to as IV). The vector has the same size as a plaintext block.

Encryption in CBC mode can only be performed by using one thread. Despite this
disadvantage, this is a very popular way of using block ciphers. CBC mode is used
in many applications.

C. Cipher Feedback (CFB):

Copyright © 2015-2018 VIT, All Rights Reserved. 14


ITNE3013 Advanced Network and Infrastructure Security

Cipher Feedback (CFB) mode is very similar to CBC; the primary difference is CFB
is a stream mode. It uses feedback (the name for chaining when used in stream
modes) to destroy patterns. Like CBC, CFB uses an initialization vector and
destroys patterns, and errors propagate.

D. Output Feedback (OFB):

Copyright © 2015-2018 VIT, All Rights Reserved. 15


ITNE3013 Advanced Network and Infrastructure Security

Fig: Output Feedback(OFB)

Output Feedback (OFB) is Similar to CFB, except that the input to the encryption
algorithm is the preceding encryption output, and full blocks are used

E. Counter (CTR):

Fig: Counter (CTR)

Each block of plaintext is XORed with an encrypted counter. The counter is


incremented for each subsequent block.

Task 2 - Practice Questions 1)

You want to build a hardware device to do block encryption in the cipher block
chaining (CBC) mode using an algorithm stronger than DES. 3DES is a good
candidate. Figure 1 below shows two possibilities, both of which follow from
the definition of CBC. Which of the two would you choose:

Copyright © 2015-2018 VIT, All Rights Reserved. 16


ITNE3013 Advanced Network and Infrastructure Security

a) For security? One-loop has two fewer XORs per block. three-loop might benefit
from the ability to do a large set of blocks with a single key before switching. The
performance difference from choice of mode can be expected to be smaller than
the differences induced by normal variation in programming style

b) For performance? From performance perspective the most plausible approach


is the second three-simple approach. This is because each block which is present
in the loop contains its own set of encryption and decryption. This in truns make it
more effective, and speeds up the process, as compared to the first one where a
single overall unit of encryption and decryption is functioning. But as discussed
earlier, it is more vulnerable to differential attack as compared to single loop DES.
As compared to single DES triple DES has three discrete 56-bit keys namely 168,
112 0r 58 keys. It is tough to break with current technology.

Conclusion Both the DES discussed above have their own set of advantages and
disadvantages. Each one of them has its field of usageand hence depends on the
both situation and requirements that decide which one of them would be used in
which cases. For security purpose, it is perferable to use a single DES algorithm.
But when it comes to performance 3DES should be considered. Whatever the
choice might be, The DES algorithm remains one of the most commonly used easy
to read digital algorithm used in modern cryptographic application.

Copyright © 2015-2018 VIT, All Rights Reserved. 17


ITNE3013 Advanced Network and Infrastructure Security

2) Can you suggest a security improvement to either option in Figure 1, using


only three DES chips and some number of XOR functions? Assume you are still
limited to two keys.

Ans: The “single loop compact” approach in figure gives a scope of more security
because the EDE clock contains the encryption function. It is challenging foor
cryptanalysis without simplifications (like differential attack) more difficult as compare
doing it on a simple loop with encryption and decryption. this is because each loop
present in the diagram looks like simple DES that could be attacked separately in a
chosen-plaintext attack.

A differential attack is atype of cyptanalysis attack where the attacker has ciphertexts
and some plain texts as per their choice. As an evident, a simple DES present will make

Copyright © 2015-2018 VIT, All Rights Reserved. 18


ITNE3013 Advanced Network and Infrastructure Security

the process much more comfortable since the difference would be easy to calculate, as
well as for the fact thet there are very fewer pairs in the original to begin with.

Copyright © 2015-2018 VIT, All Rights Reserved. 19

Das könnte Ihnen auch gefallen