hjugement-protocol-0.0.4.20190711: A cryptographic protocol for the Majority Judgment.

Safe HaskellNone
LanguageHaskell2010

Voting.Protocol.Election

Contents

Synopsis

Type Encryption

data Encryption c Source #

ElGamal-like encryption. Its security relies on the Discrete Logarithm problem.

Because (groupGen ^encNonce ^secKey == groupGen ^secKey ^encNonce), knowing secKey, one can divide encryption_vault by (encryption_nonce ^secKey) to decipher (groupGen ^clear), then the clear text must be small to be decryptable, because it is encrypted as a power of groupGen (hence the "-like" in "ElGamal-like") to enable the additive homomorphism.

NOTE: Since (encryption_vault * encryption_nonce == encryption_nonce ^ (secKey + clear)), then: (logBase encryption_nonce (encryption_vault * encryption_nonce) == secKey + clear).

Constructors

Encryption 

Fields

Instances
Eq (Encryption c) Source # 
Instance details

Defined in Voting.Protocol.Election

Methods

(==) :: Encryption c -> Encryption c -> Bool #

(/=) :: Encryption c -> Encryption c -> Bool #

Show (Encryption c) Source # 
Instance details

Defined in Voting.Protocol.Election

Generic (Encryption c) Source # 
Instance details

Defined in Voting.Protocol.Election

Associated Types

type Rep (Encryption c) :: Type -> Type #

Methods

from :: Encryption c -> Rep (Encryption c) x #

to :: Rep (Encryption c) x -> Encryption c #

Reifies c FFC => ToJSON (Encryption c) Source # 
Instance details

Defined in Voting.Protocol.Election

Reifies c FFC => FromJSON (Encryption c) Source # 
Instance details

Defined in Voting.Protocol.Election

NFData (Encryption c) Source # 
Instance details

Defined in Voting.Protocol.Election

Methods

rnf :: Encryption c -> () #

Reifies c FFC => Additive (Encryption c) Source #

Additive homomorphism. Using the fact that: groupGen ^x * groupGen ^y == groupGen ^(x+y).

Instance details

Defined in Voting.Protocol.Election

type Rep (Encryption c) Source # 
Instance details

Defined in Voting.Protocol.Election

type Rep (Encryption c) = D1 (MetaData "Encryption" "Voting.Protocol.Election" "hjugement-protocol-0.0.4.20190711-9XKUqaKqeIWGSUJTM0D5D" False) (C1 (MetaCons "Encryption" PrefixI True) (S1 (MetaSel (Just "encryption_nonce") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (G c)) :*: S1 (MetaSel (Just "encryption_vault") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (G c))))

Type EncryptionNonce

encrypt :: Reifies c FFC => Monad m => RandomGen r => PublicKey c -> E c -> StateT r m (EncryptionNonce c, Encryption c) Source #

(encrypt pubKey clear) returns an ElGamal-like Encryption.

WARNING: the secret encryption nonce (encNonce) is returned alongside the Encryption in order to prove the validity of the encrypted clear text in proveEncryption, but this secret encNonce MUST be forgotten after that, as it may be used to decipher the Encryption without the SecretKey associated with pubKey.

Type Proof

data Proof c Source #

Non-Interactive Zero-Knowledge Proof of knowledge of a discrete logarithm: (secret == logBase base (base^secret)).

Constructors

Proof 

Fields

Instances
Eq (Proof c) Source # 
Instance details

Defined in Voting.Protocol.Election

Methods

(==) :: Proof c -> Proof c -> Bool #

(/=) :: Proof c -> Proof c -> Bool #

Show (Proof c) Source # 
Instance details

Defined in Voting.Protocol.Election

Methods

showsPrec :: Int -> Proof c -> ShowS #

show :: Proof c -> String #

showList :: [Proof c] -> ShowS #

Generic (Proof c) Source # 
Instance details

Defined in Voting.Protocol.Election

Associated Types

type Rep (Proof c) :: Type -> Type #

Methods

from :: Proof c -> Rep (Proof c) x #

to :: Rep (Proof c) x -> Proof c #

