| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ouroboros.Consensus.Peras.Crypto.BLS
Contents
Description
BLS-based crypto scheme used in Peras voting committees
Synopsis
- data PerasBLSCrypto
- type family ElectionId crypto
- type family VoteCandidate crypto
- newtype PerasPrivateKey = PerasPrivateKey (PrivateKey (Any ∷ KeyRole))
- data PerasPublicKey = PerasPublicKey (PublicKey (Any ∷ KeyRole))
- data family VoteSignature crypto
- data family VRFElectionInput crypto
- data family VRFOutput crypto
- type family AggregateVoteVerificationKey crypto
- type family AggregateVoteSignature crypto
- newtype PerasBLSCryptoAggregateVoteVerificationKey = PerasBLSCryptoAggregateVoteVerificationKey {}
- newtype PerasBLSCryptoAggregateVoteSignature = PerasBLSCryptoAggregateVoteSignature {}
Documentation
data PerasBLSCrypto Source #
BLS-based crypto scheme used in Peras voting committees
TODO: we should investigate why this type needs these instances at all. See https://github.com/tweag/cardano-peras/issues/272
Instances
type family ElectionId crypto Source #
Election identifiers
Instances
| type ElectionId PerasBLSCrypto Source # | |
Defined in Ouroboros.Consensus.Peras.Crypto.BLS | |
| type ElectionId (VoidPerasCrypto blk) Source # | |
Defined in Ouroboros.Consensus.Peras.Void | |
type family VoteCandidate crypto Source #
Vote candidates, i.e., what's being voted for
Instances
| type VoteCandidate PerasBLSCrypto Source # | |
Defined in Ouroboros.Consensus.Peras.Crypto.BLS | |
| type VoteCandidate (VoidPerasCrypto blk) Source # | |
Defined in Ouroboros.Consensus.Peras.Void | |
newtype PerasPrivateKey Source #
Private key of a Peras committee member
Constructors
| PerasPrivateKey (PrivateKey (Any ∷ KeyRole)) |
Instances
| Generic PerasPrivateKey Source # | |||||
Defined in Ouroboros.Consensus.Peras.Crypto.BLS Associated Types
Methods from ∷ PerasPrivateKey → Rep PerasPrivateKey x # to ∷ Rep PerasPrivateKey x → PerasPrivateKey # | |||||
| NoThunks PerasPrivateKey Source # | |||||
Defined in Ouroboros.Consensus.Peras.Crypto.BLS | |||||
| type Rep PerasPrivateKey Source # | |||||
Defined in Ouroboros.Consensus.Peras.Crypto.BLS type Rep PerasPrivateKey = D1 ('MetaData "PerasPrivateKey" "Ouroboros.Consensus.Peras.Crypto.BLS" "ouroboros-consensus-4.0.0.0-inplace" 'True) (C1 ('MetaCons "PerasPrivateKey" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PrivateKey (Any ∷ KeyRole))))) | |||||
data PerasPublicKey Source #
Public key of a Peras committee member
Constructors
| PerasPublicKey (PublicKey (Any ∷ KeyRole)) |
Instances
| FromCBOR PerasPublicKey Source # | |||||
Defined in Ouroboros.Consensus.Peras.Crypto.BLS | |||||
| ToCBOR PerasPublicKey Source # | |||||
Defined in Ouroboros.Consensus.Peras.Crypto.BLS Methods toCBOR ∷ PerasPublicKey → Encoding Source # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy PerasPublicKey → Size Source # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [PerasPublicKey] → Size Source # | |||||
| Eq PerasPublicKey Source # | |||||
Defined in Ouroboros.Consensus.Peras.Crypto.BLS Methods (==) ∷ PerasPublicKey → PerasPublicKey → Bool # (/=) ∷ PerasPublicKey → PerasPublicKey → Bool # | |||||
| Generic PerasPublicKey Source # | |||||
Defined in Ouroboros.Consensus.Peras.Crypto.BLS Associated Types
| |||||
| Show PerasPublicKey Source # | |||||
Defined in Ouroboros.Consensus.Peras.Crypto.BLS Methods showsPrec ∷ Int → PerasPublicKey → ShowS # show ∷ PerasPublicKey → String # showList ∷ [PerasPublicKey] → ShowS # | |||||
| NoThunks PerasPublicKey Source # | |||||
Defined in Ouroboros.Consensus.Peras.Crypto.BLS | |||||
| type Rep PerasPublicKey Source # | |||||
Defined in Ouroboros.Consensus.Peras.Crypto.BLS type Rep PerasPublicKey = D1 ('MetaData "PerasPublicKey" "Ouroboros.Consensus.Peras.Crypto.BLS" "ouroboros-consensus-4.0.0.0-inplace" 'False) (C1 ('MetaCons "PerasPublicKey" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PublicKey (Any ∷ KeyRole))))) | |||||
data family VoteSignature crypto Source #
Cryptographic signature of a vote
Instances
| FromCBOR (VoteSignature PerasBLSCrypto) Source # | |||||
Defined in Ouroboros.Consensus.Peras.Crypto.BLS Methods fromCBOR ∷ Decoder s (VoteSignature PerasBLSCrypto) Source # label ∷ Proxy (VoteSignature PerasBLSCrypto) → Text Source # | |||||
| ToCBOR (VoteSignature PerasBLSCrypto) Source # | |||||
Defined in Ouroboros.Consensus.Peras.Crypto.BLS Methods toCBOR ∷ VoteSignature PerasBLSCrypto → Encoding Source # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (VoteSignature PerasBLSCrypto) → Size Source # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [VoteSignature PerasBLSCrypto] → Size Source # | |||||
| Eq (VoteSignature PerasBLSCrypto) Source # | |||||
Defined in Ouroboros.Consensus.Peras.Crypto.BLS | |||||
| Generic (VoteSignature PerasBLSCrypto) Source # | |||||
Defined in Ouroboros.Consensus.Peras.Crypto.BLS Associated Types
Methods from ∷ VoteSignature PerasBLSCrypto → Rep (VoteSignature PerasBLSCrypto) x # to ∷ Rep (VoteSignature PerasBLSCrypto) x → VoteSignature PerasBLSCrypto # | |||||
| Show (VoteSignature PerasBLSCrypto) Source # | |||||
Defined in Ouroboros.Consensus.Peras.Crypto.BLS Methods showsPrec ∷ Int → VoteSignature PerasBLSCrypto → ShowS # | |||||
| NoThunks (VoteSignature PerasBLSCrypto) Source # | |||||
Defined in Ouroboros.Consensus.Peras.Crypto.BLS Methods noThunks ∷ Context → VoteSignature PerasBLSCrypto → IO (Maybe ThunkInfo) Source # wNoThunks ∷ Context → VoteSignature PerasBLSCrypto → IO (Maybe ThunkInfo) Source # showTypeOf ∷ Proxy (VoteSignature PerasBLSCrypto) → String Source # | |||||
| newtype VoteSignature PerasBLSCrypto Source # | |||||
| type Rep (VoteSignature PerasBLSCrypto) Source # | |||||
Defined in Ouroboros.Consensus.Peras.Crypto.BLS type Rep (VoteSignature PerasBLSCrypto) = D1 ('MetaData "VoteSignature" "Ouroboros.Consensus.Peras.Crypto.BLS" "ouroboros-consensus-4.0.0.0-inplace" 'True) (C1 ('MetaCons "PerasBLSCryptoVoteSignature" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPerasBLSCryptoVoteSignature") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Signature 'SIGN)))) | |||||
| data VoteSignature (VoidPerasCrypto blk) Source # | |||||
Defined in Ouroboros.Consensus.Peras.Void | |||||
data family VRFElectionInput crypto Source #
Input to the verifiable random function.
This is fixed across all participants for a given election.
Instances
| Eq (VRFElectionInput PerasBLSCrypto) Source # | |
| Show (VRFElectionInput PerasBLSCrypto) Source # | |
Defined in Ouroboros.Consensus.Peras.Crypto.BLS Methods showsPrec ∷ Int → VRFElectionInput PerasBLSCrypto → ShowS # | |
| newtype VRFElectionInput PerasBLSCrypto Source # | |
data family VRFOutput crypto Source #
Output of the verifiable random function
Instances
| FromCBOR (VRFOutput PerasBLSCrypto) Source # | |||||
Defined in Ouroboros.Consensus.Peras.Crypto.BLS | |||||
| ToCBOR (VRFOutput PerasBLSCrypto) Source # | |||||
Defined in Ouroboros.Consensus.Peras.Crypto.BLS | |||||
| Eq (VRFOutput PerasBLSCrypto) Source # | |||||
Defined in Ouroboros.Consensus.Peras.Crypto.BLS Methods (==) ∷ VRFOutput PerasBLSCrypto → VRFOutput PerasBLSCrypto → Bool # (/=) ∷ VRFOutput PerasBLSCrypto → VRFOutput PerasBLSCrypto → Bool # | |||||
| Generic (VRFOutput PerasBLSCrypto) Source # | |||||
Defined in Ouroboros.Consensus.Peras.Crypto.BLS Associated Types
Methods from ∷ VRFOutput PerasBLSCrypto → Rep (VRFOutput PerasBLSCrypto) x # to ∷ Rep (VRFOutput PerasBLSCrypto) x → VRFOutput PerasBLSCrypto # | |||||
| Show (VRFOutput PerasBLSCrypto) Source # | |||||
Defined in Ouroboros.Consensus.Peras.Crypto.BLS | |||||
| NoThunks (VRFOutput PerasBLSCrypto) Source # | |||||
| newtype VRFOutput PerasBLSCrypto Source # | |||||
Defined in Ouroboros.Consensus.Peras.Crypto.BLS | |||||
| type Rep (VRFOutput PerasBLSCrypto) Source # | |||||
Defined in Ouroboros.Consensus.Peras.Crypto.BLS type Rep (VRFOutput PerasBLSCrypto) = D1 ('MetaData "VRFOutput" "Ouroboros.Consensus.Peras.Crypto.BLS" "ouroboros-consensus-4.0.0.0-inplace" 'True) (C1 ('MetaCons "PerasBLSCryptoVRFOutput" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPerasBLSCryptoVRFOutput") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Signature 'VRF)))) | |||||
type family AggregateVoteVerificationKey crypto Source #
Aggregate vote verification keys
For testing purposes
newtype PerasBLSCryptoAggregateVoteVerificationKey Source #
Wrapper around the aggregate vote signatures.
Constructors
| PerasBLSCryptoAggregateVoteVerificationKey | |
newtype PerasBLSCryptoAggregateVoteSignature Source #
Wrapper around the aggregate vote verification keys.
Constructors
| PerasBLSCryptoAggregateVoteSignature | |
Instances
| FromCBOR PerasBLSCryptoAggregateVoteSignature Source # | |||||
| ToCBOR PerasBLSCryptoAggregateVoteSignature Source # | |||||
Defined in Ouroboros.Consensus.Peras.Crypto.BLS Methods toCBOR ∷ PerasBLSCryptoAggregateVoteSignature → Encoding Source # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy PerasBLSCryptoAggregateVoteSignature → Size Source # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [PerasBLSCryptoAggregateVoteSignature] → Size Source # | |||||
| Eq PerasBLSCryptoAggregateVoteSignature Source # | |||||
| Generic PerasBLSCryptoAggregateVoteSignature Source # | |||||
Defined in Ouroboros.Consensus.Peras.Crypto.BLS Associated Types
| |||||
| Show PerasBLSCryptoAggregateVoteSignature Source # | |||||
| NoThunks PerasBLSCryptoAggregateVoteSignature Source # | |||||
Defined in Ouroboros.Consensus.Peras.Crypto.BLS | |||||
| type Rep PerasBLSCryptoAggregateVoteSignature Source # | |||||
Defined in Ouroboros.Consensus.Peras.Crypto.BLS type Rep PerasBLSCryptoAggregateVoteSignature = D1 ('MetaData "PerasBLSCryptoAggregateVoteSignature" "Ouroboros.Consensus.Peras.Crypto.BLS" "ouroboros-consensus-4.0.0.0-inplace" 'True) (C1 ('MetaCons "PerasBLSCryptoAggregateVoteSignature" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPerasBLSCryptoAggregateVoteSignature") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Signature 'SIGN)))) | |||||