Cryptography Reference
In-Depth Information
Estimate the number of prime numbers in the interval [ rmin_l , rmax_l ] , and store
the result in NoofCandidates_l .
udiv_l (rmin_l, ld_l (rmin_l), Pi_rmin_l, junk_l);
udiv_l (rmax_l, ld_l (rmax_l), Pi_rmax_l, junk_l);
sub_l (Pi_rmax_l, Pi_rmin_l, NoofCandidates_l);
Set rmin_l ( rmin_l 1) / 2
.
dec_l (rmin_l);
div_l (rmin_l, two_l, rmin_l, junk_l);
if (GTZ_L (junk_l))
{
inc_l (rmin_l);
}
Set rmax_l
( rmax_l 1) / 2
.
dec_l (rmax_l);
shr_l (rmax_l);
do
{
Test the breakoff condition for whether number of prime candidates has been re-
duced to zero. If this is the case, then no prime will be found within the given
boundary conditions. This is indicated by the error code E_CLINT_RGE .
if (EQZ_L (NoofCandidates_l))
{
return (E_CLINT_RGE);
}
Determination of a random number.
if (E_CLINT_OK != (error = RandMinMax_l (p_l, xrstate, rmin_l, rmax_l)))
{
return error;
Search WWH ::




Custom Search