ToJSON (Proof c) Source # 
Instance details

Defined in Voting.Protocol.Election

Reifies c FFC => FromJSON (Proof c) Source # 
Instance details

Defined in Voting.Protocol.Election

NFData (Proof c) Source # 
Instance details

Defined in Voting.Protocol.Election

Methods

rnf :: Proof c -> () #

type Rep (Proof c) Source # 
Instance details

Defined in Voting.Protocol.Election

type Rep (Proof c) = D1 (MetaData "Proof" "Voting.Protocol.Election" "hjugement-protocol-0.0.4.20190711-9XKUqaKqeIWGSUJTM0D5D" False) (C1 (MetaCons "Proof" PrefixI True) (S1 (MetaSel (Just "proof_challenge") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Challenge c)) :*: S1 (MetaSel (Just "proof_response") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (E c))))

Type ZKP

newtype ZKP Source #

Zero-knowledge proof.

A protocol is zero-knowledge if the verifier learns nothing from the protocol except that the prover knows the secret.

DOC: Mihir Bellare and Phillip Rogaway. Random oracles are practical: A paradigm for designing efficient protocols. In ACM-CCS’93, 1993.

Constructors

ZKP ByteString 

Type Challenge

Type Oracle

type Oracle list c = list (Commitment c) -> Challenge c Source #

prove :: Reifies c FFC => Monad m => RandomGen r => Functor list => E c -> list (G c) -> Oracle list c -> StateT r m (Proof c) Source #

(prove sec commitmentBases oracle) returns a Proof that sec is known (by proving the knowledge of its discrete logarithm).

The Oracle is given Commitments equal to the commitmentBases raised to the power of the secret nonce of the Proof, as those are the Commitments that the verifier will obtain when composing the proof_challenge and proof_response together (with commit).

WARNING: for prove to be a so-called strong Fiat-Shamir transformation (not a weak): the statement must be included in the hash (along with the commitments).

NOTE: a random nonce is used to ensure each prove does not reveal any information regarding the secret sec, because two Proofs using the same Commitment can be used to deduce sec (using the special-soundness).

fakeProof :: Reifies c FFC => Monad m => RandomGen r => StateT r m (Proof c) Source #

(fakeProof) returns a Proof whose proof_challenge and proof_response are uniformly chosen at random, instead of (proof_challenge == hash statement commitments) and (proof_response == nonce + sec * proof_challenge) as a Proof returned by prove.

Used in proveEncryption to fill the returned DisjProof with fake Proofs for all Disjunctions but the encrypted one.

Type Commitment

type Commitment = G Source #

A commitment from the prover to the verifier. It's a power of groupGen chosen randomly by the prover when making a Proof with prove.

commit :: Reifies c FFC => Proof c -> G c -> G c -> Commitment c Source #

(commit proof base basePowSec) returns a Commitment from the given Proof with the knowledge of the verifier.

Type Disjunction

type Disjunction = G Source #

A Disjunction is an inversed (groupGen ^opinion) it's used in proveEncryption to generate a Proof that an encryption_vault contains a given (groupGen ^opinion),

Type Opinion

type Opinion = E Source #

Index of a Disjunction within a list of them. It is encrypted as an Exponent by encrypt.

Type DisjProof

newtype DisjProof c Source #

A list of Proofs to prove that the Opinion within an Encryption is indexing a Disjunction within a list of them, without revealing which Opinion it is.

Constructors

DisjProof [Proof c] 
Instances
Eq (DisjProof c) Source # 
Instance details

Defined in Voting.Protocol.Election

Methods

(==) :: DisjProof c -> DisjProof c -> Bool #

(/=) :: DisjProof c -> DisjProof c -> Bool #

Show (DisjProof c) Source # 
Instance details

Defined in Voting.Protocol.Election

Generic (DisjProof c) Source # 
Instance details

Defined in Voting.Protocol.Election

Associated Types

type Rep (DisjProof c) :: Type -> Type #

Methods

from :: DisjProof c -> Rep (DisjProof c) x #

to :: Rep (DisjProof c) x -> DisjProof c #

