cardano-crypto-wrapper-1.5.1.2: Cryptographic primitives used in Byron era of the Cardano project
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Crypto.Signing.Tag

Synopsis

Documentation

data SignTag Source #

To protect against replay attacks (i.e. when an attacker intercepts a signed piece of data and later sends it again), we add a tag to all data that we sign. This ensures that even if some bytestring can be deserialized into two different types of messages (A and B), the attacker can't take message A and send it as message B.

We also automatically add the network tag (protocolMagic) whenever it makes sense, to ensure that things intended for testnet won't work for mainnet.

Constructors

SignForTestingOnly

Anything (to be used for testing only)

SignTx

Tx: TxSigData

SignRedeemTx

Redeem tx: TxSigData

SignVssCert

Vss certificate: (VssVerificationKey, EpochNumber)

SignUSProposal

Update proposal: UpdateProposalToSign

SignCommitment

Commitment: (EpochNumber, Commitment)

SignUSVote

US proposal vote: (UpId, Bool)

SignBlock VerificationKey

Block header: ToSign

This constructor takes the VerificationKey of the delegation certificate issuer, which is prepended to the signature as part of the sign tag

SignCertificate

Certificate: Certificate

Instances

Instances details
Generic SignTag Source # 
Instance details

Defined in Cardano.Crypto.Signing.Tag

Associated Types

type Rep SignTagTypeType Source #

Methods

fromSignTagRep SignTag x Source #

toRep SignTag x → SignTag Source #

Show SignTag Source # 
Instance details

Defined in Cardano.Crypto.Signing.Tag

Buildable SignTag Source # 
Instance details

Defined in Cardano.Crypto.Signing.Tag

Methods

buildSignTagBuilder Source #

Eq SignTag Source # 
Instance details

Defined in Cardano.Crypto.Signing.Tag

Methods

(==)SignTagSignTagBool Source #

(/=)SignTagSignTagBool Source #

Ord SignTag Source # 
Instance details

Defined in Cardano.Crypto.Signing.Tag

type Rep SignTag Source # 
Instance details

Defined in Cardano.Crypto.Signing.Tag

type Rep SignTag = D1 ('MetaData "SignTag" "Cardano.Crypto.Signing.Tag" "cardano-crypto-wrapper-1.5.1.2-inplace" 'False) (((C1 ('MetaCons "SignForTestingOnly" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "SignTx" 'PrefixI 'False) (U1TypeType)) :+: (C1 ('MetaCons "SignRedeemTx" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "SignVssCert" 'PrefixI 'False) (U1TypeType))) :+: ((C1 ('MetaCons "SignUSProposal" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "SignCommitment" 'PrefixI 'False) (U1TypeType)) :+: (C1 ('MetaCons "SignUSVote" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "SignBlock" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 VerificationKey)) :+: C1 ('MetaCons "SignCertificate" 'PrefixI 'False) (U1TypeType)))))

signTagProtocolMagicIdSignTagByteString Source #

Get magic bytes corresponding to a SignTag. Guaranteed to be different (and begin with a different byte) for different tags.

signTagDecodedAnnotated ProtocolMagicId ByteStringSignTagByteString Source #

Get magic bytes corresponding to a SignTag, taking ProtocolMagic bytes from the annotation