Fork for adding functionality to DĒMOS 2 needed for independent auditing.
This repository has been archived on 2022-08-01. You can view files and clone it, but cannot push or open issues or pull requests.
Find a file
vincentmdealmeida 571cd723bc
Merge pull request #10 from vincentmdealmeida/BinaryEncoding
Implemented full end-to-end encryption and decryption of an event usi…
2018-07-07 09:54:59 +01:00
allauthdemo Implemented full end-to-end encryption and decryption of an event using trustee public and secret keys. This required modification of the NodeJS crypto server to receive post data from the crypto_rpc py methods and for combining SKs together. Additionally, the new binary voting encoding scheme has been implemented for encryption and decryption of the event. General UI improvements have been made and as well as some other bug fixes 2018-07-07 09:52:47 +01:00
Node Implemented full end-to-end encryption and decryption of an event using trustee public and secret keys. This required modification of the NodeJS crypto server to receive post data from the crypto_rpc py methods and for combining SKs together. Additionally, the new binary voting encoding scheme has been implemented for encryption and decryption of the event. General UI improvements have been made and as well as some other bug fixes 2018-07-07 09:52:47 +01:00
static Implemented full end-to-end encryption and decryption of an event using trustee public and secret keys. This required modification of the NodeJS crypto server to receive post data from the crypto_rpc py methods and for combining SKs together. Additionally, the new binary voting encoding scheme has been implemented for encryption and decryption of the event. General UI improvements have been made and as well as some other bug fixes 2018-07-07 09:52:47 +01:00
.gitignore General housekeeping such as adding package.json for Node server, bash script for launching a celery worker and updating the readme to assist with launching the DEMOS2 app. Updated some models to include UI helper functions. Main work done is around event preparation - with a Celery worker running and the Node server, trustees are now emailed a link to prepare events. The event detail page has also had a bit of an overhaul to include additional information and to make it easier to use 2018-07-02 10:06:05 +01:00
commands.txt Initial commit of DEMOS2 with the upgraded 'Create Event' UI. However, there is no input validation currently 2018-06-12 13:31:38 +01:00
configure.py Initial commit of DEMOS2 with the upgraded 'Create Event' UI. However, there is no input validation currently 2018-06-12 13:31:38 +01:00
demos_cpp Initial commit of DEMOS2 with the upgraded 'Create Event' UI. However, there is no input validation currently 2018-06-12 13:31:38 +01:00
demos_cpp_bak Initial commit of DEMOS2 with the upgraded 'Create Event' UI. However, there is no input validation currently 2018-06-12 13:31:38 +01:00
LICENSE Initial commit of DEMOS2 with the upgraded 'Create Event' UI. However, there is no input validation currently 2018-06-12 13:31:38 +01:00
Makefile Initial commit of DEMOS2 with the upgraded 'Create Event' UI. However, there is no input validation currently 2018-06-12 13:31:38 +01:00
manage.py Initial commit of DEMOS2 with the upgraded 'Create Event' UI. However, there is no input validation currently 2018-06-12 13:31:38 +01:00
README.md General housekeeping such as adding package.json for Node server, bash script for launching a celery worker and updating the readme to assist with launching the DEMOS2 app. Updated some models to include UI helper functions. Main work done is around event preparation - with a Celery worker running and the Node server, trustees are now emailed a link to prepare events. The event detail page has also had a bit of an overhaul to include additional information and to make it easier to use 2018-07-02 10:06:05 +01:00
requirements.txt Initial commit of DEMOS2 with the upgraded 'Create Event' UI. However, there is no input validation currently 2018-06-12 13:31:38 +01:00
start_celery_worker.sh General housekeeping such as adding package.json for Node server, bash script for launching a celery worker and updating the readme to assist with launching the DEMOS2 app. Updated some models to include UI helper functions. Main work done is around event preparation - with a Celery worker running and the Node server, trustees are now emailed a link to prepare events. The event detail page has also had a bit of an overhaul to include additional information and to make it easier to use 2018-07-02 10:06:05 +01:00

DEMOS2

Prototype Django-based e-voting application, to demonstrate DEMOS2's client-side encryption e-voting.

The previous repository for DEMOS2 by Carey Williams can be found at: https://github.com/CareyJWilliams/DEMOS2

Main Application Dependencies

Python: Version 2.7 (Anything higher than this will not currently work)
Python packages: Specified in 'requirements.txt' - PyCharm will detect these dependencies and offer installation
MySQL Server: Community Ed will do - initialised with legacy password authentication
New MySQL DB User: Default username and password specified in 'aullauthdemo/settings.py'
New MySQL DB: demos2 (also specified in 'aullauthdemo/settings.py') - make sure to set the charset to UTF8

Finally, with all the above dependencies in place, you can simply issue the following command to initialise the DB:

python manage.py migrate

'aullauthdemo/settings.py' specifies the Google reCAPTCHA site key and private key which will need changing when deployed onto a new domain. There is also a DOMAIN setting within the file that needs updating during deployment as things like email functionality depend on this setting for correct URL generation during event preparation etc.

Emails from the application are currently sent from the following email account which can be updated within the settings:

demos2.no.reply@gmail.com

NodeJS Dependencies

The Node.js crypto server depends on the milagro-crypto-js and express modules. A package.json file can be found in the Node/ directory with these dependency requirements and therefore from this folder you can run:

npm install

Once the dependencies have been installed, you can then run the node server as per the below instructions.

Step 1: Running the Python app and creating a new user account

You can run the server with the following command:

python manage.py runserver

The application will then be available at:

127.0.0.1:8000

You can then click on 'Join' to create a new user account. Currently, a server error is thrown when you create a new email account saying something like 'Too Many Attempts'. Rest assured that the account will have been created. Navigate back to the home page and you should be able to log in. This will hopefully be fixed in a future version.

Step 2: Running Celery

Celery is used to run tasks asynchronously and the DEMOS2 application can't run without this application. A bash script called 'start_celery_worker.sh' is provided to make starting a worker as easy as possible:

./start_celery_worker.sh

Step 3: Running the NodeJS Server

The NodeJS server exposes a lot of cryptographic operations that the application depends on throughout. To run the server, issue the following command line request from the Node/ folder:

node index.js