is2150_hw5_stm57

is2150_hw5_stm57 - StevenMadara IS2150Fall09 Due:10/30/09...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: StevenMadara IS2150Fall09 Due:10/30/09 Prof.Joshi HW5Section8.7#3,10,11,12,17 3.Ifonetimepadsareprovablysecure,whyaretheysorarelyusedinpractice? Thekeystringischosenatrandom,andisatleastaslongasthemessage. Theimplementationissuessurroundingrandomkeygenerationand distribution/storageofthatkeycreateproblemsthatpreventonetimepads frombeingpracticed.Sincethekeyneedstobeatleastaslongasthe messageissuesarisewhenlongmessagesneedtobesent.Also,sincethe keyneedstobesecurelysent(needsprotectedjustlikethemessage),the messagecouldsimplybesentviaasecurechannelremovingtheneedto performaonetimepadthatcreatesakey. 10.Provethefollowing: (a)Ifpisaprime,(p)=p1. Thetotientofpisthenumberofnumbers(lessthanp)thatdon'thave anyfactorsincommonwithp.Pisaprimenumber(asstatedabove), whichmeansitspositivedivisorsare1andp.Therefore,thesetof possiblenumbersis{1,2,3,...,p1}.Thisshowsthat(p)isequal to(p1). (b)Ifpandqaretwodistinctprimes,(pq)=(p1)(q1). Thesetofnumberslessthanpqis{0,1,2,...,(pq1)}withpq numberofelements.Pandqarebothprime,sopandqareboth relativelyprimetoallthenumbersbetween1andp,q.Thenumbers withcommonfactorswithpqneedtoberemoved.Zeroisnot relativelyprime,soitcanbeimmediatelyremoved.Multiplesofpor qarenotrelativelyprimetopq,so{p,2p,3p,...,(q1)p}shouldbe removed(q1)elementsareeliminated.Also,{q,2q,3q,...,(p 1)q}shouldberemovedagain,(p1)elementsareeliminated. Therefore,thenumberofelementsrelativelyprimetopqisasfollows: (pq)=pq[(q1)+(p1)+1] =pqq+1p+11 =p(q1)(q1) =(p1)(q1) 11.Showthatdecipheringofanencipheredmessageproducestheoriginalmessage withtheRSAcryptosystem.Doesencipheringofadecipheredmessageproducethe originalmessagealso? e,anddedmod(n)=1 m = c mod n c = m mod n m = m mod n (ed = k + k(n)) so,m=m 1+k(n) (n) k ed e d modn k(n) m=m(m ) modnmm modn ApplyingFermat'sLittleTheorem, m=m1 modn=m So,thisshowsthatdecipheringofanencipheredmessageproducesthe originalmessage. E(d(x))=x,soyestheencipheringofadecipheredmessageproducesthe originalmessage,also. 12.ConsidertheRSAcryptosystem.Showthattheciphertextscorrespondingtothe messages0,1,andn1arethemessagesthemselves.Arethereothermessages thatproducethesameciphertextasplaintext?Yes Ifmessageis0(m=0)c=0emodn=0So,m=c Ifmessageis1(m=1)c=1emodn=1So,m=c Ifmessageisn1(m=n1)Proofbyinductionfollows: First,explanationofwhyeisodd:n=pqisodd,becausepandqare bothoddnumbers(prime,not2)therefore,(p1)and(q1)are bothevenwhere(n)=(p1)(q1),andehastoberelativelyprime to(n)soitneedstobeodd. Basecase:(e=1) c = (n-1)1 mod n c = (n-1) Hypothesis/Assertion: Holds for e, where e is odd m = (n 1) c=(n1)emodn=(n1) Nowmustshowitistruefornextoddvalue:(e+2) m=(n1) c = (n-1)e (n-1)2 mod n c = [((n-1)e mod n)((n-1)2 mod n)] mod n c = [((n-1) mod n)((n-1)2 mod n)] mod n c = (n-1)3 mod n c = (n-1) 17.SupposeAliceandBobhaveRSApublickeysinafileonaserver.They communicateregularlyusingauthenticated,confidentialmessages.Evewantsto readthemessagesbutisunabletocracktheRSAprivatekeysofAliceandBob. k However,sheisabletobreakintotheserverandalterthefilecontainingAlice'sand Bob'spublickeys. (a)HowshouldEvealterthatfilesothatshecanreadconfidentialmessages sentbetweenAliceandBob,andforgemessagesfromeither? EvecanplantherpublickeyinplaceofbothAliceandBob's.Evewouldthen beabletointerceptmessagesfromAlicetoBob(andviceversa)thatAlice believeshavebeenencryptedusingBob'spublickeybut,inreality,arenow abletobedecryptedwithEve'sprivatekey.Eveisalsoabletosend messagestoAlice/Bobthathavebeenencryptedwithherprivatekey,which willbedecryptedbyAlice/BobusingEve'spublickey(unbeknownstto Alice/Bob). (b)HowmightAliceand/orBobdetectEve'ssubversionofthepublickeys? AliceandBobcoulddoselftestingoftheirkeysperiodicallytoensurethey encrypt/decryptinanexpectedmanner.Also,anymessagefromAlice/Bob toBob/AlicethathasnotbeeninterceptedbyEvecouldpotentiallyalert AliceandBobtoEve'ssubversionofthepublickeys(messagewouldnot decryptproperly). ...
View Full Document

This note was uploaded on 02/07/2012 for the course SIS 2150 taught by Professor Joshi during the Fall '11 term at Pittsburgh.

Ask a homework question - tutors are online