aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nse/gnunet-service-nse.c2
-rw-r--r--src/nse/nse.conf.in23
-rw-r--r--src/nse/perf_kdf.c2
3 files changed, 19 insertions, 8 deletions
diff --git a/src/nse/gnunet-service-nse.c b/src/nse/gnunet-service-nse.c
index 2b7b3f8ee..d427602d1 100644
--- a/src/nse/gnunet-service-nse.c
+++ b/src/nse/gnunet-service-nse.c
@@ -492,7 +492,7 @@ pow_hash (const void *buf,
492{ 492{
493 GNUNET_break (0 == 493 GNUNET_break (0 ==
494 gcry_kdf_derive (buf, buf_len, 494 gcry_kdf_derive (buf, buf_len,
495 GCRY_KDF_PBKDF2 /* FIX: use SCRYPT! */, 495 GCRY_KDF_SCRYPT,
496 1 /* subalgo */, 496 1 /* subalgo */,
497 "gnunet-proof-of-work", strlen ("gnunet-proof-of-work"), 497 "gnunet-proof-of-work", strlen ("gnunet-proof-of-work"),
498 2 /* iterations; keep cost of individual op small */, 498 2 /* iterations; keep cost of individual op small */,
diff --git a/src/nse/nse.conf.in b/src/nse/nse.conf.in
index 84bbef5c5..64e07945e 100644
--- a/src/nse/nse.conf.in
+++ b/src/nse/nse.conf.in
@@ -11,18 +11,29 @@ UNIX_MATCH_UID = NO
11UNIX_MATCH_GID = YES 11UNIX_MATCH_GID = YES
12PROOFFILE = $SERVICEHOME/.nse-proof 12PROOFFILE = $SERVICEHOME/.nse-proof
13 13
14# The directory where the NSE services logs timestamps everytime a size estime 14# The directory where the NSE services logs timestamps everytime
15# flooding message is received 15# a size estime flooding message is received
16# This option is only used for benchmarking, not in production.
16HISTOGRAM_DIR = $SERVICEHOME 17HISTOGRAM_DIR = $SERVICEHOME
17 18
18# How 'slowly' should the proof-of-work be constructed (delay 19# How 'slowly' should the proof-of-work be constructed (delay
19# between rounds); sane values between 0 and ~1000. 20# between rounds); sane values between 0 and ~1000.
21# It should rarely make sense to change this value.
22# Only systems with slow CPUs where 5ms is a long time might
23# want it to be reduced.
20WORKDELAY = 5 ms 24WORKDELAY = 5 ms
21 25
22# Note: changing any of the values below will make this peer 26# Note: changing any of the values below will make this peer
23# completely incompatible with other peers! 27# completely incompatible with other peers!
28
29# How often do peers exchange network size messages?
30# Note that all peers MUST use the same interval.
31# DO NOT CHANGE THIS VALUE, doing so will break the protocol!
24INTERVAL = 1 h 32INTERVAL = 1 h
25# 26 is about 100 minutes on a modern i7 (single-core) for PBKDF2; 33
26# need to re-calibrate once we have SCRYPT! 34# 2^22 hash operations take about 2-3h on a modern i7 (single-core)
27WORKBITS = 26 35# for SCRYPT; with 2ms/op and 5ms workdelay, we can expect
36# the POW calculation to be done by a high-end peer in about 6h
37# DO NOT CHANGE THIS VALUE, doing so will break the protocol!
38WORKBITS = 22
28 39
diff --git a/src/nse/perf_kdf.c b/src/nse/perf_kdf.c
index e462c129f..fbc846ac2 100644
--- a/src/nse/perf_kdf.c
+++ b/src/nse/perf_kdf.c
@@ -45,7 +45,7 @@ pow_hash (const void *buf,
45{ 45{
46 GNUNET_break (0 == 46 GNUNET_break (0 ==
47 gcry_kdf_derive (buf, buf_len, 47 gcry_kdf_derive (buf, buf_len,
48 GCRY_KDF_PBKDF2 /* FIX: use SCRYPT! */, 48 GCRY_KDF_SCRYPT,
49 1 /* subalgo */, 49 1 /* subalgo */,
50 "gnunet-proof-of-work", strlen ("gnunet-proof-of-work"), 50 "gnunet-proof-of-work", strlen ("gnunet-proof-of-work"),
51 2 /* iterations; keep cost of individual op small */, 51 2 /* iterations; keep cost of individual op small */,