README.md 1.48 KB
Newer Older
Mikkel Wienberg Madsen's avatar
Mikkel Wienberg Madsen committed
1
2
[![pipeline status](https://gitlab.au.dk/dissys/bsc-shamir/badges/master/pipeline.svg)](https://gitlab.au.dk/dissys/bsc-shamir/-/commits/master)
[![coverage report](https://gitlab.au.dk/dissys/bsc-shamir/badges/master/coverage.svg)](https://gitlab.au.dk/dissys/bsc-shamir/-/commits/master)
Anders Jensen Løvig's avatar
Anders Jensen Løvig committed
3
4
# bsc-shamir

Mikkel Wienberg Madsen's avatar
Mikkel Wienberg Madsen committed
5
6
7
8
9
10
We use Go modules to manage dependencies and as such our implementation requires Go version 1.12 or greater.
All dependencies are located in the `go.mod` file and are automatically installed when running the project.

The project can be build using the go tool chain.
Unit tests and benchmarks can be run using the following commands
```bash
Mikkel Wienberg Madsen's avatar
Mikkel Wienberg Madsen committed
11
    go test bsc-shamir/...
Mikkel Wienberg Madsen's avatar
Mikkel Wienberg Madsen committed
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
    go test -run NONE -benchmem -bench . bsc-shamir/election
```
The command line interfaces are in the `cmd` directory.
To run the server program, use
```bash
    go run bsc-shamir/cmd/server
```
The default port is 27000, however another can be specified using `--port` flag.
To vote, use
```bash
    go run bsc-shamir/cmd/vote
```
The vote can be specified using `-v` flag.
Because each voter can vote at most once, once should else set the certificate and key using `--key` and `--cert`.

## Certificate Authority 


To support our implementation we have created a simple CA.
The is a command line tools, which can create a root certificate, `n` server and `m` voter certificates.
To create certificates run
````bash
    go run bsc-shamir/cmd/ca --new -s n -c m
````
where `n` and `m` are the numbers of servers and voters respectively.