Reifies c FFC => ToJSON (DisjProof c) Source # 
Instance details

Defined in Voting.Protocol.Election

Reifies c FFC => FromJSON (DisjProof c) Source # 
Instance details

Defined in Voting.Protocol.Election

NFData (DisjProof c) Source # 
Instance details

Defined in Voting.Protocol.Election

Methods

rnf :: DisjProof c -> () #

type Rep (DisjProof c) Source # 
Instance details

Defined in Voting.Protocol.Election

type Rep (DisjProof c) = D1 (MetaData "DisjProof" "Voting.Protocol.Election" "hjugement-protocol-0.0.4.20190711-9XKUqaKqeIWGSUJTM0D5D" True) (C1 (MetaCons "DisjProof" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Proof c])))

proveEncryption :: Reifies c FFC => Monad m => RandomGen r => PublicKey c -> ZKP -> ([Disjunction c], [Disjunction c]) -> (EncryptionNonce c, Encryption c) -> StateT r m (DisjProof c) Source #

(proveEncryption elecPubKey voterZKP (prevDisjs,nextDisjs) (encNonce,enc)) returns a DisjProof that enc encrypts the Disjunction d between prevDisjs and nextDisjs.

The prover proves that it knows an encNonce, such that: (enc == Encryption{encryption_nonce=groupGen ^encNonce, encryption_vault=elecPubKey^encNonce * groupGen^d})

A NIZK Disjunctive Chaum Pedersen Logarithm Equality is used.

DOC: Pierrick Gaudry. Some ZK security proofs for Belenios, 2017.

Hashing

encryptionCommitments :: Reifies c FFC => PublicKey c -> Encryption c -> Disjunction c -> Proof c -> [G c] Source #

(encryptionCommitments elecPubKey enc disj proof) returns the Commitments with only the knowledge of the verifier.

For the prover the Proof comes from fakeProof, and for the verifier the Proof comes from the prover.

Type ErrorVerifyEncryption

Type Question

data Question Source #

Instances
Eq Question Source # 
Instance details

Defined in Voting.Protocol.Election

Show Question Source # 
Instance details

Defined in Voting.Protocol.Election

Generic Question Source # 
Instance details

Defined in Voting.Protocol.Election

Associated Types

type Rep Question :: Type -> Type #

Methods

from :: Question -> Rep Question x #

to :: Rep Question x -> Question #

ToJSON Question Source # 
Instance details

Defined in Voting.Protocol.Election

FromJSON Question Source # 
Instance details

Defined in Voting.Protocol.Election

NFData Question Source # 
Instance details

Defined in Voting.Protocol.Election

Methods

rnf :: Question -> () #

type Rep Question Source # 
Instance details

Defined in Voting.Protocol.Election

type Rep Question = D1 (MetaData "Question" "Voting.Protocol.Election" "hjugement-protocol-0.0.4.20190711-9XKUqaKqeIWGSUJTM0D5D" False) (C1 (MetaCons "Question" PrefixI True) ((S1 (MetaSel (Just "question_text") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "question_choices") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 [Text])) :*: (S1 (MetaSel (Just "question_mini") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Natural) :*: S1 (MetaSel (Just "question_maxi") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Natural))))

Type Answer

data Answer c Source #

Constructors

Answer 

Fields

Instances
Eq (Answer c) Source # 
Instance details

Defined in Voting.Protocol.Election

Methods

(==) :: Answer c -> Answer c -> Bool #

(/=) :: Answer c -> Answer c -> Bool #

Show (Answer c) Source # 
Instance details

Defined in Voting.Protocol.Election

Methods

showsPrec :: Int -> Answer c -> ShowS #

show :: Answer c -> String #

showList :: [Answer c] -> ShowS #

Generic (Answer c) Source # 
Instance details

Defined in Voting.Protocol.Election

Associated Types

type Rep (Answer c) :: Type -> Type #

Methods

from :: Answer c -> Rep (Answer c) x #

to :: Rep (Answer c) x -> Answer c #

Reifies c FFC => ToJSON (Answer c) Source # 
Instance details

