0% found this document useful (0 votes)
8 views16 pages

Lab Work

The document outlines various experiments related to cryptographic techniques, including the use of SHA-1, HMAC, DES, and RSA. Each experiment includes an aim, protective measures, and a detailed procedure for implementation. The document also emphasizes the importance of understanding the underlying principles of these cryptographic methods.

Uploaded by

priyajunwal11
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views16 pages

Lab Work

The document outlines various experiments related to cryptographic techniques, including the use of SHA-1, HMAC, DES, and RSA. Each experiment includes an aim, protective measures, and a detailed procedure for implementation. The document also emphasizes the importance of understanding the underlying principles of these cryptographic methods.

Uploaded by

priyajunwal11
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Date.

510|
Expt. No. Page No...

Eocasimemt-y
MenAage duthaticadi.com Cedaa

AIM
A Kpha Qleck Chaimimg MeAbage Authatimliem Csde
(ceC MAC) a a tedhiqua pon comstbudima a JmaMge
authumicatiem cedu u n a Reck didhun.

Abeut tha ecbasxment


ece
9ntha encpimunt utbugrda adumm" h a momu the
p h (that i u a Qumdttem amd
psubriteA a ua dlede iphun) aumd aNa qauto we
a m 0dottiasu
t 0 Ambute he CRC MA +0-
madAage

ORTECTIVE
TooLM hous t0 compLt thu tag Secum CRC-
MAC Ney am obiteHOy maskage aJAUmimg tnat UR
uith a pleudeuOmdem Pumsiom.
a u MAidad

PROCEDURE

Selat a blaimtendt to be emcuptd.


Step
umath plainteoct J /a.
'
u c h tnok & <
Step Selat
IV s Jungt .
Initialfgottgm Vectex,
Stehg Selat om

a ststimg Junmgtn.
tne ualue o FCx) by bsuourding
SHep Gnt
Sepy Teacher's Signature
Date
Expt. No.
Page No..10

intne Qteld Rilad YauuTendt amd liamg m phly


Pumotom Rapeat this Ro ad moamy ima A o
JMLd tO (gt tna Oneuuted teoct Nau he plaited
selacted

Steps h ma Rünal ctiphu tesct o nalOuftput' PI edd.

Ssp Qnce ueu haue JansUmt to use usth the boaNA CAC
MACeuRam umaloa d secu ithan ou pHapauim
Jumgto ou ou ulimg mltip
daNeuibed im Hla heu sectie, yQu ma dccOAdim
auGLuk uth the cecond asut ha echietimeMt
tn W simila to t h i t pou amd hamc
m nst daidead )

0 , 2 2

Teacher's Signature: 2
11110e1118aco1111061811ee113 1ee11011e01011001101e11
Plaintext: Next Plaintext

Key, : 111ee10 NextKey

iengn af Initieiization yector (V), 1, where i {the length f pleintext adcve!/2

v: 110 - Next

Put your tert of size 2 to get the torrespending value of Fftext} of size 1.

our text.1111
Apphy Function Choose another FitIn

Funceion output: * * * * *

He *****************a********************ssenoukah. h e c k Answer!
*********.
******************************************
Compute and use your
key
**********.**..

11090200cO1111e0191010
Plaintext: *****
*******************\
******* -****
Next Plaintext ****

******************aaa-.
****************.

Hello World **********


***********-*****

Your Plaintext:
*****************

Key:111ee1ee **** *****************


**********************-***" *
*************************************** ********

Another Key

*****~**-********o.
******

********************

Calculated Key: l ****************************************************** ***************************


****
********************-*:

***

******************************"
Second Key: lee1e8
********** **********

Another Key
*********************************"
Plaintext (string):
Asimulator for SHA-1

010100010001100111110110111110000000110010 ***AAAAAAAAAAwn wAAAAAAAMAAA AwAMAAASAAAA

SHA-1
**********

Hash output(hex):
-suumwmmnmuuassmmnneomoos
b7879e8712a2d1902efb13ddf65c9541db079d09
***************************************************************************
Date 11|AR
Expt. No...5 Page No...11

xpesimenmt- 5
Otequaphie Hath Fumdiema amd Rpplicaioma (HMAc)

AIM
SHA-4 å a pepube hudstic haa lumdion toat
CuHAOMl un uso n thiu ecpsimant, we dhall
RamilfasHine welueh uuith sHA-1 0A sll o so
o meimpeLdamt abpcoiom o oAimg, Damaluy,
the HMAC adggUthn. uhfch LHHUdty ed îm
the ttundt adier doto iteqüky
OQTECTIVE
Toumdsuutand tha mud,dasiqn and ablfcaigmy
celicton AOatam halo udigmb._
PROCEOURE

Familiauine yeusbelR uith tha useung SHA- 1Jhog


