手机浏览器扫描二维码访问
Chapter4Cryptography:thesecretlifeofprimes
banner"
>
Thereaderreciatethattheofumbershas,fromtheearliesttimes,beenreizedastherepositoryofriddlesas,manyofwhieverbeehisday.Formanyofus,thisisenoughtojustifytheuedseriousstudyofhersmaytakeadifferentattitude.Intriguinganddifficultasthesesmaybe,itmightbeimagiheyhavelittlebeariofhumanwisdom.Butthatwouldbeamistake.
&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,isthattheyrequirethepartitstoexgeakeyiousethem.Iakesalotofeffh-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,whitheoordinaryplaibyAliputersystem.Thisis,ofcourse,happeningseamlesslybehindthesesforanyreal-lifeAlidBob.
ItwouldseemthattheonlythingthatEvelacksthatreallymattersisthisdegnumberd.IfEvek,shecoulddecipherthemessagejustaswellasAlice.Itturnsoutthatdisasolutioaiion.SolviionisputationallyquiteeasyaheEuAlgorithm,publishedintheBooksofEu300BC.Thatisnotthedifficulty.Thetroubleisthatitisnotpossibletofilywhatequationtosolveunlessyoukoheprimespandq,andthatistheobstaclethatstopsEveiracks.
laihowthenumbersinvolvedinallthisworkiem.First,thereisapparentlyquiteaproblemwithBob’sinitialtask.Thenumbermisbig,thenumbernismonstrous(oftheorderof200digits)andevehatlarge,thenumbermeisgoiremelylargeaswell.Aftergit,wehavetodividemebythetheremainderr,whichrepresentsthee.Itmightseemthatthecalsaretoouobepractical.Weshouldbeawarethateventhoughmodernputersareextremelypowerful,theyyethavetheirlimitations.Whencalsinvhpowers,theyexceedtheputersystem.Welyethatanypracticalcalthatwesetforaputereinashortperiodoftime.
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.
...
一朝穿越,温言成了孩子娘!这孩子听话懂事不说,还天生的锦鲤好运,简直不要太好!有了他,他们一上山就捡野鸡野兔不说,一去镇上摆摊东西更是全部卖空。不仅如此。去读书他还秒杀众学子,记忆力超群,学啥啥会,...
本文于15日(周六)25章开始入v辞宁嫁了,嫁给她心心念念藏在心底数十年的郎君。只是嫁得不怎么光彩,体面。因一场不知名的算计。辞宁和严韫有了肌肤之亲,而严韫本该是姐姐的未婚夫。姐姐另许他人与辞宁同日出嫁,...
东方神州,有人皇立道统,有圣贤宗门传道,有诸侯雄踞一方王国,诸强林立,神州动乱千万载,执此之时,一代天骄叶青帝及东凰大帝横空出世,斩人皇,驭圣贤,诸侯臣服,东方神州一统!然,叶青帝忽然暴毙,世间雕像尽皆被毁,于世间除名,沦为禁忌从此神州唯东凰大帝独尊!十五年后,东海青州城,一名为叶伏天的少年,开启了他的传奇之路…...
一觉醒来,王凯发现他居然穿越到了斗罗大陆!叮,无限武魂系统绑定成功,你获得抽取神级武魂机会一次!叮,你获得了神级武魂修罗皇!叮,你获得新手任务突破魂师!凭借着穿越时获得的无限武魂系...