版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025四川安和精密电子电器股份有限公司招聘品质工程师测试笔试历年难易错考点试卷带答案解析
- 2025四川内江庆隆机床有限公司招聘11人笔试参考题库附带答案详解
- 2025四川九州电子科技股份有限公司招聘工艺技术岗(校招)等测试笔试历年典型考点题库附带答案详解
- 2025四川乐山市市中区国有企业招聘员工拟聘用人选(第三批)笔试历年常考点试题专练附带答案详解
- 2025吉林省高速公路集团有限公司白城分公司劳务派遣项目招聘笔试参考题库附带答案详解
- 2025华能澜沧江水电股份有限公司大学毕业生招聘17人笔试参考题库附带答案详解
- 2025北京首发集团拟聘人员笔试参考题库附带答案详解
- 安徽省合肥市普通高中六校联盟2024-2025学年高二下学期4月期中考试化学含答案
- 2025内蒙古鄂尔多斯电力冶金集团股份有限公司招聘102人笔试参考题库附带答案详解
- 2025中国联合网络通信有限公司贵州省分公司校园招聘(81个岗位)笔试参考题库附带答案详解
- 神经内科卒中患者误吸风险的多维度评估
- 机加工检验员培训课件
- 上海市奉贤区2026届初三一模物理试题(含答案)
- 2025年数字货币跨境结算法律场景报告
- 医院消毒供应监测基本数据集解读与实践
- 2025年中国联通AI+研发效能度量实践报告
- 2026年新高考历史全真模拟试卷 3套(含答案解析)
- 技术调研实施管理办法
- 网络空间安全概论 实验6 网络监听实验样例1
- T/CECS 10055-2019绿色建材评价集成墙面
- 钢管出租公司管理制度
评论
0/150
提交评论