您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 其它文档 > 现代密码学_清华大学_杨波着+习题答案
字母ABCDEFGHIJKLMNOPQRSTUVWXYZ数字012345678910111213141516171819202122232425设A,可求得A状态(a1,a2,a3,a4)f(a1,a2,a3,a4)输出字母ABCDEFGHIJKLMNOPQRSTUVWXYZ数字012345678910111213141516171819202122232425设A,可求得A状态(a1,a2,a3,a4)f(a1,a2,a3,a4)输出(1,1,0,1)11(1,0,1,1)11(0,1,1,1)10(1,1,1,1)01(1,1,1,0)11(1,1,0,1)11………am11amc2am1Lcma1248163264727677k18519116351203511821723字母ABCDEFGHIJKLMNOPQRSTUVWXYZ数字012345678910111213141516171819202122232425设A,可求得A状态(a1,a2,a3,a4)f(a1,a2,a3,a4)输出(1,1,0,1)11(1,0,1,1)11(0,1,1,1)10(1,1,1,1)01(1,1,1,0)11(1,1,0,1)11………am11am248163264727677k18519116351203511821723字母ABCDEFGHIJKLMNOPQRSTUVWXYZ数字012345678910111213141516171819202122232425设A,可求得Af(a1,a2,a3,a4)输出(1,1,0,1)11(1,0,1,1)11(0,1,1,1)10(1,1,1,1)01(1,1,1,0)11(1,1,0,1)11字母ABCDEFGHIJKLMNOPQRSTUVWXYZ数字012345678910111213141516171819202122232425设A,可求得Af(a1,a2,a3,a4)输出(1,1,0,1)11(1,0,1,1)11(0,1,1,1)10(1,1,1,1)01(1,1,1,0)11(1,1,0,1)11字母ABCDEFGHIJKLMNOPQRSTUVWXYZ数字012345678910111213141516171819202122232425设A,f(a1,a2,a3,a4)输出(1,1,0,1)11(1,0,1,1)11(0,1,1,1)10(1,1,1,1)01(1,1,1,0)11(1,1,0,1)11字母ABCDEFGHIJKLMNOPQRSTUVWXYZ数字012345678910111213141516171819202122232425设A,f(a1,a2,a3,a4)输出(1,1,0,1)11(1,0,1,1)11(0,1,1,1)10字母ABCDEFGHIJKLMNOPQRSTUVWXYZ数字012345678910111213141516171819202122232425设A,f(a1,a2,a3,a4)输出(1,1,0,1)11(1,0,1,1)11NCUT密码学–习题与答案2010(声明:非标准答案,仅供参考)一、古典密码(1,2,4)1.设仿射变换的加密是E11,23(m)≡11m+23(mod26),对明文“THENATIONALSECURITYAGENCY”加密,并使用解密变换D11,23(c)≡11-1(c-23)(mod26)验证你的加密结果。解:明文用数字表示:M=[19741301981413011184220178192406413224]密文C=E11,23(M)≡11*M+23(mod26)=[24221510232472110231413151992724123111510191]=YWPKXYHVKXONPTJCHYBXLPKTB∵11*19≡1mod26(说明:求模逆可采用第4章的“4.1.6欧几里得算法”,或者直接穷举1~25)∴解密变换为D(c)≡19*(c-23)≡19c+5(mod26)对密文C进行解密:M’=D(C)≡19C+5(mod26)=[19741301981413011184220178192406413224]=THENATIONALSECURITYAGENCY2.设由仿射变换对一个明文加密得到的密文为edsgickxhuklzveqzvkxwkzukvcuh,又已知明文的前两个字符是“if”。对该密文解密。解:设解密变换为m=D(c)≡a*c+b(mod26)由题目可知密文ed解密后为if,即有:D(e)=i:8≡4a+b(mod26)D(d)=f:5≡3a+b(mod26)由上述两式,可求得a=3,b=22。因此,解密变换为m=D(c)≡3c+22(mod26)密文用数字表示为:c=[4318682102372010112521416252110232210252010212207]则明文为m=3*c+22(mod26)=[85241420201317403197818197013100194072417]=ifyoucanreadthisthankateahcer4.设多表代换密码Ci≡AMi+B(mod26)中,A是2×2矩阵,B是0矩阵,又知明文“dont”被加密为“elni”,求矩阵A。解:dont=(3,14,13,19)=elni=(4,11,13,8)abcd则有:4ab313ab1311cd14(mod26),8cd19(mod26)1013923第1页字母ABCDEFGHIJKLMNO数字01234567891011121314设A,可求得A状态(a1,a2,a3,a4)f(a1,a2,a3,a4)输出(1,1,0,1)11(1,0,1,1)11(0,1,1,1)10(1,1,1,1)01(1,1,1,0)11(1,1,0,1)11字母ABCDEFGHIJKLMN数字012345678910111213字母ABCDEFGHIJKLMNOPQRSTUVWXYZ数字012345678910111213141516171819202122232425设A,可求得A状态(a1,a2,a3,a4)f(a1,a2,a3,a4)输出(1,1,0,1)11(1,0,1,1)11(0,1,1,1)10(1,1,1,1)01(1,1,1,0)11(1,1,0,1)11………am11amc2am1Lcma1c2j10am21am12am248163264727677k160mod2211851911635120351182172318.椭圆曲线E11(1,6)表示y≡x+x+6mod11,求0123456789103x+x+6mod1168538484974是否为mod11NoNoyesyesNoyesNoyesyesNoyes字母ABCDEFGHIJKLMNOPQRSTUVWXYZ数字012345678910111213141516171819202122232425设A,可求得Af(a1,a2,a3,a4)输出(1,1,0,1)11(1,0,1,1)11(0,1,1,1)10(1,1,1,1)01(1,1,1,0)11(1,1,0,1)11………NCUT密码学–习题与答案2010二、流密码(1,3,4)1.3级线性反馈移位寄存器在c3=1时可有4种线性反馈函数,设其初始状态为(a1,a2,a3)=(1,0,1),求各线性反馈函数的输出序列及周期。解:设反馈函数为f(a1,a2,a3)=a1⊕c2a2⊕c1a3当c1=0,c2=0时,f(a1,a2,a3)=a1,输出序列为101101…,周期为3。当c1=0,c2=1时,f(a1,a2,a3)=a1⊕a2,输出序列如下10111001011100…,周期为7。当c1=1,c2=0时,f(a1,a2,a3)=a1⊕a3,输出序列为10100111010011…,周期为7。当c1=1,c2=1时,f(a1,a2,a3)=a1⊕a2⊕a3,输出序列为10101010…,周期为2。3.设n=4,f(a1,a2,a3,a4)=a1⊕a4⊕1⊕a2a3,初始状态为(a1,a2,a3,a4)=(1,1,0,1),求此非线性反馈移位寄存器的输出序列及周期。解:列出该非线性反馈移位寄存器的状态列表和输出列表:因此,输出序列为1101111011…,周期为5。4.密钥流由m=2s级的LFSR产生,前m+2个比特是(01)s+1,即s+1个01,请问第m+3个比特有无可能是1,为什么?解:根据题目条件,可知初始状态s0为:s0(a1,a2,L,am1,am)(0,1,...,0,1)设该LFSR的输出序列满足如下递推关系:amkc1amk1c2am1Lcmak,则第m+1,m+2个比特为:注:s个01k1scj1sccLcj1而第m+3比特应为:am3c1am2c2am1c3amc4am1Lcm1a4cma3c11c20c31c40LLcm11cm0sj1即第m+3比特为0,因此不可能为1.M的散列值相同。第2页字母ABCDEFGH数字01234567字母ABCDEFG字母ABCDEF字母A字母ABCDEFGHIJKLMNOPQRSTUVWXYZ数字012345678910111213141516171819202122232425设A,可求得A状态(a1,a2,a3,a4)f(a1,a2,a3,a4)输出(1,1,0,1)11(1,0,1,1)11(0,1,1,1)10(1,1,1,1)01(1,1,1,0)11(1,1,0,1)11………am11amc2am1Lcma1c2j10am21am12amma2c2j1248163264727677k160mod2211851911635120351182172318.椭圆曲线E11(1,6)表示y≡x+x+6mod11,求其上的所有点。0123456789103x+x+6mod1168538484974是否为mod11的NoNoyesyesNoyesNoyesyesNoyes字母A字母AB字母ABCDEFGHIJKLMNOPQRSTUVWXYZ数字0123456789101112131415161718192021
本文标题:现代密码学_清华大学_杨波着+习题答案
链接地址:https://www.777doc.com/doc-5382341 .html