版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
thereisnomathematicalproofofsecurityforanypracticalcipher.theonlywaytohaveassurancethipherissecureistotrytobreakit(andfail)!学的早年时代:文世出:学水平低导致丢了性命courtesyfrom 是学的催化剂:理科生登场国家重 学:信息论 现代学:理论和现实的鸿courtesyfrom ided modern 3500 ~1950 math 2015! ysis:Attacking Brute-ImplementationAttack:Trytoextractkeythroughreverseengineeringorpowermeasurement,e.g.,forabankin artcard.SocialEngineering:E.g.,trickauserintogivingupher! Attack(orExhaustiveKey SymmetricTreatsthecipherasablackRequires(atleast) intext-ciphertextpair(x0,CheckallpossiblekeysuntilconditionisdK(y0)= HowmanykeystoweneedinbitKeySecuritylife(assumingbrute-asbestpossibleShortterm(fewdaysorLong-term(severaldecadesintheabsenceofquantumLong-term(alsoresistantquantumcomputers–notethatQCdonotexistatthemomentandmightneverexist)Important:Anadversaryonlyneedstosucceedwithoneattack.Thus,alongkeyspacedoesnothelpifotherattacks(e.g.,socialengineering)arepossible..ContentofthisOverviewonthefieldofBasicsofsymmetricSubstitutionModularShift(orCaesar)CipherandAffine!SubstitutionHistoricalGreattoolforunderstanding yticalEncryptslettersratherthanbits(likeallciphersuntilafterWWIdea:receeachintextletterbyafixedother forinstance,ABBAwouldbeencryptedasExampleiqifccvqqrfbrdqvfllcqnardqcfjwhwzhrbnnbhcchwwhbsqvqbrehwqvhlqHowsecureistheSubstitutionCipher?Let‘slookat!AttackstheSubstitutionAttack:ExhaustiveKeySearch Simplytryeverypossiblesubsititutiontableuntilanin intextappears(notethateachsubstitutiontableisakey)..Howmanysubstitutiontables(=keys)are26x25x…x3x2x1=26!Searchthrough288keysiscompleyinfeasiblewithtoday‘scomputers!(cf.earliertableonkeylengths)Q:Canwenowconcludethatthesubstitutioncipherissecures eabrute-attackisnotfeasible?A:No!Wehaveto allpossible!2.Attack:Letter ysis LettershaveverydifferentfrequenciesintheEnglishMoreover:thefrequency intextlettersis intheForinstance,“e“isthemostcommonletterinEnglish;almost13%ofalllettersinatypicalEnglishtextare“e“.Thenextmostcommononeis“t“withabout
LetterfrequenciesinFrequencyFrequencyinETAOINSHRDLC WFGYPBVKJXQZ Chapter1ofUnderstandingCryptographybyChristofPaarandJan!BreakingtheSubstitutionCipherwithLetterFrequencyLet‘sreturntoourexampleandidentifythemostfrequentiqifccvqqrfbrdqvfllcqnardqcfjwhwzhrbnnbhcchwwhbsqvqbrehwqvhlqWe cetheciphertextletterqbyEandiEifccvEErfbrdEvfllcEnardEcfjwhwzhrbnnbhcchwwhbsEvEbrehwEvhlEByfurtherguessingbasedonthefrequencyoftheremaininglettersweobtaintheWEWILLMEETINTHEMIDDLEOFTHELIBRARYATNOONALLARRANGEMENTSAREMADEInIntheeraofsubstitutionciphers(very…very…very…longperiodoftime),linguistsareoftenbettercryptographersthanmathematicians.!BreakingtheSubstitutionCipherwithLetterFrequencyInpractice,notonlyfrequenciesofindividualletterscanbeusedforanattack,butalsothefrequencyofletterpairs(i.e.,„th“isverycommoninEnglish),lettertriples,cf.Problem1.1inUnderstandingCryptographyforalongerciphertextyoucantrytobreak!Importantlesson:Eventhoughthesubstitutioncipherhasasufficientlylargekeyspaceofappr.288,itcaneasilybedefeatedwith yticalmethods.Thisisanexcellentexamplethatanencryptionschememustwithstandalltypesofattacks.ContentofthisOverviewonthefieldofBasicsofsymmetricAttackingcryptoSubstitutionModularShift(orCaesar)CipherandAffine!ShortIntroductiontoModularWhydoweneedtostudymodularExtremelyimportantforasymmetriccryptography(RSA,ellipticcurvesSomehistoricalcipherscanbeelegantlydescribedwithmodulararithmetic(cf.Caesarandaffinecipherlateron).!ShortIntroductiontoModularGenerallyspeaking,mostcryptosytemsarebasedonsetsofnumbersthatdiscrete(setswithintegersareparticularlyfinite(i.e.,ifweonlycomputewithafinielymanySeemstoo ?---Let‘slookatafinitesetwithdiscretenumberswearequitefamiliarwith:aclock. Interestingly,eventhoughthenumbersare rementedeveryhourweneverleavethesetof1,2,3,…11,12,1,2,3,…11,12,1,2,3,!ShortIntroductiontoModularWedevelopnowanarithmeticsystemwhichallowsustocomputeinfinitesetsofintegerslikethe12integerswefindonaclock(1,2,3,…,12).Itiscrucialtohaveanoperationwhich„keepsthenumberswithinlimits“,i.e.,af andmultiplicationtheyshouldneverleavetheset(i.e.,neverlargerthan12).Definition:Definition:ModulusLeta,r,mbeintegersandm>0.Wea≡rmodif(r-a)isdivisibleby“m”iscalledthe“r”iscalledtheExamplesformodularLeta=12andm=9 12≡3modLeta=34andm= 34≡7modLeta=-7andm= -7≡2mod(youshouldcheckwhetherthecondition„mdivides(r-a)“holdsineachofthe3!PropertiesofModularArithmeticTheremainderisnotItissomewhatsurprisingthatforeverygivenmodulusmandnumbera,thereare(infini manyvalidremainders.12≡3mod9→3isavalidremainder e9divides(3-12≡21mod9→21isavalidremainder e9divides(21-12≡-6mod9→-6isavalidremainder e9divides(-6-!PropertiesofModularArithmeticWhichremainderdoweByconvention,weusuallyagreeonthesmallestnon-negativeintegerrasremainder.Thisintegercanbecomputedas a=qm+ where0≤r≤m-Example:a=12and12=1x9+ →r=Remark:Thisisjustaconvention.Algorithmicallyweare tochooseanyothervalidremaindertocomputeourcryptofunctions.x=25,y=x+y=43=7modx+y=(25mod12+18mod12)mod(x+y)modm=(xmodm+ymodm)modx=15,y=x*y=255=3modx*y=(15mod12*17mod12)mod(x*y)modm=(xmodm*ymodm)modx0isaconstantand0≤x0≤m-s={x|x=x0modm}isacongruenceInmodulararithmetic,valuesinthesamecongruenceclasscansubstituteeachother!PropertiesofModularArithmeticHowdoweperformmodularFirst,notethatratherthanperformingadivision,weprefertomultiplybytheinverse.b/a≡bxa-1modTheinversea-1ofanumberaisdefinedsuchaa-1≡1mod Whatis5/7mod9Theinverseof7mod9is4 e7x4≡28≡1mod9,5/7≡5x4=20≡2modHowistheinverseTheinverseofanumberamodmonlyexistsifandonly(a,m)=1(notethatintheexampleabove(5,9)=1,sothattheinverseof5existsmoduloFornow,thebestwayofcomputingtheinverseistouseexhaustivesearch. hapter6ofUnderstandingCryptographywewilllearnthepowerfulEuclide gorithmwhichactuallycomputesaninverseforagivennumberandmodulus. gebraicViewonModuloArithmetic:TheRingZmWecanviewmodulararithmeticintermsofsetsandoperationsintheset.By arithmeticmodulomweobtaintheintegerringZm.withthefollowingproperties:Closure:WecanaddandmultiplyanytwonumbersandtheresultisalwaysintheAdditionandmultiplicationareassociative,i.e.,foralla,b,ca+(b+c)=(a+b)+ca(bc)=(ab)candadditioniscommutative:a+b=b+Thedistributivelawholds:a×(b+c)=(a×b)+(a×c)foralla,b,cThereistheneutralelement0withrespecttoaddition,i.e.,forallaa+0amodForallaZm,thereisalwaysanadditiveinverseelement–asucha+(-a)0modThereistheneutralelement1withrespecttomultiplication,i.e.,forallaa1amodThemultiplicativeinversea-aa-11modexistsonlyforsome,butnotforall,elementsin!PropertiesofModularArithmeticModularreductioncanbeperformedatanypointduringaLet’slookfirstatanexample.Wewanttocompute38mod7(notethatexponentiationisextremelyimport public-keycryptography).Approach:Exponentiationfollowedbymodular38=6561≡2modNotethatwehavetheintermediateresult6561eventhoughweknowthatthefinalresultcan’tbelargerthan6.Approach:Exponentiationwithintermediatemodular38=3434=81xAtthispointwereducetheintermediateresults81modulo38=81x81≡4x4mod4x4=16≡2modNotethatwecanperformallthesemultiplicationswithoutpocketcalculator,whereasmentallycomputing38=6561isabitchallengingformostofus.GeneralGeneralrule:Formostalgorithmsitisadvantageoustoreduceresultsassoonas gebraicViewonModuloArithmetic:TheRingZmRoughlyRoughlyspeaking,aringisastructureinwhichwewaysadd,subtractmultiply,butwecanonlydividebycertainelements(namelybythoseforwhichmultiplicativeinverseWerecallfromabovethatanelementaZmhasamultiplicativeinverseonly(a,m)=1WesaythataiscoprimeorrelativelyprimetoEx:WeconsidertheringZ9=Theelements0,3,and6donothaveinversess etheyarenotcoprimeto9.Theinversesoftheotherelements1,2,4,5,7,and8are:1-11mod 2-15mod 4-17mod5-12mod 7-14mod 8-18modContentofthisOverviewonthefieldofBasicsofsymmetricAttackingcryptoSubstitutionModularShift(orCaesar)CipherandAffine GaiusJuliusFirstTriumvirate(ruleofthreeCleopatra(dictatorOctavian->!Shift(orCaesar)CipherAncientcipher,allegedlyusedbyJulius ces intextletterbyanother cementruleisverysimple:TakeletterthatfollowsafterkpositionsinthealphabetNeedsmapfromletters→numbers:ABCDEFGHIJKLM0123456789NOPQRSTUVExamplefork=intext=ATTACK=0,19,19,0,2,Ciphertext=haahr=7,0,0,7,Notethattheletters”wraparound”at ofthealphabet,whichcanbemathematicallybeexpressedasreductionmodulo26,e.g.,19+7=26≡0mod26!Shift(orCaesar)CipherElegantmathematicaldescriptionoftheLetLetk,x,yε{0,1,…,y=ek(x)≡x+kmodx=dk(x)≡y-kmodQ;IstheshiftcipherA:No!severalattacksare Exhaustivekeysearch(keyspaceisonlyLetter ysis,similarto substitution!AffineCipherExtensionoftheshiftcipher:ratherthanjustaddingthekeytothe intext,wealsomultiplybythekeyWeuseforthisakeyconsistingoftwoparts:k=(a,Letx,Letx,yε{0,1,…, y=ek(x)≡ax+bmod x=dk(x)≡a-1(y–b)mod etheinverseofaisneededfordecryption,wecanonlyusevaluesforafor(a,26)=1Thereare12valuesforathatfulfillthisFromthisfollowsthatthekeyspaceisonly12x26=312(cf.Sec1.4inUnderstandingAgain,severalattacksare Exhaustivekeysearchandletterfrequency ysis,similartotheattack substitutionciph
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 智能农业的土地利用规划
- 四川电影电视学院《动画史与经典作品赏析》2021-2022学年第一学期期末试卷
- 石河子大学《药用植物学》2021-2022学年第一学期期末试卷
- 石河子大学《食品技术原理》2022-2023学年第一学期期末试卷
- 石河子大学《结构力学二》2021-2022学年第一学期期末试卷
- 石河子大学《家庭社会工作》2023-2024学年第一学期期末试卷
- 石河子大学《房屋建筑学》2023-2024学年第一学期期末试卷
- 沈阳理工大学《自动控制原理》2023-2024学年期末试卷
- 沈阳理工大学《商业摄影》2023-2024学年第一学期期末试卷
- 沈阳理工大学《建筑实务》2021-2022学年第一学期期末试卷
- 数据可视化说课 高中信息技术
- 混凝土结构施工图平面整体表示方法制图规则和详图
- 2024年二季度灵活就业调查报告
- 中华民族现代文明有哪些鲜明特质?建设中华民族现代文明的路径是什么?参考答案三
- 液压站操作说明书
- 2021至2024年广东新高考化学真题考点分布试题及答案
- 7《小书包》教学设计-2024-2025学年统编版语文一年级上册
- 广安市岳池县2024年上半年“小平故里英才”引进急需紧缺专业人才历年(高频重点复习提升训练)共500题附带答案详解
- 婚内财产约定协议书范本2024年
- 走进摄影智慧树知到答案2024年海南软件职业技术学院
- 2024年人教版五年级上册数学第五单元课后练习题(含答案和概念)
评论
0/150
提交评论