"Fossies" - the Fresh Open Source Software Archive  

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

About: Nettle is a low-level cryptographic library.

ecc-mul-m.c  (nettle-3.7.1):ecc-mul-m.c  (nettle-3.7.2)
skipping to change at line 51 skipping to change at line 51
#include "ecc-internal.h" #include "ecc-internal.h"
void void
ecc_mul_m (const struct ecc_modulo *m, ecc_mul_m (const struct ecc_modulo *m,
mp_limb_t a24, mp_limb_t a24,
unsigned bit_low, unsigned bit_high, unsigned bit_low, unsigned bit_high,
mp_limb_t *qx, const uint8_t *n, const mp_limb_t *px, mp_limb_t *qx, const uint8_t *n, const mp_limb_t *px,
mp_limb_t *scratch) mp_limb_t *scratch)
{ {
unsigned i; unsigned i;
mp_limb_t cy, swap; mp_limb_t swap;
#define x2 (scratch) #define x2 (scratch)
#define z2 (scratch + m->size) #define z2 (scratch + m->size)
#define x3 (scratch + 2*m->size) #define x3 (scratch + 2*m->size)
#define z3 (scratch + 3*m->size) #define z3 (scratch + 3*m->size)
/* Formulas from RFC 7748: /* Formulas from RFC 7748:
A = x_2 + z_2 A = x_2 + z_2
AA = A^2 AA = A^2
skipping to change at line 165 skipping to change at line 165
ecc_mod_sub (m, B, x2, z2); ecc_mod_sub (m, B, x2, z2);
ecc_mod_sqr (m, AA, A, tp); ecc_mod_sqr (m, AA, A, tp);
ecc_mod_sqr (m, BB, B, tp); ecc_mod_sqr (m, BB, B, tp);
ecc_mod_mul (m, x2, AA, BB, tp); ecc_mod_mul (m, x2, AA, BB, tp);
ecc_mod_sub (m, E, AA, BB); ecc_mod_sub (m, E, AA, BB);
ecc_mod_addmul_1 (m, AA, E, a24); ecc_mod_addmul_1 (m, AA, E, a24);
ecc_mod_mul (m, z2, E, AA, tp); ecc_mod_mul (m, z2, E, AA, tp);
} }
assert (m->invert_itch <= 7 * m->size); assert (m->invert_itch <= 7 * m->size);
m->invert (m, x3, z2, z3 + m->size); m->invert (m, x3, z2, z3 + m->size);
ecc_mod_mul (m, z3, x2, x3, z3); ecc_mod_mul_canonical (m, qx, x2, x3, z3);
cy = mpn_sub_n (qx, z3, m->m, m->size);
cnd_copy (cy, qx, z3, m->size);
} }
 End of changes. 2 change blocks. 
4 lines changed or deleted 2 lines changed or added

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