Defined in Voting.Protocol.Election

Reifies c FFC => FromJSON (Answer c) Source # 
Instance details

Defined in Voting.Protocol.Election

NFData (Answer c) Source # 
Instance details

Defined in Voting.Protocol.Election

Methods

rnf :: Answer c -> () #

type Rep (Answer c) Source # 
Instance details

Defined in Voting.Protocol.Election

type Rep (Answer c) = D1 (MetaData "Answer" "Voting.Protocol.Election" "hjugement-protocol-0.0.4.20190711-9XKUqaKqeIWGSUJTM0D5D" False) (C1 (MetaCons "Answer" PrefixI True) (S1 (MetaSel (Just "answer_opinions") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 [(Encryption c, DisjProof c)]) :*: S1 (MetaSel (Just "answer_sumProof") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (DisjProof c))))

encryptAnswer :: Reifies c FFC => Monad m => RandomGen r => PublicKey c -> ZKP -> Question -> [Bool] -> StateT r (ExceptT ErrorAnswer m) (Answer c) Source #

(encryptAnswer elecPubKey zkp quest opinions) returns an Answer validable by verifyAnswer, unless an ErrorAnswer is returned.

Type ErrorAnswer

data ErrorAnswer Source #

Error raised by encryptAnswer.

Constructors

ErrorAnswer_WrongNumberOfOpinions Natural Natural

When the number of opinions is different than the number of choices (question_choices).

ErrorAnswer_WrongSumOfOpinions Natural Natural Natural

When the sum of opinions is not within the bounds of question_mini and question_maxi.

Instances
Eq ErrorAnswer Source # 
Instance details

Defined in Voting.Protocol.Election

Show ErrorAnswer Source # 
Instance details

Defined in Voting.Protocol.Election

Generic ErrorAnswer Source # 
Instance details

Defined in Voting.Protocol.Election

Associated Types

type Rep ErrorAnswer :: Type -> Type #

NFData ErrorAnswer Source # 
Instance details

Defined in Voting.Protocol.Election

Methods

rnf :: ErrorAnswer -> () #

type Rep ErrorAnswer Source # 
Instance details

Defined in Voting.Protocol.Election

Type Election

data Election c Source #

Instances
Eq (Election c) Source # 
Instance details

Defined in Voting.Protocol.Election

Methods

(==) :: Election c -> Election c -> Bool #

(/=) :: Election c -> Election c -> Bool #

Show (Election c) Source # 
Instance details

Defined in Voting.Protocol.Election

Methods

showsPrec :: Int -> Election c -> ShowS #

show :: Election c -> String #

showList :: [Election c] -> ShowS #

Generic (Election c) Source # 
Instance details

Defined in Voting.Protocol.Election

Associated Types

type Rep (Election c) :: Type -> Type #

Methods

from :: Election c -> Rep (Election c) x #

to :: Rep (Election c) x -> Election c #

ToJSON (Election c) Source # 
Instance details

Defined in Voting.Protocol.Election

FromJSON (Election c) Source # 
Instance details

Defined in Voting.Protocol.Election

NFData (Election c) Source # 
Instance details

Defined in Voting.Protocol.Election

Methods

rnf :: Election c -> () #

type Rep (Election c) Source # 
Instance details

Defined in Voting.Protocol.Election

type Rep (Election c) = D1 (MetaData "Election" "Voting.Protocol.Election" "hjugement-protocol-0.0.4.20190711-9XKUqaKqeIWGSUJTM0D5D" False) (C1 (MetaCons "Election" PrefixI True) ((S1 (MetaSel (Just "election_name") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: (S1 (MetaSel (Just "election_description") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "election_crypto") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (ElectionCrypto c)))) :*: (S1 (MetaSel (Just "election_questions") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 [Question]) :*: (S1 (MetaSel (Just "election_uuid") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 UUID) :*: S1 (MetaSel (Just "election_hash") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Hash)))))

Type ElectionCrypto

data ElectionCrypto c Source #

Instances
Eq (ElectionCrypto c) Source # 
Instance details

