Cryptography Reference
In-Depth Information
int
introot_l (CLINT n_l, USHORT b, CLINT floor_l)
{
CLINT x_l, y_l, z_l, junk_l, max_l;
USHORT l;
if (0 == b)
{
return -1;
}
if (EQZ_L (n_l))
{
SETZERO_L (floor_l);
return E_CLINT_OK;
}
if (EQONE_L (n_l))
{
SETONE_L (floor_l);
return E_CLINT_OK;
}
if (1 == b)
{
assign_l (floor_l, n_l);
return E_CLINT_OK;
}
if (2 == b)
{
iroot_l (n_l, floor_l);
return E_CLINT_OK;
}
/* step 1: set x_l
2 ld_l(n_l)/b */
setmax_l (max_l);
l = ld_l (n_l)/b;
if (l*b != ld_l (n_l)) ++l;
SETZERO_L (x_l);
setbit_l (x_l, l);
Search WWH ::




Custom Search