11848 cse403 solution
TRANSCRIPT
8/2/2019 11848 Cse403 Solution
http://slidepdf.com/reader/full/11848-cse403-solution 1/16
Q1 (a) What is the difference between an unconditionally secure cipher & computationally secure
cipher?
Ans. Unconditionally Secure Cipher:
1) A system is said to be unconditionally secure if it is secure against cryptanalyst with computa-
tional resources.
2) It deals with the impossibility of breaking the cipher text.
3) No matter how much time and resources an intruder has, he/she can not decrypt the ciphercode
4) No encryption method is unconditionally secure except one(One-time pad.)
Computationally Secure Cipher
1) A system that is secure against any enemy cryptanalyst with specified limited computational
power.
2) It deals with the difficulty of breaking the cipher text.
3) The cost of breaking the cipher exceeds the value of the encrypted information.
(b) Show a Playfair cipher in use using a 6X4 matrix, ignoring Q & Z and filling other 24 alpha-
bets, keyword is your “First Name” and plaintext is “I am loving it”.
Ans. For the Given Statement:
Keyword is: SHAJID
Plaintext is: I AM LOVING IT
1) Now we have to take a 6X4 matrix and we have to insert Keyword into this matrix. We have
to ignore Q & Z. So the obtain matrix is:
S H A J
I D B C
E F G K
L M N O
P R T U
V W X Y
2) Now split plaintext in the pair or two.Plaintext: IA ML OV IN GI TX
1
8/2/2019 11848 Cse403 Solution
http://slidepdf.com/reader/full/11848-cse403-solution 2/16
Here , X is the Filler.
Now take first pair and check in matrix. Now you have to follow certain steps:
• If the letters appear on the same row in matrix, replace them with the letters to their
immediate right respectively, wrapping around to the left side of the row if neces-
sary.
• If the letters appear on the same column, replace them with the letters immediately
below, wrapping around to the top if necessary.
• If the letters are on different rows and columns, replace them with the letters on the
same row respectively but at the other pair of corners of the rectangle defined by the
original pair.
3) By applying the rules on the plaintext the obtain Cipher text is:
Cipher text: BS NM LY BL EB XA
(c) Take a plaintext - “The slow green fox jumped over the fast lion”, use- Keyword
“mr_______ is my father, mrs________ is my mother”, fill your parents name in the blanks
and then use this keyword to Encrypt the plain text, the Algorithm to be used in one-time pad.
[Remember to do a XOR], then use the result to demonstrate 2 problems of 1 time pad.
Ans. In One Time Pad we do,
Keyword XOR Plaintext
Keyword: MR AZIZUL IS MY FATHER, MRS SARWARI IS MY MOTHER
Binary Notation:
001100 010001 000000 011001 001000 011001 010100 001011 001000 010010 001100 011000
000101 000000 010011 000111 000100 010001 001100 010001 010010 010010 000000 010001
010110 000000 010001 001000 001000 010010 001100 011000 001100 001110 010011 000111
000100 010001
Plaintext: THE SLOW GREEN FOX JUMPED OV ER THE FAST LION.
Binary Notation: 010011 000111 000100 010010 001011 001110 010110 000110 010001 000100
000100 001101 000101 001111 010111 001001 010100 001100 001111 000100 000011 001110
2
8/2/2019 11848 Cse403 Solution
http://slidepdf.com/reader/full/11848-cse403-solution 3/16
010101 000100 010001 010011 000111 000100 000101 000000 010010 010011 001011 001000
001110 001101
Ciphertext
011111 010110 000100 001011 000011 010111 000010 001101 011001 010110 001000 010101
000000 001110 000100 001110 010000 011101 000011 010101 010001 011100 010101 010101
000111 010011 010110 001100 001101 010010 011110 001011 000111 000110 011101 001010
Ciphertext: FWWVTOAODICIFDQNFAEWMFRACBPWJYEDYPKCDVRCVVHTWMNSEL-
HGDK
(d) My Birth Place is __________, _____________ ( put city and state), then use the double
transposition technique to encrypt the information.
Ans: Plaintext: My Birth Place is Lucknow Uttar Pradesh.
Let the Key is: 4 3 1 2 5 6 7
1) In transposition technique, we write out plaintext in a matrix and then apply key to it to ob-
tain the cipher text.
2) We insert the plain text row by row & to obtain the cipher text we read it column by column.
Plaintext:
M Y B I R T H
P L A C E I S
L U C K N O W
U T T A R P R
A D E S H Y Z
Where Y & Z are fillers.
Now the key is:
4 3 1 2 5 6 7
M Y B I R T H
P L A C E I S
L U C K N O W
U T T A R P R
3
8/2/2019 11848 Cse403 Solution
http://slidepdf.com/reader/full/11848-cse403-solution 4/16
A D E S H Y Z
The output after Ist Transposition:
Ciphertext: BACTEICKASYLUTDMPLUARENRHTIOPYHSWRZ
Again applying transposition:
4 3 1 2 5 6 7
B A C T E I C
K A S Y L U T
D M P L U A R
E N R H T I O
P X H S W R Z
Ciphertext after IInd Transposition:
CSPRHTYLHSAAMNXBKDEPELUTWIUAIRCTROZ .
(e) Show difference between the block and stream cipher using the same plaintext as example.
Block Cipher:
1) Partition the text into relatively large blocks and encode each block separately
2) DES is a block cipher with a 64 bit block size. AES is a block cipher with a 128 bit block
size.
3) In this there is mixing key data in with the message data in a variety of different ways.
4) Length of key and plaintext vary.
5) The total number of reversible mappings between n bit blocks is 2n! This is a very, very large
number!
Notice that if n is small, what we have is something similar to a substitution cipher. However, for
large n, (56 for DES), frequency analysis is clearly impossible.
Stream Cipher:
1) Partition the text into small blocks and let the encoding of each block depend on many previ-
ous blocks
2) One-time pad is stream ciphers.
3) They perform some operation (typically an exclusive OR) with one of these key bits and one
of the message bits.
4) Length of key and plaintext are same.
4
8/2/2019 11848 Cse403 Solution
http://slidepdf.com/reader/full/11848-cse403-solution 5/16
Q2) For each of the following assets, assign a low, moderate, or high impact level for the loss of
confidentiality, availability, and integrity, respectively. Justify your answers.
a. An organization managing public information on its Web server.
Ans.
i) If we talk about List of Employees in an organization, Employee Detail, Time Table of
teachers, grades of students or List of Reservation of People in a Particular train. All
these information if leaks then there it won’t cause much damage to any organization or
individual. So it is low level for the loss of Confidentiality.
ii) If Some teacher know the password of another teacher and Upload a wrong content for
the student. Students read it and write the same content in the Exam. After this the stu-
dents will blame the teacher if they won’t get marks on this question.
The person who knows the password can send an absurd announcement to anyone which can
be very dangerous for the teacher job or University. So, it is moderate level for the loss of
Integrity.
iii) If someone keeps on Sending request for the UMS again & again, on the same time if
Students have to upload assignment on the UMS. Then this would leads to DOS. Now
students wont be able to upload the assignment in time so, they are not able to get there
resources. The person who keeps on sending request for the server again and again
achieved success. This is effects both University and individual. So , it is high level of
availability
b. A law enforcement organization managing extremely sensitive investigative informa-
tion.
Ans.
i) Law Enforcement Organization contains all the important information about the Laws,
which laws should be implemented when and where. It also contain some secure inform-ation. If someone come to know about the information then it is high level of Confiden-
tiality.
ii) As it contain all the information which is for the betterment of the society, if if someone
make some change to it, the it would be high level of Integrity.
iii) If the laws available are intercepted then it would result in non completion of government
work in time. It is moderate level of Availability.
5
8/2/2019 11848 Cse403 Solution
http://slidepdf.com/reader/full/11848-cse403-solution 6/16
c. A financial organization managing routine administrative information (not privacy re-
lated information).
Ans.
i) As financial organization managing activity on the routine basis then, if some-
body come to know about the records then it hardly have affect on confidential-
ity. It will have low level of Confidentiality.
ii) As the administrative manages record on the routine basis then again it will have
low level of Integrity
iii) It will too have low level of Availability
d. An information system used for large acquisitions in a contracting organization con-
tains both sensitive, pre-solicitation phase contract information and routine adminis-
trative information. Assess the impact for the two data sets separately and the informa-
tion system as a whole.
Ans.
i) As this information system contains sensitive, pre-solicitation, routine adminis-
trative information. If someone who is not authorized to view all these informa-
tion and come aware with these records, will have moderate level of confidenti-
ality.
ii) As it is a information system, it will contain all the information. If someone do
some changes in the record, for some time it will affect the organization but for
afterward we administrator will make changes. So, it will have moderate level of
integrity.
e. A power plant contains a SCADA (supervisory control and data acquisition) system
controlling the distribution of electric power for a large military installation. The
SCADA system contains both real-time sensor data and routine administrative inform-
ation. Assess the impact for the two data sets separately and the information system asa whole.
Ans
i) The information about the power plant are easily available publically, so it will
have low level of confidentiality.
ii) If someone make some changes in the record that how much volts of electrify is
transmitted to a particular section. If someone increases the volts and if high
volts electricity is transmitted, it can have severe affect on the life of people.
So, it is high level of integrity.
6
8/2/2019 11848 Cse403 Solution
http://slidepdf.com/reader/full/11848-cse403-solution 7/16
iii) High level of Availability too.
Q3) The following ciphertext was generated using a simple substitution algorithm.
Decrypt this message.
Hints:
1. As you know, the most frequently occurring letter in English is e. Therefore, the first or
second (or perhaps third?) most common character in the message is likely to stand for e.
Also, e is often seen in pairs (e.g., meet, fleet, speed, seen, been, agree, etc.).Try to find a char-acter in the cipher text that decodes to e.
2. The most common word in English is “the.” Use this fact to guess the characters that stand for
t and h.
3. Decipher the rest of the message by deducing additional words.
Warning: The resulting message is in English but may not make much sense on a first
Ans. It is very difficult to decrypt the code from cipher text by just viewing it, or applying certain sub-
stitution to it.
So, I decided Write a program .
1) Before writing the program count the frequency of the letters occurring in the cipher text.
The most frequent letter from the less frequent occurring letters.
8 > ; > 4 > ) > ± > x > 5 > 6 > ( > + 1 > 0 > 2 > 9 > 3 > : > ? > ] >. > ƪ
2) Now you should know the most frequent letters occurring in the English language:
E > T > A > O > I > N > S > R > H >L > D > C > U > M > F > P > G > W > Y > B > V > K > X
> J > Q > V
3) By writing a program and substituting:
5 with A
‡ With O
3 With G
† With D
7
8/2/2019 11848 Cse403 Solution
http://slidepdf.com/reader/full/11848-cse403-solution 8/16
8 With E
0 With L
; With T
) With S
( With R
4 With H
1 With F
* With N
2 With B
9 With M
] With W
ƪ With V
. With P
: With Y
? With U
- With L
4) output:
A GOOD GLASS IN THE BISHOPS HOSTEL IN THE DEVILS SEA TWENTY ONE DEGREES
AND THIRTEEN MINUTES NORTHEAST AND BY NORTH MAIN BRANCH SEVENTH
LIMB EAST SIDE SHOOT FROM THE LEFT EYE OF THE DEATH HEAD A BEE LINE
FROM THE TREE THROUGH THE SHOT FIFTY FEET OUT
Q4)
8
8/2/2019 11848 Cse403 Solution
http://slidepdf.com/reader/full/11848-cse403-solution 9/16
Ans. For the given set of statement
Key: 0 1 2 3 4 5 6 7 8 9 A B C D E F
Binary Notation: 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101
1110 1111
Plaintext: 0 1 2 3 4 5 6 7 8 9A B C D E F
Binary Notation: 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101
1110 1111
a) Derive K1, the first-round subkey
Use Permutation Choice One Table:
Key: 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
Number the Key from 1 to 64.
Insert the key into PC1 table and remove the last bit of every 6th bit i.e. remove 8th, 16th , 24th , etc.
The obtain output after PC1 table is:
9
8/2/2019 11848 Cse403 Solution
http://slidepdf.com/reader/full/11848-cse403-solution 10/16
Now the bits get converted into 56 bit form 64 bit
C0=1111000011001100101010100000
D0=1010101011001100111100000000
Do Circular Left Shift on C0 & D0
Ci=1110 0001 1001 1001 0101 0100 0001
Di=0101 0101 1001 1001 1110 0000 0001
Again Number the bit in the Ci & Di from 1 to 56
Use the PC2 table to & insert the Ci & Di into the PC2 table:
Now use PC2 table-:
0 0 0 0 1 0 1 1
0 0 0 0 0 0 1 0
0 1 1 0 0 1 1 11 0 0 1 1 0 1 1
10
1 1 1 1 0 0 0
0 1 1 0 0 1 1
0 0 1 0 1 0 1
0 1 0 0 0 0 0
1 0 1 0 1 0 1
0 1 1 0 0 1 1
0 0 1 1 1 1 00 0 0 0 0 0 0
8/2/2019 11848 Cse403 Solution
http://slidepdf.com/reader/full/11848-cse403-solution 12/16
0 1 1 1 1 0
1 0 0 0 0 1
0 1 0 1 0 1
0 1 0 1 0 1
0 1 1 1 1 01 0 0 0 0 1
0 1 0 1 0 1
0 1 0 1 0 1
E(R0): 0111 1010 0001 0101 0101 0101 0111 1010 0001 0101 0101 0101
d) A = EXP(R0) XOR K1.
We Know,
ER(0)= 0111 1010 0001 0101 0101 0101 0111 1010 0001 0101 0101 0101
K1= 0000 1011 0000 0010 0110 0111 1001 1011 0100 1001 1010 0101
Perfoming XOR operation between ER(0) and K1.
A= EXP(R0) XOR K1.
A= 0111 0001 0001 0110 0011 0010 1110 0001 0101 1100 1111 0000
e) Group the 48-bit result of (d) into sets of 6 bits and evaluate the corresponding S-box
substitutions.
We know:
A= 011100 010001 011000 110010 111000 010101 110011 110000
Taking the first 6 bit, and insert it into the S1 box:
S1= 011100
12
8/2/2019 11848 Cse403 Solution
http://slidepdf.com/reader/full/11848-cse403-solution 13/16
• Combining the First & Last bit to form the row.
• Combining the Rest bit to form the Column.
00th Row 1110th Column
Value Comes out to be: 0
S1=0000
Taking the Next 6 bit, and insert it into the S2 box:
S2= 010001
• Combining the First & Last bit to form the row.
• Combining the Rest bit to form the Column.
01th Row 1000th Column
Value Comes out to be: 12
S2= 1100
Taking the Next 6 bit, and insert it into the S3 box:
S3= 011000
• Combining the First & Last bit to form the row.
• Combining the Rest bit to form the Column.
00th Row 1100th Column
Value comes out to be: 11
S3=1011
Taking the Next 6 bit, and insert it into the S4 box:
S4= 110010
13
8/2/2019 11848 Cse403 Solution
http://slidepdf.com/reader/full/11848-cse403-solution 15/16
• Combining the First & Last bit to form the row.
• Combining the Rest bit to form the Column.
11th Row 1001th Column
Value Comes out to be: 15
S7= 1111
Taking the Next 6 bit, and insert it into the S8 box:
S8= 110000
• Combining the First & Last bit to form the row.
• Combining the Rest bit to form the Column.
10th Row 1000th Column
Value Comes out to be: 0
S8=0000
f) Concatenate the results of (e) to get a 32-bit result, B.
By, combining the outputs from the different S-boxes
B= 0000 1100 0010 0001 0110 1101 0101 0000
g) Apply the permutation to get P(B).
Give Numbering to B obtain in previous part & use Permutation Function:
P(B)= 1001 0110 0001 1100 0010 0101 1001 1101
15
8/2/2019 11848 Cse403 Solution
http://slidepdf.com/reader/full/11848-cse403-solution 16/16
h) Calculate R1 = P(B) XOR L0.
P(B)= 1001 0110 0001 1100 0010 0101 1001 1101
XOR
L0=1100 1100 0000 0000 1100 1100 1111 1111
R1= 0101 1010 0001 1100 1110 1001 0110 0010
i) Write down the ciphertext.
Combine L1 & R1 to obtain the Cipher text
Ciphertext: 1100 1100 0000 0000 1100 1100 1111 1111
0101 1010 0001 1100 1110 1001 0110 0010
Cipher text: C C 0 0 C C F F 5 A 1 C E 9 6 2
16