Defined in Voting.Protocol.Election

Show (ElectionCrypto c) Source # 
Instance details

Defined in Voting.Protocol.Election

Generic (ElectionCrypto c) Source # 
Instance details

Defined in Voting.Protocol.Election

Associated Types

type Rep (ElectionCrypto c) :: Type -> Type #

ToJSON (ElectionCrypto c) Source # 
Instance details

Defined in Voting.Protocol.Election

FromJSON (ElectionCrypto c) Source # 
Instance details

Defined in Voting.Protocol.Election

NFData (ElectionCrypto c) Source # 
Instance details

Defined in Voting.Protocol.Election

Methods

rnf :: ElectionCrypto c -> () #

type Rep (ElectionCrypto c) Source # 
Instance details

Defined in Voting.Protocol.Election

type Rep (ElectionCrypto c) = D1 (MetaData "ElectionCrypto" "Voting.Protocol.Election" "hjugement-protocol-0.0.4.20190711-9XKUqaKqeIWGSUJTM0D5D" False) (C1 (MetaCons "ElectionCrypto_FFC" PrefixI True) (S1 (MetaSel (Just "electionCrypto_FFC_params") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 FFC) :*: S1 (MetaSel (Just "electionCrypto_FFC_PublicKey") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (PublicKey c))))

reifyElection :: Election () -> (forall c. Reifies c FFC => Election c -> k) -> k Source #

Type Hash

newtype Hash Source #

Constructors

Hash Text 
Instances
Eq Hash Source # 
Instance details

Defined in Voting.Protocol.Election

Methods

(==) :: Hash -> Hash -> Bool #

(/=) :: Hash -> Hash -> Bool #

Ord Hash Source # 
Instance details

Defined in Voting.Protocol.Election

Methods

compare :: Hash -> Hash -> Ordering #

(<) :: Hash -> Hash -> Bool #

(<=) :: Hash -> Hash -> Bool #

(>) :: Hash -> Hash -> Bool #

(>=) :: Hash -> Hash -> Bool #

max :: Hash -> Hash -> Hash #

min :: Hash -> Hash -> Hash #

Show Hash Source # 
Instance details

Defined in Voting.Protocol.Election

Methods

showsPrec :: Int -> Hash -> ShowS #

show :: Hash -> String #

showList :: [Hash] -> ShowS #

Generic Hash Source # 
Instance details

Defined in Voting.Protocol.Election

Associated Types

type Rep Hash :: Type -> Type #

Methods

from :: Hash -> Rep Hash x #

to :: Rep Hash x -> Hash #

ToJSON Hash Source # 
Instance details

Defined in Voting.Protocol.Election

FromJSON Hash Source # 
Instance details

Defined in Voting.Protocol.Election

NFData Hash Source # 
Instance details

Defined in Voting.Protocol.Election

Methods

rnf :: Hash -> () #

type Rep Hash Source # 
Instance details

Defined in Voting.Protocol.Election

type Rep Hash = D1 (MetaData "Hash" "Voting.Protocol.Election" "hjugement-protocol-0.0.4.20190711-9XKUqaKqeIWGSUJTM0D5D" True) (C1 (MetaCons "Hash" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)))

hashJSON :: ToJSON a => a -> Hash Source #

Type Ballot

data Ballot c Source #

Instances
Generic (Ballot c) Source # 
Instance details

Defined in Voting.Protocol.Election

Associated Types

type Rep (Ballot c) :: Type -> Type #

Methods

from :: Ballot c -> Rep (Ballot c) x #

to :: Rep (Ballot c) x -> Ballot c #

Reifies c FFC => ToJSON (Ballot c) Source # 
Instance details

Defined in Voting.Protocol.Election

Reifies c FFC => FromJSON (Ballot c) Source # 
Instance details

Defined in Voting.Protocol.Election

NFData (Ballot c) Source # 
Instance details

Defined in Voting.Protocol.Election

Methods

rnf :: Ballot c -> () #

type Rep (Ballot c) Source # 
Instance details

Defined in Voting.Protocol.Election

