密码学简答题及计算题(共5页).doc





《密码学简答题及计算题(共5页).doc》由会员分享,可在线阅读,更多相关《密码学简答题及计算题(共5页).doc(5页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、精选优质文档-倾情为你奉上简答题及计算题1.RSA算法中n11413,e7467,密文是5859,利用分解11413101113,求明文。解:显然,公钥e=7467,满足1e,且满足,通过公式求出,由解密算法得2.用C语言编写欧几里德算法的程序。#include unsigned int Gcd( unsigned int M, unsigned int N ) unsigned int Rem; while( N 0 ) Rem = M % N; M = N; N = Rem; return M; void main() int temp; int a,b; scanf(%d,&a); sc
2、anf(%d,&b); printf(the greatest common factor of %d and %d is ,a,b); printf(%dn,Gcd(a,b); 3.用欧几里德算法计算gcd(1024,888)。1024=888*1+136 gcd(888,136)888=136*6+72 gcd(136,72)136=72*1+64 gcd(72,64)72=64*1+8 gcd(64,8)64=8*8+0 gcd(8,0)gcd(1024,888)=84.利用欧拉定理可简化大指数的幂运算,计算21000 000 mod99gcd(2,99)=1(99)=(9*11)=(3
3、2*11)=9*(1-1/3)*11=66=16666*60+4021000 000 mod99*60+40 mod99240 mod9910244 mod99344mod99672mod99345.设Z2x的两个元a(x)=2x4+2,b(x)=x5+2,求gcda(x),b(x)=g(x),并找出s(x),t(x)使g(x)=s(x)a(x)+t(x)b(x)。x5+22x(2x4+2)+(2x+2)2x4+2(x3+2x2+x+2)(2x+2)+112x4+2-(x3+2x2+x+2)(2x+2) 2x4+2-(x3+2x2+x+2)(x5+2)-2x(2x4+2) (2x4+4x3+2
4、x2+4x+1)(2x4+2)+(2x3+x2+2x+1)(x5+2) (2x4+x3+2x2+x+1)(2x4+2)+(2x3+x2+2x+1)(x5+2)所以,g(x)=1,s(x)=2x4+x3+2x2+x+1,t(x)=2x3+x2+2x+1。6.(韩信点兵问题)有兵一队,若列成五行纵队,则末行一人;成六行纵队,则末行五人;成七行纵队,则末行四人;成十一行纵队,则末行十人,求兵数。x1mod5x5mod6x4mod7x10mod11m1 =5, m2 =6, m3 =7, m4 =11a1 =1, a2 =5, a3 =4, a4 =10M=5*6*7*11=2310M1 =6*7*1
5、1=462, M2 =5*7*11=385, M3 =5*6*11=330,M4 =5*6*7=210Mb1modm462b11mod5 b13mod5385b21mod6 b21mod6330b31mod7 b31mod7210b41mod11 b41mod111*3*462+5*1*385+4*1*330+1*10*2102111mod2310兵数2111mod2310。7.求置换的逆置换。6=(1 5 6 8 3 7 4 2)6的逆=(1 2 4 7 3 8 6 5)8.用维吉尼亚密码加密明文“please keep this message in secret”其中使用的密钥为“com
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 密码学 答题 算题

限制150内