做客中文网

Chapter 4 Cryptography the secret life of primes(第1页)

天才一秒记住【做客中文网】地址:https://www.zk01.net

Chapter4Cryptography:thesecretlifeofprimes

banner"

>

Thereaderreciatethattheofumbershas,fromtheearliesttimes,beenreizedastherepositoryofriddlesas,manyofwhieverbeehisday.Formanyofus,thisisenoughtojustifytheuedseriousstudyofhersmaytakeadifferentattitude.Intriguinganddifficultasthesesmaybe,itmightbeimagiheyhavelittlebeariofhumanwisdoButthatwouldbeamistake.

&helastfewdecadesithasemergedthatordihekindswealliimetotime,becodedassebers.Thishasintopradourmostprecioussecrets,whethertheybeerilitary,personalorfinancial,politicalhtsdalous,allbeprotetheIbymaskingthemusiordinaryumbers.

&uronumbers

Hoossible?Anyinformatiobeapoemoraba,ablueprintforaonoraputerprogram,bedeswords.Wemay,however,oaugmethatisusedtomakeupourwordsbeyondtheordihealphabet.Wemayinumbersymbols,punbolsingspecialsymbolsforspaordinarywords,butitishecasethatalltheinformatiootransfer,instrusfpiddiagrams,beexpressedusingwordsfromaussay,hahousandsymbols.Wetthesesymbolsaeachsymboluniquelyasanumber.Sinumbersarediible,itmaybettousenumbersallwiththesamenumberofdigitsforthispurpose(so,forexample,everysymbolresentedusitPIringthesymbolstogetherasrequiredtogiveonebiglooldtheeory.Weworkinbinaryifwewishandsodeviseawayanyinformatioringof0sand1s.Everymessagewemighteverwanttosendbecodedasabinarystringatheotherendbyasuitablyprogrammedputer,tobepiledinethatrehend.Thistherealizatiooseweenonepersonaisenough,bothintheoryandiobeabletosendnumbersfromooanother.

Turnionumbers,however,isnotthebigidea.Tobesure,theexactprocessbywhichalltheinformationisdigitizedmaybehiddenfromthegeneralpubliethelessisnotthesourceofproteeavesdroppers.Ihepointofviewraphy,wemayidentifyaheso-calledplaihtherepresentsitahinkofthatheplaiisassumedthatanyonehasaccesstothewherewithalthatwillalloworaheother.Seesontotheswemasktheseplaihothernumbers.

&roduceyoutothefictitiouscharactersthatpopulatethevarioussariraphy,whichisthestudyofciphers(secretcodes).WeimagineAlidBob,whowanttouheachother,withoutbeiheeavesdropper,Eve.Instinctively,wemightsympathizewithAlidBEveasuptonogood,butofcoursethereversemaybetrue,withEverepresentinganoblepoligauthtoprotectusallfromtheevilplotsofBobandAlice.

&hemoralstandiits,thereisanage-oldapproachthatAliploytocutEveoutoftheversationeveerceptsmessagesthatpassbetweeheycryptthedatausihatisknownonlytoAlidBob.Whattheymayarraodoistomeetinaseviroheyexgewithoheraseumber(letussay57)aurimees,AlicewillwanttoseoBoband,justtoillustratethepoint,supposethatmessageberepresentedbyasibetween1and9.Onthebigday,AlitstoseoBob.Shetakeshermessageandaddsthesegredient,thatistosayshemasksitstruevaluebyadding57ahemessagetoBob,ainseel,of8+57=65.BobreceivesthismessageandsubtractstheseumbertoretrieveAlitext65-57=8.ThenefariousEve,hoodideawhatthesettoandindeeddoesmaercepttheencipheredmessage,65.Butwhatshedowithit?ShemaykAlitoheninepossiblemessages1,2,3,···,9toBobandalsoknowsthatshehasebyaddihemessage,whichmustthereforeliebetween65-9=55and65-1=64.However,becausesheottellwhichoftheseninemaskingnumbershasbeei),sheishewiserastotheactualplaihatAlittoBob,whichisstilljustaslikelytobeaheninepossibilities.AllsheknowsisthatAlitamessagetoBobbuthasis.

ItmightseemthatAlidBobareothemaliceofEveanduhimpunityusingthemagiumber57todisguisealltheyhavetosay.That,however,ishecase.Theywouldbewelladvisedtogethatnumber,iteroffusiimebecauseiftheydoemwillbegintoleakinformationtoEve.Forexample,sayinafutureweekAlitstosendtoBobthesamemessagenumber8.EverythingwouldrunasbeforeandonEvewouldihemysteriousnumber65fromtheairwaves,butthistimeitwouldtellhersomething.Evehateverthismessageis,itisthesamemessagethatAlittoBobiweek–thisisjustthesortofthingAlidBobwouldoknow.

