You are on page 1of 3

NPOL LAB:KeyExchangeandRSA 1

UsingRSA

A. Setup
Inthisexercise,PCaandPCbwillexchangepublickeysusingasharedfolderonPCa.

PCa PCb(afterPCaisdone)
1. OntheDesktopofPCa,createanew 6. ClickMyComputericonisnamedto
foldernamedPCAB. startWindowsExplorer
2. Rightclickthefolder,clickProperties 7. FromtheToolsmenuselectMapA
andthenclickSharingtab. NetworkDrive
3. ClickthesentencestartingwithIf 8. SelectdriveY:
youunderstandtherisksbutwant 9. IntheFolderwindowtypethe
to.,thenSelectJustEnable following
SharingandclickOK.
\\192.168.1.101\PCAB
4. SelectSharethisFolderandkeepthe
defaultname. 10. ClickonMyComputeronPCb.You
shouldseedriveY:.
5. SelectAllownetworkusersto
changemyfiles.

B. GeneratingPublic/PrivateKeyPair(PCa)
Thisexerciseyourwillcreateapublicprivatekeypair.Performthefollowingsteps.
1) OpenCrypTool(StartProgramsCrypTool)
2) FromtheDigitalSignatures/PKImenuselectPKI.
3) SelectKeyGeneration/Import.Youwillgenerateyourpublicandprivatekey
pair.
4) IntheAlgorithmframeselectRSA.
5) IntheUserDataframeenteryournameandlastname.ChooseashortPINthat
youcanremembereasily(recordyourPIN:________).
6) ClickGeneratenewkeypair.Thedisplayedkeyisyourpublickey.Theprivate
keyisstoredinyourcomputerandprotectedbythePINthatyouenteredinthe
previousstep.


NPOL LAB:KeyExchangeandRSA 2

C. ExportingthePublicKey(PCa)
Inthepreviousexercise,youcreatedpublic/privatekeypair.Yourprivatekeyisstoredinyour
computer.However,youshouldpublishyourpublickeysothatotherscansendyousecret
messagesthatareencryptedbyyourpublickey.Inthisexercise,youwillexportyourpublickey
bysavingitinthesharedfoldercreatedinexerciseAsothatyourteammatecanaccessand
importit.Performthefollowingsteps:
1) FromtheDigitalSignatures/PKImenuselectPKI,thenselectKey
Display/Export
2) Clickyourpublic/privatekeypair.
3) ClickExportPSE(PKCS#12).
4) EnteryourPINnumber.
5) CreateanewPINforthePKCS#12file.ThisPINnumberistoauthorizeothersto
usepublickey.Youwillletyouteammateknowthiskey(recordyourPKCS#12
filePIN:_________)
6) Saveyourpublickeyinthesharedfolder(PCBAfolderinPCAandinY:drivein
PCB).

D. ImportingYourTeammatesPublicKey.(PCb)
Inthenextstep,youwillsendanencryptedmessagetoyourteammate.However,youneed
his/herpublickeytodoso.Inthisexercise,youwillimportyourteammatespublickeywhich
isstoredintheshareddirectory.
1) FromtheDigitalSignatures/PKImenuselectPKI,thenselectKey
Generation/Import
2) ClickPKCS#12Import.
3) Gotothesharedfolderandselectyourteammateskey.
4) AskyourteammateaboutthePINforhis/herPKCS#12file(note:thisisnotPSE
PIN).
5) EnteranewPSEPIN.ThisPINcanbeadifferentPINthanyourteammatesPIN.
6) Youhavesuccessfullyimportedyourteammatepublickey.Nowyoucanuseit
toencryptfileandsendthemtoyourteammate.


NPOL LAB:KeyExchangeandRSA 3

E. Encryptingatextdocument.(PCb)
Inthisexercise,youwillencryptafileusingyourteammatepublickey.
1) FromtheFilemenu,selectNewtoopenatextnewfile.
2) Typeasecretmessageforyourteammate.
3) FromtheCrypt/Decryptmenu,selectAsymmetricAlgorithms,andselectRSA
Encryption
4) Inthewindowselectyourteammatespublickey,andthenclickEncrypt.
5) FromtheFilemenu,selectSaveas,renamethefileasyourfirstnameandsave
thesharedfoldersothatyouteammatecanaccessit.
6) Youhavesuccessfullyimportedyourteammatepublickey.
ReviewQuestion:Notethatyoudidnotuseakeytoencryptthedocument.Why?

F. Decryptingthefile(PCa)
1) FromtheFilemenu,openthefilethatyourteammatejustsavedintheshared
folder.
2) FromtheCrypt/DeCryptmenu,selectAsymmetricAlgorithms,andselectRSA
Decryption
3) Inthewindowselectyourkey(thisisyourprivatekey),andthenclickDecrypt..
UseyouroriginalPINthatyoucreatedinexerciseB.
Canyoureadthefile?
ReviewQuestions:
Trytodecryptthemessagewithdifferentpublickeys.Discusswhyonlythecorrect
publickeydecryptsthefilecorrectly.
DiscusshowRSAcanbeusedtoverifytheidentityofamessagesender(inthiscaseyour
teammate).

You might also like