type Rep (Ballot c) = D1 (MetaData "Ballot" "Voting.Protocol.Election" "hjugement-protocol-0.0.4.20190711-9XKUqaKqeIWGSUJTM0D5D" False) (C1 (MetaCons "Ballot" PrefixI True) ((S1 (MetaSel (Just "ballot_answers") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 [Answer c]) :*: S1 (MetaSel (Just "ballot_signature") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Signature c)))) :*: (S1 (MetaSel (Just "ballot_election_uuid") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 UUID) :*: S1 (MetaSel (Just "ballot_election_hash") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Hash))))

encryptBallot :: Reifies c FFC => Monad m => RandomGen r => Election c -> Maybe (SecretKey c) -> [[Bool]] -> StateT r (ExceptT ErrorBallot m) (Ballot c) Source #

(encryptBallot elec (Just ballotSecKey) opinionsByQuest) returns a Ballot signed by secKey (the voter's secret key) where opinionsByQuest is a list of Opinions on each question_choices of each election_questions.

Type Signature

data Signature c Source #

Schnorr-like signature.

Used by each voter to sign his/her encrypted Ballot using his/her Credential, in order to avoid ballot stuffing.

Constructors

Signature 

Fields

Instances
Generic (Signature c) Source # 
Instance details

Defined in Voting.Protocol.Election

Associated Types

type Rep (Signature c) :: Type -> Type #

Methods

from :: Signature c -> Rep (Signature c) x #

to :: Rep (Signature c) x -> Signature c #

Reifies c FFC => ToJSON (Signature c) Source # 
Instance details

Defined in Voting.Protocol.Election

Reifies c FFC => FromJSON (Signature c) Source # 
Instance details

Defined in Voting.Protocol.Election

NFData (Signature c) Source # 
Instance details

Defined in Voting.Protocol.Election

Methods

rnf :: Signature c -> () #

type Rep (Signature c) Source # 
Instance details

Defined in Voting.Protocol.Election

type Rep (Signature c) = D1 (MetaData "Signature" "Voting.Protocol.Election" "hjugement-protocol-0.0.4.20190711-9XKUqaKqeIWGSUJTM0D5D" False) (C1 (MetaCons "Signature" PrefixI True) (S1 (MetaSel (Just "signature_publicKey") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (PublicKey c)) :*: S1 (MetaSel (Just "signature_proof") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Proof c))))

Hashing

signatureStatement :: Reifies c FFC => Foldable f => f (Answer c) -> [G c] Source #

(signatureStatement answers) returns the encrypted material to be signed: all the encryption_nonces and encryption_vaults of the given answers.

Type ErrorBallot

data ErrorBallot Source #

Error raised by encryptBallot.

Constructors

ErrorBallot_WrongNumberOfAnswers Natural Natural

When the number of answers is different than the number of questions.

ErrorBallot_Answer ErrorAnswer

When encryptAnswer raised an ErrorAnswer.

ErrorBallot_Wrong

TODO: to be more precise.

Instances
Eq ErrorBallot Source # 
Instance details

Defined in Voting.Protocol.Election

Show ErrorBallot Source # 
Instance details

Defined in Voting.Protocol.Election

Generic ErrorBallot Source # 
Instance details

Defined in Voting.Protocol.Election

Associated Types

type Rep ErrorBallot :: Type -> Type #

NFData ErrorBallot Source # 
Instance details

Defined in Voting.Protocol.Election

Methods

rnf :: ErrorBallot -> () #

type Rep ErrorBallot Source # 
Instance details

Defined in Voting.Protocol.Election

type Rep ErrorBallot = D1 (MetaData "ErrorBallot" "Voting.Protocol.Election" "hjugement-protocol-0.0.4.20190711-9XKUqaKqeIWGSUJTM0D5D" False) (C1 (MetaCons "ErrorBallot_WrongNumberOfAnswers" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Natural) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Natural)) :+: (C1 (MetaCons "ErrorBallot_Answer" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ErrorAnswer)) :+: C1 (MetaCons "ErrorBallot_Wrong" PrefixI False) (U1 :: Type -> Type)))