Lemo is an implementation of a cryptographically verifiable democracy.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
To run this project easily, install miniconda.
Clone the GitHub repository into a local directory of your choice:
git clone git@github.com:desimmons/lemo.git
Move into the cloned directory:
cd lemo
Create a Python environment with all the lemo dependencies installed using Conda:
conda env create -f environment.yml
To run an example:
python ./src/python/examples.py
Lemocracy is a cryptographic implementation of a liquid democracy: a direct democracy that allows citizens to delegate their vote to representatives of their choice. In detail, it allows us to create:
- A citizen, represented by a name and public key (of which there is a corresponding private key). The citizen's
public/private key pair is generated using
jb_key = crypto_tools.generate_citizen_pub_priv_key(entropy=PRNG("seed"))
. The citizen is then defined to be the dictionaryjoey_b = {"citizen_name": "Joe Blogs", "citizen_public_id": key["citizen_public_id"]}
- A Citizens class, that:
- issues citizenship via
Citizens().add_citizen(joey_b)
. The Citizens object saves citizenship via an array of the citizen's public keys. - allows its citizens to add and remove rule objects (the Rule class will be explained next) via
Citizens().add_rule(rule_1)
andCitizens().remove_rule(rule_1)
- issues citizenship via
- A Rule class that:
- instantiates rule objects using a rule file contained in the
./rules
directory, - stores a cryptographic hash of the rule file so that any adjustment to the rule file will easy to spot,
- allows citizens to vote via the
Rule().vote(citizens, joey_b, vote_signature, vote)
method. For a citizen to be able to vote successfully, they must:- be a citizen of the
citizens
object passed to thevote
method, - construct a
valid vote_signature
object using their private key and theirvote
, a boolean.
- be a citizen of the
- instantiates rule objects using a rule file contained in the
TODO
- Create unit test examples.
- Create frontend Lemo website.
- Integrate homomorphic encryption into application.
- Create an identification platform
- TODO