"Fossies" - the Fresh Open Source Software Archive

Source code changes of the file "ecc-mul-m.c" betweennettle-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 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);