Hello,

I've noticed the following typical code sequence:

ecc_modp_mul(ecc, t, x, y);
cy = mpn_sub_n(dest, t, ecc->p.m, ecc->p.size);
cnd_copy(cy, dest, t, ecc->p.size);

What is the benefit of this piece of code over the following one?

ecc_modp_mul(ecc, t, x, y);
memcpy(dest, t, ecc->p.size * sizeof(mp_limb_t));

Does mpn_sun_n/cnd_copy add any form of side channel attach protection?

-- 
With best wishes
Dmitry
_______________________________________________
nettle-bugs mailing list
[email protected]
http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs

Reply via email to