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

Safe HaskellNone
LanguageHaskell2010

Voting.Protocol.Trustee.Indispensable

Contents

Synopsis

Type TrusteePublicKey

data TrusteePublicKey c Source #

Constructors

TrusteePublicKey 

Fields

Instances
Eq (TrusteePublicKey c) Source # 
Instance details

Defined in Voting.Protocol.Trustee.Indispensable

Show (TrusteePublicKey c) Source # 
Instance details

Defined in Voting.Protocol.Trustee.Indispensable

Generic (TrusteePublicKey c) Source # 
Instance details

Defined in Voting.Protocol.Trustee.Indispensable

Associated Types

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

ToJSON (TrusteePublicKey c) Source # 
Instance details

Defined in Voting.Protocol.Trustee.Indispensable

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

Defined in Voting.Protocol.Trustee.Indispensable

NFData (TrusteePublicKey c) Source # 
Instance details

Defined in Voting.Protocol.Trustee.Indispensable

Methods

rnf :: TrusteePublicKey c -> () #

type Rep (TrusteePublicKey c) Source # 
Instance details

Defined in Voting.Protocol.Trustee.Indispensable

type Rep (TrusteePublicKey c) = D1 (MetaData "TrusteePublicKey" "Voting.Protocol.Trustee.Indispensable" "hjugement-protocol-0.0.7.20190815-As1rduHXqx8BecfrJje01q" False) (C1 (MetaCons "TrusteePublicKey" PrefixI True) (S1 (MetaSel (Just "trustee_PublicKey") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (PublicKey c)) :*: S1 (MetaSel (Just "trustee_SecretKeyProof") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Proof c))))

Generating a TrusteePublicKey

proveIndispensableTrusteePublicKey :: Reifies c FFC => Monad m => RandomGen r => SecretKey c -> StateT r m (TrusteePublicKey c) Source #

(proveIndispensableTrusteePublicKey trustSecKey) returns the PublicKey associated to trustSecKey and a Proof of its knowledge.

Checking a TrusteePublicKey before incorporating it into the Election's PublicKey

verifyIndispensableTrusteePublicKey :: Reifies c FFC => Monad m => TrusteePublicKey c -> ExceptT ErrorTrusteePublicKey m () Source #

(verifyIndispensableTrusteePublicKey trustPubKey) returns True iif. the given trustee_SecretKeyProof does prove that the SecretKey associated with the given trustee_PublicKey is known by the trustee.

Type ErrorTrusteePublicKey

Hashing

Election's PublicKey

Generating an Election's PublicKey from multiple TrusteePublicKeys.

Checking the trustee's DecryptionShares before decrypting an EncryptedTally.

Decrypting an EncryptedTally from multiple TrusteePublicKeys.

combineIndispensableDecryptionShares :: Reifies c FFC => [PublicKey c] -> DecryptionShareCombinator c Source #

(combineDecryptionShares pubKeyByTrustee decShareByTrustee) returns the DecryptionFactors by choice by Question