RSA算法C程序bug [英] RSA algorithm C program bug
本文介绍了RSA算法C程序bug的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨亲爱的朋友们,
我正在为RSA Algoritm实施寻找一个好的C程序,但是我目前的程序是错误的
例如:当我根据RSA提供两个素数(p& q)为11和3
和公钥(e)为5
时我得到了错误的答案
请帮我纠正这个问题我的代码是:
Hi Dear Friends,
I am looking for a good C program for RSA Algoritm implementation, but my current program is buggy
eg: when I give two prime numbers(p&q) as 11 and 3
and public key (e) as 5
according to RSA i got wrong answer
please help me to correct this issue My code is:
展开 | 选择 | Wrap | 行号
推荐答案
你期望第52行(d +++;)做什么?
What do you expect line 52 (d+++;) to do?
亲爱的Donbock,
对不起我t'的d ++ //递增操作。
请在代码中告知我给出的好的方式
谢谢,
Anes
Dear Donbock,
Sorry it''s d++ //increment operation.
Please advise in code i given in good manner
Thanks,
Anes
对于(p,q)=(11,3),n = 33且phi(n)= 20。这与您的程序报告的内容相符吗?
e = 5不是可接受的值,因为5和phi(n)不是互质的;那就是gcd(5,20)!= 1.
gcd是最大的共同点。
For (p,q) = (11,3), n=33 and phi(n)=20. Does that match what your program reported?
e=5 is not an acceptable value because 5 and phi(n) are not coprime; that is gcd(5,20) != 1.
Where gcd is greatest-common-denominator.
这篇关于RSA算法C程序bug的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文