This,however,lookstobenobigproblemforAlidBob.Whemeetupto‘exgekeys’,insteadonumber,AlicecouldprovideBobwithaloofthousaobeusedoher,thusavoidingthepossibilityofmeaningfultheirpubliclyavailableunis.

Andthisisiisdoice.Thiskindofciphersystemisknowradeasaohesenderaheirplaihasingle-usehe‘pad’.Thatleafofthepadisthehthesenderahemessagehasbeeaheoimepadrepresentsapletelysecuresysteminthattheihattravelsinthepubliainoinformationaboutthetoftheplaiodecipherit,theiorholdofthatpadiaiioionkey.

Keysandkeyexge

Itwouldseemthenthattheproblemofseunipletelysolvedbytheoimepadand,inaway,thatistrue.Thedifficultywithciphersliketheoimepad,however,isthattheyrequirethepartitstoexgeakeyiousetheIakesalotofeffh-levelunis,suchasthosebetweeeHouseandtheKremlin,moneyishenecessaryexgesarecarriedoutuionsofmaximumsetheeverydayworldoherhand,allsortsofpeopleandinstitutioouhoherinatialfashioitsotaffordthetimeandeosecurekeyexd,evenifthiswerearrarustedthirdparty,itexpensivebusiness.

Theondrahersthathadbeehousandsofyearsupuntilthe1970swasthattheywereallsymmetricciphers,meaningthattheenaioiallythesame.Whetheritwasthesimplealphabet-shiftcipherofJuliusplexEnigmaCipheroftheSedWorldWar,theyallsufferedfromtheoonadversarylearnedhowyouwereenessages,theyjustaswellasyou.Iomakeuseofasymmetriccipher,theunigpartoexgethecipherkeyinasecure>

&ohavebeentacitlyassumedthatthiswasanunavoidableprincipleofsecretcodes–foraciphertobeusedthepartnersneeded,somehoworother,toexgethekeytothedtokeepitsetheehismightberegardedasmathemationsense.

Thisisthekindofassumptionthatmakesamathematisuspiciwithwhatisessentiallyamathematicalsituation,soosuciple’tobewellfoundedaedbysomeformofmathemati.Yettherewasnosu,atherewasnosurinciplesimplyisnotvalid,asthefollowingthoughtexperimentreveals.

TransmissionefromAlicetoBobdoesnotinitselfheexgeofthekeytoacipher,fortheyproceedasfollows.AlicewritesherplaimessageforBob,ainaboxthatshesecureswithherownpadlolyAlicehasthekeytothislock.ShethenpoststheboxtoBob,whoof.Bob,however,thenaddsasedpadlocktothebox,forossessesthekey.TheboxistheoAliovesherownlodsendstheboxforaseetoBob.Thistime,BobmayunlocktheboxandreadAlice’smessage,sethekhemeddlingEveothavepeekedatthetsduringthedeliveryprothisway,asecretmessagemaybesetonaninseelwithoutAlidBihisimaginarysarioshowsthatthereisnolawthatsaysthatakeymustdsintheexgees.Iem,AlidBob’s‘locks’mightbetheirownessageratherthanaphysicaldeviceseparatingthewould-beeavesdropperfromtheplai.Aliaythehisiosetupanordiriccipherthatwouldbeusedtomaskalltheirfutureuni.

&hisisthewayaseunielisofteablishedintherealwphysigdevicesbyperso,however,soeasytodo.UheengsofAliayihoher,makingtheunsg(thatis,theunlog)thatiscarriedoutfirstbyAlidthenbyBobunworkable.However,thatthismethodbeeffectiveublistratedbyWhitfieldDiffieandMartinHellmanin1976.

Asedrelatedapproachistheideaofasymmetricorpublickeycryptographyinwhiepublishestheirownpublickeythatistheesmeantforthatperson.Hoersonalsoholdsaprivatekey,withoutwhichthemessageseheirownuniquepubliotberead.Ihepadlockmetaphor,AliceprovidesBobwithaboxinwhichtoplacehisplaiogetheradlock(herpublickey)towhichshealohekey(herprivatekey).

Aublickeysystemmightseemtoomuchtoaskforasthetwisofsedeaseofuseseemtoflict.Fast,safeenis,however,availabletothegeneralpublitheIheybarelyrealizethatitisthere,safeguardierests.Anditisalldowntonumbers,andprimehat.

Howsecretprimesprotectoursecrets

