diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-12-07 14:37:44 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-12-07 14:37:44 +0100 |
commit | a6b9d2e1879a4072dbece09f37d3bec672ec4a09 (patch) | |
tree | bc2bef9a206e070dbb1cbcf90870862feebc0ffe /src/util/crypto_pow.c | |
parent | 7bb0b3291244286a114e652949a181e31f70364f (diff) | |
download | gnunet-a6b9d2e1879a4072dbece09f37d3bec672ec4a09.tar.gz gnunet-a6b9d2e1879a4072dbece09f37d3bec672ec4a09.zip |
fix #3795/5968/5398
Diffstat (limited to 'src/util/crypto_pow.c')
-rw-r--r-- | src/util/crypto_pow.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/util/crypto_pow.c b/src/util/crypto_pow.c index af6837e03..be575e537 100644 --- a/src/util/crypto_pow.c +++ b/src/util/crypto_pow.c | |||
@@ -27,8 +27,6 @@ | |||
27 | #include "gnunet_crypto_lib.h" | 27 | #include "gnunet_crypto_lib.h" |
28 | #include <gcrypt.h> | 28 | #include <gcrypt.h> |
29 | 29 | ||
30 | /* FIXME: change to 1 for #3795 / 0.12! */ | ||
31 | #define NEW_CRYPTO 0 | ||
32 | 30 | ||
33 | /** | 31 | /** |
34 | * Calculate the 'proof-of-work' hash (an expensive hash). | 32 | * Calculate the 'proof-of-work' hash (an expensive hash). |
@@ -46,7 +44,6 @@ GNUNET_CRYPTO_pow_hash (const char *salt, | |||
46 | size_t buf_len, | 44 | size_t buf_len, |
47 | struct GNUNET_HashCode *result) | 45 | struct GNUNET_HashCode *result) |
48 | { | 46 | { |
49 | #if NEW_CRYPTO | ||
50 | struct GNUNET_CRYPTO_SymmetricInitializationVector iv; | 47 | struct GNUNET_CRYPTO_SymmetricInitializationVector iv; |
51 | struct GNUNET_CRYPTO_SymmetricSessionKey skey; | 48 | struct GNUNET_CRYPTO_SymmetricSessionKey skey; |
52 | char rbuf[buf_len]; | 49 | char rbuf[buf_len]; |
@@ -81,17 +78,6 @@ GNUNET_CRYPTO_pow_hash (const char *salt, | |||
81 | 2 /* iterations; keep cost of individual op small */, | 78 | 2 /* iterations; keep cost of individual op small */, |
82 | sizeof(struct GNUNET_HashCode), | 79 | sizeof(struct GNUNET_HashCode), |
83 | result)); | 80 | result)); |
84 | #else | ||
85 | GNUNET_break (0 == gcry_kdf_derive (buf, | ||
86 | buf_len, | ||
87 | GCRY_KDF_SCRYPT, | ||
88 | 1 /* subalgo */, | ||
89 | salt, | ||
90 | strlen (salt), | ||
91 | 2 /* iterations; keep cost of individual op small */, | ||
92 | sizeof(struct GNUNET_HashCode), | ||
93 | result)); | ||
94 | #endif | ||
95 | } | 81 | } |
96 | 82 | ||
97 | 83 | ||