Expand description
Crate implementing the cryptographic functions for E-Voting
It is based on the specifications of Swiss Post, according to the following document version: Crypo-primitives, version 1.4.1
The crate reduces actually at the necessary functions for the Verifier. The crate is grouped in modules releated to themes, like the specifications
The module crate::basic_crypto_functions
contains a wrapper to openssl. Details about installation and functionalities
can be found on the crate openssl.
The crate ist based on rug that is strongly performant, but GMP must be installed for compilation. See the requirements and installation path in the crate documentation rug
If a method should return an error, then each error type is specified per module and is transparent to the user of the crate.
§Features
Following feature is possible:
- “checks”: The library will perform checks of the input data, according to the specifications of Swiss Post. This reduces the performance. If the checks are performed during the usage of the crate, it is recommended, not to activate the feature
Modules§
- Implementation the algorithms for strings and alphabets
- Module that implement key derivation functions with argon2id
- Module to wrap the openssl library for crypto functions
- Module implementing the direct trust
- Implementation of El Gamal functionalitiies
- Module implementing the algorithm for the the mixnet
- Module that implement random functions
- Implementation of the verification of the signature
- Implementation the algorithms for strings
- Implementation of the necessary algorithms used for the zero-knowledge proofs of Swiss Post:
Structs§
- ByteArray represent a byte of arrays
- Structure containing the verifications for the generic object T with the error type E
- An arbitrary-precision integer.
Enums§
- Enum to represent an element that is hashable
Constants§
- The length of the group parameter
p
according to the security level in the specifications - The length of the group parameter
q
according to the security level in the specifications - The security length according to the security level in the specifications
Traits§
- Trait to calculate byte length
- Trait to implement constant numbers
- Trait to decode from string in different bases
- Trait to encode in string in different bases
- Transformation from or to String in hexadecimal according to the specifications
- Trait to extend operations of Integer
- Trait implementing defining an interface for objects implementing a recursive hash function.
- Functionality on small primes
- Trait for the verification of a the domain of a strucut