所以我有一个问题,我今天早上刚刚学会了如何使用以下变量制作RSA加密器/解密:
p = 5,
q = 11,
n = 55,
PHI = 40,
e = 11,
d = 11
当我输入它时(BTW这是JAVA):
public void draw() {
int p = 5, q = 11, n = 55, PHI = 40, e = 11, d = 11;
Scanner in = new Scanner(System.in);
message = in.nextInt();
println(' ');
ecripted_message = Math.pow(message, e);// m^3
ecripted_message %= n;
println("This is the ecripted message " + ecripted_message);
println(' ');
message = Math.pow(ecripted_message, d);
message %= n;
println(' ');
println("This is the origanal message " + message);
}
但是当我输入三个以上的东西时,我会在我的控制台中输入:
1
This is the ecripted message 1.0
This is the origanal message 1.0
2
This is the ecripted message 13.0
This is the origanal message 2.0
3
This is the ecripted message 47.0
This is the origanal message 24.0
请记住,我是一个非常不满意的程序员,而且我比较新。