CNS Lab Manual
CNS Lab Manual
CEASER CIPHER
Theory:
Analyzing the Problem:
Using the Caesar Shift (3 to the right), the message
"RETURN TO ROME"
"UHWXUA WR URPH"
In this example, 'R' is shifted to 'U', 'E' is shifted to 'H', and so on. Now, even if the enemy did
intercept the message, it would be useless, since only Caesar's generals could read it.
Thus, the Caesar cipher is a shift cipher since the ciphertext alphabet is derived from the
plaintext alphabet by shifting each letter a certain number of spaces. For example, if we use a
shift of 19, then we get the following pair of ciphertext and plaintext alphabets:
Plaintext: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Ciphertext: T U V W X Y Z A B C D E F G H I J K L M N O P Q R S
For this solution we have to scan the following input from the user as given below.
1) Input value for Plain Text & key.
2) Encryption logic for generating Cipher Text.
3) Print function for printing Cipher Text Output.
4) Vice-versa for the Decryption logic.
Exercises:
Review Question:
MONOALPHABETIC CIPHER
Theory:
A mono-alphabetic cipher is a simple substitution cipher wherein each letter of the plaintext is
replaced by another letter in the ciphertext. An example of a mono-alphabetic cipher key
follows:
ABCDEFGHIJKLMNOPQRSTUVWXYZ
jrsqxzoewndyvpfatbcilhgkmu
This key means that any 'A' in the plaintext will be replaced by an 'j' in the ciphertext, any 'B'
in the plaintext will be replaced by a 'r' in the ciphertext, and so on. 3
Breaking the mono-alphabetic cipher was difficult at first, but with a little experience, it became
routine. An effective method was developed which was applied successfully to ciphertext as
short as three times the key length. The method developed follows:
2. Using the letter frequency statistics and clever observations, make guesses at probable
letter substitutions.
3. Backtrack, if necessary.
Sample Example:
Here are the number of single letter occurences in the encrypted text:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 18 3 7 35 0 2
14 14 22 26 13 0 25 39 38 12 3 7 1 14 0 21 3 19 15 41
First we guess the word 'VIY' to be 'and'. The frequency of 'Y' is small enough to be
substituted for 'd'.
thDN NeHDnar XoPrNe wDll NtPdT NeXPrDtT AroH HPltDKle KerNKeXtDQeNh we wDll
XonNDder NoAtware DHKleHentatDonN oA NeXPrDtT related KolDXDeN Dn the XonteSt
oA oKeratDnB NTNteHNA networkNA and dataWaNeNh toKDXN DnXlPdet oKeratDnB
NTNteH KroteXtDon HeXhanDNHNA DntrPNDon deteXtDon NTNteHNA AorHal HodelN oA
NeXPrDtTA XrTKtoBraKhTA data WaNe NeXPrDtTA worHNA QDrPNeNA network and
dDNtrDWPted NTNteH NeXPrDtTA and KolDXDeN oA KrDQaXT and XonADdentDalDtTh
thiN NeHinar XoPrNe will NtPdT NeXPritT AroH HPltiKle KerNKeXtiQeNh we will
XonNider NoAtware iHKleHentationN oA NeXPritT related KoliXieN in the XonteSt oA
oKeratinB NTNteHNA networkNA and dataWaNeNh toKiXN inXlPdet oKeratinB NTNteH
KroteXtion HeXhaniNHNA intrPNion deteXtion NTNteHNA AorHal HodelN oA
NeXPritTA XrTKtoBraKhTA data WaNe NeXPritTA worHNA QirPNeNA network and
diNtriWPted NTNteH NeXPritTA and KoliXieN oA KriQaXT and XonAidentialitTh
this seminar XoPrse will stPdT seXPritT Arom mPltiKle KersKeXtiQesh we will Xonsider
soAtware imKlementations oA seXPritT related KoliXies in the XonteSt oA oKeratinB
sTstemsA networksA and dataWasesh toKiXs inXlPdet oKeratinB sTstem KroteXtion
meXhanismsA intrPsion deteXtion sTstemsA Aormal models oA seXPritTA XrTKtoBraKhTA
data Wase seXPritTA wormsA QirPsesA network and distriWPted sTstem seXPritTA and
KoliXies oA KriQaXT and XonAidentialitTh
this seminar course will study security from multiple perspectivesh we will consider software
implementations of security related policies in the context of operating systemsf networksf
and databasesh topics includet operating system protection mechanismsf intrusion detection
systemsf formal models of securityf cryptographyf data base securityf wormsf virusesf
network and distributed system securityf and policies of privacy and confidentialityh
Some of the punctuation in the original message seems to have translated to alphabetic
characters. The original mono-alphabetic cipher implementation (which eventually turns
out to be a shift cipher) comes under scrutiny.
When we write out the key(EX.2)
ABCDEFGHIJKLMNOPQRSTUVWXYZ
fghijk lmnopqrstuvwxyzabcde
Exercises:
Review Question:
PLAYFAIR CIPHER
Practical No: Date:
Aim:Introduction to PLAYFAIR CIPHER.
Theory:
Analyzing the Problem:
By analyzing the problem I found required two basic steps for implementing the
data encryption using Play Fair cipher
1) Generate Key matrix
To Generate the key matrix take any random key of any length and form a 5X5
matrix. Go on filling the raws of the matrix with the key characters ( if repeating
character occurs then ignore it). Fill the remaining matrix with alphabets from A to
Z (except those already occurred in the key).
For example for the key "monarchy" we have the matrix as follow
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
Encryption rules
i) Repeating plain text letters that would fall in the same pair are separated
with filler letter, such as x.( i.e. Balloon becomes Ba, lx, lo, on)
ii) If both the characters are in the same raw then replace each with the character
to its right, with the last character followed by the first, in the matrix.
Example:
Using key as "monarchy" we have
- Encryption of AR as RM
- Encryption of MU as CM
- Encryption of BP as IM
For the solution we have to implement the following functions given below. 1)
Input function for key & Plain Text.
2) Matrix generation.
3) Encryption function for generating Cipher Text.
4) Print function for printing Cipher Text Output.
Testing the SolutionBy Testing the program we get the cipher text as output.
Exercises:
Review Question:
1. Using the key =‖monarchy‖ create the key square ,encrypt the below text
(a) ―we are discovered save yourself‖
(b) ―It was used for tactical purposes by British‖
(c) ―The technique encrypts pairs of letters called digraphs ‖
(d) ―The Playfair is significantly harder to break‖
POLYALPHABETIC
Aim:Introduction to POLYALPHABETIC
Theory:
The Alberti cipher by Leon Battista Alberti around 1467 was believed to be the first
polyalphabetic cipher. Alberti used a mixed alphabet to encrypt a message, but whenever he
wanted to, he would switch to a different alphabet, indicating that he had done so by including
an uppercase letter or a number in the cryptogram. For this encipherment Alberti used a decoder
device, his cipher disk, which implemented a polyalphabetic substitution with mixed alphabets.
Although Alberti is usually considered the father of polyalphabetic cipher, it has been claimed
that polyalphabetic ciphers may have been developed by the Arab cryptologist Al Kindi 600
years before Alberti. Johannes Trithemius—in his book Polygraphiae libri sex (Six books of
polygraphia), which was published in 1518 after his death—invented aprogressive key
polyalphabetic cipher called the Trithemius cipher. Unlike Alberti's cipher, which switched
alphabets at random intervals, Trithemius switched alphabets for each letter of the message. He
started with a tabula recta, a square with 26 alphabets in it (although Trithemius, writing in
Latin, used 24 alphabets). Each alphabet was shifted one letter to the left from the one above it,
and started again with A after reaching Z (see image).
Table of PolyAlphabetic
The cipher was trivial to break, and Alberti's machine implementation not much more difficult.
Keyprogression in both cases was poorly concealed from attackers. Even Alberti's
implementation of hispolyalphabetic cipher was rather easy to break (the capitalized letter is a
major clue to the cryptanalyst). For most of the next several hundred years, the significance of
using multiple substitution alphabets was missed by almost everyone. Polyalphabetic substitution
cipher designers seem to have concentrated on obscuring the choice of a few such alphabets
(repeating as needed), not on the increased security possible by using many and never repeating
any.
The principle (particularly Alberti's unlimited additional substitution alphabets) was a major
advance—the most significant in the several hundred years since frequency analysis had been
developed. A reasonable implementation would have been (and, when finally achieved, was)
vastly harder to break. It was not until the mid-19th century (in Babbage's secret work during
the Crimean War and Friedrich Kasiski's generally equivalent public disclosure some years
later), thatcryptanalysis of well-implemented polyalphabetic ciphers got anywhere at all.
Exercises:
Review Question:
1. Encrypt the following text using Polyalphabetic Cipher.
(a) ―Must see you over Cadogan West Coming at once‖
(b) ―involve something more than just sliding one alphabet against another‖
(c) ―the wheel is constructed from four disks‖
(d) ―the war will be over within two weeks‖
HILL CIPHER
Theory:
Analyzing the Problem:
Each letter is represented by a number modulo 26.(Often the simple scheme A = 0,B=1,.., Z = 25
is used, but this is not an essential feature of the cipher.) To encrypt a message, each block of n
letters (considered as an n-component vector) is multiplied by an invertible n × n matrix, again
modulus 26. To decrypt the message, each block is multiplied by the inverse of the matrix used
for encryption.
The matrix used for encryption is the cipher key, and it should be chosen randomly from the set
of invertible n × n matrices (modulo 26). The cipher can, of course, be adapted to an alphabet
with any number of letters; all arithmetic just needs to be done modulo the number of letters
instead of modulo 26.
Sample Example:
Let
be the key and suppose the plaintext message is HELP. Then this plaintext is represented by two
pairs
Then we compute
Then we compute
Therefore
Exercises:
Review Question:
1. Encrypt the message ―meet me at the usual place at ten rather than eight oclock‖
9 4
using the Hill cipher with the key .Show your calculations and the result.
5 7
2. Show the calculation for the corresponding decryption of the cipher text to recover the
original text.
DES Algorithm
Theory:
Over the last decade, there has been an accelerating increase in the accumulations and
communication of digital data by government, industry and by other organizations in the private
sector. The contents of these communicated and stored data often have very significant value
and/or sensitivity. It is now common to find data transmissions which constitute funds transfers
of several million dollars, purchase or sale of securities, warrants for arrests or arrest and
conviction records being communicated between law enforcement agencies, airline reservations
and ticketing representing investment and value both to the airline and passengers, and health
and patient care records transmitted among physicians and treatment centers.
The increasing volume, value and confidentiality of these records regularly transmitted and
stored by commercial and government agencies has led to heightened recognition and concern
over their exposures to unauthorized access and use. This misuse can be in the form of theft or
defalcations of data records representing money, malicious modification of business inventories
or the interception and misuse of confidential information about people. The need for protection
is then apparent and urgent.
The origins of DES go back to the early 1970s. In 1972, after concluding a study on the US
government's computer security needs, the US standards body NBS (National Bureau of
Standards) — now named NIST (National Institute of Standards and Technology) — identified a
[1]
need for a government-wide standard for encrypting unclassified, sensitive information.
Accordingly, on 15 May 1973, after consulting with the NSA, NBS solicited proposals for a
cipher that would meet rigorous design criteria. None of the submissions, however, turned out to
be suitable. A second request was issued on 27 August 1974. This time, IBM submitted a
candidate which was deemed acceptable — a cipher developed during the period 1973 –1974
The DES (Data Encryption Standard) algorithm is the most widely used encryption algorithm in
the world. For many years, and among many people, "secret code making" and DES have been
synonymous. And despite the recent coup by the Electronic Frontier Foundation in creating a
$220,000 machine to crack DES -encrypted messages, DES will live on in government and
banking for years to come through a life- extending version called "triple-DES."
1.1 Get a 64-bit key from the user. (Every 8th bit (the leastsignificant bit of each byte) is
considered a parity bit. For a key tohave correct parity, each byte should contain an odd number
of "1"bits.) This key can be entered directly, or it can be the result ofhashing something else.
There is no standard hashing algorithm for thispurpose.
1.2.1 Perform the following permutation on the 64-bit key. (Theparity bits are discarded,
reducing the key to 56 bits. Bit 1 (the mostsignificant bit) of the permuted block is bit 57 of the
original key,bit 2 is bit 49, and so on with bit 56 being bit 4 of the original key.)
57 49 41 33 25 17 9
1 58 50 42 34 26 18
10 2 59 51 43 35 27
19 11 3 60 52 44 36
63 55 47 39 31 23 15
7 62 54 46 38 30 22
14 6 61 53 45 37 29
21 13 5 28 20 12 4
1.2.2 Split the permuted key into two halves. The first 28 bits are called C[0] and the last 28 bits
are called D[0].
1.2.3.1 Perform one or two circular left shifts on both C[i-1] andD[i-1] to get C[i] and D[i],
respectively. The number of shifts periteration are given in the table below.
Iteration # 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Left
Shifts 1 1 2 2 2 2 2 2 1 2 2 2 2 2 2 1
1.2.3.2 Permute the concatenation C[i]D[i] as indicated below. Thiswill yield K[i], which is 48
bits long.
14 17 11 24 1 5
3 28 15 6 21 10
2.1 Get a 64-bit data block. If the block is shorter than 64 bits, itshould be padded as appropriate
for the application.
58 50 42 34 26 18 10 2
60 52 44 36 28 20 12 4
62 54 46 38 30 22 14 6
64 56 48 40 32 24 16 8
57 49 41 33 25 17 9 1
59 51 43 35 27 19 11 3
61 53 45 37 29 21 13 5
63 55 47 39 31 23 15 7
2.3 Split the block into two halves. The first 32 bits are calledL[0], and the last 32 bits are called
R[0].
2.4.1 Expand the 32-bit R[i-1] into 48 bits according to the bit-selection function below.
Expansion (E)
32 1 2 3 4 5
456789
8 9 10 11 12 13
12 13 14 15 16 17
16 17 18 19 20 21
20 21 22 23 24 25
24 25 26 27 28 29
28 29 30 31 32 1
Gandhinagar Institute Of Technology 3161606 CNS
.
2.4.3 Break E(R[i-1]) xor K[i] into eight 6-bit blocks. Bits 1-6 areB[1], bits 7-12 are B[2], and so
on with bits 43-48 being B[8].
2.4.4 Substitute the values found in the S-boxes for all B[j]. Start with j = 1. All values in the S-
boxes should be considered 4 bits wide.
2.4.4.1 Take the 1st and 6th bits of B[j] together as a 2-bit value (call it m) indicating the row in
S[j] to look in for the substitution
2.4.4.2 Take the 2nd through 5th bits of B[j] together as a 4-bit value (call it n) indicating the
column in S[j] to find the substitution.
Substitution Box 1
(S[1])
14 4 13 1 2 15 11 8 3 10 6 12 5 9 0 7
0 15 7 4 14 2 13 1 10 6 12 11 9 5 3 8
4 1 14 8 13 6 2 11 15 12 9 7 3 10 5 0
15 12 8 2 4 9 1 7 5 11 3 14 10 0 6 13
S[2]
15 1 8 14 6 11 3 4 9 7 2 13 12 0 5 10
3 13 4 7 15 2 8 14 12 0 1 10 6 9 11 5
0 14 7 11 10 4 13 1 5 8 12 6 9 3 2 15
13 8 10 1 3 15 4 2 11 6 7 12 0 5 14 9
S[3]
10 0 9 14 63 15 5 1 13 12 7 11 4 2 8
13 7 0 9 3 4 6 10 2 8 5 14 12 11 15 1
13 6 4 9 8 15 3 0 11 1 2 12 5 10 14 7
1 10 13 0 6 9 8 7 4 1514 3 11 5 2 12
S[4]
7 13 14 3 0 6 9 10 1 2 8 5 11 12 4 15
13 8 11 5 615 0 3 4 7 2 12 1 10 14 9
10 6 9 0 1211 7 13 15 1 3 14 5 2 8 4
3 15 0 6 10 1 13 8 9 4 5 11 12 7 2 14
2 12 41 7 10 11 6 8 5 3 15 13 0 14 9
14 11 2 12 4 7 13 1 5 0 15 10 3 9 8 6
4 2 1 11 10 13 7 8 15 9 12 5 6 3 0 14
11 8 12 7 1 14 2 13 6 15 0 9 10 4 5 3
S[6]
12 1 10 15 9 2 6 8 0 13 3 4 14 7 5 11
10 15 4 2 7 12 9 5 6 1 13 14 0 11 3 8
9 14 15 5 2 8 12 3 7 0 4 10 1 13 11 6
4 3 2 12 9 5 15 10 11 14 1 7 6 0 8 13
S[7]
4 11 2 14 15 0 8 13 3 12 9 7 5 10 6 1
13 0 11 7 4 9 1 10 14 3 5 12 2 15 8 6
1 4 11 13 12 3 7 14 10 15 6 8 0 5 9 2
6 11 13 8 1 4 10 7 9 50 15 14 2 3 12
S[8]
13 2 8 4 6 15 11 1 10 9 3 14 5 0 12 7
1 15 13 8 10 3 7 4 12 5 6 11 0 14 9 2
7 11 4 1 9 12 14 2 0 6 10 13 15 3 5 8
2 1 14 7 4 10 8 13 15 12 9 0 3 5 6 11
2.4.4.4 Loop back to 2.4.4.1 until all 8 blocks have been replaced.
Permutation P
16 7 20 21
29 12 28 17
1 15 23 26
5 18 31 10
2 8 24 14
32 27 3 9
19 13 30 6
22 11 4 25
2.4.6 Exclusive-or the resulting value with L[i-1]. Thus, all together,your R[i] = L[i-1] xor
P(S[1](B[1])...S[8](B[8])), where B[j] is a 6-bit block of E(R[i-1]) xor K[i]. (The function for
R[i] is more concisely written as, R[i] = L[i-1] xor f(R[i-1], K[i]).)
2.5 Perform the following permutation on the block R[16]L[16]. (Note that block R precedes
block L this time.)
-1
Final Permutation (IP )
40 8 48 16 56 24 64 32
39 7 47 15 55 23 63 31
38 6 46 14 54 22 62 30
37 5 45 13 53 21 61 29
36 4 44 12 52 20 60 28
35 3 43 11 51 19 59 27
34 2 42 10 50 18 58 26
33 1 41 9 49 17 57 25
This has been a description of how to use the DES algorithm to encrypt one 64-bit block. To
decrypt, use the same process, but just use the keys K[i] in reverse order. That is, instead of
applying K[1] for the first iteration, apply K[16], and then K[15] for the second, on down to
K[1].
Exercises:
Review Question:
1. Why is it important to study the Feistel cipher?
2. What is the difference between diffusion and confusion?
3. Explain the avalanche effect.
Theory:
Analyzing the Problem:
Diffie Hellman key exchange algorithm uses asymmetric key principles for the distribution
of symmetric keys to both parties in a communication network. Diffie Hellman utilizes the
public& private key of asymmetric key cryptography to exchange the secret key.
Before going in depth of Diffie Hellman Algorithm, we define primitive root of a prime
number 'p' as one whose powers generate all the integers from 1 to p-1, i.e. if 'a' is the
primitive root of a prime no 'p', then,
2 3 p-1
a mod p , a mod p , a mod p, .............. a mod p generate all distinct integers from 1 to
(p-1) in some permutation.
If Alice wants to know the secret key k, she takes Bob’s public number, v = 28,
and raises it to her private number, a = 18 (taking the result mod 47).
If Bob wants to know the secret key, he takes Alice’s public number, u = 2,
and raises it to his private number, b = 22 (taking the result mod 47).
Exercises:
Review question:
1. Users A and B use the Diffie-Hellman key exchange technique with a common prime
q = 71 and a primitive root α = 7.
a. If user A has private key XA = 5, what is A’s public key YA?
b. If user B has private key XB = 12, what is B’s public key YB?
c. What is the shared secret key?
2 . Consider a Diffie-Hellman scheme with a common prime q = 11 and a primitive root
α = 2.
a. Show that 2 is a primitive root of 11.
b. If user A has public key YA = 9, what is A’s private key XA?
c. If user B has public key YB = 3, what is the secret key K shared with A?
RSA
Theory:
Analyzing the Problem:
the public key is (n, e) and the private key is (n, d)
the values of p, q and φ(n) are private
e is the public or encryption exponent
d is the private or decryption exponent
Encryption
e
The cyphertext C is found by the equation 'C = M mod n' where M is the original message.
Decryption
d
The message M can be found form the cyphertext C by the equation 'M = C mod n'.
Sample Example:
Therefore the public key is (n, e) = (33, 3) and the private key is (n, d) = (33, 7).
So now the cyphertext C has been found. The decryption of C is performed as follows.
d
M' = C mod n
7
M' = 13 mod 33
M' = 62,748,517 mod 33
M' = 7
Exercises:
Review Question:
1. What are the principal elements of a public-key cryptosystem?
2. What requirements must a public-key cryptosystems fulfill to be a secure algorithm?
3. In a public-key system using RSA, you intercept the ciphertext C = 10 sent to a user
whose public key is e = 5, n = 35. What is the plaintextM?
4. Perform encryption and decryption using the RSA algorithm, for the
following:
a. p = 3; q = 11, e = 7; M = 5
b. p = 5; q = 11, e = 3; M = 9
c. p = 7; q = 11, e = 17; M = 8
d. p = 11; q = 13, e = 11; M = 7
e. p = 17; q = 31, e = 7; M = 2
Hint: Decryption is not as hard as you think; use some finesse.
Theory:
A digital signature is a mathematical scheme for demonstrating the authenticity of a digital
message or documents. A valid digital signature gives a recipient reason to believe that the
message was created by a known sender, that the sender cannot deny having sent the message
(authentication and non-repudiation), and that the message was not altered in transit (integrity).
A key generation algorithm that selects a private keyuniformly at random from a set of
possible private keys. The algorithm outputs the private key and a corresponding public key.
A signing algorithm that, given a message and a private key, produces a signature.
A signature verifying algorithm that, given the message, public key and signature, either
accepts or rejects the message's claim to authenticity.
Two main properties are required. First, the authenticity of a signature generated from a fixed
message and fixed private key can be verified by using the corresponding public key. Secondly,
it should be computationally infeasible to generate a valid signature for a party without knowing
that party's private key. A digital signature is an authentication mechanism that enables the
creator of the message to attach a code that acts as a signature.
Formally, a digital signature scheme is a triple of probabilistic polynomial time algorithms, (G,
S, V), satisfying:
G (key-generator) generates a public key, pk, and a corresponding private key, sk, on
n
input 1 ,whe re n is the security parameter.
S (signing) returns a tag, t, on the inputs: the private key, sk, and a string, x.
V (verifying) outputs accepted or rejected on the inputs: the public key, pk, a string, x,
and atag, t.
n
Pr [ (pk, sk) ← G(1 ), V( pk, x, S(sk, x) ) = accepted ] = 1.
S(sk, · )
where A denotes that A has access to the oracle, S(sk, · ), and Q denotes the set of the
queries on S made by A, which knows the public key, pk, and the security parameter, n. Note
that we require any adversary cannot directly query the string, x, on S.
Exercises:
Write a C program to implement digital signature algorithm.
Review Question:
1. What are the properties a digital signature should have?
2. What requirements should a digital signature scheme satisfy?
3. What is the difference between direct and arbitrated digital signature?
4. In what order should the signature function and the confidentiality function be applied
to a message, and why?
CRYPTOOL
Aim:Introduction to cryptool.
Theory:
CrypTool is an open source e-learning tool illustrating cryptographic and cryptanalytic concepts.
CrypTool implements more than 300 algorithms. Users can adjust these with own parameters.
The graphical interface, online documentation, analytic tools and algorithms of CrypTool
introduce users to the field of cryptography. Classical ciphersare available alongside asymmetric
cryptography including RSA, elliptic curve cryptography, digital signatures, homomorphic
encryption, and Diffie–Hellman key exchange, many of which are visualized by animations.
CrypTool program
AES Tool
Extensive online help
Script(PDF) with background information on
Encryption algorithm,prime numbers, digital signature, elliptic curves, public key
certification.
Hybrid Encryption
Digital Signature
Digital Signature Visualized: Preparation
Exercises:
Perform any one of the above encryption technique with cryptool.
Review Question:
1. Install JCrypTool
2. Analyze any one algorithm using JCrypTool
Wireshark
Aim:Study and use the Wireshark for the various network protocols.
Theory:
What is Wireshark?
Wireshark is a network packet analyzer. A network packet analyzer will try to capture network
packets and tries to display that packet data as detailed as possible. A network packet analyzer as
a measuring device used to examine what’s going on inside a network cable, just like a
voltmeter is used by an electrician to examine what’s going on inside an electric cable (but at a
higher level, of course). In the past, such tools were either very expensive, proprietary, or both.
However, with the advent of Wireshark, all that has changed. Wireshark is perhaps one of the
best open source packet analyzers available today.
Features:
Exercises:
8. Inspect the contents of the first HTTP GET request from your browser to the server. Do
you see an ―IF-MODIFIED-SINCE‖ line in the HTTP GET?
9. Inspect the contents of the server response. Did the server explicitly return the contents of
the file? How can you tell?
10. Now inspect the contents of the second HTTP GET request from your browser to the server.
Do you see an ―IF-MODIFIED-SINCE:‖ line in the HTTP GET? If so, what information
follows the ―IF-MODIFIED-SINCE:‖ header?
What is the HTTP status code and phrase returned from the server in response to this second
HTTP GET? Did the server explicitly return the contents of the file? Explain.