Skip to main content
. 2019 Jun 27;19(13):2864. doi: 10.3390/s19132864
Algorithm 2: Montgomery Multiplication
Input: P¯=P×rmodN and Q¯=Q×rmodN where r=2n and n=log2N
Output: R¯=P×Q×rmodN
SP¯×Q¯
WS×Nmodr where N=N1modr
T(S+W×N)/r
if TN then((
|   T=TN
end
(
RT
Return (R¯)