SHA
SHA-1
font of
[28 bits l60 bits
saatedgos
and Requires 28 Requi'res
nck to try
Caderiginal apentions fo break opentios fo
break iD
eSSAge qiveNaa in
64
tnck to trsand Requires 2ge
aperatons to
bae messagea operatons to
Andto break ih
bYeak in
orrcing the
Same msq digest
atempts No such clams
Reported
Suecesstd attacks to Some extent So for
So far
Slower (80
Speed .faster (s4 iterato
bit bufer)) iteraton &
ee 128
(6o bit bufer
Simple Simple
oftAre
implemertaton
Insecare thah More secure
than MbS
SHA -1
classmate
Date
Page
Exp cnptogra,phic hash functons with,
wi
properties of secure hash function
A hash functon H accepts aa vouriable
size messaqe Mas input and produces
a tixed size output Yefered bo as
hash cade., HM)
Hash code does not use a key but
is a function onls of the inpu
message.
The hash code is also refered to as
digest or hash value.
The hash code s afunction of al
the bbitss of the message and provide:
error dekection capablity
Achange in any hit
bìt in the message
yeswts in a change to hash code
When hash funchon pmvides securihy
applicati on it is called
cruptoqraphic
hash fun cion.
To preserve inteqrits of a message,
it is passed thyouqh algorthm
alled rgptoaahic hash functon.
Hash
funcion
Messaqe Message dyest
Docu nnt) (fi ngerphit)
clAsSMAte
Date
Page
rygtoqraphic hash futcion propertes:
DPreimaae resistarhce
a hash value it should
he diicult for an adversary to compute
the preimage of the hashed yalue
This' shawd not exclude the condition
taat
T£ the qivehyalue of
h(x)
for some x I is difficul t to compute.
the value of any x' such that,
Second prermaqe resistan ce.
In this an advercary is pyovided wotth
the yalue of and is asked too
coMpute the val ue of x x ,
Such that h«) h Cx)
) collision reststance
collision f
a hashfu nchon is the
event when two values and x' such
that x t hash to the same Value
i.e. he)=hCx)
The hash function is collision resistance
uh en it is difficutt for the adversarY
to tind the collisions.
clAssmate
Date
Page
Explain Advarced Encrypted Standarde
A£S ia a symmetric -key block cipher
It is a non feistal cipher that encrupt
and decråpts a data block of
28 bits.
It uses o, 12 or (4 Younds and the
key si2e Can be [23, (42 or 2s6
bits dependin the hb. of Dund
23 bit plaintext ABS
keus
Ko
Pre-raund transfomatn23 s Key
expansien
Goner
Key
T23
Round L
Round 2 bits)
Round Nr k
122 bilt cCpher text
Three different AES versions are
acConding to seres key size thamely
A£S-I25 AES-92 and AfS-2S6
The ound keys genermted by key expanst
are alays 28 its, tha sam
as plaintext Or cipher text blok.
ES
A£S ses five units measurement to
cfer to data: bits, bytes, words,blocks
and state.
A£S USes several YOUnds. ln each ound s
made af severa staqes. Data block is
anstor med from one stage to onoter
Strv ct of each ound:
State E
Sub Bytes
State
RLocund Shitt yus
Stae
Mix coumns
State
Add roud Key -Round key
Stute HH
classmte
Date
Page
To provide secunty AÂS uses four
tupes of tyansformotfons:
D'Substitution.
fivst cubstitutio is done for eadh bute
Only ohe table is used for transform
-atton of every byte. i.e. 1f 2
is
bytes are sane, transtormaton
dlso Same.
2) Permutation.
Shifting transformatn, is done at the
byte feyel
the order cf bits in the byte is
not changed.
This chonges the contents f each byte
hanges
bs takinq 4 butes at a time and
CÑmbining them to create for
byes.
9)Key addinq
AES uses key expansion that creates
Nr t 6und keys fom the cipher
key
fach vound ic 128-bits lon, it is
treated as 4 32-bits words.
elassmate
Date
Page.
Elabornte steps d Fey generation astn
ASA aloritm.
KSA IS a most com mon
pudlic key
alqonith m.
ALQ0
Select 2pnine no, p & q such that
2Nepx4
3.
4 Select e Such that ke< N) and
e is coprime to #N)
mod N) ied=mocd N)
6
7. pyivate key e d
a Cipher text c= M med N
8"
where Mis plauntext.
q Plain test M- C mod N.
where d is cdecryptilon key.
alAsSMAte
Date
Page.
Calculate d(N) and pivate key
in RSA. Cipher text for M=l0
using public key (7, (87?) ?
e= 7
N = 137.
Step 1: Select 2 large Yandon pime
IF we celect p= |7 and gell
which Yesults N= 187.
N= pX4
(37 (7 X U
step 2: ¢a)=(p-dxq-)
Step 3 3 e is
is qiven e=47.
Step 4: Calculate d, such that
d e mod oCN)
Le. dx 7 =1mod 160.
Extend ed Euclid
Applying Extended Euclidiens alqonthm.
Y2 R 3
t2
l60 7
t= t-(4t2)
R= rL%r2
clssMate
Date
Paga
r2
t t
22. l60 7 -22
-22 23
6 -22 23 -|60
23 -|60
Here ti is positive |oth eruise
d= ti d= titt2
d= 23
cipher text for Mal0 using public
using publickey
(,T87):
C= M mod N
2 |75.
. C=(7s is the Cipher text.
classMate
Date
Page.
Explain velation slap between security
services 2 mechanisms in detail
Secunity services:
X.800 pYovides detuls of seurity
Services,
oAuthentication.
It is concemed wth assuring that
the communicaton s authentic
Authen tication helps to identfs cdaimed
idenitty af an entits
Two specific auth services defined in
X800_are
Reer enttts auth.
Data oniqin auth
2 Accecs Contro
t is the abilits_ to limit and coutrot
the access o host sustems and
applicatons via communIcation inks.
3iConftd entality
t is potechon of transmited data from
passive attacks and pyotectton of trafftc
flow from analyss.
analyis.
4 Integnty
EnSures that messages.are received
as seht, with no duplicaton, nsertion,
modificatton, reordering, replay or loss
classmate
Date
Page
s. Availabi lits
|t is the
property of a system/ resource
a
being aCesble and usale upon dema nd
by an authorjzed ystem entits, according
4o the performance specificaHorns for the
sustem.
Secunty Mech anisms
Thes ane techniques decqned to recoyer
bom attack at various_protocol layer.
layers.
Securitty mechanisms are techniaues used
to implement the security services.
They include:
|: Encipherment
Ik deals oith hiding & coverin of data
ohich helps data to become confidenfial.
It is achie ved by applying mathemaital
calcula ions or alqorithms which onstr
-Uct the info in non-Yeada ble form.
Level of data encryption ie dependent on
the
algorithm used" for en cipherment.
2. Acess Control
This nechanism is used to stop unattended
access to data hich you are sendinq.
It an be achieved by varous techques
firewal o
Such as applying passwords, fire
PIN fo data.
adding
clAs Mat
Date
Page
3-Notanization.
This se Curity mech involves use cf
tristed Brd ports in communicath.
1t acts as media tor between serde
and recejver so that iif any chace
of confict is reduced.
This mediator keeps vecords of
requests made by sender sto
neceiver which for later denied.
4Data ntegity.
This mech s used bs appending
value to data hich i credted u
dati itself. *
It is similar to Sending packet
of info known to botth Sendng e
Yeceivinq partes ahd checked befoe
eafter data je received.
When this packet which is appended
s checked and is same, data
iotearity is maintained.
S Authentiation Exchance:
It.deals .with id entits to be knoon in
communicaton.
This is achieved at TCP LIP Nayer
where 2 cay handshaking is use to
ensure data is sent or pot
classMite
Date
Page
6.Traffic padding.
this security mechanism is used to add
extra bits into the data which is
being tronsmitted.
Tt helps data to be checked at eceiinq
end .and is achieved by een parity or
bdd parity
7. DiqitaJ siqnature.
This seurits mech is achieyed by
addin di ital data that is not uisible.
to ejes.
It is fom of electronic siqhature uhich
is added by sender which is checked by
receiver electronicay.
iaty data which is
It is used topyeserve
not nore bonfielential but senders idertits
is to be notified.
B Routing Contral.
Enables selecion of partcular physically
secure routes or certain data and
allows routing dhanqes especially when a
reach of security'is suspected.
clAsSMate
Date
Page
The house is being
Encrypttoni ght" usinq Vigenere
sold
cipher with key 'boLARS"
Plain tex t: The house is bein
gold toniqht.
poLLARS
key
strean:(3,14, L IL o, 17, 18)
ftaintext Thle hja us leis|ble lihk sp lidltolnih.719
P's voue 97474l201a4818| U48G|B|4 u3 (114336
Key streAm: 3|14) |uoI7s3 onte 1o bulolz (8l4U|o
vale; 22)21|Is|13)"| 12723242s52sesto16|227 13||9
cs
Ci pher text is :
RI4 wrs
r t.
clas mat
Date
Page,
Explain securits qoads and their
significance.
Confidentiality
preservinq authonized restrictong
on info access and digdosure,
including means for protectnq
pers onal and psoprietary
piivacs and
information.
Aloss of confiden Hality is unauthor
-i2e discdosune of information.
2Inteavits
auiding aqainst improper info
modification or destruchion and
includes ensurnq informaticn
non -repudiation añd authen ticity.
A loss of integnits is una uthoizad
Modificaion..or destructoofinfo
3 Availabilits
Ensuring timels e reliable daess fo
and Se of nfo.
Aloss of availability is the disnuptior
.of acess OY uSe of into or an
info suctem.
clAsSMate
Date
Page
.Exp Keyed ard keyless transpositfon cpher
with help of example.
Keyless transpositon cpher !
The cipher text is created readinq the
pattern YDw by Yo.
To send the msq meet me at the
parkto Bob, Aice wri tes
t
The ipher text beomes :
me mateaketethpr
Alice and Bo can agaree oh number of
olums and use the second method.
Alice writes the Same. text Yow bs ro
in table of
by
4 columns.
m e t
m a t
t e
Shes then creates the ipher text:
mmtaeehr eaektbp.
cASSMate
Date
Page
Keyed transpositon iphers
The keyless ciphers permute the
characters by usimq writn the
plain texb in One ay and readind
dnother way
Another method is to divide the
plaintex+ into grps of predefemined
si2e, called brocks, and then
USe d key to permute the
characters in each block geperataly
£q: Alice needs to send msq
"Enemu atacks tonigbt
enemy attac ks ton iahtz
The key used for encruptn decrptn
is a permutaton keu, which shoA
how characters are permuted.
Encnptr 3
3|4
s2 decrptn.
The permutatton yields:
eemyn taact tkons hitzq