uR u l d ke usimg a dummu hadh îm te g0QuaN R
dmpicaky, m mInal, u could be uim SHA-1
mstead
selaat a plaintedt eu uhich thu HMAC400 *AHo be
Cmbuted.
F aimpliiky ix A8 which diaut, but it
sheAl Jbe A< uoth opajtect) /Y
Seluat am 9nifaloaiam VCcteu, V
clfdajmg n *Ned 1V" butkon) odungth &. y
S s e tab to combute th
dhdet uith tha hllp o
he han umdin psuidad by y8.
Teacher's Signature .
ILMACConstrnct sioe a "Dnmmy" lHash Eunctlon

HMAC Construction
www
e101ee010ee11e011111011e1111100eceee1100101e01010001
e01011101e010111eec00O
Plaintext: Next Plalntext
*eara*adensasaddns*****a aaaaa

Jength of Initialization Vector (IV), 1, B


* **"*************************
01001001
V
Next IV

Key, k 19000101 Next Key

length of Initialization Vector (IV), 1,

IV: 3106
A
Next IV

wodeandadoawd
Key, k:
**************a*a******** ****e*******.an*unnno-.. Next Key

ipad: exSC (010111e0)


opad: ex36 (00118110)

Put your text of size 21 to get the


corresponding value of hash of size 1.
nnnaanannnnonnnansnsn
xt: Please 8Ve a O1Nary String of si2e 21
. . hash
* ** ***
Hashed value: *************************** ******* ******** ****arams

***** *** ***~*~****


Final output: 10e19111010018111000000
Check Answer!
Date
Expt. No..
Page No.12

bDiide Qmlkated bloittat "m't o sauu 'K chumb e


uth and eth dwnk ul balse kit J a that B,4o mma
tR- bitthu paddimg geHRA Ot a a.
Cembist z0: * N L(KOR ipad) mamuallA udnane 11
mplies cemcuntoin and edeh z0im yQu Ted" Nield

Cemlpurt 1:"20 m1 marmuallu hae | impl


Oomcoteati on Und

Rapeot obove Ae
Cund inadly Cembude
2(Rt1)"zR||L" uwe L m,maler L?-hib
bydding gRs to luet ta tt.
10.J Combut pz "TV ||QKOR skad Jmamtally uhea \
mplied cmcatemdiom omd emt pin Yau Test"
Rield to get 0.

Comcoturotion a d entas'A imuowItedt Nield to


getimal HMAC t a t

Nstice that zo,11,21-zR, z(R+1) , p, S1 aa a sfge 2 (

13 Lih tha Qinal ciph0x t e c tn FiralOutpus' Ntetd amd chaeR


.22
leacher's Signature:
PARTI

Message 00101001 10111101 01000000 11001011


10010000 10111101 01000001
010| Change plaintext
Key Part A b60f204c2c7fe334
Change Key A
Key Part B 9064756932df4c16
Change Key B
Date 4. | 2 .
Expt. No....G Page No. 12

ocpexmemt -6
SumumeeicRey emcupatten Stamdnds OES)

AIM

DES
CHueeqtabhy slptum JpkeKdad hat ua aa
Rn m jmpla mendtatigon q DES.
0RTECTIVE
To Umdodtamd hA tO C
ett_ OES eDcpdMUMA
mplumetotim o a tilpl- DES Implomantasien.
PROCEOURE
Shepa Gunshade Plaimtest sm,
ssdtie uutne PatuyA amd Ry
1 s the bu dicdmg om
Jum Uatin
Stapamn unanated plainterct m
Y6U tenc to be NLm Pot 1 to Pam-TT`n.
emcuuoked | döcustedbledk.
Ste mtem gemasuated
Shepa
nuuA ugm ut1 to
Ue"SAsdR omd dfden DES PatII R to be
emtuypt oufon to
Rrde muaded
dphustbot
FAAedh 4o Pot in c4
am
*YuH Art to Pot I n Qutput
daopted:* Woch. be
emculates

Teacher's Signature
PART II
Your text to be
encrypted'decrypted: 00101001 10111101 01000000 11001011 10010000 10111101
Key to be used: 01000001 0101
b60f204c2c7fe334
| DES Encrypt| DES Decrypt
Output: 10001101 01001101 11111000 01000111
00001000 10111101 10010010
0001

PARTII

Your text to be
Key to be used:
encrypted/decrypted: 00101001 10111101 01000000 11001011
10010000 10111101 01000001
9064756932df4c16 0101
DES Encrypt| DES Decrypt
*****

Output:
00110110 01111100 00011111
11110001 01011100 01010010
11010110 11110
Date -- - -

Expt. No..
Page No.

ssmH Ogmsated uyRu@m Paut 1to Pud in Kau tole


uAed NOck amd Sfdk en DES dLAHct bUdtgn to
Gutput cikhuudenct . Thid secgmd emcHuptien.
Stepo
Step emtn qunakated dphutud es* Raem utput'; bledka to
pat Jnm * Y0uMtet fo ke anowed | dirsutted : blECR

Stependth qunadtd kaua Ruem Pont 1 to PaHt & * Keyto be


whed:* JtedR amd did on DES emeyot buten to
emcuin ia deme thsice, Thi húme i acoilLd tHipl
DES

Steb imteu ounJgtiLd ciphusdheaxC3 KAQm Paut 1N "Outou Rlde


to Paut Il * emdesu yGunamSURN hJu? Jsck îmgudonto
i u ueuH tuipl DES

22
Teacher's Signature:
Date 17]I1|
Expt. No...
Page No. 15

Eocpesiumemk-
Summetuin Key emauuptiom Stamd0uc CAESS)
AIM
In ib ecailuimemk,iyU ae adaed te QmCst Joma
nAkCgeh LAmg NOiSLA meds) e
dpeuaiom utnieim a

DeTECTIVE
Ta umdutomd n
mud atuumgha amd AARmo
NaGA Madis o skeatjon
blech ciphan
PROCE DURE
Step Ch8ee 0mgde a apRHa kiam
MAm out 1.
Shetpa Seluot RuAge,
Omd CT
plointthdt, Ruteadt
,
`ntialigaion KNte
8n Por

