Marcel Keller | 4 Aug 14:28
Picon
Picon

[Fwd: [PATCH 1 of 1] Added computation-id option]


-------- Original Message --------
Subject: [PATCH 1 of 1] Added computation-id option
Date: Wed, 04 Aug 2010 12:17:43 -0000
From: Thomas P Jakobsen <tpj <at> cs.au.dk>
To: mkeller <at> cs.au.dk
CC: ttoft <at> cs.au.dk
References: <patchbomb.1280924262 <at> dhcp-11-67-32.daimi.au.dk>

# HG changeset patch
# User Tomas Toft <ttoft <at> cs.au.dk>
# Date 1280227043 -7200
# Node ID 7c45463151f482ff75bbd877dad3509e8f9cb3c9
# Parent  e7b2fe7eb75319e2f60cc292b0d68fe568d394ab
Added computation-id option.

This changeset adds a command line option to VIFF allowing users to
specify a computation id.

Prior to this changeset, any computation involving pseudo-random
secret sharing (which for the time being boils down to computations
done with the PassiveRuntime) could only be run one time using the
same set of VIFF player configuration files. If more than one
computation was executed with the same set of configuration files, the
security of the system would be broken.

With this changeset, multiple computations can be run securely with
the same set of configuration files as long as each computation is run
with a unique computation id.

(Continue reading)

Thomas P Jakobsen | 13 Apr 20:15
Picon
Picon

[PATCH 0 of 1] Command line arguments for host and port.

Here's a patch that allows users to specify player host and port
numbers via the command line.

If theres no objections, I'll push this change into VIFF in a couple
of days.

Regards,
Thomas
Thomas P Jakobsen | 20 Jan 08:56
Picon
Picon

[PATCH] Added option to avoid retrying to connect if socket is already in use

# HG changeset patch
# User Thomas P Jakobsen <tpj <at> cs.au.dk>
# Date 1263974081 -3600
# Node ID 2324d01c74e2c35b5bb6cb4d7bda1304a376b066
# Parent  efa1983063d62a8115949a7e63d5ad4e5a23a791
Added option to avoid retrying to connect if socket is already in use.

In some situations it turns out to be more convenient to have VIFF
throw an exception rather than keep retrying to connect to a socket
with exponentially increasing delays. This is now possible using the
new command line parameter --no-socket-retry.

diff -r efa1983063d6 -r 2324d01c74e2 viff/runtime.py
--- a/viff/runtime.py	Thu Jan 14 11:36:13 2010 +0100
+++ b/viff/runtime.py	Wed Jan 20 08:54:41 2010 +0100
@@ -525,6 +525,9 @@
                          help="Collect and print profiling information.")
         group.add_option("--track-memory", action="store_true",
                          help="Track memory usage over time.")
+        group.add_option("--no-socket-retry", action="store_true",
+                         default=False, help="Fail rather than keep retrying "
+                         "to connect if port is already in use.")

         try:
             # Using __import__ since we do not use the module, we are
@@ -1068,6 +1071,8 @@
         try:
             runtime.port = listen(port)
         except CannotListenError, e:
+            if options and options.no_socket_retry:
(Continue reading)

Thomas P Jakobsen | 19 Jan 23:18
Picon
Picon

[PATCH] Added option to avoid retrying to connect if socket is already in use

# HG changeset patch
# User Thomas P Jakobsen <tpj <at> cs.au.dk>
# Date 1263939336 -3600
# Node ID 0b1e6cf3f57efe5a3b320897da636a6e2ebb2bdf
# Parent  efa1983063d62a8115949a7e63d5ad4e5a23a791
Added option to avoid retrying to connect if socket is already in use.

In some situations it turns out to be more convenient to have VIFF
throw an exception rather than keep retrying to connect to a socket
with exponentially increasing delays. This is now possible using the
new command line parameter --no-socket-retry.

diff -r efa1983063d6 -r 0b1e6cf3f57e viff/runtime.py
--- a/viff/runtime.py	Thu Jan 14 11:36:13 2010 +0100
+++ b/viff/runtime.py	Tue Jan 19 23:15:36 2010 +0100
@@ -525,6 +525,10 @@
                          help="Collect and print profiling information.")
         group.add_option("--track-memory", action="store_true",
                          help="Track memory usage over time.")
+        group.add_option("--no-socket-retry", action="store_false",
+                         dest="socket_retry", default=True,
+                         help="Fail rather than keep retrying to connect "
+                              "if port is already in use.")

         try:
             # Using __import__ since we do not use the module, we are
@@ -1060,18 +1064,21 @@
         connect = lambda host, port: reactor.connectTCP(host, port, factory)

     port = players[id].port
(Continue reading)

Janus Dam Nielsen | 6 Oct 10:09
Picon

[PATCH 00 of 20] Implementation of the Orlandi runtime

Hi friends of VIFF,

This pathcbomb contains three contributions

1) I have made it possible for a player to send and expect data from him self. This simplifies the
implementation of the broadcast protocol I have implemented for the Orlandi runtime

2) An implementation of the Orlandi runtime. I have decided not to include the code for the commitment
scheme yet, since it uses propriatary code

3) A refactoring and improvement of the benchmark.py application

