Security and Communication Networks / 2018 / Article / Alg 2

Research Article

A Vendor-Neutral Unified Core for Cryptographic Operations in GF(p) and GF() Based on Montgomery Arithmetic

Algorithm 2

Modified Miller-Rabin Primality Test.
Precomputation: (, with )
Input: (, , ,   )
Output: (, composite or probably prime)
;
;
for     from 1 to    do
;
;
;
if  orthen
continue;
for   fromtodo
;
;
if    then
return ( composite);
;
if    then
continue;
return ( composite);
return ( probably prime)

Article of the Year Award: Outstanding research contributions of 2020, as selected by our Chief Editors. Read the winning articles.