版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 板栗、坚果初加工产业链项目可行性研究报告模板-立项拿地
- 2026年苏教版高中生物必修第一册第4章知识点巩固习题及答案
- 建筑工程施工组织与实施考试模拟试卷及答案
- 公共卫生执业医师考试卫生监督学模拟试题及答案
- 特种设备作业人员证锅炉司炉安全操作与维护试题及答案
- 江苏省苏州市第一中学九年级历史第5章模拟试卷及答案
- 物业管理师职业道德与素养测试卷及答案
- 北师大版数学 专题4.3 多边形和圆的初步认识(知识梳理+9个考点讲练+中考真题演练+难度分层练 共43题) 同步练习 含答案
- 年产3200吨农药中间体和年产2000吨聚氨酯胶粘剂项目可行性研究报告模板-立项备案
- 北京市2026年上学期七年级期中数学试卷附答案
- 球形网架施工方案范本大全
- 月子中心流感防控要点宣教大纲
- DB32T 5188-2025经成人中心静脉通路装置采血技术规范
- 全屋定制代加工协议合同
- 企业反恐怖安全风险评估报告
- 2025春季学期国开电大专科《中级财务会计(二)》一平台在线形考(第一至四次形考任务)试题及答案
- 《绿色建筑评价标准》(2024年修订)
- 异常子宫出血护理查房
- 走进广告世界知到课后答案智慧树章节测试答案2025年春桂林理工大学
- 《既有建筑节能改造碳排放计算标准和分析方法》
- 外刊改编语法填空题Day+75-Day+76- 高三英语一轮复习
评论
0/150
提交评论