[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r37467 - in gnunet/src: include scalarproduct util
From: |
gnunet |
Subject: |
[GNUnet-SVN] r37467 - in gnunet/src: include scalarproduct util |
Date: |
Wed, 6 Jul 2016 15:25:24 +0200 |
Author: grothoff
Date: 2016-07-06 15:25:24 +0200 (Wed, 06 Jul 2016)
New Revision: 37467
Modified:
gnunet/src/include/gnunet_crypto_lib.h
gnunet/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c
gnunet/src/util/crypto_ecc_dlog.c
Log:
fix dlog API for mteich
Modified: gnunet/src/include/gnunet_crypto_lib.h
===================================================================
--- gnunet/src/include/gnunet_crypto_lib.h 2016-07-06 11:37:42 UTC (rev
37466)
+++ gnunet/src/include/gnunet_crypto_lib.h 2016-07-06 13:25:24 UTC (rev
37467)
@@ -1030,7 +1030,7 @@
void
GNUNET_CRYPTO_kdf_mod_mpi (gcry_mpi_t *r,
gcry_mpi_t n,
- const void *xts, size_t xts_len,
+ const void *xts, size_t xts_len,
const void *skm, size_t skm_len,
const char *ctx);
@@ -1348,7 +1348,7 @@
*
* @param max maximum value the factor can be
* @param mem memory to use (should be smaller than @a max), must not be zero.
- * @return @a max if dlog failed, otherwise the factor
+ * @return NULL on error
*/
struct GNUNET_CRYPTO_EccDlogContext *
GNUNET_CRYPTO_ecc_dlog_prepare (unsigned int max,
@@ -1361,7 +1361,7 @@
*
* @param dlc precalculated values, determine range of factors
* @param input point on the curve to factor
- * @return `dlc->max` if dlog failed, otherwise the factor
+ * @return INT_MAX if dlog failed, otherwise the factor
*/
int
GNUNET_CRYPTO_ecc_dlog (struct GNUNET_CRYPTO_EccDlogContext *edc,
Modified: gnunet/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c
===================================================================
--- gnunet/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c
2016-07-06 11:37:42 UTC (rev 37466)
+++ gnunet/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c
2016-07-06 13:25:24 UTC (rev 37467)
@@ -472,7 +472,7 @@
ai_bi = GNUNET_CRYPTO_ecc_dlog (edc,
g_ai_bi);
gcry_mpi_point_release (g_ai_bi);
- if (MAX_RESULT == ai_bi)
+ if (INT_MAX == ai_bi)
{
/* result too big */
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
Modified: gnunet/src/util/crypto_ecc_dlog.c
===================================================================
--- gnunet/src/util/crypto_ecc_dlog.c 2016-07-06 11:37:42 UTC (rev 37466)
+++ gnunet/src/util/crypto_ecc_dlog.c 2016-07-06 13:25:24 UTC (rev 37467)
@@ -151,7 +151,7 @@
*
* @param max maximum value the factor can be
* @param mem memory to use (should be smaller than @a max), must not be zero.
- * @return @a max if dlog failed, otherwise the factor
+ * @return NULL on error
*/
struct GNUNET_CRYPTO_EccDlogContext *
GNUNET_CRYPTO_ecc_dlog_prepare (unsigned int max,
@@ -219,7 +219,7 @@
*
* @param edc precalculated values, determine range of factors
* @param input point on the curve to factor
- * @return `edc->max` if dlog failed, otherwise the factor
+ * @return INT_MAX if dlog failed, otherwise the factor
*/
int
GNUNET_CRYPTO_ecc_dlog (struct GNUNET_CRYPTO_EccDlogContext *edc,
@@ -237,7 +237,7 @@
GNUNET_assert (NULL != g);
q = gcry_mpi_point_new (0);
- res = edc->max;
+ res = INT_MAX;
for (i=0;i<=edc->max/edc->mem;i++)
{
if (0 == i)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r37467 - in gnunet/src: include scalarproduct util,
gnunet <=