Please review the code.

--
Janus
Thomas P Jakobsen | 11 Jun 14:15
Picon
Picon

[PATCH 0 of 1] Clone errors.

The current implementation of the clone_deferred method in
viff/util.py silently eats exceptions in both the original and the
cloned deferred.

This patch ensures that exceptions will propagate to both the clone
and the original. However, since it sometimes makes sense to have an
exception go only one way, I've made propagation into the cloned
defereed optional.
Janus Dam Nielsen | 29 Apr 09:49
Picon

[PATCH] [mq]: Signed_and_unsigned_representation

# HG changeset patch
# User Janus Dam Nielsen <janus.nielsen <at> alexandra.dk>
# Date 1240990761 -7200
# Node ID a0d0dd74a4f18097713d56e773978d8328e5562e
# Parent  05bcb213270c49803801f20eac701f806776f295
[mq]: Signed_and_unsigned_representation

diff --git a/viff/field.py b/viff/field.py
--- a/viff/field.py
+++ b/viff/field.py
@@ -505,6 +505,20 @@
             """Extract a bit (index is counted from zero)."""
             return (self.value >> index) & 1

+        def signed(self):
+            """Return a signed integer representation of the value.
+
+            If x > floor(p/2) then subtract p to obtain negative integer.
+            """
+            if self.value > ((self.modulus-1)/2):
+                return self.value - self.modulus
+            else:
+                return self.value
+
+        def unsigned(self):
+            """Return a unsigned representation of the value"""
+            return self.value
+
         def __repr__(self):
             return "{%d}" % self.value
(Continue reading)

Janus Dam Nielsen | 27 Apr 13:46
Picon

[PATCH 0 of 2] Signed and unsigned representation of GF field elements

I use GF field elements to represent positive as well as negative integers, and in some situations I want to
convert the field elements to integers, e.g. to display them to a user.

I have implemented two methods signed() and unsigned() which returns a signed or a unsigned
representation of a GF field element. They are implemented as methods in the GFElement class because it
maintains the encapsulation of the prime used as a modulo. E.g. a user of GF fields needs not propagate the
prime to the code for user interaction, but only needs the prime when the GF field is instantiated.
Martin Geisler | 12 Dec 01:42
Picon
Picon
Favicon
Gravatar

[PATCH 0 of 3] Begin benchmarks with "burn-in"

Hi,

In trying to explain some measurements, Jesper felt paranoid and asked
if we could start the benchmarks with a warm-up phase. The idea is to
"burn-in" the CPU and network so that everything is to tuned when the
benchmark begins for real.

These patches add this, but I think there is something wrong with the
network burn-in. I tried to make it measure the round trip time by
letting everybody send ping packets back and forth.

With three players I get numbers like this:

RTT  1 <->  2: min avg max = 3447.198 ms 3899.702 ms 4363.692 ms
RTT  1 <->  3: min avg max = 2529.485 ms 3307.890 ms 3892.167 ms
RTT  1 <->  *: min avg max = 2529.485 ms 3603.796 ms 4363.692 ms

This should be the round trip time *per* packet when sending 10,000
packets. But this is clearly too large -- and if I send fewer packets
the average time drops. So I guess I've programmed it wrong, somehow.

Please take a look at this code, experiment with it and let me know
what you think. Thanks.
Martin Geisler | 10 Dec 10:17
Picon
Picon
Favicon
Gravatar

[PATCH 00 of 22] Yet another SFDL parser

This patch series is yet another attempt to parse SFDL programs. The
parser is based on Pyparsing, which makes it very easy to write
recursive descent parsers:

  http://pyparsing.wikispaces.com/

So far the parser can handle all the examples I've tried. It evaluates
the constant expressions found in the programs, but it does not
produce any VIFF programs yet.

This is just a suggestion for how I would handle the easy part of
parsing the programs. The difficult part is mapping the SFDL
constructs to VIFF (Python) constructs.
Picon
Picon
Favicon

[PATCH 0 of 7] Automated benchmarks for VIFF.

Here's my initial attempt at automating benchmarks and graph
generation in VIFF. Some parts of it is borrowed from the benchmark.py
script that's alread in the repository.

The main goal is to make it easy to write, run, and generate graphs
for distributed VIFF benchmarks while at the same time not limiting
the kind of benchmarks that could be made. Another design goal is that
the code should scale as the number of benchmarks increase. An approah
is chosen where benchmark data is collected in a central database
rather than as a bunch of text files. My feeling is that this eases
data maintainability and production of more complex statistics.

The code is by no means finished. Lots of TODO's are still there,
documentation can be improved, and I haven't done much to remove
trailing whitespaces, etc. However, I've reached a state where I'm
actually able to use it to run benchmarks on the DAIMI hosts while
data is reported to a MySQL database at my computer at home.

I post the patch now hoping that an early review will result in time
saved, so please feel free to comment on the code. I'd be happy to
hear about bugs and ideas for improving it. I'm quite a newbie in
Python, so if I've done something very non-pythonic, please let me
know, too :-)

A good place to start is example.py and the benchmark examples in
examples/. The list of featurs and issues in the top of suite.py is
also a good starting point.

Gmane