Avoid constructing the huge integers explicitly. Maintain and , computing after each step.
In case (1), the nontrivial greatest common divisor is one of the prime factors . Divide by it, compute with the extended Euclidean algorithm, and return .
In case (2), . The preceding value satisfies . Cubing is a bijection on the residue classes modulo , so there is only one such cube root, namely the original plaintext . Therefore
For , the preceding value is ; a fixed point is its own plaintext. Keeping the previous iterate makes the recovery immediate once the RSA cycling attack succeeds.

Articles by others on the same topic (0)

There are currently no matching articles.