Navigation

VIFF is written in Python and uses the Twisted framework for
asynchronous communication, (optionally) OpenSSL and PyOpenSSL for
secure communication, and GMPY for fast bignum arithmetic. You can
find these components here:

Include the path to your Python installation (e.g. C:\Python25\)
in the PATH system environment variable. One way to edit this
environment variable is by right-clicking My Computer in the Start
menu, selecting Properties, Advanced, and then pressing the
Environment Variables button.

Download and install the full MacPython version 2.5 (the
Python-installation which comes with Mac OS X is not entirely
up-to-date).

Download and Install Twisted from source. There is an installer
for Mac OS X 10.5 which can be used if you use Mac OS X
10.5. Notice again that Mac OS X comes with a pre-installed version
of Twisted, but this is not the full Twisted installation. After
installation change your PYTHONPATH (in your
~/.bash_profile) to:

Download and install GMP. You can preferably use the Macports or
Fink package utilities. If you download the other dependencies from
either Macports or Fink, they might depend on Python 2.4 which is
not preferable, you should use Python 2.5, unless you have good
reasons not to.

Download and install GMPY following the instructions in
gmpy-1.02.macosx.README.txt (under Downloads).

Install VIFF from source. If you prefer you can just
install it in site-packages, it makes no difference.

For developers, either add VIFF to the PYTHONPATH:

export PYTHONPATH=$PYTHONPATH:$HOME/path-to-viff/viff

or create a symbolic link from the site-packages directory to the
VIFF Python files (viff/viff/), as otherwise you need to
re-install VIFF each time the project is modified.

VIFF was originally developed on GNU/Linux and is well supported
there. When installing the VIFF dependencies you either have the
option of using your package manager or to install from source. VIFF
itself must be installed from source.

If you do not have permission to use the package manager or simply
prefer to install from source, then (assuming that Python is already
installed) one can easily install VIFF and its dependencies by
downloading and unpacking each of them and executing:

python setup.py install --home=$HOME/opt

That will install everything under the given prefix. With the above
command the Python modules are installed into:

$HOME/opt/lib/python

You should add the directory to the PYTHONPATH environment
variable. Bash users can normally do this by adding:

export PYTHONPATH=$PYTHONPATH:$HOME/opt/lib/python

to their ~/.bash_profile file, creating it if it is not already
there. Consult the documentation for your shell to learn how
environment variables are set.

If you are doing development on VIFF, you might prefer to make a
symlink from the viff folder in your repository to a place in your
PYTHONPATH, like this:

To verify the installation, try out one of the applications. We will
run the millionaires example with three players and a threshold of
one. For this test, we will let all players run on localhost: Player 1
will run on port 9001, player 2 on port 9002, and player 3 on port
9003. The test is done on Windows, but it works the same on the other
platforms. Do the following:

Go to the viff/apps/ directory and generate the needed
configuration files by entering: