hjugement-protocol-0.0.4.20190711: 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.4.20190711-9XKUqaKqeIWGSUJTM0D5D" 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))))

Type ErrorTrusteePublicKey

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.

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.

Hashing

Election's PublicKey

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

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