aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-09-05 19:55:04 +0000
committerChristian Grothoff <christian@grothoff.org>2015-09-05 19:55:04 +0000
commit537de3328e656911aa3c1c84e1ceb6bcaa8ab3d3 (patch)
tree90eea14ae876cf69c67ed9da658ce988132c4622
parentba292e84786ed42902a56cd03037ba7064b194fe (diff)
downloadgnunet-537de3328e656911aa3c1c84e1ceb6bcaa8ab3d3.tar.gz
gnunet-537de3328e656911aa3c1c84e1ceb6bcaa8ab3d3.zip
-more data
-rw-r--r--src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c15
-rwxr-xr-xsrc/scalarproduct/perf_scalarproduct.sh21
-rw-r--r--src/scalarproduct/scalarproduct.conf.in6
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,11 +40,20 @@
40 40
41/** 41/**
42 * Maximum allowed result value for the scalarproduct computation. 42 * Maximum allowed result value for the scalarproduct computation.
43 * DLOG will fail if the result is bigger. 43 * DLOG will fail if the result is bigger. At 1 million, the
44 * precomputation takes about 2s on a fast machine.
44 */ 45 */
45#define MAX_RESULT (1024 * 1024) 46#define MAX_RESULT (1024 * 1024)
46 47
47/** 48/**
49 * How many values should DLOG store in memory (determines baseline
50 * RAM consumption, roughly 100 bytes times the value given here).
51 * Should be about SQRT (MAX_RESULT), larger values will make the
52 * online computation faster.
53 */
54#define MAX_RAM (1024)
55
56/**
48 * An encrypted element key-value pair. 57 * An encrypted element key-value pair.
49 */ 58 */
50struct MpiElement 59struct MpiElement
@@ -1162,8 +1171,8 @@ run (void *cls,
1162 }; 1171 };
1163 1172
1164 cfg = c; 1173 cfg = c;
1165 edc = GNUNET_CRYPTO_ecc_dlog_prepare (MAX_RESULT /* max value */, 1174 edc = GNUNET_CRYPTO_ecc_dlog_prepare (MAX_RESULT,
1166 1024 /* RAM */); 1175 MAX_RAM);
1167 /* Select a random 'a' value for Alice */ 1176 /* Select a random 'a' value for Alice */
1168 GNUNET_CRYPTO_ecc_rnd_mpi (edc, 1177 GNUNET_CRYPTO_ecc_rnd_mpi (edc,
1169 &my_privkey, 1178 &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 @@
2# Computes a simple scalar product, with configurable vector size. 2# Computes a simple scalar product, with configurable vector size.
3# 3#
4# Some results (wall-clock for Alice+Bob, single-core, i7): 4# Some results (wall-clock for Alice+Bob, single-core, i7):
5# SIZE 2048-H(s) 2048-O(s) 1024-O(s) 5# SIZE 2048-H(s) 2048-O(s) 1024-O(s) ECC-2^20-H(s) ECC-2^28-H(s)
6# 25 10 14 3 6# 25 10 14 3 2 29
7# 50 17 21 5 7# 50 17 21 5 2 29
8# 100 32 39 7 8# 100 32 39 7 2 29
9# 200 77 13 9# 200 77 13 3 30
10# 400 149 23 10# 400 149 23 OOR 31
11# 800 304 32 11# 800 304 32 OOR 33
12
13# Bandwidth (including set intersection):
14# RSA-2048 ECC
15# 800: 3846 kb 70 kb
12# Configure benchmark size: 16# Configure benchmark size:
13SIZE=1600 17SIZE=800
14# 18#
15# Construct input vectors: 19# Construct input vectors:
16INPUTALICE="-k CCC -e '" 20INPUTALICE="-k CCC -e '"
@@ -54,4 +58,3 @@ gnunet-statistics $CFGBOB -s core | grep "bytes encrypted"
54echo "Terminating testbed..." 58echo "Terminating testbed..."
55# terminate the testbed 59# terminate the testbed
56kill $PID 60kill $PID
57
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
8UNIX_MATCH_UID = NO 8UNIX_MATCH_UID = NO
9UNIX_MATCH_GID = YES 9UNIX_MATCH_GID = YES
10#OPTIONS = -L DEBUG 10#OPTIONS = -L DEBUG
11#PREFIX = valgrind
12
11 13
12[scalarproduct-bob] 14[scalarproduct-bob]
13AUTOSTART = @AUTOSTART@ 15AUTOSTART = @AUTOSTART@
@@ -20,4 +22,6 @@ UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-service-scalarproduct-bob.sock
20#ACCEPT_FROM6 = ::1; 22#ACCEPT_FROM6 = ::1;
21UNIX_MATCH_UID = NO 23UNIX_MATCH_UID = NO
22UNIX_MATCH_GID = YES 24UNIX_MATCH_GID = YES
23#OPTIONS = -L DEBUG \ No newline at end of file 25#OPTIONS = -L DEBUG
26
27#PREFIX = valgrind