n OANSHdomee ith ngeien amde


eslpeodion.
SpiUse Rumciom FK and
be l d aeed Reuin hr" teld in Pot TL
gnúoBed m Stepa shod
Steps RO Plaiantendr in
3n Orcudomce hac Neld uAta
cice Qenet buttom.
usito dhsgsem madeokholtiade ualue
o olpotiom omd
Stelp

Teacher's Signature: 6 . 1 2 . 2 2
Date.17 11l2
Expt. No.....9. Page No. .16.

ocpoimamt -q
Publie Keu Gptskern
AIM
An thi ocauimunt,,M Qie am implunemtatiom a
text oodla" RSA AmdKR UAU ta daNgm a seCAe sAtem
Smme witoiad pulblic ey stamdaud
08TECTIVE
T wmdLatamd PKCSVL5 Scho.me.

PROCEDURE

She h i d u t kesct to be emexpted Im tme


PLaimtenct osu¬a

Steh2 Selust eayige apLlokfc be Rum RSA Hiuate


Aecin_byiching ne s tha pey
buten.

StehaCce m emcuupt buttem te qumuodte a dphA teact

12.02
Teacher's Signature:
Date 1 11|23
Expt. No......J0 Page No...I7

Cocpeimemt - 10
Otaitol Sanaluna Schame
AIM
A diaital AigmakuAHe Íi am authmticotian JmchamiO
tha emablua dha CAte RPhe maAAage to attoce
a osde that acts a e(matuMe

AGOUT THE EXPERIMENTT


n thin eocptsimemt, uR_shaus heu cam aLLeiR U
imeguit emasLogein puebitc say settina
OBJECTIVE
Te umdsuat.amd *HA amd Lshy Olgital sianlusAe
schsnekA

RROCEDURE

Steb emteu dthe imput tONct te oe emclotedun ta PlaimteACT


o9A amd qumOde hoah yalus Reu NmAAage hy
Kdtng m th SHA-1 butten

SspColay condet e Holh Qutout (hanc) ield omd Jauste it


in imput to RSA (humc) ield
Selaot ouaine e public kÍY Ruem RSA Jublie ny
seckon bu ddeimg n my R buttom.

Spl
Sohlcorda maphly R$a button te qRmgHade a digitol 8igmaluea.
Teacher's Signature: 222
Date 1712
Expt. No...9 PageNo... 18

climmemt- 8
DIRRLe-Holmam Rey estolishmumt
ATM
An thia entoesuimeMt, UR dÍmudade ciutaim tey" AUAiAND
s the psloula.u Diggie- He\mam Secue Ruy eocckocima.e

ORTECTVE
TumdtUstamd he OH-Re enCdhamaepuGterA.
PROCEOVRE
Asty, chdese a Jauge 0wmo numbth p amd a

Sec gmdy, bato Alce ondg Qemsade thiu saApeotiiw


Rep Aomd 1dnd (ga O ) he tnauu RuA HaNAeshiuely..

Brsth aice amd Dah send gncchnae HaH Qa,o0

Hno u bsth calulate Ksi pukblfc Reu gab and qoa,-


Hspertiuely-
ARboth Qah amd qba asu equal tham Di e -Helmo.m
RAAy acchamge iuspied.

o 22 2
Teacher'sSignature:

You might also like