- 67
- 0
- 约4.06千字
- 约 5页
- 2021-11-01 发布于广东
- 举报
密码学简答题及计算题
密码学简答题及计算题
PAGE PAGE 5
PAGE 5
密码学简答题及计算题
简答题及计算题
算法中n=11413,e=7467,密文是5859,利用分解11413=101×113,求明文。
解:
显然,公钥e=7467,满足1<e<,且满足,通过公式求出,
由解密算法得
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);
scanf(%d,b);
printf(the greatest common factor of %d and %d is ,a,b);
printf(%d\n,Gcd(a,b));
}
3.用欧几里德算法计算gcd(1024,888)。
1024=888*1+136 gcd(888,136)
888=
原创力文档

文档评论(0)