Journals
Publish with us
Publishing partnerships
About us
Blog
Security and Communication Networks
Journal overview
For authors
For reviewers
For editors
Table of Contents
Special Issues
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
or
then
continue
;
for
from
to
do
;
;
if
then
return
(
composite);
;
if
then
continue
;
return
(
composite);
return
(
probably prime)