密码学简答题及计算题.docVIP

  • 521
  • 0
  • 约3.42千字
  • 约 5页
  • 2016-10-20 发布于重庆
  • 举报
密码学简答题及计算题

简答题及计算题 1.RSA算法中n=11413,e=7467,密文是5859,利用分解11413=101×113,求明文。 解: 显然,公钥e=7467,满足1<e<,且满足,通过公式求出, 由解密算法得 2.用C语言编写欧几里德算法的程序。 #includestdio.h   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));    }φ(99)=φ(9*11)=φ(32*11)=9*(1-1/3)*11=66 1000000=16666*60+40 21000 000 mod99≡216666*60+40 mod99≡240 mod99≡10244 mod99≡344mod99≡672mo

文档评论(0)

1亿VIP精品文档

相关文档