Attention une mise à jour du service Gitlab va être effectuée le mardi 30 novembre entre 17h30 et 18h00. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes. Cette mise à jour intermédiaire en version 14.0.12 nous permettra de rapidement pouvoir mettre à votre disposition une version plus récente.

Commit 023924f0 authored by Stephane Glondu's avatar Stephane Glondu
Browse files


parent b79c12c7
......@@ -5,9 +5,9 @@ Belenios
### Dependencies
### Command-line tool
To run basic command-line tools, you will need:
To compile the command-line tool, you will need:
* [OCaml](
* [Findlib](
......@@ -18,35 +18,66 @@ To run basic command-line tools, you will need:
* [Atdgen](
* [Yojson](
To run the web server, you will additionally need:
If you use [OPAM](, these dependencies can
be installed with the following command:
* [Eliom]( version 3
opam install atdgen zarith cryptokit uuidm calendar
In general, using [OPAM]( should work on any
Unix-based system.
On [Debian]( systems, they can be
installed with the following command:
apt-get install atdgen libzarith-ocaml-dev libcryptokit-ocaml-dev libuuidm-ocaml-dev libcalendar-ocaml-dev
Once all the dependencies have been installed, the command-line tool
can be compiled with:
It produces a single executable, `belenios-tool`. You can install it
in your `PATH` (which we will assume in the guides), or refer to it
with a full path.
### Web server
The web server uses the [Ocsigen/Eliom](
framework. Eliom version 3 is needed.
With OPAM, you can install it with:
opam install eliom
On Debian-based systems, you can install it with:
apt-get install ocsigenserver eliom
But keep in mind that Belenios needs a very recent version of these
packages (in particular, eliom version 3 which is not in Debian stable
at the time of writing), so the ones available on your system might be
too old. If you are in this case, and want to run the server, we
advise you to use OPAM.
Once all the dependencies have been installed, the Eliom module can be
compiled with:
make all
### Documentation
To generate HTML files from `.md` ones, you will need:
* [Markdown](
There are two Makefile targets corresponding to the two levels of
dependencies: `minimal` (default) and `all`.
### Debian-specific instructions
Additionnaly, you will need LaTeX to compile the specification.
On Debian and its derivatives, you can find the list of packages to
install in the `stuff/belenios-deps-*.control` files. You can also
create meta-packages with `equivs` by using the following commands:
On Debian-based systems, you can install the dependencies needed to
compile the documentation with:
cd /tmp
equivs-build $BELENIOS/stuff/belenios-deps-minimal.control
equivs-build $BELENIOS/stuff/belenios-deps-all.control
apt-get install markdown texlive
Then install the chosen `deb`s with `dpkg -i`, followed by `apt-get -f
install` to install missing dependencies.
Once all the dependencies have been installed, the documentation can
be compiled with:
NOTE: `equiv-build` should not be run from a NFS directory!
make doc
Voter's guide
......@@ -67,7 +98,7 @@ If you put these files in a directory `/path/to/election`, the following
command will perform all possible verifications, depending on existing
./stuff/ --dir /path/to/election
belenios-tool election --dir /path/to/election
For example, during the election, you can check if some candidate
ballot is acceptable by putting it alone in `ballots.jsons`, and
......@@ -81,7 +112,7 @@ Trustee's guide
To generate a keypair, run:
make trustee-keygen
belenios-tool trustee-keygen
It will generate two files, `XXXXXXXX.public` and `XXXXXXXX.private`,
containing respectively the public and the private key. Send the
......@@ -93,7 +124,7 @@ with extreme care.
To compute your decryption share, set `/path/to/election` up as
described in the _Voter's guide_ section above, and run:
./stuff/ --dir /path/to/election --decrypt /path/to/privkey > partial_decryption.json
belenios-tool election --dir /path/to/election --decrypt /path/to/privkey > partial_decryption.json
and send `partial_decryption.json` to the election
......@@ -109,7 +140,7 @@ Credential authority's guide
To generate the credentials, run:
belenios-tool credgen --uuid XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX --count N
election given by the administrator, and `N` the number of credentials
......@@ -129,7 +160,7 @@ to whom you sent each individual private credential.
If you have a list of identities in a file `F` with `N` non-empty
lines, one identity per line, you can also run:
belenios-tool credgen --uuid XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX --file F
It will create the same `TTTTTTTTTT.public` file as above, with `N`
lines. It will also generate `TTTTTTTTTT.private` with `N` lines, each
......@@ -147,7 +178,7 @@ that there is no matching between them based on line numbers.
To get the public key derived from a private credential, run:
Server administrator's guide
......@@ -155,7 +186,8 @@ Server administrator's guide
### Overview of the web server
A sample web server can be run with the `demo/` script.
A sample web server can be run with the `demo/` script,
from the compiled source tree.
Here is an excerpt of the sample configuration file:
......@@ -229,7 +261,7 @@ In the following, we assume `ocsigenserver` is properly configured.
2. Concatenate the `partial_decryption.json` received from each
trustee into a `partial_decryptions.jsons`, in the same order as in
3. Run `$BELENIOS/stuff/`. It will create
3. Run `belenios-tool election`. It will create
`result.json`. Publish this file, along with the files listed in
the first step above. The whole set will enable universal
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment