狂风中文网

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

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

AllthisservestogiveanindithatthebyBobtoAlice,memodulon,deedbecalculatedwithouttoomucheffortonbehalfofBob'sputer.Allthesame,thenumbersinvolvedareiybig,somoreexplanatiooshowthattheydled.Thelargepowersinvolvedinebedealtwithinstagesbyaproasfastexpoion.Withoutgoihemethodinvolvessuccessivesquaringandmultiplyioarriveatmemodulonwiththebinaryfuidihmthroughtoquidtherequiredremaiivelyfewsteps.

EuclidshowsAlicehowtofindherdegnumber

Aliputerddusioolthatisover2,300yearsold,theEuAlgorithm,whichwillbeexplainedi.Eve'sputercouldofethingifitjustknewwhichequationtosolve.However,sindqareprivatetoAlice,sois(p-1)(q-1)akobegin.

&otheEuAlgorithm,thisbeginsfromtheobservationthatitispossibletofionfabersa〉bbysuccessivesubtra.(Thehcfisalsoknownasthegcd–greatestondivisor.)Wejustr=a-bhasthepropertythatanyonfaytwoofthethreenumbersa,b,andrwillalsobeafactorofthethird.Forexample,ifonfactorofaandb,sothata=db=cb1say,weseethatr=a-b=ca1-cb1=c(a1-b1),givingusafactorizationofrinvolvingthedivisorparticular,thehdbisthesameasthehdr.Sihesenumbersarelessthana,wehesameproblembutappliedtoasmallernumberpair.Repetitionofthisideatheuallyleadtoapairwherethehcfisobvious.(Iwonumbersinhauallybethesame,forifnotwecouldproorestep;theirohenthenumberweseek.)

&ofindthehcfofa=558andb=396,thefirstsubtrawouldgiveusr=558-396=162,soournewpairwouldbe396and162.Since396-162=234,ourthirdpairbees234and162,aihefulllistofnumberpairsis:

(558,396)→(396,162)→(234,162)→(162,72)→(90,72)→→(72,18)→(54,18)→(36,18)→(18,18)

andsothehd396is18.

Itispossibletowritedownthehberpairfromtheprimefactorizationsofthenumbersiion.Inthisexample,558=2×32×31,while396=22×32×11;takingtheonporimeeothefactorizatiohehcfas2×32=18.heless,ferakesmuchlessworktouseEuclid’sAlgorithmasitisgeoperformsubtrasthantofiorizations.

AnotherbonusoftheEuAlgorithmisthatitisalossibletoworkitbadinsodoihehtermsinaltwooseethisinathepreviousexample,itisbesttopressthecalwhenthesamenumberappearsseveraltimesoverinthecourseofthesubtras,representingthisasasiionasfollows:

558=396+162

396=2×162+72

162=2×72+18

72=4×18.

Beginningwiththesedtolastline,weleequatioetheieremaiime.Inthisexample,byusingfirstthepeioheo>

18=162-2×72=162-2×(396-2×162)=5×162-2×396

andfinallyusiequatioethefirstieremainderof162:

=5×(558-396)--2×396=5×558-7×396=18.

Thaterformthisreverseprocedureisimportantforbothpradtheoretis.Inparticular,tofindAlice’sdegnumberd,wewantdtosatisfythethatdeleavesaremainderof1whendividedbyφ(n).(Forbrevity,weshalldehesinglesymbolk.)Weowseethereasooneandkbeingaepair,asiftheirhighestonfactoris1,wheheEuAlgorithmonthepaireandk,thefihatappearsis,ofcourse,1.Byreversihm,wewilleventuallyexpress1asabinationofeandk;inparticular,wewillfondintegersddsuchthatck+de=1,orinotherwordsde=1-ck,sothatdewillleavearemainderof1whendividedbyk.

ThisrelativelysimpleprocesswillyieldAlice’sdegheinitialvalueofdobtaiheequationmayheraokbutifnot,byaddingasuitablemultipleofk,wewilleventuallyfindtheuniquehatrahasthemagicpropertythatdeleavesaremainderof1wheheuniquenessofdiseasilyproved,butwewoofurtherexplaishowthedegnumberdiscalculatedasweshtotheexamplegivenearlierwherep=5,q=13,sothatn=pq=5×13=65.-1)(q-1)=4×12=48.Alicesetse=11,andsind48aree,thisiswithihegame.TheEuAlgorithmappliedtoφ(n)=k=48ahengives:

48=4×11+4

11=2×4+3

4=1×3+1

ingthatthehdeisindeed1.Reversihm>

1=4-3=4-(11-2×4)=3×4-11=3(48-4×11)-11

=3×48-13×11.

Thisgivesaninitialvalueofd=-13asthesolutiontotherequirementthat11dleavesremainder1upondivisionby48,setapositivevalueofdintherequiredraothisd=48-13=35.

ThereasonwhydworksforAliceisalldowntomodulararithmetidthefactthatdeleavesaremainderof1whendividedbyk=φ(es(me)d=mdemoduloheform1+krforsomeintegerr.Asexplainedbefore,mkleavesaremainderof1whehisisoftenkheorem)andsothesameistrueof(mk)r=mkr.Hencem1+kr=m×mkrleavestheremaindermwhendividedbyailedverifiofthisrequiresalittlealgebra,butthatisens.)Inthisway,AliceretrievesBob’smessage,

AndinpassingitiswelltopointoutthattheEuAlgorithmprovidesthemissinglinkinourproofoftheuniquenessofprimefactorizationasitallowsustoverifytheeupropertythatifaprimepisafactoroftheproductab,sothatab=pcsay,thenpisafactorofatleastoneofaandb.Thereasonforthisisthatifpisnotafactorofathen,sincepisprime,thehdpis1.ByreversingtheEuAlgorithmliedtothepairaahenfindintegersrandssaysuchthatra+sp=1.Thisisenoughtoshoisthenafactorofbfor,sinceab=pc,>

b=b×1=b(ra+sp)=r(ab)+psb=r(pc)+psb=p(rc+sb).

Thisistherequiredfactorizationofbthatfeaturestheprimepasafa,theheRSAengmakesthesystemsound,althoughvariousprotocolsthathavenotbeenexplaiberespeuardtheiyofthesysteThereareissuesofauthentifi(whatifEvetactsAlidingtobeBob?),ion(whatifBobpretendsthatitwasEvewhoseoAlididentityfraud(whatifAliceabusestialidentifittoherbyBobaoimpersonatehimonliherweakhesystembeexposedwheableorrepeatedmessagesproliferate.However,thesedifficultiesmaypotentiallyariseinanypublickey.Theyeandinthemaiotheunderlyieiquesthatensurehighqualityandrobusten.

ThischapterhasdemonstratedamajorappliehetheoryofdivisibilityandremaimathematicsofEudthe18th-turytributionofEulerallowsthistobeexplaionlyinbroadpriiail.

&partofourbookclosester5whiespecialclassesofintegersassociatedwiththeeiourallyroupings.

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

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

新书推荐

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