CSS Topper
CSS Topper
Er.gine-:rin;; i� c1 :,,otoriously der.:iandJlg field Clf s :.:d� • .Z..:::ig wc.c-c» • in e:o�--i: t."XaW'\
rt."!;'"_,re!$
a�·stematicand foc;used aPJ]roach. ino,Ce.:oc',.(1"e:l,youwiil,..eedwlttrc?:.o-,,,. tr.,�•ro:-h:
s.t.mesttr exam in cnginttrlng.. Ha\'C Y<Y'.J !!a\e a!!'e:ady gin.n up th!Ilkir:1,. "Vtlut the h.e.U J can do
11 B
at this moment? TomotTOW L,:: ex.am!· Thi:::ik .1pin! You a.r� � srud,e,:;t u last ru.;f::
21 17 �l.;<�J'!i" are e'\·ery eng.ineericg: studrot"5 epitome.
39 17
... I ?--� ;:,y em,<.,;s,.# •we�� aN k;Jown for our crMfivff_J•
I
54 13
u:,�;,hk H.i<b Fu::ctio-...s p. : v;cny �ntireToppcr's Solution.s Team is •,-.·orking o...:: for bm.ermmt of ibdt:c:.s.. H� ur:
... I 65 14
oome techniques abcnn Cryptography & System Security (CSS) Subj,ert.
79 Zi
Ho·w to score first 50 marks:
% 30
Study anv 11n .. of the bel"" set an d tnaU: s-Jrl! yoi.: Qn f!3rily attempt any,;-�� f:oo b,e:;c..-w
12.; 5 �b:ipters included in particular��-....
i� Ch.2:pte.r Sa.me
O[C-16
__,
f-- ------·----t-----------1
05 !O
I
1'5 15 :o 15
I w 15
J Public Iv!\ C.rypt;;,::aph,
7:J 15 2� 30
I 10
)
ll
QS lO 15 15 I JO 23
(1 l:, .5 rn
! ;?r, 2;
15 :3 :;5. 10
l 30 15
40 ,n :co 35
I
I
25 ,n --i :.:o
05
-\--
I so
2!, 60 �c ;o 1J
__j
•
/I
---
I
.---
II
- ---
111lowi11µ, :\ clia ptcr5.
-
---
Chapter Na inc
W<:ightage (Marks)
I 1n1rod11ction
8
2 Basici of Cryptography
Secret Key . h 17 / 13
Cryptography/Cryptographic Has
:3/5
Functions
Please Note: The Above Analysis is suggest by Topper's Solutions Team. Don't be
completely dependent on it. It may change as per University of Mumbai Guidelines.
OS SECURITY:
l. Oµ eratin g Syst em Security (OS security) is the process of ensuring OS integrity, confidentiality
and availability.
2. lf a L·0mputcr prog:·am is run by an unauthorized user, then he/she may cause severe damage to
rompu tt: r or d:'lt:l s tored in it
3. So :1 computer system must be protected against unauthorized access, threats, viruses, worms
;md m:1lw:1res.
ent
Figm·e 1.1: OS Security .
► It t' i) . m es th,1Lt h1.: d:1t:1 1s :1:w:1ys .1ccess ible/ a•.ta ilablc to a; 1ti10!'"iZ~l1 µ ersc 1,:.
► Wh cnewr .in a uthori zed sys tem entity dema nds for s~ ste m ,e. tir re, i~ mu~ t be .tC es s ible am!
usable at :1ll times by h im/h er.
SECURITYG.OALS:
I) Confidentiality:
► Example: Figure 1.2 shows the example of Con fidenti:i li ty. Consider tha t A & E wants to
communicate with each oth er. When A sends a messc1ge "111" to B, only B should rece ive it. Only
then confide ,1ti3lly is maintajne d.
A B
(Semler)
l _
_...__
(Attackei·)
_..__,
JI) integrity:
r in teer ily ens ures lhat the data received by the r~ceiv e r is exactly same as the data send by ser. de r.
Th e dnta sho tild not be modified by ariy unauth o ri ;~ecl entiry.
Only a•.1thorized entity or perscn shot.:ld he ..i o:e to modify or update the datci.
,. M0d ification mea ns modification of cia r.1 through ii1~ertio11, deletion o r replay of da t~.
In te grity can bE: achieved by using checksum or hashing methods such as MDS, SHA-1 & Tige r
Hash.
(Sr11,l r r)
Actual Rout&
[Attadlar)
Ill) Ayailabi)jty;
► It ensures that the rlata is always accessible/ available to authorizE'CI persons.
► Whenever an authorized system entity demands for system resou rce, it must be accessible and
usable at all times by him/h er.
► The informcJtion created and stored bv, an organization needs to be ava ilable to authorized
/
entities. Information is useless ifit is not available.
► Example: The situation c.rn be difficult for a banh: if the customer cou ld not access their accounts
for transactions. !nte rrupticn puts the availab ility of resources in danger.
\'
A B
D (Sen~er) (Re-ceive r)
I) Encipherment:
:,, This is hidi ng or cove ring of dc1 ta which provides confidentiality.
1• Ir is also used to c0n!ple111 e:·1t '.lther rne cha11isms to i: ro virle other se:·v ice;,.
► Cryptography ,rnd Stego nography arc used for en.:iph erin g.
H) Digital Integrity;
,. The data integ rity mecha ni sm appends a shorl' ched: value to the d:1 ta tin t ha:; ueen creatf'.d by a
specific process from the rlata itself.
,.
111) Dir;:ital S:i:naturc :
-,. A digital s igna tu:-e is a mc;ins by which th e !:e nd er c.:111 clr.c.tronic.iiiy sign t!JP i1:1ta :in:! t hP ~eceiv':'r
can el ec.tronically verify tlw s1gr.alu:-e.
► Public and pri',ate keys ca n bl! U!:ed .
VU) Notari'zatio n;
Notarization means selecting a third trusted party to control the communication between two
►
entities.
The receiver can involve a trusted third party to store the sender reg uest in order to prevent the
►
sender from later denying that she has made a request
Vlll) ~sControl:
Access control used methods to p rove that a user has access right to ·L he data
c or reso urces owned
►
by a system.
Ans: [5M-May18]
REPLAY ATTACKS:
1. Replay
•
attack is also \ nows a('~ phyb
< ack attack.
2. It, ., tyµe of active security attack
3. Re play atta cks :ire the nenvo r,, ,. :it,.:1c.ks
•· .
in 'Nhich a -
11
sende r a.nd receive r a,1 ct ta 1,cs the authenticatE;d ., dttacker SJ)les
· tli e wnversation between t~e
1
the re.-:e1 \'e r wi th that key· 1. fo:-m a ti on e. -~-s11;-i nng
. key ;:1nJ tr.en cor.~act!O
4. In replay attack, th e attacker .
gives the. Proo• f l . .
.). Rep b y i!aacl, i~ l1l1 e o f the I , . . D .11s ldentil:'y d
. o .ver t1e1· Vt: i an authe t ' · •
5.
in Replay Ar-ck • rs on s of a''!\\ . . n ,ci.y.
'" 'ar. ::i tLacker ca t . an in the ' . •
p ures d)e. datc1 ~ •
-•
Fio1ire 1 s i.-uduie atla ::k"
., . . c.na rr>·
-Ll.a ns n1 itt; • . .
· - lt ,i fte r s0 rn e delay as sbo,\·nif.
Hwe ,, of-=----
J ..,. 134 -- --- .,,.,
A n
(S<-udrr)
C
at.er somt' time
(Allarlu,r)
► Generally not used for authentication and key exchange because of overhead.
II) Timestamps:
In future, when an atta cker gets th e ciphertext, he refers the di ctionary to find th e corresponding
plain text.
!n t his method, the attacker tries to determine the key by attempting all possible keys.
► lfthe key is R tits Je ng, then th e number of possible keys is 28 =- 256.
The attacker k.101,vs the ciphertext a;1d the algorithm, r.ow he attempts 2 1; the 256 keys on e by
one for clecryption.
The time ~o complete the a tta ck would be very high if the key i'i long.
vo Birthday At::ack:
/, bi rthde1y a tt:ick is ~1 i:!a-;s of brute for ce ,ltt3ck used ag;:i i nsl h;:i;; h 1nr.; f•.11: ·ti 0 n!:.
► It is haseci on the "birthday paradox"
Thie; states tl.;i t in .i grouµ of 2:3 peo pl e, there is at least 2 50% proh?.bil1ty that at leas t ti..vo peunle
will share the same birthday. '
ln <-1 group of 60 people, th e probabiiity is over 99%.
Scanned by CamScanner
IA11 ·# ?Hmll.JMN
f I 9nlroducfion .J~me.rler - 7
VII) M.n1Liu..Mllld.l!LJUta\:lt!MlMJ i
,- The targl'IS of this nltack are lllOstly p11hlk l<1•y cryptosystcms where key exch..111ge is involved
before wn1111unlr:11l1111 t;1lu·s pl:1, 1•.
:.- llos t t.. wants to con11111111lc:1te tn hnsl ll, he 111·e rcqul'sts puhllc lrny of □.
► t..11 nttackcr lnterct~pls this req11rst :rncl sends his pullllc key instead.
:;.. Thus. whntcver host A sends to lwst 0, Ihe :ittad:cr Is able to react.
,, In order to mnlnt,1ln communication, the attacker re-encrypts the data after reading with his
public key :rnd sends to B.
► The :1ttncker sends his public: key as i\'s public key so that D takes it as if it is taking it from A.
is carryi ng out.
For example, if the encryplio n t;:i l<cs ;1 l011g1! 1· ti111c, it i 11 d lc:1tcs th :i l the secre t lwy is I011g.
- ------ ---------
SECURITY ATTACKS:
Sncurlty l\tt:,ck
1
Pasdve
l
Active
l l l f
n.,pJay
I
Modifica tion
l
0Pnl'11
1'-1 cssag e Content Altaclc o (M esaago o(Se1-vlce
1. In Passive Attack, an a ttacker just obtains <1 11 information being trn nsmittcu.
2. It does not alter the message.
:,... It may happe n th rough various ways s uch as: Listening to teleph o ne co nvcr~ati o n, access ing e-
ma ils or observing a tra nsferred file which may co nta in sensiti've in fo rmat ioP..
► In Trnffic An alysis, an attacker observes th e netwo rk traffic: an d tri es to '.l naly;;:e ti e na tu:-c: of
1
communi catio!1.
:;... Encrypcion technique is used to prevent ..fraffic Analysis.
ACT!VE ATTAr.K:
i) M~queradc;
This attack occurs when uria11thom:ed Ci1 ti1 y pretends r0 be a?1 au~iw.-,zetl C:~ ! i t y.
ThJt is a n attacker takes J n identity of somE-one and acts on bch.1lf of them w ith out th e ir
knowledge.
--
[D EJ]
C
(Att>rkn)
rT::IL_
1......______Lf
- ------------------
(,l:-\] S e curity Services
Ans:
SECURITY SERVICES:
1. Security service is a service that enhances the security of the system or data transfer.
Security Sc-n•ices
Aut)1e11 ticntion
I
'D.•ta Confidentially
i I.,
N o11-rep11diation
I
l
A.c:ce .'i!: C;i11tTol
I) Authentication:
P,~
C1_Jefoof134 - - - __
Q2] WitJ1 the help of suitable examples compa1·c and contrast monoalphabctic
ciphers and polyalphabetic ciphers?
Ans: [Qt I 5M -- Dec15] & [Q2 I 5M - Dcc17]
SUBSTlTIITION CIPHER:
1. Substitution cipher is a method of encoding by which units of rlaintext are replaced with cipher
text, according to a fixed system.
2. The "units" may be single letters, pairs of letters, and tripl e ts of le tters or mixtures of the above.
3. The recei ver deciphers the text by performing th e inverse suhstitution.
4. In s hort, in Subs titution, one symbol/letter is re placed by ;mother.
S. Subs tituti on Cipher can be divided as:
► A characte r i:1 pbn :ext is always changed to the s am e ch;cir;icte r in th e ci pher t exr regardless of
its pos it:on.
► Exa mple of this is the Ceaser Cipher v.rhich involves r e pl;i cing each le tte r of the a lphabet wi th
th e le tt e r s tandi:ig three places furthe r dow 11 the alphab et.
Cipher Text jo
i I
1
E F G H II
I I J KIL IM N
I '
R
I
T u Iv w
I I
X y
I
z A B cl
- -- -- - - -
_co1, PARISON:
1 habetic & PolyaJphabetic Cipher
Table 2 1 · Comparison between Monoa p
The relationship between a character in the The relationsh ip between a character in the
plaintext and the character in the cipher text is plaintext and the character in the cipher text is
one to one. one to many.
Monoalpha bet ic cipher is easy to break. Polyalphabetic cipher is difficul t to break a5
value of'ki' do es not depend on the positior. of the value u, kt t1oes <!cpe11d on the p osit!on of the
1
plaintext charactei in the plaintext stream. I plaintext char;:icter in th e p!aintext stream. _l
- - - - -- - -·- - - - - - - - - - - - - -
E:,qJlain ""ith example, keved and ke,,Jcss transpos1·t1• • I
~ ., - 011 c1p 1crs.
Ans:
[51\I ·- 1'fay16J
TRANSPOSITION CIPHER:
].
Tra ns r,osition cipher is;; method of encryption by w11ich ti •. l
· 1e Dos1t1(~ns ie ld by uni~:; o f p!2in te:xt
are sh ifted accC1rding to a regular system su that the cinh . t . •
• · . e t L' X t co11sut1t1.es .i perr:illt.itio'1 of the
plain tex t.
L. That is, lit e r, rdc r of ~he units is changed.
3.. .
Transposition cipher does not s11bstitutc one ~ymuol fo r a nothtr ins te- J ;t c· . . . .
of th e symbols. ct • na .1ge~ t 1le 1ocatwn
4.
Transpos ition Cipher c;in he c!i·1ided J~ keyless a nd keyed trJns posi ti on cipher.
- ---
Scanned by CamScanner
i-f#efi.#¥4H,,,2ieiU·5
'Topper 1Sofufion,
► In the second method the text is written into t.~e table row by row .ind then tra nsmitted column
by column.
► For example, Alice a nd Bob ca n agree 0n the number of colum ns an d use the second method.
► Alice w rites t he sam e pla in text, row by row, in a table of fo ur columns.
m e e t
m e a t
t h
nt
e p
a r k
► In Keyed T ra ns posit ion Ci rhe,, plain text is divided into grou ps of p rerletermined size called
blocks.
Then it u se a key rn !Jermute th e cha racters in each block sepa ra tely.
Exampl e: Al ice needs to se n d t he message "Enemy attacks t on igh t" to Bob.
,. Th e key used for encryptio n and decryption is a pe rmut:ition key, wi11cb sh ows how th e
cha racter!: are per,nLl teG .
K ey:
Encryptio11
_ _ .1._
I
_r-__
-1-
3 \ 1 4 5 _-.-+,- -Z
--+L--2~ ~~:__3_ __.,_ _1 _ _,_ _s_ _,_______
__,
iDec,~t;J
E
~J I i i i I/·1
tfj 12 34 5
E
Key /\ /\ C T
T A ,\ C T T
T K () N S T K 0 N s
11 l T /,~ JI ! T z G
An s:
f r;M - I )(,:Cl;il
2. Play F,1/r Cipher 11sr•~ .1 5 x 5 M;i trix of a/plrnlw ls Cfllll i1 i11 i11g i1 l<r•ywMcl ,,r phn .,;1•.
J. This dpli r!r encrypts p.1i r o{ l<!: 1,,,-:; i i:r;te:i d () ( sl r1 gle le:1te r.
4·. It i:; diffic11l1 lo lin:.ik 1Je:c:11ii,£: fn :q111;11r-y .i n nly -.; ;.., does ,1111 wnrk /11 Pl[1y J\ tir (;ip/w r.
/Ccy: /)omc:sllc
-------------------
'P".ief 4 of(34 ■ --
:1. l>1111hlr1 1011111· 111' r1111 ••111tlv11 ly 1,,p,1111,•tl 11,1111111 11 11,11 ,, 111 ,, i11•p,1111 111d liy " ,
111 1
'1 , II ,111 ntlll I l111r,wtr11· lri l,11111111 p tlr II wit h >1 1ll" 1 ,
II
V
p
\\I
II
(J
X ~ i-
nt
H11lcm
'I' ll 1•1~ "Y I'>' Iii dr. etc 111111<1 l! I' th c d oJX or
'1'11,:1 l'f11n ·,
---
<:l plll' r T1•x1 I•;: d ar a c ho gc 111v os pl! vi. ay d ~o mw e p
_ _ _ _ _j
-----------
Ans:
EX AMPLE:
Key: Monarchy
Th is is ;;11 ca sy ta .sk
2. JfJny ch:iractcr in the pl::li11 text: i-; ')' then rep Ince it with 'I'. (in our c;:ise cha!·;:i ct er T :s ri o: presP.n:}
Tl1 is is .1 11 ca sy task
3. Doub!" letter or consecutively repc,, ted sa rne letters nre ::€ par<1ted by x or z. (in our case there i~
no consecu tively repe;i ted s:1111e lett ers)
Th is is an ca sy task
4.
!f an odd characte r is left out pair it with x or z. (in our case the re is no odd ch"• t )
. c. I ac er
Th is is an ea sy task
l'reparc a t;-iblc san; c ;.is Mo noalph,:bet:c table b1H t 1iis table \/\,·1• b
1
s .5 I ·
' " ' e x t:ib c beca:.1sc Tc ')' \·: d!
be merge together. (Using Key i.e. Monarchy)
- ------ - ·- ------
Scanned by CamScanner
.J'emtrfer - 7
hJ
~
If both ll'tters arc in the s;11111.' ff'lt111111 , t:,l<t• \IH' kllt•1· lil'lnw Pnd1 011f' (gol11 i: l,nt'k fo tl, r fr ,p if ,ti
the hntttllll)
If both lellers arc in the snme row, tal<e the letter tu the right ofc,11.:h <111c (gnl11g lmtk to th e left if
Th Is Is an ea sy la sl<
th ➔ Rule 3 ➔ pd
i$ -➔ Rule 2 ➔ sx
is ➔ Rule 2 ➔ sx
an ➔ Rule 1 ➔ ra
eJ ➔ Rule 3 ➔ im
sy ➔ Rule 3 ➔ qb
ta ➔ Rule 3 ➔ sr
sk ➔ Rule 3 ➔ ti
Afler Applyi.!.!.&..RUJ.f..£ pd sx sx ra im qb sr t!
Q6] Use the Play fair cipher ,dth the keyword: "MEDICINE" to encipher the mcss;:ge
"The greatest wealth is health".
'
.l. ?lay Fai:- Ciphe r is e>llt' c,f th ~ J\iulti -lctt~r Cipher.
2. Piay Fair Cipher uses a 5 x 5 i\'latrix (, f :Jlphabcts conraining a key\.vorct or phrase.
This cipher encrypts pair o l lettP rs iP::>te:1d of :single letter.
4. It i~ difficult to t,revk l.JecJu sr frequ en cy amc!ysis dot!s not work ir1 Pby F:i ir Cir her.
lCey: MEDICINE
- - -- - - - --- - --
2
.. ----- c~e
'°.f:t_~
I, ------
I '8aiiC o{
r-
Jq- - /s1- - LI
rv-
L__..1.l_~_v__ _x_ 1
1 . _
y z
. 1 - . - -'---- -J
-,.. lfho th letters are in the sa me coli 111111, t,1ke th e letter below each one (gc ing ba ck t o the tcp ·rat
tw ➔ Hu ie 3 ➔ ry
ea ➔ Rule 3 ➔ ak
It ➔ Rule 3 ➔ os
hx ➔ Rule 3 ➔ Iv
1acthentica tion .
... 1· n·legr1·ty protect1·on or
It 1·Jro 11 1·,.ie
~'
Stream Clpher is more s uitable for hardwar-c- - ---;-B-l-1J_c_kCiph_e_r-:is_ n_10_r-·e_s_u-:-it-a-:-b-le_fo_r_s_o_f_~_v_a-re-~
'
I, ,···•r
. ._., r, ·1,~,-r.
- "'·n 2 ti on. I 1·1nplP..111'-'-11·at1
• · on . 1
- - ------=--=--------
__ ______" - - - - --- - - - - -- ~ =le:_D~S - - - -- -/
1\ pplic.lliun: ~SL j App!italion : D,1t,1Lu-s:-:r-i1e En -· yj•t1.,,~---7 1
..J'emMler- 7
[5M - f)p_,.,
,. -:-1
· .. p_,.:', is a symmetr :c key cipher which oper;i tes on a fixed length gr oup of bits c ,
1
, a~,1:-:
IDEA:
5. IDEA de rives much of its security by interleavi ng opernllon:; frum df(fore nl g((JU('fi Jlkc: mndular
addition a nd multiplication, and bitwise exclusive OH (XO R).
KEY GENERATION:
► The 128 bit key is divided into 8 sub parts tha t is 16 hits cnch.
► Then th e 128 bit key is cyclically shifted to the left by 25 pos ition, so by uolng tbl!; we wfll bave
one new 128 b it key.
► New simila rly as abow it is divided into Hs ub bl ocks an rl wil l lw us ud in ncx rnuniJ.
► The same proce::s is performe<i 9 times anJ 56 keys ;u c g!! n11rJ ,r:cl from whlr:h th e Dn,t 52 keys
will be used.
► So likewise from Kl to K52 key$ are generate ~! ;:i s s hown in figurr: 3,1.
K-i
l !
Rounrl 1
l l
- K,.
L
1{7
J'lo1 .1rl 2
1
,~,2
......... ' ........ ......'
l l nn,rn ~ 0
l
____r l Y.1a
K1a
l J l l
[_ OufJ,u~ T, ansfo n :1,1ti o 11
K,. e,
r- J
/(H
1la_Je 2f of f34
S.t'ltJ.el\.te.&llllC.[ iillmwlJllltlfillll.d
1. Mu ltiply fl, ;rnd K:.
t.. AJd P. :ind seco nd I<.:,
3. Add P:i and third 1( ,.
4. Multiply P4and K., .
s. Step 1 EB step 3.
6. Step 2 EB step 4.
7. Multiply step S with l<s.
8. Add result of !>tep 6 and step 7.
9. Multiply result of step 8 with K6•
10. Add n•sult of step 7 and step 9.
11. XOR result of steps 1 and step 9.
12. XOR result o!' steps 3 and step 9.
13. XOR resul t of steps 2 and step 10.
14. XOR result of steps 4 a nd step 1 O.
~ ·~-+K6
f-H4--+--l------L..►EB
__,____ ____ J _. ►
I
l
Figure 3.2: cn cryp~ion round of IDF./ •.
lllowtlsh
.--- -------
,- l' (Ill l •II~)
L-1,- - - - - - - ~ - -- ~ -
I.
nt
"'
• JI
G:··<
,.,I, ____
.- - -
- -- ----
c' (H l l ii 1, ~
t•- r•JrJ t,l rn, \.; t_ - C q ,J11 tCt.a. t ; l( x - I' m rnv t 11 111 ·: ,
Pa_Je 2
ef134 ■
ReferQ2.
0 = XOR _j
..__P_la_inr-T_ex_t 6 4 b::
L
XL
Cipher T<•x t
6~ bi t
.
-- Figur~ 3.4: Data E
- --
'Pa e 24 of
ncryption.
t34 -;
musol ut1on. 1n Scanned by CamScanner
.Semmu-7 Topper 1 .Sofufiom
Oat.\ Encryption has a function to iler:lle 16 times of neh•1ork.
► Each round consists ofkey·depend cn l permut:ltion a nd a key and data-dependent substitution.
·..., All t I et .H ion:: are \ORs ;\ttd ,Hld il i11'ls o n 3 2-\Jit words.
► The only additicnal operations :lre rour indexed array data lookup tables for each round.
AJgmitbmi
Divide x into two 32-bit halves: xL, xR
For i = l to 16:
xL =XL XOR Pi
xR = F(XL) XOR xR
Swap XL and xR
Swap XL and xR (Undo the last swap.)
xR = xR XOR Pl 7
xL = xi.. XOR P18
Recombine xL and xR
nt
8 hi,s 8 bils
I
'
4168 bytes.
Th ese keys :ire ~eneratcd ec1 ,·!icr 1o a ny data encryptio11 or de:crypticn.
,.. The P-Mray co nsists or 10 s ub keys of 32 bi~. i.e. P, · P,u
four 32- bi t S-Ro:<es consists o f 256 e n tries each i.e. Sln - Sl m , S2o - S2i ,s,S3 o - S3cs, &Strn - S·L s5
5.
.
hr.crypt the outpu t O f see t'n (3) u s ing the Blowfish algorithm with th e mudifiNI subke_vs.
7. Continue the process, replacing all e ntries of the P arr3y, and then all four $-boxes in order, With
the output of the continuous ly changing Blowfis h algorithm.
8. Jn total, 521 iterations a rc required to generate all required subkeys.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - ---
Q5] Explain working of DES.
Q6] R'.li'.pfain working of DES detailing the FicstcJ structure.
Q7] Explain DES, detailing the Ficstcl s tructure and S-block design.
Ans: [Qs I 10M - May16], [Q6 I 10M - Dcc15] & [Q7 / 1ol\1 - May ]
17
0£S:
WOHKING-
- -----:.
L __,. . ,..................!
,-------
L- •n
.
-- J
-,
tu•r ~ I
' "')' -----..
,.,,,,...,.n., r•,41.!u,,
- - -- Pl:.:11r1! :t ( . W
-- - - - -::_~ rhlu~ uf DES.
'Pa_Je2.Go/~ - ------ - ·-
5_ l _.S_tert_f1v:J--=-~~
- -~-=-..,_·_:::fJJc___ _ _J_'t1_n_Mh_ r_-_l_ ____ _____~_'Tl
_o_,t/1er1
_,_ Suf.1Hu11J
STEPS:
n lnitial Permut.ttion:
-,. lnit1,,l r~rmutation m~ans rc:11-r,rng111i:.1lh! 11:ts ,ii 1hi.: pl,1111 t cxL
lnith,l P~rmutation is pt!rformed owr pl.1i11 text
For ~uili:,; P = 1010101010 ➔ 11 l l 100000
It produc~s two halves of the permuted blocks Le. Ldt Plain Text (LPT) & Right Pin In te xt (HPT)
l ,. 1
'--~-D_
,._1 )
Lc ll Shirt (s)
Perm11t ~t lo11/
Conlr,,rl lc,n
e n
I
I
I
I I
I
_J
R,. 1 [ c,.1 [ '7
0,. ,
!n Exp ar.s io:-1 Permut?tion, lr. e ri;;ilt h:i lf is expam4ed from 32 bits to -Hl h its.
cxpans:on µenna ~a lio n per:-mlles orr.kr oft h~ bil .:tr.d r epc;,ts cen;-iin hit :;, ~u th;it b,)th :lie in;.,u t$
of first XOR operation a re co mp,ir.:ibk.
VII)
'.,- \11 this Step, the output of XOR oper:.i tion becomes new right pla in tex t and old rH·,t
0
c----~~~~=------
~1._____ ,:_u;_:•1,:::gl:.:. :·''
".::.: (;-I hit l'l 'l ill Text
-- - --
musolutifl Scanned by CamScanner
11-&uP ¥ f\J4w 2 ri~M
Semufer-7
,.. The DES satisfies both the desired properties of block cipheL
>- These avalanche and cnmpletene~s p:-~perry ;11ake cipher ver: stro::f:
• Avalanche Effect: A sm~,li change in plaintext resd~s in ~he \·e:-y greJ.t ci,z.ng ,,, ~I~<:
cipher text.
■ Completenesf.: Each bit of ripher te~:t depe nds 0r. ma:1y bics 0f plain -<.: :x:.
.,. Four o ut o f 256 possible keys ir. DES art· called W eak Keys .
A wea!< key is th£ one that, after p,11 ity drop operation, con~ists eithtr c f J !l 1.b. ,; !t L:;. L'r r.,,., L' ~;
a nd h..:lf l s .
, These keys are shown in Table 3. 1.
(64 bits)
Actual key (56 bits)
~
\
_ s before
l{ey parities
_ _ __
- 000000 000000
000000 FFFFFF
FFFFFFF 0000000
EOEO EOEO F1F1 FlFl
FEFE FEFE FEFE FEFE
II FFFFFFF FFFFFFF
of these weak keys are the same and have the same pattern
The round keys create d from any '" as
►
the cipher key.
► Weak key is the inverse of itself.
► There are six key pairs that are called semi-weak keys.
► These six pairs are shown in Table 3.2 (64 -bit forrnrlt bP.fore dropping the parity bits)
The
..
S-boxes do the re~a \ mixtng
. . '~conf:.isicm)
-,.. DES uses 3 S-b
oxes, each with a 6-b't . ~ ·
i
.
ln1) u , 2na ci,,.r -b·It (1t.1tput.
.. - ,- i--r-T·,-
32- b .11 u u1pw1
musolutKr .1n
. ......
:·. ·...
_.- . .- Scanned by CamScanner
mt¥,!H,,,2i,iut5
,. The 1A· hll da1a from the second operation is divided into eight 6-bit chunks, and each chunk is
f•c1 Into n hnx.
;,. TIii' rl",11lt nf l':1d1 i>ox Is n 4-hlt chunk,
,. Wh en tlw sc :irf' con1hlncd th e result is a 32-bit text.
► ror ex;im plr, in Sl, 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.
QtoJ Desc•·ihc triple DES with two DES keys. Is man in the middle attack possible on
triple DES?
Ans: [5M- Dec16]
1. The DES ;ilr,orlthm user. a key length of 56 bits, with which becomes very easy for an attacker to
hrcnk I he 1:ncryrt ion.
2. To improve thr. security of DES at higher level Triple DES was proposed.
3. This uses 1lm:c stages on DES for encryrtior1 and Dccryrtion.
4. It l,Js two versions: Triple DES with Two Keys and Triple DES with Three Keys.
p-6- D E C p -♦ch-.cb-cb-~
Figurr: 3.1 !J: Tripi(• DES witl1 'L lfoy~.
- -- -- - ·1"Ja.3e310(134
somewhat unwieldy.
For this reason Triple DES with 2 keys is used.
Using Triple DES with 2 keys we get the same cost of attacking for less number o f keys.
Qu] Compare DES and IDEA. Explain the rounc.l key generation scheme in both these
algorithms.
[10M - Dec1 6}
Ans:
I- DE~. JDEA
I
, DE
D ESS. S-t-a-nd-s--fo-r-Da ta ..•r,;. EEn~c~r~y~p;;ti~o-;_;-n----;S;t:an::-d~a:-:r::d.+~;::-:-~--:----=---_:_=:
IDEA s tc1n ds for Intern oti __ a nal:--:Dc1t,:,
_______ 1
I A:gorithm. Enc:-y~tio:i
_ _ _-.1._A_lgori thm . j
ll uses 56-hit !-:ey. I It uses 17.8-bit key. -
DES is nov: considered insecure (mainl.v due to -:,-r-::----------
u Consi dered to bo d - - - - -- - -~
small key size of 56-hits). - a goo and secure a]go,ith m.
· hlock.
' inrn 64 h 'rrsper
DES divides plain text/cipher te-<t
t;;.IDEA<li ·c1 ,
ll k
.
.vi es pl arn text/cipher text intc, O, 4 1 · c
!.lit.p
,~
16 :·our.ds of en . J oc .
crypt10n /decryptic1n It h -o=--- -~;-;;,:;::=-:::--~ ---- - - -~
pn.icess. I · as rou n els o f "-l1Crypti. o n/d er.rypio11 pr0cf~~
I - - --- -
I fo ll owed lr
Y ;:i fin ;, ) roun,JlJ of (),J : i li ;
~~~~i~~;;f~~)i;triain~~fo;i~·n;1a~t~i~c,;n~.;-:::;:-----:------
f: E::; ch :·ou 11 cl uses d.t ft·crent 48 -hi t sub
~-e_n_e~a~~-~rJrn the 56-bit key. key Each of the 8 ro und s L,ses ciiff"rf' r, .. , -;-.- - -.•
- :-
~
I l c rl 1'f'1l're> 11L~~-;_-::-::-::-:--~
:; u!:J kC'
_ _____ y., ;ire used in DES.
-- -
- -1__
'1Js t r 0 1
~ · us~c; 4s ub key.-,.
.... - , D
•
lll ., '\. '1 •
"\ - ,,, ·
,----- -
muso u~ion.-in Scanned by CamScanner
i!u/.fii,i\N,,,21,S:d
Refe r Q2.
Q1:.1J \¥hat arc block ciphers? Explain with examples the CBC and ECB m odt!s of block
ciphers
[s_~I - Dee16]
Ans:
B1.0CK CIPHER:
1. Block Cipher is a symm etric key cipher which operates on a fixed length group of bi.ts, ca!Ted
block.
2. It encrypts entire block c f message one at a time.
3. In this the pla in text a re combined with a pseudorandom ciphe r bit stream by :an XOR operatiorr..
4. Cipher text is generat e d by en crypting the plain text bits o ne at a time.
S. Example: RS A. Diffie 1-: e llma n, DES and AES.
MODES OF OPERATION:
I)
►
►
Ef.B Mode:
ECB Mol1e s tands for El e ctronic Code Book M ode.
bloc.k.
· · t .· · ·r , ·es . .., Ill" kov fo r ncrup tic n a nd dE-(T\" ptitH, of t•~1 d ·, bk,d;:.
0
Sin ce it is symm e 1 1c. I L,!> ::-o , . ~. ~ ., ;
I '
I
I
[ffiiliilllLD a o -rrrrn,n
'
crrro ITJTrTTI Ciphcrtc,t ' ;.'~:-n;Et.\ \,
~ p nerte,.l
Eiect ronic ~odPboo\.: (ECB) mode e11c1~pti0n
I
I '
;:r_s1::::uuw rr::I UITI!"T...:l
a:;:r:rr::J rrrm P!a•" ··e "-t
"iJ r~tit , l
Pia •n te •t
[ lec,ronl-: Coclcbc.ok (t::CU) 1r1 odE> d eer) µl.t>n
encrypted.
This way, each cipherter.t block depends on all pla!ntext blocks processed up to that point
To make each message unique, an lnltlallzatfon vector (IV) must be used in the first block.
, The encryption and decryption can be done as follows as shown in figure 3.12.
-f..1IJ1~
TIP! 11• .1. ·r •
"..: Ll/1-: {; 11' II CH :
l.
M.ultii,!it;:i tiv!! clph1;r I~ a
,-' 2. J• ·, .- . . . type1Jfsuhstilu11
• ,_sim;Jar to ra,.... on Cii)!iel'
- ---
--- - - '-',,<tr rlpher, .
EXAMPLE:
Encryption:
Plain Test Number C = (P x KJ mod 26 Cipher Text
--
C 2 2 x 15 mod 26 = 4 E
R 17 1 7 x 15 mod 26 = 21 V
I
y 24 24x 15 mod 26 = 22 w
p 15 15x15mod26=17 R
T -o
l , 19 x 15 mod 26 =25
I ~f( z
0
\
I
II
...
14 ' 14 x 15 m od 26 =2 C
G
~ 6 ·\.'::: ....
6x 15mod26-1 2 M
R
\ 17 17 x 15mod2 6::.: 2 1 V
A - 0 0 x 15 m od 26 ::: 0 A
p 15 15 x 15 ni od 26 - 1 7 I R
I
H 7 7 x 15mod 26=1 lJ
y 24 24 x 15 mod 26 = 22
l \IV
I 8 8 x 15 mod 26 - 16 Q
s l8 18x 15 mocl26 10 K
-j
F 5 S x 15 mod 26 - 23 X
-- ,-- ~
20 20 x !5moci 2,S = 14 0
~
LI
L N 13
I
13 x 15 mod 26 = 13 I
I
N
.,.
Qe~r:wtion:
,--- - - -T------r Number -
P - (C x J{- 1) m o d ·1 r, Plai11 Text 7
Cipn e r e st ~
I l
t, 4 I .J. :: 7 Ill rid :1 () = 2 C
-I
I
- - - -
\i 21 I 2Jx7 m nd2 6 = 17 R
L ·- -- 22
- -- --
22 x 7 /11(\d 26 = 24
- - y- - - --
I \IV
r- R 17 17 x 7 mod 26 - 15 p
- - -- - - - -- --
tJa_Je-~ off34
•
musolution .1n Scanned by CamScanner
LMul.faft?H,,,ffiiMtl
,_ 2x7rno d 26= 1
,,
I C
I 2
- - -(,
(
I M 12 I 2. 7 mod 26 =- 6
- It
-
t= A
R
V
17
21
0
21x7 mod 26=17
Ox 7 mod 26 - 0
17 x 7 m od 26 =15
-- A
-
1----=
1
-
~-
-
!
I x 7 m od 26 - 7
- --
B ] It
w 22 22 x 7 mor.J 26 =21
·-
_____ ,,___
-- -- - --:;:..
Q 16 16 x 7 m od 26 =8 J
I( JO 1o x 7111oc1 26 "' w
---23 x- 7 rnlld
------
- -----=--
.t.;
~- ·-
-- I
X 23 26 = 5 /l
I
Q14] Use Hill cipher to encrypt the text "short". The k ey to be w;cc1 is ''hill''
1.
Ans:
HILL CIPHER:
EXAMPLE:
Plainte.xc: short
w e have to encrypt 1he mcss:iRc 'short' (11 ,. :. ). The• 11,·y i s 'hill' which ,;.111 lw w1'111,•11,1s the• 11 x 11111.11rlx:
Short =- [;,
0 7'] = [I II 1-1
17
19]
0
I? - 7
81 [187
11
14
17
191 d ( ) ,.,, [ ll12
0 mo 26> 275
2 ]'1
3'11
0 3]
3 1
I. Tltf! DES algorithm uses a key !~ngt~1 of 56 hits, w ith which becomes very easy for a n a ttai:ker to
urec.1 k th e enc.ryption.
2. Do ubl e DES is the encrypti on star.rla rJ v,1 hi r.h p rnvides gr2a ter se curity, si n ce it uses key !ength
of 80 bit-;.
3. In thi s two key s are u se J sny K1 and !<2.
4 It firs t pe t form s DES on the original plain rext u s ing Key K1 to get t he e ncrypted text.
5. It performs DES agai n on the encrypted text but this time with the other k ey K2 .
6. ThP. final output is the encryption of e n crypted text with th e o riginal plain text e ncryp ted twice
with twc diffe:-ent kt:y!: show!1 below in fig'Jre 3. 13 .
I 011£,ltia l Plain
Tr..; 1 f :-1}
Tn u po rary Cip h " ,.
Key ('rJ
.___ _ _ _ _ _j
___
._ En rry pt
t
Fiu;il Ciµh e 1· K..,~.
( C.J
,
L-----~ 1
K,
I
f:g~re :u 3: Dour.le TlES.
p C p D D C
and final output seco:1ci step i:; encrypt':'d c1gain with key K3 .
.!='igure 3.13 shows the encryption & decryprion us ing triple DES \\'ith 3 key .
nl
p -cb-Jl~ ·[ 1~]- ,
figure 3.13: Trjple DES With
3
l<<:ys.
Sem01ler - 7 To . ~r i .Solulionr
AL<:iORITHM:
1. Choose two different lnrge rancJorn prime 1111r11IH: r:l :,ay "p" ;1 11cl "q",
2. Calculate n = p x q. Sinre "n" Is Lite modulw: for Iii• 1,111Jllc lwy a11d llw l)l'lv:il u lwy::
3. Calcul;ite th e toticnt: 0 (n) = (p - t)(q • I)
4. Choose an inle:gc r "e" such tlrnl 1 < c < {tj (11) ;,r,rl " l'" Ir, , (l•j1 rl111 •1 to 0 (11) L •. ",,". 11d I-') (llj ·;l1.11·,·
,w fa ctor!; oth er than 1.
5. F111d Oi.l t decrypti on key "d" such th;i l 1• • d = I riir,d (p · l J fq • I) .
6. En crypt the me~sagc "m" usin1~ c 11 cryption key c, c ~ 111 · 11111d rt.
1
7. D ecryp t ti1 e mes,,age " ;11" us in g (lec ryp llon i«.:y d, 111 " t• 1110d 11.
Ans:
RefE: r Q~.
■
Muhipii ca tion of Two Primes.
1. Encryption Function:
r '!'he encryption function is a trapdoor one-way function, whose trapdoor is the private key.
,. The difficulty of reversing this function without th e trapdoor knowiedge is believed (hu t n~t
known) to be as difficult as factoring.
The difficulty of determining a n RSA private key from an RSA pu i.Jl ic key is known to be e q uivale n
to factorir.g n.
An ;;ttacker thu s ca11 n ot use knowledge c,f an RSA public key to determ ir1e . R", .
- a n • ..)~ pnvate kev
unl ess they can factor n. -
Beca use multiplication of two primes is believed to be a one-way fun ctior. Jet . .
•· c ermmmg an RSA
p r ivate key from an RSA public key is belie-✓ e<l to be very difficul t.
Ans:
!{SA:
Refe:· Ql.
E.X~JJ.Pl..£:
Given:
musou -
Scanned by CamScanner
l•h::f·' ¥,f !Jm2 ,Mi·' I
1JJ- .Semufer-7
............
Solution:
n = p x q ...........wh ere p & CJ are two prime numbers
:. p = 17 and q = 7
Now 0 (n) =(p-l)x(q-1)
= ( 1 7 · 1) X (7 · 1)
= J.6 X 6
= 96
:. 0 (n) = 96
1 + k 0 (n)
Now Private Key 'd'
e
1 + 4 (96)
=
7
= 385/7
= 55
:. d = 55
Then As given m = 10
t Using fo rmu ia fo r encryption key e: c = me mod n
= 10 7 mod 119
= 73
:. Cipher T ext ( c) = 73
o4 ] A and n wish to use RSA to communicate securely. A chooses public key (c, n) as
(7, 247) and B chooses public key (e, n) as (5, 221). Calc~late their prh·ate keys.
'\Nhat will be the cipher text sent by A to B if A wishes to send message m = 5
securely to B?
Ans:
RSA:
Refer Ql.
EXAMPLE:
n = ?.47
tlow O (n) = (p · 1) X ( q • 1)
= (13 · J) X (19 · 1)
= 12 X 18
= 216
:. 0 (n) = 216
-------
_l+k.(216)
7
:. d == 31
== 2i7/7
n =-= 2 2 1
Si ri ce n -=: ') ,. q
' · ........... wh ere ,1 & .
·, (J ;.ir etwo ,. .
.-. P =-= 13 ;ind q ==
17
r, ini e nunibc, 8
== (p • 1) x ( q . J)
Now pr·
i v:i te f(cy d
so Iuti on.in --
Scanned by CamScanner
i·Muf·MPH,,,t\,JMN
4 I 'Pu6nc Sem1.1ftr-7
:= 1 t k ( 1 '>2)
!;
Privnlc K 'Yd
::: l 'J3 / 5
C :.; C1phcrtcx t = ?
rnent
C -= P·· mud 11
Q5l A and B ,,;s h to use RS,\ to communic.1tc sccun•:y. .-\ ch o o ~c~ pu h lic !,cy a-.(;,
119) and B chooses p11hlic 1,cy a s (13, 221). C.,lculat c the !, pr:'l.·a tc keys. A ,.,;~hes
tn -.end mr.ssa;_!o.! ,n :..: 10 I<, r.. '.\'ha t will he the c ipl1cr !t·: ·t:J \\"ith ,,·h a t kc:- " i ll _.1_
,\ ltS:
l~cfer Q !
EX AMPLE :
I' • 7
Slnc,i
. n a px11 .. ......... w Iicrc II ,Iv., q nre Lwo p1"1rt1c numbers
:;: (7 · I) x ( I 7 . I)
c:: 6xl6
'-" 9(,
te\ernent
7
When k :.:: 1,
rrivale l{Py d ::::: I + I (?(,)
:;:; lJ 7/7
Wht) n le :-:: 4,
= 305/7
= 55 ... (whirl'. is ,111 integer)
I - .. .,..
t I{
II = nI
.\1II C:1' n -:.:: r, .:\: ('I .... .. ..... \VIH!I ..? p
I •• '" ! ·c
fl '·ire IW
. Ll J)r.·11111• nurn llc rs
~·J1 0 1
:{ ;ind fl == I'/
- 'Plf_Je 44 of 1y7 --
musol ution. in Scanned by CamScanner
l-&11\· 1i¥di%u2 ,ifl-i I
.Semamr-7
Now 0 (n) (p -1) X (q - 1)
= (13 - 1) X (17 - 1)
= 12 X i6
= 192
:. 0 (n) = 192
1 + k 0 (n)
Now Private Key d e
=1 + k (192)
13
Whenk=l
. I
!' ~ Plaintext == 10
C == Ciphertext == ?
C == pe mod n
== (10)l 3 mod 221
== 62
Thus . cinher text.=Jl2 for r-Iain text = 10
C
Refer Ql.
EXAMPLE:
= 16 X 10
= 160
fe\ernent ff
:. 0 (n) = 160 ,.
I\
Now Private Key d
_ 1 + .'<. (160)
7
When k= 1, Q
= J 61/7 D'
= 23 •·· (which is an integer) l.
:. d = 23 2.
3.
Thus, privatf! keyJud, n) == (.n..Jfil)
2 -L
( ) Jf tlw intcrc(•ptcd CT= . .
ihc I'T? 11 ,ind s ent to a u ser whos e pub}; . k • . ·-- .. 5
.c '-=) c - / & n=1S7. \\"h~t 1~
L1 phrr ·:·ext == 1 1 G.
PuoJi c Key (e, n) = (7, l8?)
l'nva te key (d, n) = (Z 3 , 187 )
--
--------- - - - - --- -
musol ut10 fr in
6
Scanned by CamScanner
N,,w, ll,1-.,•<111n USA d1 '1 pllo11 il,to, II h111,
1''1' I:'1'• 1 uw d 11
1111
111)
.M..all ll! ma Llc.i.u. All aCks i
This :tltac:k dupf'rul 011 f:H'l o rir q: tilt· 1irnd11rt ol lwo p.-i nws.
J.iwlu lLJlLlil.cJi:ii
rnent
T ill s :1t l :1c:k dt.qw 11d 011 th • l'llllllin g t irnc of' the l1 l'L'l'ypl io 11 idgo r i lhm .
IV) ChNiC ll Clu h ~.a.~
'!'hrs typo of :Ht ad<ex plnir,., pnip e rt ies o r lhe RS,\ ,1 lgorit h111.
Explain how n key is c;han..: d hctwcc n lwo parties u s ing Diffie -Hcllm a n hy
exchange algoritlm1. Wlwt i!-- the cl1·awhack of thi!i algorithm?
An s : [ toM - Dcc15]
,.
r' It ts n s p e cial method o f cx dwngin~ l<cys.
.l t s ., •., ...,·d ki>y •o 11c used for !! r. crypt in g il message.
6. Th is r.!lgont 1m gc11cn.1 e. •• , .. · ' -
. .,., I I tli til e se·id e r n11 ci receiver ,:;in encry pt and decrypt th e mess;igc us ing
'/. One . n lccy 1s <1cu u e<, io · •
:;, m • lwy.
--- - -- - - - - --:;,f;_ge 47 of134
A choose x = 3 B choose y = 6
M = gxmod n. S = gYmod n.
= 7 3 mod n = 76 m o d n
= 343 mod 11 = 117649 mod 11
M =2 S =4
Ki = sx mod n ~
-><-.._
Kz = mYr.io cl n
= 4 3 mod 11 =2 6 mod l l
~~4mod11 = 64 mod 11
K2 = 9
---
DRAWl3AC!(S:
DlffJF · :l
-...c....;.;.~ .:. J.,_LMA N l< CY EX C!! AN"'-,~
- - ----'-=...:... • '" ,-, ~ ALl'i ORITIIM:
Refer Q7.
--
mus O Iut10h~Tn-~ Scanned by CamScanner
Seme.J{er- 7
PROBLEM OF MIM ATTACK IN DIFFIF.-HELLMAN KF.Y f:XCIIANEiE ALGORITHM:
Choose;,. I Choose b
ent
r.'
Con1putt.> (g•) m
A an dB cl cc1 e
·a
to use Diffie Hellman Algorithm to share a key.
. _ d G = 5 as the vubiic parameters . Their 5CC!'(·t kl'YS ;~\-,' l'
Thcv choose P - 2 3 an ·
." . · 1 Coni1>utc tile secret key that they s hare.
ano 1 5 respective Y·
[10M - l\ l:\y Ill & lh'l·th)
.~m;: . -
. _ . Al ,orilhm is bcfPn! sc, iving any Difiie He!lm.\n Exanq ,h•. ::l1r 1'11:l t'
•·•• Nole: Expl;:ai11 what D1f11c Hcllm,111 g
l-lellm~11 Algorithm Theory re fer Q7 ***
Given :
---- 'Pa3e490{64
- --
~ · ',... l
A r hnoscx: 6
M::: wmod p.
~ _ ; _.!.,...'.;;;..-------
£3 ch()o~c y = 15
s = g:rrnod p.
::S' • mod 23
:: 51, rn od 23
= 30517578125 mod 23
= 15625 mod 23
S :: l 9
M=8
A 5ends M = 8 to B B send S = 19 to A
K1 = si mod p K2 = mr mod p
= 196 mod 23 = g,; mod 23
= 47045881 mod 23 = 35184372088832 mod 23
K, :: 2 Kz= 2
:. K = K1 =K2 =2 ·- - -----,
ITherefore, A & B Share Secre t K<:y as 2
Q10 l \'\'hat arc the various wayR in whkh public key <listdbution is implcmcn tc,
Explain the wor king o f puhUc k ey cc1·tifica t cs clearly <lct:aWng the role 1
An,-,:
r101't1 - May a:
PIJBI.IC KE'{ lJlSTH IB UTfON:
.,.
In ;-,ubliL iwy cryrt 1Jgraphy, only puoik key needs LIJ be: di-;t ;·ib ill1:d, w hcn:,1 s rrl vntc k ey it: l<cr
secrel.
,. Following ,1rc the 'N'JYS Jn wh ich puhlk key:; can h,~ di s trihutcd:
. I
I •
t ,
CJ ,tnflOllll C(.! It pu!,11<:Jy .
rwwsr;1pcr.
011
' "II:
1'> 1U: 11r Hdvrnf•:,: ir 111 I," ,rl (ir : 1;,r:or:,1
;...
For ~ .ilDluJ.!!i. Wh,:n !{ 11ti.;jJ Vv;J 11t s to '> (!lld a r or n f i I
c:,1 1.. , t :1 , ..,,,;q~,- l n T· ' 1vi · I I. 'I'
r1u l,Jic; key ci th ' r 1. h
1
• J l
· .i , , l l· 1, 1: 1 n 1::11, 1 .,nv1 ·,·
. e iom ,~r we,slt<: orfrom ne " . ,. .
;. Fivu
'
r c 1 ·
'L. dr•sn
--
··
r ti· .. .
11,_ .. J ! ~11u at 11m .
, ,,.
w ,p.1p~, :i nd
· U1 1: 11 l"H
.. ry !, 1 1.i,~
, 1
,11 •·,: :,~1,· 11 •. ln ~ It.
..,,
., Fi 1tUf'I! 1 'l. A
- - -- - - -- - -- - - - -~ 1111111111 cc rn 1: 111 Ill r,ul:fl c lw y,
n,, '\hu h
I 1111 •1111\111111111 I 111111111 I Pl' I 1\111 1111!11l' Hil I II 1111111 111 11 111 111 11 111111,111 111 ), 14 /t/llil, /11/11
,\ \11111 111 r,111111111• 11 1111111111 II 1 11 1111,111111111 ,1111ilt11, Iv,J11,i/lrd,I,, d11,11 1,,11/ ,,r 111 ,!i/1, ~•,:;~, ,rh/1/, 1::
II\Hl11li:1I 11 \'\I 11111111\1\I
II I 11111 I 11 11\ill\ltti\11111 \1 111 ~1111111 II ll~lflil I 11111 111 ill 11111,111/ lill/lJ /I /I , ///11//J}•II// :J /Ji/ ,1w11im1;,, I / '-
~ tri11111 p ,1,,I ~h 111V 111 i1 1111 1111i1 11 111 !II p11l 1l11 I 1111 d 111 1111 11y
l11il1III I l•i'
IIII H ll•I Y
, , 1 , , ,;, ,,. , i 111•1•1/ /'Ill/Ii'
w
l
·•• /II/ I
l.11'11\\l llil elU . 11 1 11l 11• 111 IVri11J ht!\i 1J r d1 ,,,1l1J / l/ ;1lill111ill /,H1il l11JJJ' l ~'llli' l':! ~/J'j•JV'l; JJ,1 •;;,,
,, 11 ;11i v111 1i,11 ,v/ 1111 rn il u1111111' II I 11 ' -
lil'l lll li li l11 1jJl'ti rffll 11/ ~[ l(l~t< d ltl 111 11·111 1111',
111)
,
[)rawhacki
):• Publi c keys 111;1intaincd by ,wthorlty :-ire vulnerable to n10clifl c;1tio11.
► Public key authority gc1:: overloaded if the number <if request~: ls large.
1V) ~lc.lic...'!..Cw.if1£11.ti;
► The ;iltcrnative to prcvioui: :1ppro.1ch l.s to create public l<cy rertlf1c:i tt·s.
► Using the pnblk key ccrtif1catcs, 11'.iCrs can exchange the keys withou t ro11tncli11g a public kt
;111thorily.
The r •rtific:-it es n ,nsi sts of:
•
11
A pdilic key.
,'\n id enti fil':1 tio11 of key ow ner.
--..---ent
► Thi:, certifi c,ne is signed by a certificate au tho ri ty such .1s ;i govc;·11me11t agency, a financia
inslitu ion or ;1 s1,1 te organ b 1tion.
► Consider for Examp le: Rutuja w<1nts to distribute her publ ic key i n ;i securt manner.
► She c.111 presP.nt he r public key to certificate authority (CA), obt;iin a certiricate and then publis~
the certificate.
Now. one who wJ nts the public key of Rutuja, can obtain the cc , ti fi rate ,md ;:ilso ver ify that the
certifica te has originated from CA. (i.e. the certificate is valid and cri gi n;ilJ.
One r:111 also tra r:smit ::: certi ficate to convey the hy to th ose \'✓li u r eq,.ie:;~ed it.
Figure 4.S shuws di~t rillut:011 of pu b:ic key using certi fie ates.
------
·---- 1'~1ej 3o(f!JII
. §lGNAnJRE:
However in c:1:,c of digit:il ~ig1~:lture, message is encrypted with the p;·iv;;;te key and decrypted
·with t.he pt,tlic key.
0.
Only :1 spe cific p~rs0n w;th the c rrcspondi ng priv:itc•
' ,
1Jyc-rn' nc·r·ypt •I •
' ic message or lil oth ei
words sign the mess:-igc.
.i 1.
Ho,"evt.'r 3ny party \Vh o '1:-is th e sig;1:itory's public key can enc•·yiit •he :i i e · . , • • .
, 3n verify the mes--~1ge. · ' • :ss~Je, 111 ol11er wonts
12. Figur e 5. J shows the pn.cesses of Digit:-il Signature.
Figure s 1 · D' .
~ - ~ - - - - - - - -_
i, , . . Jgllal Signature p roi.:e!-.s.
--~-;;;;;J~-
'Pt1_Je540(134
-- - - --
Scmuf~r-7
Key Generallon;
~, Choose a prime number q, which is called th e prime divis or.
► Choose another primer number p, such that p -1 mod q = 0. Where pis called th e prime- modulus.
► Choose an integer g, such th at
1 < g < p,
g11 mod p = 1,
g = h HP· 1J/qJ mod p.
;.. Choos e a secret key x by some ran dom melh od, where O < x < q.
;.. Compute public key y = g• mod p.
, Package th e public key as {p, q, g, y}.
-,. Packnge th e priva tP key as {x] .
.S.ti!..nature Ge11~r,1li9n;
dfe\ernent
!las h
Alg orithm
----+
Hash Vnl11c
+ Si g n er' s Pri v::ite
Key
Oigi ra lly Signe d rne
;... Let 'h ' he the hashing functio n & ' m' lh c message.
;,.. Genera te ;i ra nd11p1 num he r k, ,;uch that O< k < q.
r Cnm!") LJ te r = (r_:I: mod r) mo d q.
,. 111 thr! 1rnli!<ely cnsc~t hill If ,::: n, start ag.1in w ith ;i d iffe rent r;i r.do m k.
,. C:Jlcu l..! l(; s :.; It 1 (1! (11::} + xr) lll tt d q
--
, ...... v ........
. tu the receiver of the message and the digital signature can folio~
To ,·erify a message s1gna re,
cc steps:
,. , · 'h' be the hashing function & 'm' the message.
Reject the signature if O < r < q or O < s < q is not satisfied.
Cakulate \V =: ;·1 mod q.
Compute u1 = h (m) * w mod q.
Compute u2 = r * w mod q.
► Compute v = (((gu1) *(yll2 )) mod p) mod q.
► lf v == r, the rligit2l s,gnature is v,;lid.
Q2] '\\Thy arc Digital Signatures & Digital certificates required'? What is the
s ignificanceofDual Signature?
m GITAl. SIGNATURE:
l.c::~::;~:~·~:~~~~~er
' . le r.terrwt using the ub ; . .
musol LI R..
t,
-- ■ ■ p
Seme.rfer-7 Topper', Sofufiom
$. digit:il rertificill0 may also be referred to as a public J<cy ccrtlncatc.
11 ,1..i
:,,i l*: u a l\· 1,·
►~ ~--~: .J
Ans:
~3HA -1:
1. SHA stands for Secure Hash Algorithm.
2. In cryptography, SHA-I IS a cryptographic hash function proposed hy NIST.
3. There are three SHA algorithm named as SHA-0, SHA-1 ar.d SHA-2.
4. SliA-1 is most widely used SHA hash function.
~ The input to SHA-1 is message of length 264· bits and its produces a 160 bits outp1.1t
nt
Ir is
6.
3. · It is more secure.
b. It is little slower to execute than 1\1 OS.
c. SHA-1 makes 5 passes whereas MDS makes fo ur p3sses.
7. SHA-1 pads the message in similar way ciS MD5 .
8. Similar to MDS, SHA-1 also operates i:1 st3ges.
ALGORITHM:
Step - 1: Append Padding: Bits
The message is padded so that its length is congruent to 448, modul e 512.
P:11ldl11g
l'ad1lh1"
1,
________ __..
Scanned by CamScanner
IA,,i·#¥di•J,,,21,JMN
Th l· n's ultant message has a le ngth tha t is an e;.;;:ic t m ultip lt:: of s 12 bits.
400 ◄ II
+-1
64
.____o_,_1i:_tn_11_Musa
_ _~_--1,_ _
Pa_dd_11_,!l__J~ l ~ngth ]
Da l:, tn be h~shed
32 Bil t__A_----l-_H_E__
X--1-_ 0_l-+- 2__3_ i--_4_5_ t_6_7 _j
32 E3!t B HEX 89 AB CD EF j
98 ~
1
32 Bit 1:.-
1 _ C_-+-_H_E
_X--t FE DC BA
32 Bit O I HEX _ +-__7_6_-1--_s-=4-r--=3=-=-2-t-~ 0 ~
3 2 S it E HEX I C3 i D2
I El ~ 0
cp cp cp 9
G][J0Q
} • co 16 su b blocks.
5 .2 : Divide current 512 bit bl ot: <. ,n
-L~--------_-_-_ __J
- Bind; 1 (5 12 ul!]
32 bll
32 hi t
3z uit
- ------ --
musolution.in Scanned by CamScanner
Semuftr-7
One Round
l nr PJ ➔ I= o ro 15 a b C d e t(~J ➔ k = 1 to 7'J
A B C D E
Q4 i V\/ha t arc foe pro perties of hash fiH1c rion .,;? \ Vhat is lhc rol e of a has h function jn
s ecurity?
A n ~;:
11 A _c;H FIJ.\C ;'!0.\::
·- ---- -
1. A hash f; rnclion is a mathematical fu11crion ,hJ t coni,,,,r,.:- a nu m • 1 . • 1icr
· - • ., Cf! CJ. l n p t: I 1/cl.1ll C JOto <1110 1
compressed n11m1:rm tl v;i lu e.
.,
L,. The input to th t hash fu nction is of arbitrary fengtl, h t .
0
u
,s r1 lways uf fixed lc11gtlt.
11 tr 11t
3. Values rct 11rneu by a hash functio n are ca/Jeri messaa. d' .
_ _ __ _ _ _ _ - - - , ,11--1.:1..__ _ · 1-; i
1gcst or simp ly hash v,1l11 c5.
4. Hash funct i ns are "'Xtremely usi::ful anJ appeJr in almost all ini rm:it iun s~urity Jpplications.
ROLE:
An.s: [toM-.May.
CHARACTERISTICS ARE NEEDED IN SECURE HASH FUNCTION:
Refer Q3.
Q6] What is the need for message authentication? List various techniques used fa
message authentication. Explain any one
Ans:
NEED FOR MESSA6£ A:UTHENTICATJON: e
1. Message authentica ti o n ens ures th a t t he m ess agP. has been s ent by a g e nuine i den tity and not t
ar: imposter.
2. Message a uth entication is used to verify:
3. Received m essage is fro m a ll eged so urce .
b. Message h as not been a ltered.
c. Th e r e is no change in message s eque n ce.
d, Message is not del aye d or a replay.
3_ Messa g e a !_;thenticatio n indudes mechanis m for r~on-rev 1l!;a ti on O} s ource .
1. !•-1/\C ;dgcri l!1m i.o; ;1.sy mmetric Jw .v cry ptogn1 pl!i c !(•cl111iqu e.
2. :t 15 U~£:d Lu J)ro•; io(' 111e-.s~1,~e ;, 11th1:ntir..1 ti,J11.
)
3. /\ MAC uses a keyed hash functio11 th at i11,·lt1d
.
c.;• 1/1•• ' "' ,.. ,,.· c I,c_v h (:: (\Vet•ll the s e 1HJ1·r ··1'•1-1
... .,_, . 11111 - l l
For e!;t.:i b!is hing MA C r,roce:;s, the se nder •ind rL•c , · , . ·/1 . . .
' Ln er s .11 e ;i symme tric key K.
Semt1hr-7
5. Essentially, a MAC is an encrypt ed checks um generated on the untl e rlying 111ess:ige tha t is se nt
along with a message to cns11rc m essage .1uth e nticallon.
6. Th e process of us ing M,\C rnr a uthL' ntic.i ti o n is s hown in ngure 5.!:i.
MAC MAC
K eyK
Algo rithm
MAC
Message MAC fcq1111I ·r
Algorillnn
Sender
WORKING:
> f-igure 5.5 s hows how a sender uses a keyed hash fun ction to aulhe nlic.llc hi s message aml
how the receiver can verify the authenticity of the mcssnge.
> This system makes use or a symmetric key shared by sender and rece ive r.
r Sender use rhe symme tric key a nd a ke yed has h ru nctinn o gene rates a MI\ C.
-,. Sende r then sends this MAC a long wi th the origi 1:,1 l m essage to n~ceivur.
> Receiver rece ives the m essag.:? an d the MAC a nd separa tes the 11ess.ige frn m th e r,..·1M:.
-,. Rece ive r th e n a p p lies the s:m1e keyed !ia~I. fun cti on to Lhe 1:1!!ss.igc usi r:g ihc s'..'I~1 u .;ym ;n ut ric
key to get a fresh l\lA.C.
Receiver then comp:'.! res tile !Vt,\C se nt I )' se 11dc r wi th th e ne wly ge ne r~1ted M / 1C.
-;.. If they m a tch, the n the re n ~iver ;:icce;Hs t!i e 1:1ess.ige a nd :-1s:rn r es h im,:Qlf ti1;i t tne 111c s~.1gc h;:is
hee n sent by the intended sender.
If the compute d 1\11-\C d oes not ma tch the 1\1!\C s e n t by the sender, th e receivc r c:11111 0 ; dct~rrn ine
" h ether it is the m essage that h:is Ut' e n ~1lt e re d or it is th e origin tha t has bPe:n fri lsifie ,I.
-;.., As a botto m-line. a receive r sa fe ly assu m s tin t the 111ess;1ge is not the ge n u ine.
0
KDC
--T C.\
--- - ----....
I
I
~D( 1311 J ~ fo r ~ey Dis t r;buti on Ce nl~r. CA St:ir.ds fo r Ce rt ifi ca t e Authorit ·
ht l5 symmetric key solution a gai ns t a ct ive c1 tt.1 ck~. I t is ,;symm e trickcy solut ion ;-ig:i ins t .. rti \'t' .11 t1cks. I
I 1
I , t ,s less se cure.
- -- - -- -- - ~
~
t~
is lll Ul'l! S CC lll't! . - - -- - - - - - ~
I
--
~ - ~------
Pr •f<:rr1•d for WAN:. .. --- --
---- -------------
SIi i\
I
I$,11·v:;,~~1• IJJ~•··
I -,. . - . .. --·· - ~
l ,~nl!' I;
I --
l 1,,q w , -------·
j 1,, ,., l)j ,t I c.011·.i,1 ,,, ,.<1 m ,JI , • ._,., ur,• ill.Ht . n,
1}~1~ G4 ,J/1~t, .
\. F\~u~ t1. l :;hows th fom1;..t f X.S -1 igit..1l C~rti fi -;:;.~. -CA- Ce ro -ote Au th ority)
Subiect Putl:c
t<e-: info
~
_-~-..,- ...,_,t'
~a.in .
thcX~ .0 9 l."'e rtjficate format
[toM - Dec17]
. . ._ 0£ R7&7C..I\TE-
3. .: ~ ::-~ :ad~ 2 U:,J-ti:h ::.':e Au· mi ty (C..\) to verify the identity of the certificate holder.
~- °i::= CA r-s::'=5 <;.J : za:--;i-:ai oigitaEcetfficar-e co n □ ining the applicant's public key and a variety
.;,. i..i:~E) ....::.:: =b-i' Es · sro ro c:::tc.ch ;:m b!id :ey with a particu!ar individual or an entity.
5. .=-:;:3 ~ '"c:l .:B-2 m =::;;;•rr;:
n. S::..~ =·•, ~ w·,•,-::im ts us...-=<l m u niquely identif/ a certifica te, the individual er the entity
!t:=-i~i:ffi ~ -L_-2 CE, :ifica.e
2:...
rn
l.
is Dc:S"'c:! on ,ne c!igica! certifica tes o f the user .
in ~ i:l~~ r:Z'j' infrc:...~ .x~ re
(PKIJ, cte digir:.:: l c1;:rcifica tes a re us ed fo r
ITT.nsa ct!OilS. se cure cligit;il
3.
4.
1u-e s P. ntc l! by tlw c\ic nl is stored in the user's c 111ry 111 : n LIMI ' tl :rccto,y.
1
10. Th i.' serv ~r the!\ l'V:ll ltales whether Lhc itlt-11ti fic:I 11s •r is pt·11111 t\ •d t o n 't'c :;i; lil t: n :q111":l1:rl
l l.
resou:-c~.
D l.-\lL SECURlT'I'·:
1. r M ·1Sl" n •ls to • r El
. c...•·t1·<)t1ic
. Mail. . . 11 • 1•1 t1• l'l) '' l I I) S l ' I\( I ; 11) ( I ..' l'I l '••
'"t' ,r1(•.., .,., ....
• • ,. , .. ,
i·,•
c.· . il l " - - I 11\i1"\ I l ( ' li 111 , ,, .
. . . .. i , l vmkly us1:t np ,
2. Eleclro1~1t m,11' ,s 111 ( ·
. cxlrc rr\l' ly i111port:1r,L l~s111·.
othc:- users . .. ,s Ir is bew1nu •111
ii 111cs:,,1gc. . . . I
3. . tl1t' sC't:u!·llY o f P rn il . I for c111,ill ri 11111111111wat n 11.
l hie tl'! ltlS , . . I (SMTP) is W,L'(
. ·fe r l' rowco • I .
1. The Simple Milil 1 r" ns . 1· ,1scd arc ;is fn l ows .
· 1 st:
··1y 1)1·0\o cn s
· •(:Lll l
5. The th ree ma in e rn at ----::--- -- - -
---- -- - - -~ e670( :A
1
sn1tp.a.0T&
l t!J
·---~:-:_
Secu re M~1itip•Jrpo se Interne!: l\'t2il Extensio ns fS/ i\ll ~H:i:
M!ME system exte nd5 the bas[c e ma!J Si.·st e m !},.- cermicr·ncr -e ,....,. - - -_ •
_. - • . 0- k ..:b I,. 0 - e .__ · ~ " " : - -;;-,
•1mai! sys tem. .... - - ...........
► Figure 6.4 shows the Confidentiality & Authentication in Em;iils using PGP.
► First, a signature is generated for the plaintext mess;:ige and prcpended to the message.
► Then the pbintext message plus signature is encrypted usi ng CAST-128 (or IDEA or 3DES).
► Session key is then encrypted using RSA.
► In summary, whe n both services are used, the sender fi rs t s igns the message with its own private·
key.
> Then the sender encrypts the message with ~ session key, c1nd finctlly encrypts the s ession key
with the r e cipien t'-s public key.
P~. K
l,
'"""~fl~~©-€)-.
lfa sl:
j
I · ul g
Compress1011 s n .
ZIP Algo,ithm a lul'trse C~mpression
Usiug
ZIP AlgN'it!:ir.
EniaH lE)
~~
l'uhl1r Kl'}'
£11rrypt 1011
Svnu:ie o·i c
E.n rryp tio11
S)'111111 e!ric
-
[lecrr;it ion
PU l'u!ilir :,er
~ ~'ernvt icn
r~·
Co111 p.11 r I■I
iia;;-7 I ½l'j
fu nction~
E(PR. lf(E)l
. . . prp
& Confidentiality 111 " • _ _ __
Figure 6.4: Aulhent1catron - -- - - - - --
1'14_3c 6~ of134 ■
Ans:
Typeso(Email Threats
I
I Phishing I Spoofin~ I IL__s_p_a_u•__I ~
~ L n.rnsomwa1·0
_ _ _ _ __
Zllro Day
Exploits
Social
Engineerin
1
I)
Many email recipients beUevc the mtssage is from a trusted indivJ dua) and wi }) open infecter/
attachments or click on malicious Jinks.
IJJ SU!>ofing:
Because email protocols lack effective mechanisms for authenticating email addresses, hackers
are able to use addresses 2nd domains that are very similar to leg,·r ·ma.. d . , · ri·ms
into believing that rraudulent emails are from a trusted individual 1
. .e ones, ece1v,ng vie .
►
Crim;n::il$ may spoof an individual mailbox
orgamzadons 1
. ... t o care fuIIYevamate
. spam f d e ivered Via spam, "..,nd i' t behooves ;ill
or angerous intent.
-~-------- -----
musolution.in Scanned by CamScanner
Ef§uh'ii,?H:::3,1}[,J I
Bansomware:
Ransom malware, or ransomware 1·s a typ f
• e o malwa.re.
It prevents users from accessing th ·
e,r system or personal files and demands ransom p.;.yment in
order to regain access.
► A zero-day vulnerability refers to a security weakness that is unknown ta the software developer.
► The security hole is ex ploited by hackers before the vendor h3s created a fi x.
Zero-day attacks are frequently delivered via malicious emails, ar:d h ackers use them to gain
►
unal!thorized a ccess and steal sensitive information.
confidenti al data .
. . k mou te r criminal poses as a trus ted individl.!al (IT sup port,
b a social e ngmeer!ng attac , a co . . .
t ) .:I enoa oes in ;i conYer ·ancn t0 gall' access tc a
.r.nman ~.e s ource, o uts ide contractor, e c. an •,:, "'
Ans:
sep'1rately. 1111
To ac.:rn inii1ml,,l t! 1lw, n: , l rit:L in11. PGP ..u1101H i-Hicillly :-i 1d>div1d ,::-, .1 ,,,, ...,..,,.,,,l, 111.il 1·, l •J•J !,,,)',~ .v
I
~
Co11Ji 1l011linlly n N111ii~j -----
'-----r---·_J
No
Ans:
1'" h I'• ,, 1111 P1 lw , ,111111 1 111 1 u\J 111111 ii 1 l'itlilln lu.1v ,.. , . .
' 11111 ,, 111
I I1I 1Vil 1It 1lf! Y 1'11 Ill,
I) 1'11htlc llm• 1'III L11
1•1lP ,111111\•>-t 1111!11 q, 1,, 1111 1,1 11 / 111 ll'tl lp 1111\1 11ni1'ri l11 r 11111 Ii 111,11r,
11 11111111 1111111 1' ii 111 11 ,111 h 11 \H1 h1111 w 11 ill 111111 11,111 ,J,
l'uhll•' l,1c1v 1'1111 ll11 u ht ,1111111' 111 Vr11lt111 !i wny11,
-- ---- '"---~--
- - - .,,.__ __ _ - - - - - ---+- - -- --1
I~\' cul!J.mut· 't.'l'lu_,ex 1,,i 111 ,, w l111·l1 1 (:1• IVl ll 11 11•,11 1,,. l11•v,
1
).. Pt·lvo le l<11y:, lll'n r 11 1·1·y p ll'il 111:1 1111 ,I 1<1·.v hli t,l' d ll l l I lle ' u1:111•':, l\ il ti.~p l1 1',1!,1• (Si l/\ ll ,1:-.h l'llrl,· nr' th,,
pn::1;pl1 l'!Wt 1J
l~ . '
iii,,,-=- ·--·- Tcu~•111
'
1'
11., I',
.• 7-' of,:;.~
Pr,q11
1
I
_____J
------~.. _._____
1)t!J;·?4 a/~ -----
"'
.,.
_e-:r,2:- ('iTGS;...
,,.
,.
,.
,..
I-
Scanned by CamScanner
~ ~ r <;ontacts Secrer for access:
JI!
Server in order to i:nter in to a session.
User can now sen d KAB to
Si nce this exchange is also desired to be secure, User can simply forwac ci KAU encryp tl'd ~v,1~
,.
Server's secret key to Server.
This will ensure that only Server can access KAO.
► Server now adds 1 to the timestamp sent by User, encrypts the result wit KAB and se nds it 10
User.
Since User and Server know KAB, User can open this packet and verify tha t th~ timestarnp
►
incremented by Server was indeed the one sent to Server in the first place.
Now User and Server can communicate securely using the shared secret key KAB to encrypt
►
messages.
u key from
If User wants to communicate with another server, than User will need another s hare·1
the TGS and specify the name in the messagi:.
Qu] S/MIME
\ernent
r\ns:
[5M - !\lay17I
S/ MIME:
-- ~ G---
■ -.le 7 of[,- ;;;--------:.
Sender
[10M - :May18j
--------
dir.l ribution ce 11tc:- (KDC) . ·
1- 11 ' 1re
' r '1l\\1i; 1ra\(' ( \1., -f'' r..
. · ScPnart D ' " ·
5. A typical KP.Y Distr:but1on -
-
mUSol u{i011 .in Scanned by CamScanner
Gl 11ul~l;CA6on '
li!Buf·SMH,\,fuiMN
,\mhontic:1tio11
St r ps
~=;__-~ (5) E(I<,, f(N.z))
I)
,..
H)
,..
,..
-------
musolu --- ■
: In Scanned by CamScanner
7 I Securi'J ~ ~rewa/6 i·Muf·MPFA,,,t\,JMN
..Sttmt.rfer - 7 To
CHAPTER 1.Sofufio111
Q tJ
.
What 1s a firewall? \Vhat al" th
- ?: SE.cum.TY&. flREWALLs
AJ)S:
e e fi rew•1 ll ·l • .. . .
• • CSl~n pr111c1pte·?
-
flRfWALL:
2. .
It ca n be hardware, software or co~b,·n OLate
ti
at the
fb
network gateway server.
'" a on o oth.
3. It protects private networks from outside networks.
4. It is a nehvork security system that m ·t d •
- om ors an controls the incoming and outgoing nt?twork
traffic based on predetermined security rules.
S. The rules c1re nothing but the firewall security policy.
6.
This poiicies specifies which traffic is authorized to pass in each direction.
7.
Firewall examines each packet to determine whether to permi t or deny network trnnsmission.
8.
The purpose of firewall is to filter traffic ar.d keep malicious or un s;,fe info rmation outside of a
protecte d network.
9. Firewail is like a secretary of network.
10.
A firewall typically es tablishes a barrier b etween a t:.-ustecl, s~rnrt> in ternal network an d anoth~r
outs1·ct e networ.k , sueh as the Internet
1
or \Vide Art>a Net,·:ork that i:; assurm:d not to be secure or
trnsted <1.s s how n ir: figure 7.j ·
F i1-..'-"-:til l
~
... r I,T1 ~s-
?JB£WALL CHAR1-\CTE.~ .__, ...!. , • , l I ·endine- on set of rnk~.
~
of se:·vicc~ can be ::ice :,St c . 't.>(, o
Serv:ce control: Sp2cifies wha, typ e . . = • . ,·.,.~ tion :rnd tkw of I :1rt1rnbr ~t' :'\'tCe.
II) ~ •fiesth " (lI·,.,e ct1·0n ol 111, tu .1..,, ·
Directic,r. control: :-:,peCI
1
~ •
-- ·111 G\\
. 1 le' - cr~:;s :1 :-t' IYtt'I!.
1
IJJ) . Particular use1, .~, ,U •
User control: Specifie~ which · . .
IV) . . ~ beh3vior nf t Iie. ~" r'\'l c' t' .
Behavi<!U=Ontrol; Sp~crnes ·'
C trol Link. .
------------
io Establish a Sccurf: on . ,, ti:ised ;:tt,tl"~~-
To protc<.:t the pre mtst!
· c; net•.vor k f ro·11
' lntc1n, , .
_ _ _ _ __ _
fla.J~ 79 er..,
'°64
IQ •• I aoM -
.~
l)cc16 l & [Q:l I 10M _ M"~~
fltJfel' t) I ,
,,
Scanned by CamScanner
Semeite,_ 7
\\)
filateful lnspectio 0 F.irewa\l.,
Unlike packet fi\\crin,~. firCW;'I\\ St
'P
be initiat ion . lbta \r;l n.,,·fe, r ur \c• r matefu\
inati firewall k ccps lrar.k of s1.:it1· ' ,
A drawba ck of packet 1 ters IS tl r·, .
on . - Jf a crrnnct tion v11l1C
i . ·h rn,JJ
• ,at they
~ vu\ncrab\e to are state\ css and they have •10
pack e ts w \Heh makes t\ lt!ITI
Attacker may modi· fy t\
,c attack b s . spoofing
. "a•t·acks. · memory of nrei,·,, t i~
,. , ,
packet fi\ter . y plittmg it into multiP\c packt·l~, wh·ICh f1OCS un delected in 0 •
TCP
From: 192.1 68.10.1
To: 177.1 6 .5.5 -- TCP
From: 192.168.10.1
To: 172.16.5.5
\.-TCP
- From : 172.1 6.5.5
To: \ 91..168.10.1
-- 172 16 ~.s
F·r-om: TCP
T~: 192.1 68.101
_ \
No UD P Se'lL "7CP \
fr(»n: 172 II, 5 !' --
~•a Protoccl Match. \- To. 192.16'! l ~
UC,P !l.•·icct
Advantages:
Prevent more kind s of OoS attack than packet fil te r.
llisadyantal,!es:
,. S\ower than p?..cket fi\ t ering firewall.
lt doP.s not prevent app\icnli on layer c1ttac\<s.
tothem
· .. .. • th the :n" h ·""' ·' h"' I ·' "' "•"
E \ · f 11 ' \ 1a \ nctwnrk 11., rt • \\ I
1111
. ach proxv
• ngent nutncnticatcs eac 1 iv. \blontctrlCS,
' 10\w•' ,,,att·hto~
. . -----
:.. fj
. .de the packet. l•hn'·'i i .J:n2,ifo5
► It also veri ies the. data msi f the OSI Mo ctel .
1· ation layer.o
It work on the i!clPi!PlllllC=~~
►
__S_o_u_rce
_· A:--d~d::re=ss-;-~ I SOIIITe t'\<l1lr,is-;
t 7 U.2 11. l0.60
178.28,10.80
JP Pitcket
I'
Inside Host
7 IP Packet
- ..
(
HTfP
SMTP
1 - !
- Outslclo Host
I
FTP
I l TELNIIT _,,
App Ucation Gateway
IP Address: 178.28.10.60
Disadvantages:
It is software application used to protect a single internet connected computer from intruders.
Personal firewall protection is useful for use rs With.'always , . DSL or cable
modem.
. ·on connecti o n s sue 11 as
These users are students, hoine users, individual wo k
►
Personal firew;i \j can ue u'-e' d w ·it}1 cl. !l t·1\'irt;s
.n cl Work station t 0 bl oc k u1~wr111~ ed trziffi c from nen•/O
,. f
. ■
lt does not gives early warning of an intrusion. It gives ear!y warning 0I an intrusion.
Firewall is more likely to be attacked then IDS. IDS ls less likely to be attacked then Firewall.
It is not aware of traffic in the internal network. It is aware of traffic in t!ie :nternal necw o rk.
ITypes: I Types:
I 2. Statefut-inspe.ction Fi:-ewail. I Z
13:
Host IDS.
Protocol Ba~t:d :os.
I 3. Network Address Translation fir ewall.
4. Application Based firewall
I 4. An ornaly 8 dsed ! OS.
s. Misus~ 13a~ed IDS.
I 5. Hybrid Firewc:111s.
6. Hybrid IDs.
Ans:
IDS:
1.
IDS stand for Intrusion Detection System.
2.
It is the device which gives early warning of an intrusion.
3.
So that the defensive action can be taken to prevent or minimize damage.
4.
IDS detect unusual pattern of activity, which may be malicious or suspicious.
Jl
SWitch
IDS
Server Router
rg -
c:::::i:;t
PC
CHARACTERISTICS:
p Figure 7.S: IDs.
1.
It must run continuously Without h
2. I t suould
1. uman supe· . .
not be ir. a bl
. ac kb ox. cv1s1on.
3.
It must resist subversion.
4.
It must be fault toler;:int.
)DS SIGN!FICANCE·
---.:
1.
IDS is used forMcni·t .
. onng a11 d ana]I, · .
2.
It helps in assessin , _./J ng !:>0th Use
3. . g S} s tern and fi l ; . . rand syste ..
!DSdetectattackwhi h e .n ,egm y_ lllact1v1ties.
4. r • C :-n;:iy hr1rrn th
it provides cross pla tfor . e system by r .
ll is used . m Pr1Jte(:ti0n. -Ontinuousiy . .
to tr..ick llse r 11c1· . tnon1t,)nn o it
6. ID~ perform A
'I~ ll_)' 1•1nf ~ .
1 • ;i t, ;1!1s.
na.ys1s of - b
a 11orrn- •
a, ;ictivit
COMPONENTS OF AN IDS· y P,HtQ1 ns i?1 o d
~ rert
~-
. 1gure 7.6 shows the co o secur . '
e cl 1.et\~,, rk.
rnprments of ID
- - - - - - - - - s.
musofut~ ~-
• Scanned by CamScanner
-
Iii, "''•u-., I
1••111.,1•••
I , . . ,.. ----1
--
-
1
,,. --
I I of. •••'-I
II)
Ill)
IV)
nas1d IDS. 1
11 ,~~ii:1~ 1;;-;v7'1 w
tne~-; 1~1k;1~v11~1t1.l~1 s~ - ·- -
Scanned by CamScanner
i·Muf·MP\1§,,,t\,JMN
_ ll,_ _ __ _ _.Semdrler-7
7 I Securl'J ~ 'NrrlMM
rortcr~ Soft,l•110n,
-----..:_
1r---·----~1-----
1e_ _ _Do_o_t_Sc-Jr,o-r\-~-ru_s___~l-01-
ou.~T-i11~
\'lr11s
M~rro Vin,.•
·' 6111.,11 \'irm
7
Flgu 1·"'- 7 ' 7 : ·1·}'Jl" •'
~ -• 11f Vi I•IISt!S,
(),
,iliw TI mc E2illru1Jilll..YJtllii.;
Scanned by CamScanner
.. -.
in a program file.
, Macro virus is platform independent.
► Virtually al! of the macro viruses infect Microsoft Word documents.
V) E-Mail Virus;
5. Thus, th er a re si:!lf-propagating.
I) Em;1il Worm£ .
• . . f)("' r "rr. ,,il r.J11: r,t t" ~11 :·1',,cl qi·rlt. .
r ,\;) !:Olcll
·1\·1-,~m·
· ·
us ,·" •1
J ..
• ·· " · ·
I ·· 1 · 1 , t th , ('l)'lllll llt'f'. • ·t
•J I 1
,,,ill
. ' .
I ·. t' ,. cnrnil urn t. w!H·ll rllcke<, \I' ll in .n ' . .
it w!II eith er ~end ,, lin k WJI ,1.1 n - . ..
r
h . <: ned 1-.,,1! :;tart the 1nfcL1 11 >11.
s'.:!nd a:1 attachmen t tha t, w .e n op , . I '"ILOVEYOU" worm. which infected millions of
le of this tvp~ o f worm is t ,e
;... A well-known eY.amp .
mputers worldw1'J e in
· 2000.
co ---- -{
'Pa_Je 87 o 134
downloading. fl)
The worm will copy itself into a shared folder with an unassuming name.
►
When another user on the network downloads files from the shared folder, they will unwittingly
►
downlo;itl the worm, which then copies itself and repea ts the process.
In 2004, a worm called "Phatbot" infected millions of computers in this way, and had the ability
lo steal personal information, including credit card details, and send spam on an unprecedented
scale.
• needs to "..,ere
Th ese a:-c not as effective as email worms u:i the recii1 ient - p t th
. e message an d clJCk
•
the link. ~ http://
Th ey tend to effect only the users ofth<:! parti culnr prngn:rn
•
•
\'Vilh the help of examples C:\.1>lain ll011-
ni.,. r,c1ous
.· progranuning errors. •
An s: Ill)
4 Tbere ;ire thrre broad cbsse~ ofnc 11 _,,11a 1.li.,•)l ll! S pri,gr:i .
t:1t:y ::r, · ,1 , fllll ow~. ' Ii·" 1,t: S('
· - · rnrnmg errnrs th.it , l'tu·1ty
, l'fkrt~ ,11:t
I) .IJ.!illfr Ov1.:rflows;
A bufft•r is a spnce in which dat·a t:.111
, be held .
/1 buffer resides in memory.
•.
:.'"
1'.·~
·· °r; •
·-·(
:{;.;
~}~
..
: ,
v.r~
;!trt
Scanned by CamScanner
7 \ SuurifJ &:_______
-:-----=:;__ 'Hrewaffl St
-=.~em=ei=ie=-r_-!_7 _______1i::_o'ff_~~er'i .Sofuliom
1.
,Example:
?arm 1 & Parm2 are the parnm~ters for Telephone number and a Date r espectivel y .
•
it is possibi e for the a ttacker to change this parameters in th e URL as Pa rm 2:: 11 GOFPb20 .
•
The receiving program may give data type error, or it may execute and give wrong res ulr.
•
Time-of-check to Time-of-use Errors:
III)
The Time-cf-cher.k to Time-of-use (TOCTTOU) Errors is pe rformed b y "bait & switch" ~trategy,
r
It is a lso known as Race Condition Errors or se rialization or synchronizatiun ffaw .
1
. f r l k to Ti·n o. ~i-u se erro rs exp· lo:ts the time lag between th e time ¥ e ch <: ck ;111d the tin~r
.,· T 1me-u --. 1ec
1 ~ .1 . .
we use.
:;.. Non Computing Exampl~:
r Shopketper shows bt,)'et r er1I Role x W3(Ch LLa it)
• After bu~1e r pays, shopket'µc!· switches rf-!al Rolex vvcitch tn c1 forged o ne.
_fornp_utin~ £xam•ll1;_;, . c~ Data '; between time access checked and tim e ar.l'.ess u~ed.
■ Change cf~ res oUl ce 1:.g. -
Pa.3e 89 of134
Ans:
METHODS:
1'1•rnur)' 11:t .i\tltit 1•.c• 1•, t• t "'f-111,1 ,
-----------.-•.;a~------~-
I U.uo .~ lJnun,b
J{,c.L: h t P1'
I)
A ft>nt:e
. or lenrc
. :itidrcss is simpll•sl
.. fol' 111 ll 1· lll('l1101'_1' p ro f .. , I i( l l '
,..... !tis tltis1g1:t>d rur si11glc llSl!r systems. .
• . tlr,1l users
A fe nce is .i p:irtil:u lar address . . il nd lhL·l1· 1i1·( I "(•<.,• I " t '
Only th e OS ra n npl!ra tc o11 o11e side of the f, . , . . ., ,11 111r,r rr-<,. ~-
enu:, nd 11 ... <·,·r•·. ''1r·,: r ·!'; trJ Ct(: d t'() rhr. •
11 I1;15l' and Bonmls Rc:i:!stcrs; ..: n t h~r ~id1,.
'P&f_Je 90 o(04- - - - - - - - -
► In this m et hod of protection eve ry word of mJchine m e mory h.1s one M m ore ext ra l; it :; tu id e ntify
the access rights to that word.
IV) ~entation;
► This method divides the memory into logical units such as individua! procedures or the data in
one array.
► Once they are divided, appropriate access control can be enforced on each segment.
► A benefit of segmentation is that any segment can be placed in any memory location provided the
location is large enough to hold it.
a. Username / Password :_User need t o ente r a regi s tered use ,·na me a nd passwo r d with
Oµerating system to login into the system.
b. User card/l<P.V: Use r need Lo pu ~,ch cc:rd in card slot, or e nl e:· key gene r,n ed by kt<y
generator in option provided by operating system to login into the syst e m.
c. User attribut~ - fin~.rp_rinr-J eye 1:etin.:i [Jatten11.filru)Jlturc : User need to j1:i:,;s h is / her
attributt:: •,na Jcsignated inpu, clcvi r.e l1sed hy opera t inr-; system to ltlgin into the system .
--------- - -- -- ·
'Pa_JP, 91 o{f34
I
r"""'
L
3) Scuds uscrnamc & pas sword
- -·- .
Fl gun• 7.8: Authentic.atio a
n rrccess.
NON·ltf~PUDI/•, TION:
Semukr-7
:,. Non-repudiation can be obtained through the use of:
b. ConOrmatlon seryjcc:;: The message transfer agent can create digita l r,:r.:cipt:; 10 indicate
that messages were se nt a nd/or received.
c. Timestamps: Timestamps contain the date and time a document was composed and
proves that a document existed at a certain time.
6. Figure 7.9 shows non-repudiation process.
Signed Message
Recipient
Initiator
Fioure
:::,
7.';: Non-rl!pudiati~n 5c~nari:>.
(ltl Malwnrc
2.
I) toe)c Bomb:
It \s 3 piece of rode tha t detonates 0r sets ~IT when specific condition is tri_g gered.
►
The condition may be a day. d at e, rime, a particular 'if!uop', 1i!'Tle inte1val, or coum:.
11) Vin1s:
lt is s computH prog.r?m w h ic h rep!icate~ itself and spreads fr-o!11 one computer to a noth er.
A vi:-us can s;::iread itself by infe cti ng files on a n etwork file s ystem that is accessed by other
compute r.
,,. Ex;1mple: An cman virus attaches ;t selfto an email
=-- · that is sencl . m on e user to ano ti1er.
- fro
lll) Worm:
....,· Jt spread~ itself:hrou gh nctwor~ to infect o~he r compute rs .
It does not need ct• ~ide assista nce a'.; required by vir:.is.
Example: Code r ed worm mav be eras}, rhe ope t ·
· · - ra 111 g syst-
.em :1 nr! othe r '' evic.:C's conn ccicd u, l.it'f
l
the same P.ct'.H,r k. '"' ·
I
unli\<C worms, it ::\oes not spre:i ri o\'~r ne, worl·.
It c:1n exh aust system resource!:.
5oywar~ 1
v1ll ll is the type of malware that can be insta\led on computer and which collectS informat.;1;i:12.bti .:1
I ·• \Vlwl
Whal i~ a Uc11ial of s crvk1.• all:H' ":
<.l It· ·I~ on H ~yR lCllt~
11 1' '
. I
:,uackcr- can mount ;.1 0 ()
,.:i •• •''-
DENIAi. OF SERVICE:.
ME.TIIODS:
messages.
1 -
I
--
I
Source SYN -!-ACK
I
ACK Des ~in? !ion
- --
---------
Figure 8.1 : SYN fl '
o !>ti Attack 3 W
ay Hanctshak' '
--
~-
~e 96 of~-- - - - - --
• Htg.
-•-:
Scanned by CamScanner
g\ 9,P Stcurif:J ii..
----
i ·Muf·WPFA,,,t\eJMN
To initi ~te TCP connection, the system that wishes to communicate, se nds a SYN message to the
target system.
I f the t:> rg2t sys tem is ready to communicate, it sen ds SYN+ AC!< message to source ma chine.
The source system then responds with an AC!( message to complete the communication.
In SYN flood attack, attacker denies service to the ta rget by sending many SYN message and not
replyi11g with ACK.
► This fills up the buffer space for SYN message on the target mach ine, which preve r.ts other
systems on the network from communicating with target system.
SYN
SYN +ACK
ACK
SYN
SYN +ACK
I I
connection.
f34
-
- ----------
. _ ing message.
. attack. I l ru:idcas 1 p
;.. I . ·1vari.1tion of a ping ia spoofe1 J t address on the network addr
tis. t "}'stell1 v
I a targe ~ •ty , b1·oadcas
s es,·•·
:.- This atwck~r fhio( s t to a third P31 ds p ing response to the Victim
·ng reques . then sen . .
The attacker sends a p1 ' broadcast domain
. h. third party s
Eve,y system wit 111
2. Host Teplyto
vlctim.
Echo Chare::en:
u
n
1
hat is access contrr,)'- H
control?
' .
d
o-.~, ocs the n.,11 L.a
"'- Padula model achieve acct'~s
-
Ans:
].
!.c.,e ,., t Onlrvl is,~~ccuritv tec.h·i· .
• I lc.;.t(•.
ll c;;n he us~d to regu!atp who .
3. or \\ 11Jt can ·
Vi Qw or u
The ;Jct of a,.cessing m '>ere sour , - . (Tlfl'i-
-t . . . • ay rr.ean co;1surn tn g, enteri · ces 111 a comptilin g environ
Perm1ss1on to a ccess a reso·• . . ng, or lJs ing
s. vrce IS Crtll<>d •
An:ess Control includes /icces(" C - a Utho-iz' a t··ion.
- Or.trol fvt .., t .
... rix & Ac
- ------ cess Control List.
'P..4Je98 o(fJA
----
Scanned by CamScanner
ll "'°Secs,1_ri='J==~
V - --.S~--.:. :. :_r-_!._7_ _ _ _'!.!!ff_~~~
7'of'/'erl ..So/ut;om
~ s Control Matrix:
. I)
Access Control Matrix gives a classic view of authorizati on.
Authorization is used to restrict the actions of aut] e c· , __
• 1 11 lt ,he,1 u s e1·:, .
'
rx rx
I
;·w l "\\' _jI
..~lll"P I :
l - ---- 1 - - - ,
j ~.JE".!.!' r
-
:- - - : - -1
rx _.,_,_- _
---4.
- ,II'. ..
• • ' •. f\'t'
I
f ! :r· _r "ii:_
· _j__:-~--t----i 1
rw
rwx r
Sam rwx 2
IW
!X rw
Accounting rx
Program
3
e\erne
6. Ass ume th3 t O is an object, Sis a subjer.t.
7. Object O h<ls 2 classification.
8. Subject S has a cle;;1ra?1ce.
9. Secu rity leve l deno ted L(O) a nd L(S)
10. BLP consi~ts of:
No Read Up
l"o
' \\' nre
· Oown
r;·
. igure 8.S: BelJ-L.
---
muso1·----
uAIon.in
a Par1u1a ..h ,od el.
Scanned by CamScanner
J,ist the functions of the different protocols of SSL.
~] protocol Explain the handshake
4. It is a protocol developed by Netscape to protect communication between web browser and senrer.
6. SSL ensures that all data pas se d b etween web server and browser r emair.s private a nd secure.
in use.
6. Th e lock is used to d isplay the browsers ccrmection is closed or opened on the secure channel of
SSL or TLS.
HANDSHAKE ?ROTOCOL:
1. Hands hake Protocoi is th e fi ,·st ~ui1 lnyer pr otocol used in client and se rve1 tn comm:rnir:ate using
an SSL-Enabled Co nnect?on.
2. Thi~ is simila l' to i,o,,v 1\licf: g, 81:b would s hake hand s with each cth~r with a i1 e\lo 1:Jefore they
l-----~44~--~
L-----s --
u _ _ __ _
L-----6
--- ----------------------------------------- -
Figure 8.6: Handshake Protocol Operation.
;.. Thi$ initiate., logical connections a nd 2stablis hes cap abilities associate d wi th that con ncrt.:c:.
► Th is con sisrs of two messages th at are the client hello and server hello.
► The cl ie nt sends the cli ent heilo r,1essdge to ~erver and re:ceives a s erve r h e llo message fr .c ::c
server as a reply.
ii!)
!.JLe;1t..Aul.h_cntication ai1d l{e_y E~h.~n~
Th e: ciienr initiates thi ',; JJh <1··••p i'l 'Hl :s
J - ( , ,.
t!H! S(JI"
. · ,..,, .,
._ ,,1,; IJuei- Of ·1I)
Whi!P.· server 1·s t he sol e rcciJJient of all rr , .. • nitis•· - .
· '' 11gu~
I C!, S<1g e s .
► Th is phase contains the full owi11g tlm:e s te ps :
~CljfJ toioT,i;;;----..~ ·-
mLI so ILI tIO n.In Scanned b; ·CamScanner
~~4
/J'->-- fu_-:--:=~~~~-&~~-u_u_r-~7----~~~~~~
'J , o!!er1 Softl!iom
J , ~
Th. .
lS 1s an optional and used only if th
e server requested for client's digital
certificate.
finiSffi
The client initiates this phase of the Handshake which the server ends.
The client sends change ciphe r specs and finished message to the server.
On receiving them the server sends change cipher specs and finishes messages.
Q71 What are the different protocols in SSL? How do the client and server establish
an SSL connection
[5M-Dec17]
Ans:
SSL PROTOCOLS:
I) ~andshake Protocol :
j SSL Han dsha ke Protocol is the most complex p c:r t of SSL.
It is invoked before any app licati on d;:ita is transm itted.
It creates SSL sessions be Lween th e cli en t a nd the server.
:,.. It comprises of a single message excha nged between two communicating enti ties, the client a nd
the s erver .
,. As each entity se11ds the C:haneeCipherSpcc rness3ge, it changes its sine of th e co1111ectio11 in to th e
,. F.xrhar.[;e of this Message in d ic~tes c1ll fu t ure data exchanges are encr~1 ptecl :ir, Li i:11 ,' grity is
p ro~ected.
lf'SEC PROTOCOL.:
!PSec System
~ ----- r1;
User System
IPSec in Nehvork O .
e\1Ce
~
--
-""...o..
!PSec In Nen.io'"'- D
F' '" e\ire
igure 8.7: IPSe User ~r:tem
- ~
csccnar·10.
Pt,;_Je1040(134--- - - - -~
-----___.,,..
musolution. in Scanned by CamScanner
IIgf Secstri'J SemeJfer-l
~ D E D BYlPSEC:
vicf.
,fR
· j\C,ess Control.
connectionless Integrity.
confidentiality.
r
Data Origin Authentication.
---
r
Rejection of Replayed Packets.
r
oOALS Of IPSE.C:
:::---
ADVANTAGES:
lPSec provides security without any modifi cati ons to user computers.
lPJ
► It can work independent of applicati ons.
> In a firewall/router, it provides strong security to all traffic crossing the perimeter.
► It is below transport layer, hence trans p3rent to applications.
r le ca n be t r ansparent t o end use rs.
j ,_ !Psec all ows p er flo w or per connection based secu ri ty.
,Y
APPLICATIONS:
c:
IP.,ec ·d es th e ca pab ii ity to se.::11· re c,1111 r1
pro '.✓1 · un irntions across a LA N, across private .:ind pt, blic
WANs, and across the Inte rnet.
• Remo t~ !ogon.
• Client/s erver.
• E-mail.
I) To iEDm'1'lt Jnf\~:cnJticm;
> T .~tr.3j~r :-u~c" r:m SSL C':?ntinc.,tc }:; w encr;pt infa;matiorr so
:,.
m1
Qll] How is security achieved in the transport and tunnel modes of IPSec? Describe
the role of AH and ESP.
1. lPgec Communication has two modes of functioni ng: transport a nd tunnel modes.
2. These rnodes can be used in combination or used ind ividually depen ding upon the type of
communication desired.
TRANSP'JRT MODE
8.8.
AH:
16 31
C 8
------- ----
musol ution. in Scanned by CamScanner
-
~
Security Parameter l11dP;.: (SPl)
-
:u :1
S01111enco Number
I Padding
I Pa<I Length
I Next Header
Authentication (Variable)
Next Header: It id entifies type of data contained in pay load d;.ta fi el d by idf: ntiryi:ig the fi rst head e r in
that payload.
Authentication Data (Variable): A variable length value wlii t h conrn ins l!1e integrity ch eck value.
Qi ] How is security achieved in the transport and tu 11ncl modes of IPScc? \ \That ,\l'c
2
s~curif::',' associations?
(10M - Dcc171
Ans:
Refer Ql 1.
I Inbound SA
From Protoco l Authentication
!3o b AH
- ---t:= .,,...,,,,:.,,-..,....,...1
MO S, z
Inbound SA
From
/ \1 10~
Protocol Authenticc:ition/ Encryption
ESP S HA-1 . x DES. y I
I
A l ice Boh I
[_]
,~ -] 0
Authenticate &l'T'' :~;,,. ,,-:;a, , - . . •
~ '.:l-Hl.t;v,__· ,__, Veri fy I i'
,__
an_d_e_n_c_
r y_~_t _ ~ f - _ __,C IPSe-c pac-ket u:'---~--,.,. ---~~~
1 - ~ iv I
Table 8.1: Dllforcntlate between the transport mode and tunnel mode orIP Sec.
..
· "; , -~! •• Tunnc},M<fr •
, If I , , t ,J r
- - - --+-·------:-- ·- - -- -- -- -1
L--- - - --:-,- -- ---r,,-:l---:-=-l1::rn::v:i'i~de;:-:s--:- 1)rotection primarily It p1 ovides protection to th e enti re
P,·otect\on Mm c
for 11pper layer protocols. IP Packets.
Co mpa rati vely higher.
Paylo:u\ Mess age Service Less.
Spec:ifk,1tion (J\ISS)
Place in TCP/IP Mol lel 1; this mode, !PSec is plc1cPd \ In tl:is~1o<le~IPSec is placed
I
I NAT Trave rsal
-7
Nnt supported. S11pp-01-·
t_c~
tl~. ==~~------~
CliL•nl ·to•S ite VPN S c e n a ~ J
t VPN Scen.1rios
Site-to-site VPN Scena rios.
---------
Use
1c-,:--~
It
1-5~-;:u~s;edd
. n
for
between
r,..vo I betwe
· en a ute r an d h
·
host a n d a rou•1:r
':r
cmnmt1nicat10 . between a r o• • a ,o:;,:_
I
L___ _ __ _ __
I hos ts._ _ _ _ _ _ __
_..__
2-
AUTIIE/\'TICATION IN lPSEC: .fy th identjty of the sending IPsec device
. . a shared key to ven e •.
► IPsecauthentication algorithms u::,e · . ·tJuns: MDS and SHA-1.
,0 -uthentication algon
The IPsec protocol suite defines tv, " , SHA-1 algorithms that proVide ari
► The Services Router uses an HM A L- va riant of MD 5 ana 1
CONFIDENTIALITY IN I PS£ C:
► Like authentication algorithms. encryption algorithms use a shc:red key to v ei ify th e a11 thenticit:7
of the IPSec devices.
:J ~-
1
.
Asoflware flaws 1&an error, bug, failure or fault in a computer program or system.
Most software flaws arise from mistakes and errors made in either a program's source code o:- its
design, or in components and operating systems used by such programs.
According to National Institute of Standards and Technology (NIST), there are as many as twenty
flaws per thousand lines of software code.
Software Flaws can result in Denial of Service, Unauthorized Disclosure and Unauthorized
Modification of Data.
s. Following are some standard terminologies suggested by IEEE:
i. EtTor; Human Action that produces an incorrect Result.
ii. Fault: It is an incorr~ct step, :,rocess, command or data definition in a compute r program.
iii. Failure; A failure is the ina bility of the system to perform its required behavior.
.....-------;--:-~,----,
r-1 Allcious
1
N ,..1 11-,..1 : tll c iot 1$
Scanned by CamScanner
Q15] Buffer o,·erllow attack.
Ans:
UUFFEP. OVERFLO\V ATTACK:
9. The entered informa tion is the n se nt t•J a server and ti'1e server writes t h e d ata ente red to 3 buffer
In t m ain 1)
Cll:, r ·;am pk [ SJ
s ~mph.· l·:;1 = . , •.
j ..- , , . ..
- .J
Pa,.,.,.
muso u 1on.1n
I• . ;: _ •
Scanned by CamScanner
•Fu SemeJfer - 7 rr. ,
;fS¢Jll'J I D/J/Jtr 1Sofu!iom
V:::-packet sniffing and packet spoofing. Exp] • . .. .
/1coJJlP am session hijacking attack.
[10M - May16J
£T sNlfflN6:
.,CK ~
y ·r-,·· . t h . f ·
packet Sm 1mg 1s a ec mque o monitoring every packet that crosses the network.
/.
It is a form of wiretap applied to computer.
j, Packet Sniffing is widely used by hackers and crackers to gather information illegally about
networks they intend to break into.
s. A Packet Sniffer is a utility that sniffs without modifying the network's packets in any ways.
6. There are two ways in which a Packet Sniffer can be set:
a. Unfiltered: It captures all packets.
b. Filtered: It captures only the packets with specific data items.
7. Packet Sniffing is difficult to detect, but it ca n be done. But the difficulty of the solution means that
in practice, it is rarely done.
8. Figure 8.14 shows example of Packet Sniffing.
User ~ rnent
II
.. Houte1·
P"c k e ts 2,
1illlr
User
P1~CKET SPOOFlNfi:
2. It is the crea t io n of Internet P.otocol [J P) packe ls with o. fa lse source IP ;:;dd:·ess, fo, the P'Jrµuse
of !ii ding the ide ntit°'; of ~he sende, or impe rscnating another computing syste!ll .
3. · ue w·L11_.
0 netec hrnq ich,d SPn
• der m·1v
< _ •1se
• to mainta in c: nonymity is to use 3 r r0w
- '> L'J'\'er
4. As :;!,own belo'A' in figur1: 8.J 5, :,ttc:cker c:·e;,~tes 3 1! IP racke r and sends to ~l ie se iYl' :
8 I ?r'-P~Sec~u~,.;1u~·
..::J
~ - - - - - - - - - - - d b the server an d a ck now1edges it so
. YN-ACK respons e sen y as
7. The a tta cker somehow gets lhis 5
to complete a connection wit.h server. J th e server comp uttr.
8. -- tr . vario us co111 111a n s o11 Q
OJ1 ce th is is done the attacker 1...in Y attacks, ARP s poofing atta cks, anu D
9. The most common methods mclud . e JP a dd ress spoofin g Ns
User
-~-===•=P:=1=0.0.=0.=2=5==::______
s erve-r
al.......J
----:--:-----,
JP: 172.l S.l .6
Sour..-e
Qestj...,tjoD 1P, 10.0 .0.2',
SESSION HIJACKING.:
2. !tis a meth od of taking over a secure/unsecu re web t..ser session by secretly o b tajr.ing the session
ID 3nd masq ueradi ng as a n authorized use r.
.:i . Once the user's sessio n ID has been accessed, th e a ttacke r ca n m as quera d e as tliat user a nd do
a nything the use r is auth orized to do on th e netwo rk c:s shown in fig u re 8.1 6.
.. _Ce,
User
l'. tr,1cker
~
-----
Q,
71 IP spoofing.
[5M - l>ccir,f
Refer Q16 Packet Spoofing Part.
Ans: [5M-May17J
- - - - - - - - - - - - - - - - - - --
Q19j Define the following examples:
(i) Salami attack.
(ii) Session Hi,iacldng.
Ans:
S:\LA~H ATTACK:
dfe\e [5M - Dcc15]
l. Sabmi J\ttack is the series nf :;m:ill <1tt.icks which results in i,Fge at tack.
2. lt works 0 :1 "Collect & Round Off' Trick.
3. A salami a ttack is when small attacks add up t:.l one 111;:ijor ,1ttack that ca n go undetew ~d
4. It also known .is salami slicing or penny shriving.
Exampie:
198.54
Bu t because th e bank d1:r1ls c:1iy in RuiJees, r CL:nding is perfc rn,ed bc1sed on va,uc cf rc:,i,\•Je.
ff resi due is halfofrupees or ,~10re, round up is performed otherwise round do\·1n :s perfoi":neu .
At,c>cke :· c:-:es ! O stea l thi:; CJ.25 w 0.f- or sc,:ne 1>l her fr:i ct:on Llf a r1Jp~c in r aist: z.n::I ;iJj t ,) i-~ .:w r.
accoani.
> Even if the value is negligible for one accou nt holder er transacti0n. 2 hank rna~:es ., fc \·, !2kh
tra nsactions every day and an attacker mc1y collect these fractional paise from all accounts er
ll
SESSION HIJACKING:
SAL>\Ml ATTACK:
Refer Ql.
SESSION IIIJACKING:
fe\ernent
Refe r Ql 9 Sess ion Hijacking part.
@ ~
Perpetrctor injects tJ1e
website .si th a malicious I
/
W ebsi t e
~
script that steals each
visitors session cookies ( \ r-or each \llslt to th~
w e bsite,, t h ~ ma licious
\ ~c:ipt is .-.ctivated
I
,.__________
©l _~isitnrs session cookie
1s s en t t0 ~erpetra :cr.
Perpetrator
~ ~e;petrator_disrnv~rs a
website ha11111g 2 \1Jl~erab1'ity
the, enables sc.ipt lnjPction
-
Websit e Visitor
_:. ::··::_~:I0i
. I .; ·,·
t'::t ~-- -~.. ":.
■
~
i t"
~
Ans:
[10~1- D e e17]
_P HISHING A TTACK :
1.
3.
Phishing is a n exampl e of social engine ering techn iqu es.
it is use d to c.leceivc use rs.
It exp loits w eJkne::;se s in we h security.
rnent
1. Ph ishi ng is the fra udul ent atte);)pt to obta :n se.isitivc informa tion ::;1;ch as LSc:--n2m!::s , pas:;,.•:cmh,
;;; nd credit card details (a nd money), often fo r ma!icic11!. rt:a:;011s.
5. Phish ing is typically carried out by email spoofing or instan t messaging.
6. A phishing attack usua lly consists of an au the ntic-looking sende:- and a socially E:ngjn::ered
m~ssage.
7. Ma ny email recipients believe th e rn tssage is frcm a trusc1:d ind ividuai an:i •.v;ll ooen infc:.:tt rl
attachme nts or click on malicicus lin ks.
Example:
MyUniverslty
TJ1:s f.• m;. 11 i~ rnettnt to inform yo u tha t ·1our r,1,,u.,r:e;ity n':t•·,or( ~-' ~~•::-:,:
:·1iil t~p;,e ir: 24 IJ ?ur~.
'i~,.;.!~ ' o!l,;·N tr t Lr,;,: :)elv•.·1 tc upd3tt •,•cr.:r i'J:11j~•••,;r-J
f:1 .'•l('i!, •(l.;J:i.~[P;1h','<))
Refer QI.
1.
2.
SQL inj ection is a code injection technique.
It is 11:,; ed to .11 ta ck data-driven applications.
rnent
3. SQL injen io11 is :1 :set of SQl. com mand s that are placed in a URL s tring or in data strJctun:s in
rinlc1 tn l'llri e e ;1 rc.-;rons e that we want from the tl;ii:ab;i:,es that a re connecte d with th~ web
.1pplic;1tio11s.
4. Thi s type oi ,1Lt.1ci<s gene rally takes place on web pages devel oped us ing PHP or ASP.NET.
s. J\11 SQL injection att.1ck can be done with the following inte ntio ns:
• To d u:11p Ill e whole database ofa system.
To 111ocl i1y the r.ontent of the databases.
'J'o pc1·fo r11; different queries that are not ::di uwcci by the ...-npl'i
,
c·d t 10n .
Example :
1. /\ ~ypic:11•! S~o;·c':; SQi. dalalnse qu ery may look lii~c the fo!l o,vi:,g:
SELECT JtemName, lternDcscript:on
FROM Item
WHERE ItemNumber == ltcn1Numbei-
2. J-'ro111 th is. tl11! wr~b Jflplication builds a string query th,u is -:e nt h
- to t e database as a :;ingl~ SQL
!: latc:ne,1t.
I •
■.
muso u 1on.1n - - - ~ - - -- - - -- -- -
Scanned by CamScanner
----------~:;.:J:~=r=f~~,.~-z7______:~~~~~ SELECT ltemN·
,lmt\ ltemOcscriptlon
To~per 1 ..Sofufio,u
FROM ltclll
WllEHF It, N
4. The above- m , . · cm umber :: 99')
c nt1onc d lllput 1 . 1
• w H r 1 palls informa tion fo r ~ . -·
read ht.rg://www.estorcnn" ,;,, 1· "spcufic prouuct, c:i n be altert?d to
- ·•·........ u.a_<llfil. Items ·3c:" '.'i~n .. 11· I
s. As a result ti '' " ~ ( =-lJlJ9 or I =1.
, , 1e corrcspo 1· S
· n, lllg QL query looks like this:
SELECT JtcmName, lt_
emDescrlption
FROM Items
WHERE ltc111Number = 999 OR 1= 1
6. And since the state me nt 1 - 1 . I
. . - is a ways true, the query returns r1l1 of the prod uct names and
d escnpl1ons in th e da tab .
;1se, even t h ose that you may not be eligible to access.
ReferQ20.
Q22] \Vhy E-commerce h•,ms actions need security? ·which tas ks arc performed by
payinent gateway in E-commerce transaction? Explain tlu.~ S ET (Secure
Electronic Tr.ins action) protocol
• Non-Repudiabilit~~ It is the 9:-otecti:)11 agr:i inst t!·,e <lrniai of payIT.e!1t. Once a ser,cier sends
a message, the se11der should not be abl2 rn dcr1y srnd:ng the rnessc1ie. S1m\!?.r!y , 1\L
ill
musolution.in Scanned by CamScanner
I
I
i·Muf·MPH,,,t\,J~M
1vfucsllaneow Semerkr-7
TASKS ARE PERFORMED BY PAYMENT GATEWAY IN E-COMMERCE TRANSACTION:
1· A payment g:i tew,1y ,s
- :1 • prov1'd e d hy •:111 e-cnmm crre .inolication
merch.int service ' · service
provider.
2. Payment gateways facilitate transactions by transferring key information between payment
portals such as web-enabled mobile devices/websites and the front end processor /bank.
3. When a customer place.s an order from an online store, the payment gateway performs several
tasks to finalize the transaction.
I) ~
► The web browser encrypts the data to be sent between it and the vendor's web server.
► The gateway then sends the transaction data to the payment processor utilized by the vendor's
acquiring bank.
► Once the gateway obtains th(s response, it transmits it to th e website/interface to process the
pi3.yment.
► This seemingly complicated and lengthy process t"IJpically takes Oi1ly a few s econds at most.
► The steps outlined 3bove are repeated in an effort to "clear". the authorization v ia a consu mmation
of the transaction.
,..
...._
llowever,tbecleari11gisonly triggeredonce thcrnerchant hasactua ll vcon1 1 • d'h t _ , t;on
_ .p.e,e L e nm::.ar .t
Scanned by CamScanner
a,,1.1J&PJ,,, 21,1ms
"MfrcellanNJUJ
Semt1fer-l
1"o('{'er1 Sofufion1
PARTICIPANTS lN SE.T:
► Cardholder1 Customer.
Issuer·. rustom
~ er flInancial i:1stitution
Merchant
SET FUNCTlONALITIE~
► Provide Authentication.
SET WORKlN6:
Both cardholders and merchants must register w ith CA (certificate au~hority) first, before they can buy
or sell on the Internet. Once registration is do ne, cardholder and merchant can start to do transactions,
which involve 9 basic steps in this proto col, whi ch is simpli fied.
l. Cus tomer b rowses webs ite an d d ecides on wh2t to purchase
2. Cust om er sends order and payment information, wh ich includes 2 parts in one message:
a. Pu, ch~c;kc This par t is fo r n1erchant.
b. Card Information: This part is fur merch ant's bank oniy.
3. Merch ant forwards car d inform atio n (part b) LO th eir bank.
4. Merch ant's bank checks w ith Issu er fo r paym ent i:ili th oriza tion.
s. Issue r send a uthoriza tion to Mer chan t's bank.
6. Merchant's bank send auth oriza ti on to merch ant.
7. Merchan t comp letes th e or de r a nd sen ds confi r mation to the customer.
Ans:
COVERT CHANNEL:
1. Covert Channel is type of computer security attack.
2. It transfers information in a way that violates a security policy.
3. Covert channels have been defined by Lampson in 1973 as a rnmmunicati on channel, not
designed for any kind of information transfer.
4. Consider there is group of studen ts preparing for exam, where questions are of o bje ctive type.
5. For each question there are four choice of answer: a, b, c, d and right answer has to be se lected.
6. Now one who is clever in the group decides to help -others.
7. So he/she any reve 3] the answer by acting in accordance to a prede tem1ined protocol like
coughing for answer "a", sighing for answer "b" anrl so on.
8. Covert channel is hidden communication in open channel.
I---+- -t---+
Srrvic<·
J'roer;: 01
I
5J' )'
J> r oe r,1 ,11
,l
Servtrc
Progra m
l
Spy
Procr.lm
O
Se n •ire
Procran:
Sp,·
Progr;, l\\
- ---- - -------
1. A storage covert channel transfers informatio n throu gh the writing of bits by one progra m .1 nd
reading those bits by another.
2. Exa mples of storage covert channel are:
a. File Lock Channel.
3.
b. Printer Attachment Channel.
Figure 9.2 shows the exampl e o f st orage covert chan nel.
Art~rhed ?
ent
Sender Process
Printer
~·es: J Gl
---+ Sp)'
Progra,n
Det2ched (O J No: !
Rece iver Process
[ o~ta t G ue-:::1
Q2] (a) In an RSA system the public key (e, n) of user A is defin ed as (7, 119). Calculate <Pn a n d private
key d . what is th e cipher text w h e n y ou en crypt m essage m == lO, u s ing th e public key? [10]
Ans: [Chapter - 4 I Page No. 40]
(b) Give the format ofX 509 digital cer tifi cate a nd expla in th e use ofa digit al s ignature in it. [OS]
Ans: [Chapter ·- 6 I Page No. 65]
(c) Encrypt "Th e key is h id den unde r th e doo;·" us ing pby fa ir ciph er vvith k eyv.io r d "' d om es lic''
Ans: [Chapter - 2 ! Page No. 14] fOSJ
Q3] (a) Expla in how a key is s ha red b et:iNeen tw o pa rties using Diffie-H ellman by excha n ge a lg orithm.
Wha t is th e drawback of th is algorith 11i"? [ ! Oj
Ans: [Chapter - 4 I Page No. 4 7}
(b) Diffe rentiat e b etv.reen i) MD-5 and SH A ii) Firew all and IDS.
(1 O]
Ans: [Chapter - 5 & 7 I Page No. 64- & 8 3 )
QS] (a) Lis t the fonctio ns of the d iffe r e nt protocols uf SSL. Explai n th h
Ans: [Chapte1· •- 8 l P age No . 101]
e <lndshake nrotornl
· ·
[O S]
I
. ,
(iJ) Hr1w does PGP .i ch 1evc con fi d e ;1tia!ly and ;-uit he n rcatioi1 111
• .
' e m a ils '? f05 1
Ans: LChapter- 61 Page No. 6 9]
(c) Differe ntiate bdween the tr anspo rt mode a n d tu nnel
mode of IP Sec a nd 1J:-:p!:1 i11 how
a uth e nticatio n a nd con fi den tl ali ty are c1ch ieved using IP Sec.
- - ---- -
(05]
Q2] (a) 1
\- and 8 decide to use Diffi e Hellman Algc:-·Ltim ~0$::a:-e .. key. r ne:,· mos=?= 23 a!"ld G = 5 as
the pu bl!c pa rameters. Th~!!" secret keys are 5 ar.d -: 5 rc:s;-e,:,1·:el..-. Ccmputk the s <:c::et key that
(10]
th ey shc1 re.
Aus: fCha pter - 4 1Page No. 49]
(10]
(b) Explr1ir. \ vo rki ng of DES.
,r 2. I
Ans ; !Chapter - 3 1Page ,~<•. oJ
[1 OJ
Q3)
(li>)
j10}
d acket spoofing. E.:q lain !:e,;sio:i hijacl<;og ,mack.
. fi
04· (;:i) Compare packet snit mg an P .
- l
Ans: (Chapter- 8 I r~~2
151
- -- - -
- - fla_Jt 127 a{04 ... ~• I
· principle? LOS]
SJ (a) Wh at 1s a firewall? What are the firewa II d es1gn ··
Ans: [Chapter - 7 I Page No. 79)
[OS]
(b) What are the various ways for memory an d a dd r ess protection.
Ans: [Chapter - 71 Page No. 90)
. S tern for securing a network. Cornpare
(c) Explain the significance of an instruction Detection ys ·
(10}
signature based and anomaly based IDS.
Ans: [Chapter - 71 Page No. 84)
Q6] [20]
Write in brie(about (any four):
{a) Email Security.
Ans: [Chapter - 6 I Page No. 67]
(b) SSL ha ndshake protocol.
Ans: [Chapter - 3 I Page No. 101]
(c) !?Sec Protocols for security.
•.\ns: [Chapter - 8 I Page No. 104]
fe\ernent
(d) Denial of service attacks.
A.ns: [Chapter - S ! Page NG. 96j
(e} IDEA.
,\.is: (Ch~pter - 3 1 Page No. 2 J]
QI] (a) \Vha tare block ciphers? Exphin with examples the CBC and ECB modes of block ciphers. [OS]
Ans: [Chapter - 3 I Page No. 33]
(b) Eucryptthe string "This is 2r. easy task " using a µlayfai r cipher with key "mon arcliy". {OS}
Ans: [Chapter - 2 I Page No. 128]
(c} ['efi11~ authentication and 1~on-repud iarion a ,1d shov,• with example , .1 • ,. ,
s 1.ow e aL11 0 I, e ~::ir. e
ac:11cved.
(C5!
Ans: [<:hapter - 7 ! Page No. 92)
(d) Describr; ~riple DES with t:wu !JES key:;. ls ma n ;n the: 1~11d ·1l, atta k .. _. • • - . ~
' l
1
c po:.siu!e e n tnD •i- fJES . (0-i.1
Ans: [Chapter - 3 I Page No. 31]
Q~1 (a) A a;id B ciecide ta use Diffle; Hellma n .ilgorithm to s hare key •rh .
· ey choose µ=23 and 0o=S as th~
public par;:imeters. Their sec:-et l:cys ;:: re 6 a nd 15 respectivel C
Y, ompute the secret key that they
share.
[ tel
- -------
. :
Q4)
(a) Explain briefly with examples, how the following attacks occur: [10]
i) Sa lami attack
ii) Denial of Service a ttack
iii) Session hijacking attack
iv) Cross-cite scripti ng attack
Ans: (Chapter - 8 I Page No. 118]
(b) How is security achieved in the t ransport and tunnel modes of IPSec"? Describ e the r ole of AH
and ESP. [10]
Ans: [Chapter - 8 I Page No. 107]
QS] (a) Ho\N is confidentialit:y ach ieved in emails using e ither S/M I ME o r P GP"? [OSj
Ans: [Chapter - 6 ! Page No. 69]
(b) A a nd B wish to use RSfa. Lo corn mu n ica te secu re ly. A chooses 1,ublic key (e, n) as (7. 24 ) <1ml
B ch ooses p ublic key [e, n) as (5, 221). Calculate their privat e key~. What w:ll be th~ , iphe r t t!Xt
se nt by A to 8 if A wi shes to send m essage m =- 5 secure ly ro B'? (10}
Ans: [Chapter - 41 Page No. 41]
[c) What is a dig ital signature? Expla in a ny digital signature .-1lgori thm . (OS}
Ans: [Chapter - 5 I Page No. 54]
0,2) (:1) E:-:plnin DES, dc t::iiling the Fiestel structure and 5-blocl< des ign [10]
Ans: [Chaplc•r - 3 I Page No. 26)
(b) Consider a Voter cl:ita management system in E-voting system with sensitive and non-
sensi tive ntl-rib1ttt•s.
1) Show with sam ple queries how ntt;icks (Direcl, inference) .ire possible on s uch data
se ts.
2) Suggcsl 2 different w;,ys l<1 mitigate tli e problem. [10]
J\ns: !Not In chu.lcd]
Q3) (:1) Expl,1in Diffie- ll cllm an J<ey exchange algori thm with s uitabl e example. Al:,o explain the
probl em of MIM artrick in it.
[10]
Ans: IClrnµtcr - 41 Page No. 48]
(b) Whn t ,ire Den ial of Service attacks? Explain a ny three types o f DOS a ttacks in detail. [10]
Ans: [Chapter - 81 Page No. 96]
(~) !PSec offe rs security a t n/w layer. WhJt is the nee d of SSL? ExpJ ... 1·n th • f SSL
· u e services o
;Jro locol?
[10]
1\ns: [Chapter- 81 Page No. 106]
(b) What are the types offirewalls? How are fi r~wr1 ils cliffe rent from IDS
(lOJ
:\ns: [f.haptcr - 7 I Page No. 801
(,:) Wh,1 t :ire the various ways in whicl1 pub lic kev dis lribiif · , .
. . _ , ion is .n,p 1emented. Explair, chc
work111g of rubl1c key certificates clearly detailing the rnl e of . -~·r· , .
cc r .i 1cate aut11onty. t10]
1\11s: [Chapter - 41 Page No. 50]
------ -------
fla_Je 130 off34
Stnumr-7
(b) Why a r e Digi t.ii Signa tu re . .
S1s;nature ? s & Digital ce rtifica tes req..;lred? What is the significa nce of Dua l
(10]
Ans: fCh a ptf! r- S I P<11~1• No. S6 J
Q2] (a) Wh a t is a digita l cerri{;cate? How does it help to validate the auther.~ic: ity uf ;i u:1::,? Ex plai11
tJ1e X.5 09 certificate furm;:i t
(101
Ans: [Ch apter- 6 / Pa ge Ko . 66J
( I, ) \.Viti: :-eftn~nce w CC co;:11 ;1e1:~ rJil the fcll o-,·.-i;,g: 1101
(i) Block size and ke_v s;ze.
(ii) Need for exp2mi on permutaticn.
(iii) Avalanche and completene~s effects_
(iv) Weak keys ar.d serr.i-wec:k keys_
- - - ----------
Owsiicn 1>.~
(v) Role of S-b x.
ns: [Chapter - 3 I Page No. 2 91
t .1} \\lhat are the different types of vi rus2s and wom"ls? How do th <'Y prnp:ig:He] ( I OJ
An~: [Chapter - 7 I Page No. 86]
(l>) What are the various ways for memory and address protection in Opera ting System 7 rlO)
Ans: [Chapter - 7 I Page No. 90]
Q1J (a) Explain briefly with examples. how the following attacks occur: (101
i) Phishing attack.
ii) Denial of Ser:ice att:ick.
iii) SQL injection a ttack.
i \·) Cross-site scripting a ttack
Ans: {Miscellaneous I Page ~o. 119]
(b) How is se-rnrity achie\'ed in the tr.rnsport and tunnei modes of IPScc! Wh::.t :1re secu rity
asscciations? [10]
Ans: lChapter- 8 I Page No. 107]
QS j {a)\\ hat are the different threats to emails? Gt\'e an :tlgorithm to secure crna1b being sent from
u~er .-\ rn t.:::er B. [10}
Ans: (Chapter - 6 I Page No. 70)
tb) A a n B wish to use RS.-\ to communiC3te securely . .-\ chooses p ublic k~y as (7, 119) an d I3
chcost?s c u· lie key ctS ( 13, 2~1). CJ lcubte their private ;.;~ys. A wisi1es to s end r~~essage m = 10 to
B. \\ r. :a wm be th e ciµher!e:xt? \'. ith what key will A encrypt th e message "m'' if A needs to
:tuthemiGte itself to B. (10)
Ans: (Chapter - --l- I Page No. --l-3]
Q1l (n) Wh at is the purpnc;c of S-lHlXl'S i 11 DES? Explain the avnlanrhe eft'ccl't IOS I
Ans: [Chapter ·- 3 I Page No. 29]
(b) Give examples of replay ntwcks. List th rec general approaches for dealing with rcpl;1y a ll.lCY.!i, (05 I
Ans: [Chapter - 1 I Page No. 41
(c) Why is the segmentation c1nd reassembly function in PGP (Pretty Good Privacy) needed? [05J
Ans: (Chapter - 6 I Page No. 71)
(d) List and explain various types of attacks on encrypted message. (OS]
Ans: [Chapter - 11 Page No. 5]
Q2] (a) What is the need for message authentication? List various techniques used for message
authentication. Explain any one. (10]
Ans: [Chapter- 51 Page No. 62)
(b) Explain Kerberos protocol that supports authentication in distributed system. (10]
Ans: [Chapter- 6 I Page No. 74)
Q3] (a) What characteristics are need ~d in ~ecu re hash function? Explain the operation of secure hash
algorithm on 512 bit block. (10)
Ans: [Chapter - 5 I Page No. 62]
(b) What is a nonce in key distribution scenario? Explain the key distribution scena rio if A wishes
to establish logical connection with 8. A and B both have a master key which they share with itself
and key distribution center. [10]
Ans: [Chapter - 6 I Page No. 77]
Q4,] (a) Why E-commerce transa•: tions need security? Which tasks are perfor,neci by p;iyrncnt
gateway in E-commerce transaction? Explain the SET (Secure Electronic Tra nsaction) protocol.
Ans: [Miscellaneous I Page No . 1 21] fl O]
(b) In RSA system the pu blic key uf2. given user e = 7 & n= 187 [10]
1) What is the private key of this use r?
2) Jf the in tercep ted CT=l land sent to a user whose public key c =7 & n=l8 7. Wh3t is the
PT?
3) Elaborate various kinds of attacks on RSA algorithm?
Ans: [Chapter - 4 I Page No . 46 J
QS] (a) How can we achieve w eb secu ;·iry" Explain w ith exarnp!P.. (10]
Ans: [Not Included]
(b) Use HiJl cipher to encrypt tile text "short". The key to be used is "hill". (10]
Ans: [Chapter - 3 / Page No . 36]
Q61 (a) Explain JP Sec proto co l it~ deta il. Also write appiications and advantages of IPSec. flOl
Ans: [Chapter- 8 / P2ge No. 104]
(t) Differentit.1te bP.t\vee 11 i) MD·5 r1n ri SH.A. ii) Firewdll 2nd IDS. i IOI
Ans: [Chapter - 5 & 'l / Page No. 64 & 83]