From 537de3328e656911aa3c1c84e1ceb6bcaa8ab3d3 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 5 Sep 2015 19:55:04 +0000 Subject: -more data --- .../gnunet-service-scalarproduct-ecc_alice.c | 15 ++++++++++++--- src/scalarproduct/perf_scalarproduct.sh | 21 ++++++++++++--------- src/scalarproduct/scalarproduct.conf.in | 6 +++++- 3 files changed, 29 insertions(+), 13 deletions(-) diff --git a/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c b/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c index 4b17bafee..0e1f3ba6a 100644 --- a/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c +++ b/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c @@ -40,10 +40,19 @@ /** * Maximum allowed result value for the scalarproduct computation. - * DLOG will fail if the result is bigger. + * DLOG will fail if the result is bigger. At 1 million, the + * precomputation takes about 2s on a fast machine. */ #define MAX_RESULT (1024 * 1024) +/** + * How many values should DLOG store in memory (determines baseline + * RAM consumption, roughly 100 bytes times the value given here). + * Should be about SQRT (MAX_RESULT), larger values will make the + * online computation faster. + */ +#define MAX_RAM (1024) + /** * An encrypted element key-value pair. */ @@ -1162,8 +1171,8 @@ run (void *cls, }; cfg = c; - edc = GNUNET_CRYPTO_ecc_dlog_prepare (MAX_RESULT /* max value */, - 1024 /* RAM */); + edc = GNUNET_CRYPTO_ecc_dlog_prepare (MAX_RESULT, + MAX_RAM); /* Select a random 'a' value for Alice */ GNUNET_CRYPTO_ecc_rnd_mpi (edc, &my_privkey, diff --git a/src/scalarproduct/perf_scalarproduct.sh b/src/scalarproduct/perf_scalarproduct.sh index 6c7b4ad72..a7935873e 100755 --- a/src/scalarproduct/perf_scalarproduct.sh +++ b/src/scalarproduct/perf_scalarproduct.sh @@ -2,15 +2,19 @@ # Computes a simple scalar product, with configurable vector size. # # Some results (wall-clock for Alice+Bob, single-core, i7): -# SIZE 2048-H(s) 2048-O(s) 1024-O(s) -# 25 10 14 3 -# 50 17 21 5 -# 100 32 39 7 -# 200 77 13 -# 400 149 23 -# 800 304 32 +# SIZE 2048-H(s) 2048-O(s) 1024-O(s) ECC-2^20-H(s) ECC-2^28-H(s) +# 25 10 14 3 2 29 +# 50 17 21 5 2 29 +# 100 32 39 7 2 29 +# 200 77 13 3 30 +# 400 149 23 OOR 31 +# 800 304 32 OOR 33 + +# Bandwidth (including set intersection): +# RSA-2048 ECC +# 800: 3846 kb 70 kb # Configure benchmark size: -SIZE=1600 +SIZE=800 # # Construct input vectors: INPUTALICE="-k CCC -e '" @@ -54,4 +58,3 @@ gnunet-statistics $CFGBOB -s core | grep "bytes encrypted" echo "Terminating testbed..." # terminate the testbed kill $PID - diff --git a/src/scalarproduct/scalarproduct.conf.in b/src/scalarproduct/scalarproduct.conf.in index 558e60d04..c5149eeaf 100644 --- a/src/scalarproduct/scalarproduct.conf.in +++ b/src/scalarproduct/scalarproduct.conf.in @@ -8,6 +8,8 @@ UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-service-scalarproduct-alice.sock UNIX_MATCH_UID = NO UNIX_MATCH_GID = YES #OPTIONS = -L DEBUG +#PREFIX = valgrind + [scalarproduct-bob] AUTOSTART = @AUTOSTART@ @@ -20,4 +22,6 @@ UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-service-scalarproduct-bob.sock #ACCEPT_FROM6 = ::1; UNIX_MATCH_UID = NO UNIX_MATCH_GID = YES -#OPTIONS = -L DEBUG \ No newline at end of file +#OPTIONS = -L DEBUG + +#PREFIX = valgrind -- cgit v1.2.3