1

I'm following well with using the shifting method to try out the Montgomery reduction (1st round). However, the computed result is actually equal to:

$$XYR^{-1} \bmod N$$ while the final goal is to obtain the result of

$$XY \bmod N$$

In order to get the final answer, I need to implement an extra step which is

$$(XYR^{-1})(R \bmod N) \bmod N$$

However, What if the product of $(XYR^{-1})(R \bmod N)$ giving me the large integer number?

In this case, how should leverage the same shifting method Montgomery reduction engine until I can obtain the final $Z = XY \bmod N$?

If I repeat the same Montgomery Reduction 2nd round using the product of $(XYR^{-1})(R \bmod N)$, I will just get back the same answer as $(XYR^{-1})$.

May I know what are the missing steps above?

Pi-Turn
  • 93
  • 6

0 Answers0