You need to have a strong foundation in rsa implementation and research ability.
Here is a fast algorithm that implements yd(modn): Let d = b1b2...bw be written in binary. Let y and
n be integers. Perform the following operation, and the variable r will have the value of yd(mod n).
r = 1;
for k = 1 to w
r = (r * r) mod n;
if (b[k] == 1) then r = (r * y) mod n;
Implementing this algorithm using the GMP library .
secret d. Try to &#64257;nd out the d using timing attack. You can measure time taken to carry out the above algorithm on your choices of y, n.
The executable rsaattack will take a number d in binary representation, such
as 11000101000. It outputs the statistical result of the timing analysis, and &#64257;nally output the secret
number d inferred from the analysis.
For example, you can use the following command to test your
To measure time of program execution, you can use C library functions times or clock.