深入浅出密码学习题答案(3)
2.Asanabsoluteminimum,abitlengthof128bitisrecommendedinordertoprecludebrute-forceattacksontheprivateexponent.However,theexponentmustevenbelargersincethereexistanalyticalattackswhicharemorepowerful.Inpractice,alengthfordofleast0.3timesthebitlengthofnisrecommended,i.e.forRSA-2048theexponentshouldatleast615bit.
7.7
p=31,q=37,e=17,y=2
n=31·37=1147d=17 1=953mod1080dp=953≡23mod30dq=953≡17mod36xp=ydp=223≡8mod31xq=ydq=217≡18mod37cp=q 1=37 1≡6 1≡26mod31cq=p 1=31 1≡6mod37x=[qcp]xp+[pcq]xq=
[37·26]8+[31·6]18=
8440=721mod1147
AliceBob
setup:kpr=d;kpub=e
publishe,n
y7.9chooserandomsessionkeyksesemodny=ekpub(kses)=kses
→kses=dkpr(y)=ydmodn
Alicecompletelydeterminesthechoiceofthesessionkeykses.
Notethatinpracticeksesmightbemuchlongerthanneededforasymmmetric-keyalgorithm.Forinstance,ksesmayhave1024bitsbutonly128actualkeybitsareneeded.Inthiscasejustusethe128MSB(orLSB)bitareusedandtheremainingbitarediscarded.Often,itissafepracticetoapplyacryptographichashfunction rsttoksesandthentaketheMSBorLSBbits.
7.11
1.Encryptionequation:y≡xemodn.Wecannotsolvetheequationanalytical,becausetheexponenti-ationtakesplaceina nitering,wherenoef cientalgorithmsforcomputingrootsisknown.
2.
Φ(n)=p·q
No!ThecalculationofΦ(n)presumestheknowledgeofpandq,whichwedonothave.
3.Factorizationyields:p=43andq=61
Φ(n)=42·60=2520
d≡e 1mod2520≡191
x=1088
7.13
1.Amessageconsistsof,let’ssay,mpiecesofciphertexty0,y1,...,ym 1.However,theplaintextspaceisrestrictedto95possiblevaluesandtheciphertextspacetoo.Thatmeansweonlyhavetotest95possibleplaintextcharacterstobuildupatablecontainingallpossibleciphertextcharacters:
?Test:yi=jemodn;j=32,33,...,126
2.SIMPSONS
奇数题号答案
3.WithOAEPpaddingarandomstringseedisusedwitheveryencryption.Sinceseedhasinpracticealengthof128–160bit,thereexistmany,manydifferentciphertextsforagivenplaintext.
7.15
Thebasicideaistorepresenttheexponentinaradix2krepresentation.Thatmeanswegroupkbitsoftheexponenttogether.The rststepofthealgorithmistopre-computealook-uptablewiththevalueskA0=1,A1=A,A2,...,A2 1.Notethattheexponentsofthelook-uptablevaluesrepresentallpossiblebitpatternsoflengthk.Thetablecomputationrequires2k 2multiplications(notethatcomputingA0andA1isforfree).Afterthelook-uptablehasbeencomputed,thetwoelementaryoperationsinthealgorithmarenow:
Shiftintermediateexponentbykpositionstotheleftbyperformingksubsequentsquarings(Recall:Thestandards-a-malgorithmshiftstheexponentonlybyonepositionbyperformingonesquaringperiteration.)Theexponenthasnowktrailingzerosattherightmostbitpositions.Fillintherequiredbitpatternfortheexponentbymultiplyingthecorrespondingvaluefromthelook-uptablewiththeintermediateresult.
Thisiterationisonlyperformedl/ktimes,wherel+1isthebitlengthoftheexponent.Hence,thereareonlyl/kmultiplicationsbeingperformedinthispartofthealgorithm.
Anexactdescriptionofthealgorithm,whichisoftenreferredtoask-aryexponentiation,isgivenin
[120].Notethatthebitlengthoftheexponentinthisdescriptionistkbit.Anexampleforthecasek=3isgivenbelow.
Thecomplexityofthealgorithmforanl+1bitexponentis2k 3multiplicationsintheprecompu-tationphase,andaboutl 1squaringsandl(2k 1)/2kmultiplicationsinthemainloop.
Example13.2.Thegoalistocomputegemodnwithk-arywheren=163,g=12,k=3,e=14510=2218=23=100100012
Precomputation:
g0:=1
g1:=12
g2:=g1·12=144g3:=g2·12=1728mod163=98g4:=g3·12=1176mod163=35g5:=g4·12=420mod163=94g6:=g5·12=1128mod163=150g7:=g6·12=1800mod163=7Exponentiation:
Iteration
10000
1b
10010000
2bA:=A·g1=1680mod163=50A:=A·g2=6768mod163=853SQCalculationA:=g2=1443SQ
奇数题号答案
a
ord(a)
123456
136362
3.Z 13:
a
ord(a)
奇数题号答案
OscarsharesnowasecretkeywithAliceandBob.AliceandBobbothdon’tknowaboutitandthinktheyshareakeywitheachother.Oscarcannowdecrypt,read,andencryptanymessagesbetweenAliceandBobwithoutthemlearningaboutitifhecontinuestointerceptallencryptedmessages.
Thisistheinfamousman-in-the-middleattack.Thisattackis,inessence,responsibleforthingssuchascerti cates,public-keyinfrastructures,etc.
8.13
Computeβ:β=αdmodp.
Encrypt:(kE,y)=(αimodp,x·βimodp).d) 1modp.Decrypt:x=y(kE
1.
2.
3.
4.(kE,y)=(29,296),x=33(kE,y)=(125,301),x=33(kE,y)=(80,174),x=248
(kE,y)=(320,139),x=248
CausedbythepreviouslymentionedPRNG,beginningwithkM,n 1,kM,j 1caneasilycalculatedrecur-sivleythrough
kM,j 1=βij 1=βij f(j)=βij·β f(j)=kM,j 1·β f(j)modp8.15Oscarknowsxn,ynandn(byjustcountingthenumberofciphertexts).The rststepofapossibleattackistocalculate1kM,n=yn·x (13.3)nmodp.(13.4)
wherethevaluesofallvariablesareknown.WiththeknowledgeofkM,jforallj,Oscarisnowabletodecryptthewholeciphertextbysolvingtheusualdecryptionequation
1xj=yj·kM,jmodp(13.5)
8.17
1.Bychoosingadifferentsecretexponenti,theciphertextyofthesameplaintextxisdifferentevery-time.Evenifapairofplaintext/ciphertextiscompromised,suchapairwillmostlikelynotrepeatasecondtimeinanon-deterministicencryptionscheme!
2.Ingeneral,thereare#{2,3,···,p 2}=p 3differentvalidciphertextsforasingleplaintext.I.e.,wehave464differentpossibilitiesforp=467.
3.TheplainRSAcryptosystemisdeterministic.Aspeci cplaintextalwaysyieldsthesameciphertextassumingthesamepublicparameters.
ProblemsofChapter9
9.1a=2,b=2
4·23+27·22=4·8+27·4=32+108=140≡4=0mod17√17≈26,25q.e.d.9.317+1 2
9.5
1.ThepointsofEare
{(0,3),(0,4),(2,3),(2,4),(4,1),(4,6),(5,3),(5,4)}
2.Thegrouporderisgivenby
#G=#{O,(0,3),(0,4),(2,3),(2,4),(4,1),(4,6),(5,3),(5,4)}=9
相关推荐:
- [外语考试]管理学 第13章 沟通
- [外语考试]07、中高端客户销售流程--分类、筛选讲
- [外语考试]2015-2020年中国高筋饺子粉市场发展现
- [外语考试]“十三五”重点项目-汽车燃油表生产建
- [外语考试]雅培奶粉培乐系列适用年龄及特点
- [外语考试]九三学社入社申请人调查问卷
- [外语考试]等级薪酬体系职等职级表
- [外语考试]货物买卖合同纠纷起诉状(范本一)
- [外语考试]青海省实施消防法办法
- [外语考试]公交车语音自动报站系统的设计第3稿11
- [外语考试]logistic回归模型在ROC分析中的应用
- [外语考试]2017-2021年中国隔膜泵行业发展研究与
- [外语考试]神经内科下半年专科考试及答案
- [外语考试]园林景观设计规范标准
- [外语考试]2018八年级语文下册第一单元4合欢树习
- [外语考试]分布式发电及微网运行控制技术应用
- [外语考试]三人行历史学笔记:中世纪人文主义思想
- [外语考试]2010届高考复习5年高考3年联考精品历史
- [外语考试]挖掘机驾驶员安全生产责任书
- [外语考试]某211高校MBA硕士毕业论文开题报告(范
- 用三层交换机实现大中型企业VLAN方案
- 斯格配套系种猪饲养管理
- 涂层测厚仪厂家直销
- 研究生学校排行榜
- 鄱阳湖湿地景观格局变化及其驱动力分析
- 医学基础知识试题库
- 2010山西省高考历年语文试卷精选考试技
- 脉冲宽度法测量电容
- 谈高职院校ESP教师的角色调整问题
- 低压配电网电力线载波通信相关技术研究
- 余额宝和城市商业银行的转型研究
- 篮球行进间运球教案
- 气候突变的定义和检测方法
- 财经大学基坑开挖应急预案
- 高大支模架培训演示
- 一种改进的稳健自适应波束形成算法
- 2-3-鼎视通核心人员薪酬股权激励管理手
- 我国电阻焊设备和工艺的应用现状与发展
- MTK手机基本功能覆盖测试案例
- 七年级地理教学课件上册第四章第一节




