狂风中文网

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

天才一秒记住【狂风中文网】地址:https://www.kfzw.net

Chapter4Cryptography:thesecretlifeofprimes

banner"

>

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

&helastfewdecadesithasemergedthatordihekindsweallindulgeinfromtimetotime,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.Seesontotheslaihothernumbers.

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

&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,isn'tquitethecase.Theywouldbewelladvisedtogethatnumber,iteroffusiimebecauseiftheydon't,thesystemwillbegintoleakinformationtoEve.Forexample,sayinafutureweekAlitstosendtoBobthesamemessagenumber8.EverythingwouldrunasbeforeandonEvewouldihemysteriousnumber65fromtheairwaves,butthistimeitwouldtellhersomething.Evehateverthismessageis,itisthesamemessagethatAlittoBobiweek–thisisjustthesAlidBobwouldoknow.

This,however,lookstobenobigproblemforAlidBob.Whemeetupto'exgekeys',insteadonumber,AlicecouldprovideBobwithaloofthousaobeusedoher,thusavoidingthepossibilityofmeaningfultheirpubliclyavailableunis.

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

Keysandkeyexge

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

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

&ohavebeentacitlyassumedthatthiswasanunavoidableprincipleofsecretcodes–foraciphertobeusedthepartnersneeded,somehoworother,toexgethekeytothedtokeepitsetheehismightberegardedasmathemationsense.

Thisisthekindofassumptionthatmakesamathematisuspiciwithwhatisessentiallyamathematicalsituation,soosuciple’tobewellfoundedaedbysomeformofmathemati.Yettherewasnosu,atherewasnosurinciplesimplyisnotvalid,asthefollowingthoughtexperimeransmissionefromAlicetoBobdoesnotinitselfheexgeofthekeytoacipher,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)thatiscarriedoutrstbyAlidthenbyBobunworkable.However,thatthismethodbeeffectiveublistratedbyWhiteldDifeandMartinHellmanin1976.

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

Aublickeysystemmightseemtoomuchtoaskforasthetwisofsedeaseofuseseemtofiict.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,theRSAsystemofengisbasedontheempiricalfactthatitisprohibitivelydifficulttofindtheprimefactorsofavery,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.

Whatismore,since74has01asthefinaldigitpair,thefourpowerswillendin07,49,43,andthen01again.Heesugpowers,thepatterwodigitswillsimplyrepeatthiscygthfour,overandaihequestioninhand,since39=4×9+3,wewillpassthroughthisfour-etimesahreemorestepsingthefinaltwodigitsof739,whichmustthereforebe43.Andthisworksquitegenerally.Iheremainderwhensomepowerabisdividedbynsay,weaketheremainderrwhenaisdividedbyraaindersaswetakesuccessivepowersofr.iththeremainderr,whichwillbeaheraoissaythatwearewmodulaiplesofnthatmayarise,astheyleavearemainderof0whendividedbyn,andsotributetothevalueofthenalremainderr.

YoumightstillsuspectthatIhaveriggedtheevidencebyganexamplewhereaverysmallpowerleftaremainderof1–inthisinstance74was1morethanamultipleofn=100.This,however,isonlypartlytrue.Itturnsoutthat,ifwetakeanytwonumbers,aandonfactoris1(wesaysuumbersaremutuallye),thenthereisalowertsuchthatatequals1modulon,thatistosayleavesaremainderof1whendividedbyn.Fromthispoint,theremaindersofsuccessivepowersfollowacygtht.It,however,behardtopredictwhatisthevalueoft,butitisknownthattmustalwaysequalorbeafabertraditionallywrittenasφ(n),thevalueoftheEulerphifun.

whichisthesameastheresultthatweobtailyfromthedefinition.Usihod,youmightliketocheckyourselfthatφ(100)=40,andso,forihenfollowsthat740equals1modulo100.However,aswehavealreadyseepowerof7thatyieldsaremainderof1isnot40butitsdivisor4.

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

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

新书推荐

情难自控总被隐藏BOSS一见钟情哥斯拉之从金刚骷髅岛开始重生之原配娇妻穿书白月光,病娇反派可狼可奶!霸道帝少惹不得港娱的人生模拟器大美人都是我老婆!上门狂婿从四合院开始的旅行极品婆婆的重生之路穿成咸鱼女配,她靠巅峰系统爆红卖火箭的小女孩[星际]神话三国领主倾世女帝:笑拥江山美男我真不是仙二代修道种田平天下重生异能俏娇妻夫人别嫁了,主帅他不孕不育啊网游之全球问道长生万古:苟在天牢做狱卒峨眉祖师苗疆少年又抢走和亲的九郡主啦从亮剑开始的战争系统权臣火葬场实录