&everyplaimessageisregardedjustasasiisnaturaltotrytomaskthisnumberusingotherhemostonwaytodothisisthroughemployingtheso-calledRSAengprocess,publishedin1978byitsfounders,Ro,AdiShamir,andLeonardAdleman.InRSA,ea’sprivatekeysistsofthreenumbers,p,q,andd,wherepandqare(verylarge)primehethirdidisAlice’ssecretdegheroleofwhichwillbeexplainedinduecourse.Aliceprovidesthepubli=pq,theproductofhertwosecretprimes,andanengnumbere(whiordinarywholenumber,inothespestaionedinChapter2).

AsimpleexampleforthepurposesofillustrationwouldbeforAlicetohavetheprimesp=5andq=13sothatn=5×13=65.IfAlicesetsherengobee=11,thenherpublickeywouldbe(n,e)=(65,11).Toencryptamessagem,BobonlyneedsnaodeciphertheencryptedmessageE(m)thatBobtransmitstoAlicerequiresthedegnumberd,whithissouttobed=35,asweshallshowalittlefurtheroicsthatallowsdtobecalculatedrequiresthattheprimespandqareknown.Inthistoyexample,giventhatn=65,anyonewouldsoop=5andq=13.However,iftheprimesparemelylarge(typicallytheyarehunderedsofdigitsihistaskbeesapracticalimpossibilityforalmostaem,atleastinareasonablyshorttime,suchastwoorthreeweeks.Insummary,theRSAsystemofengisbasedontheempiricalfactthatitisprohibitivelydiffidtheprimefactorsofavery,verylargehecleverpart,whichlainintheremaihechapter,liesindevisingawaythatthemessagenumbermcipheredjustusingthepublibers,inpractice,degrequirespossessionoftheprimefa.

HereishohatBobsendsthroughtheetherisheremainderwhenmeisdividedbyheakingthisremainderrandsimilarlygtheremainderwhenrdisdividedbyn.TheunderlyiisuresthattheouteforAliceistheinalmessagem,whitheoordinaryplaibyAliputersysteThisis,ofcourse,happeningseamlesslybehindthesesforanyreal-lifeAlidBob.

ItwouldseemthattheonlythingthatEvelacksthatreallymattersisthisdegnumberd.IfEvek,shecoulddecipherthemessagejustaswellasAlice.Itturnsoutthatdisasolutioaiion.SolviionisputationallyquiteeasyaheEuAlgorithm,publishedintheBooksofEu300BC.Thatisnotthedifficulty.Thetroubleisthatitisnotpossibletofilywhatequationtosolveunlessyoukoheprimespandq,andthatistheobstaclethatstopsEveiracks.

laihowthenumbersinvolvedinallthisworkieFirst,thereisapparentlyquiteaproblemwithBob’sinitialtask.Thenumbermisbig,thenumbernismonstrous(oftheorderof200digits)andevehatlarge,thenumbermeisgoiremelylargeaswell.Aftergit,wehavetodividemebythetheremainderr,whichrepresentsthee.Itmightseemthatthecalsaretoouobepractical.Weshouldbeawarethateventhoughmodernputersareextremelypowerful,theyyethavetheirlimitations.Whencalsinvhpowers,theyexceedtheputersysteWelyethatanypracticalcalthatwesetforaputereinashortperiodoftime.

ThesavinggraceforBobisthatitispossibletofindtherequiredremaihoutdoingthelongdivisionatall.Iheremaidependonremainders,andhereisaoillustratethepoint.Whatarethefinaltwodigitsof739?(Thatistosay,whatistheremaihisnumberisdividedby100?)Ioahisquestiobeginbygthefirstfewpowersof7:71=7,72=49,73=343,74=2,401,75=16,807,···.Itwillsoonbeeclear,however,thatthesheersizeofthesenumbersisgoingtobeanageablewellbefetanywherenear739.Oherhaeoeranother,atterhekeyobservationisthat,aswecalculatesugpowers,thefinaltwodigitsoftheanswerdependowodigitsnumber,aswhenweultipli,digitsinthehundredsnandbeyondhaveonisandtensns.

本章未完,请点击下一章继续阅读!若浏览器显示没有新章节了,请尝试点击右上角↗️或右下角↘️的菜单,退出阅读模式即可,谢谢!

如遇章节错误,请点击报错(无需登陆)

新书推荐

末世死亡古武四合院:这背锅侠我不当了修仙百艺从呆毛王开始公开处刑盖世狂龙黄泉摆渡人反贼平天下华娱从1980开始我家老婆是娇气包大小姐她总是不求上进高武:神话最强传说神魔天尊正派都不喜欢我极品捉鬼系统我的亮剑生涯吞天帝尊我在诡异世界无限升级无敌天子世嫁网游开局契约生命之树无敌传人我有五十四张英雄牌快穿虐渣:总穿成极品老太养反派神兽召唤师斗破苍穹之魂天帝