summaryrefslogtreecommitdiff
path: root/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c')
-rw-r--r--src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c b/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c
index 59f422f9e..b5c49e85d 100644
--- a/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c
+++ b/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c
@@ -591,8 +591,9 @@ send_alices_cryptodata_message (struct AliceServiceSession *s)
/* r_i = random() mod n */
GNUNET_CRYPTO_ecc_random_mod_n (&r_i);
/* g_i = g^{r_i} */
- GNUNET_CRYPTO_ecc_dexp_mpi (&r_i,
- &g_i);
+ GNUNET_assert (GNUNET_OK ==
+ GNUNET_CRYPTO_ecc_dexp_mpi (&r_i,
+ &g_i));
/* r_ia = r_i * a */
crypto_core_ed25519_scalar_mul (&r_ia.v[0],
&r_i.v[0],
@@ -602,9 +603,9 @@ send_alices_cryptodata_message (struct AliceServiceSession *s)
int64_t val = s->sorted_elements[i].value;
struct GNUNET_CRYPTO_EccScalar vali;
- r_ia_ai = r_ia;
GNUNET_CRYPTO_ecc_scalar_from_int (val > 0 ? val : -val,
&vali);
+ r_ia_ai = r_ia;
if (val > 0)
sodium_add (r_ia_ai.v,
vali.v,