Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Ouroboros.Consensus.Protocol.PBFT.Crypto
Synopsis
- class (Typeable c, DSIGNAlgorithm (PBftDSIGN c), Condense (SigDSIGN (PBftDSIGN c)), Show (PBftVerKeyHash c), Ord (PBftVerKeyHash c), Eq (PBftVerKeyHash c), Show (PBftVerKeyHash c), NoThunks (PBftVerKeyHash c), NoThunks (PBftDelegationCert c), Serialise (PBftVerKeyHash c)) ⇒ PBftCrypto c where
- type PBftDSIGN c ∷ Type
- type PBftDelegationCert c = (d ∷ Type) | d → c
- type PBftVerKeyHash c = (d ∷ Type) | d → c
- dlgCertGenVerKey ∷ PBftDelegationCert c → VerKeyDSIGN (PBftDSIGN c)
- dlgCertDlgVerKey ∷ PBftDelegationCert c → VerKeyDSIGN (PBftDSIGN c)
- hashVerKey ∷ VerKeyDSIGN (PBftDSIGN c) → PBftVerKeyHash c
- data PBftMockCrypto
- newtype PBftMockVerKeyHash = PBftMockVerKeyHash {}
Documentation
class (Typeable c, DSIGNAlgorithm (PBftDSIGN c), Condense (SigDSIGN (PBftDSIGN c)), Show (PBftVerKeyHash c), Ord (PBftVerKeyHash c), Eq (PBftVerKeyHash c), Show (PBftVerKeyHash c), NoThunks (PBftVerKeyHash c), NoThunks (PBftDelegationCert c), Serialise (PBftVerKeyHash c)) ⇒ PBftCrypto c where Source #
Crypto primitives required by BFT
Cardano stores a map of stakeholder IDs rather than the verification key directly. We make this family injective for convenience - whilst it's _possible_ that there could be non-injective instances, the chances of there being more than the two instances here are basically non-existent.
Associated Types
type PBftDSIGN c ∷ Type Source #
type PBftDelegationCert c = (d ∷ Type) | d → c Source #
type PBftVerKeyHash c = (d ∷ Type) | d → c Source #
Methods
dlgCertGenVerKey ∷ PBftDelegationCert c → VerKeyDSIGN (PBftDSIGN c) Source #
dlgCertDlgVerKey ∷ PBftDelegationCert c → VerKeyDSIGN (PBftDSIGN c) Source #
hashVerKey ∷ VerKeyDSIGN (PBftDSIGN c) → PBftVerKeyHash c Source #
Instances
PBftCrypto PBftMockCrypto Source # | |
Defined in Ouroboros.Consensus.Protocol.PBFT.Crypto Associated Types type PBftDSIGN PBftMockCrypto Source # type PBftDelegationCert PBftMockCrypto = (d ∷ Type) Source # type PBftVerKeyHash PBftMockCrypto = (d ∷ Type) Source # Methods dlgCertGenVerKey ∷ PBftDelegationCert PBftMockCrypto → VerKeyDSIGN (PBftDSIGN PBftMockCrypto) Source # dlgCertDlgVerKey ∷ PBftDelegationCert PBftMockCrypto → VerKeyDSIGN (PBftDSIGN PBftMockCrypto) Source # hashVerKey ∷ VerKeyDSIGN (PBftDSIGN PBftMockCrypto) → PBftVerKeyHash PBftMockCrypto Source # |
data PBftMockCrypto Source #
Instances
PBftCrypto PBftMockCrypto Source # | |
Defined in Ouroboros.Consensus.Protocol.PBFT.Crypto Associated Types type PBftDSIGN PBftMockCrypto Source # type PBftDelegationCert PBftMockCrypto = (d ∷ Type) Source # type PBftVerKeyHash PBftMockCrypto = (d ∷ Type) Source # Methods dlgCertGenVerKey ∷ PBftDelegationCert PBftMockCrypto → VerKeyDSIGN (PBftDSIGN PBftMockCrypto) Source # dlgCertDlgVerKey ∷ PBftDelegationCert PBftMockCrypto → VerKeyDSIGN (PBftDSIGN PBftMockCrypto) Source # hashVerKey ∷ VerKeyDSIGN (PBftDSIGN PBftMockCrypto) → PBftVerKeyHash PBftMockCrypto Source # | |
type PBftDSIGN PBftMockCrypto Source # | |
Defined in Ouroboros.Consensus.Protocol.PBFT.Crypto | |
type PBftDelegationCert PBftMockCrypto Source # | |
type PBftVerKeyHash PBftMockCrypto Source # | |
newtype PBftMockVerKeyHash Source #
We don't hash and just use the underlying Word64
.
Constructors
PBftMockVerKeyHash | |