Cryptography Reference
In-Depth Information
return 1;
}
else
{
return 0;
}
}
Step 2: Remove the even part of bb_l .
if (ISEVEN_L (aa_l) && ISEVEN_L (bb_l))
{
return 0;
}
cpy_l (a_l, aa_l);
cpy_l (b_l, bb_l);
v = twofact_l (b_l, b_l);
if ((v & 1) == 0)
/* v even? */
{
k=1;
}
else
{
k = tab2[*LSDPTR_L (a_l) & 7];
/* *LSDPTR_L (a_l)&7==a_l%8*/
}
Step 3: If a_l =0 , then we are done. Otherwise, the even part of a_l is removed.
while (GTZ_L (a_l))
{
v = twofact_l (a_l, a_l);
if((v&1)!=0)
{
k = tab2[*LSDPTR_L (b_l) & 7];
}
Step 4: Application of the quadratic reciprocity law.
if (*LSDPTR_L (a_l) & *LSDPTR_L (b_l) & 2)
{
k = -k;
}
Search WWH ::




Custom Search