"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "ecc-ecdsa-verify.c" between
nettle-3.7.1.tar.gz and nettle-3.7.2.tar.gz

About: Nettle is a low-level cryptographic library.

ecc-ecdsa-verify.c  (nettle-3.7.1):ecc-ecdsa-verify.c  (nettle-3.7.2)
skipping to change at line 105 skipping to change at line 105
/* FIXME: Micro optimizations: Either simultaneous multiplication. /* FIXME: Micro optimizations: Either simultaneous multiplication.
Or convert to projective coordinates (can be done without Or convert to projective coordinates (can be done without
division, I think), and write an ecc_add_ppp. */ division, I think), and write an ecc_add_ppp. */
/* Compute sinv */ /* Compute sinv */
ecc->q.invert (&ecc->q, sinv, sp, sinv + ecc->p.size); ecc->q.invert (&ecc->q, sinv, sp, sinv + ecc->p.size);
/* u1 = h / s, P1 = u1 * G */ /* u1 = h / s, P1 = u1 * G */
ecc_hash (&ecc->q, hp, length, digest); ecc_hash (&ecc->q, hp, length, digest);
ecc_mod_mul (&ecc->q, u1, hp, sinv, u1); ecc_mod_mul_canonical (&ecc->q, u1, hp, sinv, u1);
/* u2 = r / s, P2 = u2 * Y */ /* u2 = r / s, P2 = u2 * Y */
ecc_mod_mul (&ecc->q, u2, rp, sinv, u2); ecc_mod_mul_canonical (&ecc->q, u2, rp, sinv, u2);
/* Total storage: 5*ecc->p.size + ecc->mul_itch */ /* Total storage: 5*ecc->p.size + ecc->mul_itch */
ecc->mul (ecc, P2, u2, pp, u2 + ecc->p.size); ecc->mul (ecc, P2, u2, pp, u2 + ecc->p.size);
/* u = 0 can happen only if h = 0 or h = q, which is extremely /* u = 0 can happen only if h = 0 or h = q, which is extremely
unlikely. */ unlikely. */
if (!mpn_zero_p (u1, ecc->p.size)) if (!mpn_zero_p (u1, ecc->p.size))
{ {
/* Total storage: 7*ecc->p.size + ecc->mul_g_itch (ecc->p.size) */ /* Total storage: 7*ecc->p.size + ecc->mul_g_itch (ecc->p.size) */
ecc->mul_g (ecc, P1, u1, P1 + 3*ecc->p.size); ecc->mul_g (ecc, P1, u1, P1 + 3*ecc->p.size);
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)