Nikos Mavrogiannopoulos nmav@gnutls.org writes:
I've checked it a bit further. Would the following on top of nettle be equivalent? void ecc_point_zeroize (struct ecc_point *p) { memset(p->p, 0, 2*ecc_size(p->ecc)*sizeof(mp_limb_t)); /* or using ecc_size_a() be better here? */ }
void ecc_scalar_zeroize (struct ecc_scalar *s); { memset(s->p, 0, ecc_size(s->ecc)*sizeof(mp_limb_t)); }
I think that should work fine. And using ecc_size_a seems to be appropriate for the first function.
Then the only change needed in nettle would be for those sizes to be documented.
Right, it seems all three ecc_size* functions are undocumented, and at least ecc_size () and ecc_size_a () make sense for users.
Regards, /Niels