1

i have got a public key with (e,n) a encrypted data and have to get the plain text via RSA and that all in C!

first of all i want to know how to find out what my p and q are? i know they have to be prime numbers and p<>q!

4

1 回答 1

6

首先,因子 n。这并不难;因为 sqrt(3233) 是 56.8……,所以你只需要测试素数。这会给你p和q。使用这些来计算 (p-1)•(q-1)。

然后使用扩展欧几里得算法求 17 模 (p-1)•(q-1) 的乘法逆。您不需要 C 代码;我是手工做的。(该算法给出了否定的结果。您可以将其用于 d 或添加 (p-1)•(q-1) 以给出同样有效的正值。)

于 2013-05-14T18:17:40.883 回答