Giter VIP home page Giter VIP logo

juvenal-lib's Introduction

juvenal-lib: The universal election verifier library

License Dependencies badge Build Coverage status Community chat

juvenal-lib is a library that implements an universal election verifier. It enables the verification of election ballots, tallies, and proofs generated by multiple voting solutions. It has been developed independently by the nVotes Online Voting team and is written in TypeScript. It also includes a command line verifier.

It currently only supports verifying ElectionGuard. Work for supporting Helios Voting is in the works. This library is used by Juvenal, which is an open-source and web-based universal verifier.

WARNING: This software is in development and is incomplete and most probably contains bugs. Please do not use in production.

Building

This is a TypeScript project and uses the standard TypeScript toolchain. Install dependencies with:

yarn

Then you can build the project into javascript to the build/ directory with:

yarn build

You can execute the unit tests with:

yarn test

You can generate package documentation with:

yarn doc

Running

You can run the verifier through the command line using node:

node build/src/bin/verifier.js $PATH_TO_ELECTION_RECORD.json

There are multiple election record examples in the directory test/data that you can use with the verifier. For example, the following command should verify correctly the valid_encrypted.json election record, which contains a valid election record:

node build/src/bin/verifier.js tests/data/valid_encrypted.json

Contribute

There are multiple ways to contribute:

Security dependencies update

You can run yarn audit to find security dependencies that need to be updated. You can also run yarn run yarn-audit-fix to try to update the dependencies to a secure version. Afterwards, you should try to do a yarn build and yarn test to ensure everything is still working.

Development

Note that we autogenerate both:

  • The file json_schemas.ts (in directory vendor/electionguard-schema-0.85) that contains the schemas as an object, so that they can be directly loaded as a javascript dependency and not opening json files.
  • The schema definitions in directory vendor/electionguard-schema-0.85/@types, so that the election record to be verified can be loaded from json in a typed manner.

When required, you can update the two generated json schemas derivatives mentioned above by running:

yarn generate_election_record_types

Dependencies

The verifier uses minimal runtime dependencies to be very self-contained:

There is a bunch of other development-only additional dependencies. These are not really relevant other than for development purposes:

juvenal-lib's People

Contributors

edulix avatar ruescasd avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

juvenal-lib's Issues

Check if need to use power residue symbol in modpgroup

We are checking for quadratic residues in modpgroupelement creation, however this may not be applicable if using a prime of the form p - 1 = qn where n !=2. (This could also have consequences for encoding/decoding, but we are not using that functionality in vjsc)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.