| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Voting.Protocol.Trustee.Indispensable
Synopsis
- data TrusteePublicKey crypto v c = TrusteePublicKey {
- trustee_PublicKey :: !(PublicKey crypto c)
- trustee_SecretKeyProof :: !(Proof crypto v c)
- proveIndispensableTrusteePublicKey :: Reifies v Version => GroupParams crypto c => Key crypto => Monad m => RandomGen r => SecretKey crypto c -> StateT r m (TrusteePublicKey crypto v c)
- verifyIndispensableTrusteePublicKey :: Reifies v Version => GroupParams crypto c => Monad m => TrusteePublicKey crypto v c -> ExceptT ErrorTrusteePublicKey m ()
- data ErrorTrusteePublicKey = ErrorTrusteePublicKey_WrongProof
- indispensableTrusteePublicKeyStatement :: GroupParams crypto c => PublicKey crypto c -> ByteString
- combineIndispensableTrusteePublicKeys :: GroupParams crypto c => [TrusteePublicKey crypto v c] -> PublicKey crypto c
- verifyIndispensableDecryptionShareByTrustee :: Reifies v Version => GroupParams crypto c => Monad m => EncryptedTally crypto v c -> [PublicKey crypto c] -> [DecryptionShare crypto v c] -> ExceptT ErrorTally m ()
- combineIndispensableDecryptionShares :: Reifies v Version => GroupParams crypto c => [PublicKey crypto c] -> DecryptionShareCombinator crypto v c
Type TrusteePublicKey
data TrusteePublicKey crypto v c Source #
Constructors
| TrusteePublicKey | |
Fields
| |
Instances
Generating a TrusteePublicKey
proveIndispensableTrusteePublicKey :: Reifies v Version => GroupParams crypto c => Key crypto => Monad m => RandomGen r => SecretKey crypto c -> StateT r m (TrusteePublicKey crypto v c) Source #
(
returns the proveIndispensableTrusteePublicKey trustSecKey)PublicKey associated to trustSecKey
and a Proof of its knowledge.
Checking a TrusteePublicKey before incorporating it into the Election's PublicKey
verifyIndispensableTrusteePublicKey :: Reifies v Version => GroupParams crypto c => Monad m => TrusteePublicKey crypto v c -> ExceptT ErrorTrusteePublicKey m () Source #
(
returns verifyIndispensableTrusteePublicKey trustPubKey)True iif. the given trustee_SecretKeyProof
does prove that the SecretKey associated with
the given trustee_PublicKey is known by the trustee.
Type ErrorTrusteePublicKey
data ErrorTrusteePublicKey Source #
Constructors
| ErrorTrusteePublicKey_WrongProof | The |
Instances
| Eq ErrorTrusteePublicKey Source # | |
Defined in Voting.Protocol.Trustee.Indispensable Methods (==) :: ErrorTrusteePublicKey -> ErrorTrusteePublicKey -> Bool # (/=) :: ErrorTrusteePublicKey -> ErrorTrusteePublicKey -> Bool # | |
| Show ErrorTrusteePublicKey Source # | |
Defined in Voting.Protocol.Trustee.Indispensable Methods showsPrec :: Int -> ErrorTrusteePublicKey -> ShowS # show :: ErrorTrusteePublicKey -> String # showList :: [ErrorTrusteePublicKey] -> ShowS # | |
Hashing
indispensableTrusteePublicKeyStatement :: GroupParams crypto c => PublicKey crypto c -> ByteString Source #
Election's PublicKey
Generating an Election's PublicKey from multiple TrusteePublicKeys.
combineIndispensableTrusteePublicKeys :: GroupParams crypto c => [TrusteePublicKey crypto v c] -> PublicKey crypto c Source #
Checking the trustee's DecryptionShares before decrypting an EncryptedTally.
verifyIndispensableDecryptionShareByTrustee :: Reifies v Version => GroupParams crypto c => Monad m => EncryptedTally crypto v c -> [PublicKey crypto c] -> [DecryptionShare crypto v c] -> ExceptT ErrorTally m () Source #
Decrypting an EncryptedTally from multiple TrusteePublicKeys.
combineIndispensableDecryptionShares :: Reifies v Version => GroupParams crypto c => [PublicKey crypto c] -> DecryptionShareCombinator crypto v c Source #
(
returns the combineDecryptionShares pubKeyByTrustee decShareByTrustee)DecryptionFactors by choice by Question