Skip to main content

Crate rust_ev_verifier_lib

Crate rust_ev_verifier_lib 

Source
Expand description

§Library for all the functionalities of the E-Voting Verifier

§Introduction

This crate is the main library for the E-Voting system of Swiss Post.

It is based on the specifications of Swiss Post, according to the following document versions:

The verifier is implemented for the version 1.4.4 of the E-Voting system of Swiss Post.

This crate is used as basis for a GUI application.

§ Structure of the project

The library contains the following modules:

  • data_structures: The implementation of structure of the data used for the Verifier. The data are reading from the files using serde
  • file_structure: The necessary functions to implement the files and directories
  • verification: The implementation of each verification.

The library depends from the following crates

§Development guide

Copy the directoy /datasets/direct-trust to the root.

The build on Windows must be done with MSYS2 (see Crypto Primitives for details)

§Integration Guide

§Environment Variables

The configuration used some environment variables, the can/must be integrated using the crate dotenvy

VariableDescriptionRequireddefault
VERIFIER_DATASET_PASSWORDThe password of the encrypted zip filesXn/a
TXT_REPORT_TAB_SIZEThe tab size for the text reports2
REPORT_FORMAT_DATEThe format of the date in the report%d.%m.%Y %H:%M:%S.%3f
DIRECT_TRUST_DIR_PATHThe path to the direct trust keystore for the verifierThe path ./direct-trust where . is the installation directory

The environment variables are retrieved using the static instance of VerifierConfig

Modules§

dataset
direct_trust
file_structure
Module implementing the structure of files and directories to collect data for the verifications
startup_checks
verification
Module implementing all the verifications

Structs§

ErrorChain
An iterator over an Error and its sources.
Report
VerifierConfig
Structuring getting all the configuration information relevant for the verifier
VerifierConfigError
Error with the configuration of Verifier

Enums§

DatasetType
Generic Enum that is a type of context, setup or tally
DatasetTypeKind