1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#[macro_use]
mod macros;
pub mod committee;
mod cryptography;
mod encrypted_vote;
mod math;
pub mod tally;

// re-export under a debug module
#[doc(hidden)]
pub mod debug {
    pub mod cryptography {
        pub use crate::cryptography::*;
    }
}

#[cfg(crypto_backend = "__internal_ex_backend_p256k1")]
pub(crate) use chain_crypto::ec::p256k1::*;
#[cfg(crypto_backend = "__internal_ex_backend_ristretto255")]
pub(crate) use chain_crypto::ec::ristretto255::*;

#[cfg(crypto_backend = "__internal_ex_backend_p256k1")]
const CURVE_HRP: &str = "p256k1";
#[cfg(crypto_backend = "__internal_ex_backend_ristretto255")]
const CURVE_HRP: &str = "ristretto255";

pub use math::babystep::BabyStepsTable as TallyOptimizationTable;

pub use crate::{
    committee::{ElectionPublicKey, MemberCommunicationKey, MemberPublicKey, MemberState},
    cryptography::Ciphertext, //todo: why this?
    encrypted_vote::{
        Ballot, BallotVerificationError, EncryptedVote, ProofOfCorrectVote,
        UnitVectorInitializationError, Vote,
    },
    tally::{Crs, EncryptedTally, Tally, TallyDecryptShare},
};