diff options
Diffstat (limited to 'src/util/gnunet-scrypt.c')
-rw-r--r-- | src/util/gnunet-scrypt.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/util/gnunet-scrypt.c b/src/util/gnunet-scrypt.c index aa64144a8..136c6debb 100644 --- a/src/util/gnunet-scrypt.c +++ b/src/util/gnunet-scrypt.c | |||
@@ -26,6 +26,13 @@ | |||
26 | #include "gnunet_util_lib.h" | 26 | #include "gnunet_util_lib.h" |
27 | #include <gcrypt.h> | 27 | #include <gcrypt.h> |
28 | 28 | ||
29 | |||
30 | /** | ||
31 | * Salt for PoW calcualations. | ||
32 | */ | ||
33 | static struct GNUNET_CRYPTO_PowSalt salt = { "gnunet-nse-proof" }; | ||
34 | |||
35 | |||
29 | /** | 36 | /** |
30 | * Amount of work required (W-bit collisions) for NSE proofs, in collision-bits. | 37 | * Amount of work required (W-bit collisions) for NSE proofs, in collision-bits. |
31 | */ | 38 | */ |
@@ -117,7 +124,7 @@ find_proof (void *cls) | |||
117 | while ((counter != UINT64_MAX) && (i < ROUND_SIZE)) | 124 | while ((counter != UINT64_MAX) && (i < ROUND_SIZE)) |
118 | { | 125 | { |
119 | GNUNET_memcpy (buf, &counter, sizeof(uint64_t)); | 126 | GNUNET_memcpy (buf, &counter, sizeof(uint64_t)); |
120 | GNUNET_CRYPTO_pow_hash ("gnunet-nse-proof", | 127 | GNUNET_CRYPTO_pow_hash (&salt, |
121 | buf, | 128 | buf, |
122 | sizeof(buf), | 129 | sizeof(buf), |
123 | &result); | 130 | &result); |