Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype RedeemVerificationKey = RedeemVerificationKey PublicKey
- redeemVKB64F :: Format r ( RedeemVerificationKey -> r)
- redeemVKB64UrlF :: Format r ( RedeemVerificationKey -> r)
- redeemVKB64ShortF :: Format r ( RedeemVerificationKey -> r)
- fromAvvmVK :: Text -> Either AvvmVKError RedeemVerificationKey
- fromVerificationKeyToByteString :: PublicKey -> ByteString
- redeemVKBuild :: ByteString -> RedeemVerificationKey
- newtype RedeemSigningKey = RedeemSigningKey SecretKey
- redeemToVerification :: RedeemSigningKey -> RedeemVerificationKey
- newtype RedeemSignature a = RedeemSignature Signature
- redeemSign :: ToCBOR a => ProtocolMagicId -> SignTag -> RedeemSigningKey -> a -> RedeemSignature a
- redeemSignRaw :: ProtocolMagicId -> Maybe SignTag -> RedeemSigningKey -> ByteString -> RedeemSignature Raw
- verifyRedeemSig :: ToCBOR a => ProtocolMagicId -> SignTag -> RedeemVerificationKey -> a -> RedeemSignature a -> Bool
- verifyRedeemSigDecoded :: Decoded t => Annotated ProtocolMagicId ByteString -> SignTag -> RedeemVerificationKey -> t -> RedeemSignature ( BaseType t) -> Bool
- verifyRedeemSigRaw :: RedeemVerificationKey -> ByteString -> RedeemSignature Raw -> Bool
- redeemKeyGen :: MonadRandom m => m ( RedeemVerificationKey , RedeemSigningKey )
- redeemDeterministicKeyGen :: ByteString -> Maybe ( RedeemVerificationKey , RedeemSigningKey )
- data CompactRedeemVerificationKey = CompactRedeemVerificationKey ! Word64 ! Word64 ! Word64 ! Word64
- fromCompactRedeemVerificationKey :: CompactRedeemVerificationKey -> RedeemVerificationKey
- toCompactRedeemVerificationKey :: RedeemVerificationKey -> CompactRedeemVerificationKey
Documentation
newtype RedeemVerificationKey Source #
Wrapper around
PublicKey
.
Instances
redeemVKB64F :: Format r ( RedeemVerificationKey -> r) Source #
redeemVKB64UrlF :: Format r ( RedeemVerificationKey -> r) Source #
Base64url Format for
RedeemVerificationKey
.
redeemVKB64ShortF :: Format r ( RedeemVerificationKey -> r) Source #
fromAvvmVK :: Text -> Either AvvmVKError RedeemVerificationKey Source #
Read the text into a redeeming verification key. The key should be in AVVM format which is base64(url). This function must be inverse of redeemVKB64UrlF formatter.
redeemVKBuild :: ByteString -> RedeemVerificationKey Source #
Creates a verification key from 32 byte bytestring, fails with
error
otherwise
newtype RedeemSigningKey Source #
Wrapper around
SecretKey
.
Instances
redeemToVerification :: RedeemSigningKey -> RedeemVerificationKey Source #
Verification key derivation function.
newtype RedeemSignature a Source #
Wrapper around
Signature
Instances
redeemSign :: ToCBOR a => ProtocolMagicId -> SignTag -> RedeemSigningKey -> a -> RedeemSignature a Source #
Encode something with
ToCBOR
and sign it
redeemSignRaw :: ProtocolMagicId -> Maybe SignTag -> RedeemSigningKey -> ByteString -> RedeemSignature Raw Source #
Alias for constructor
verifyRedeemSig :: ToCBOR a => ProtocolMagicId -> SignTag -> RedeemVerificationKey -> a -> RedeemSignature a -> Bool Source #
Verify a redeem signature
verifyRedeemSigDecoded :: Decoded t => Annotated ProtocolMagicId ByteString -> SignTag -> RedeemVerificationKey -> t -> RedeemSignature ( BaseType t) -> Bool Source #
verifyRedeemSigRaw :: RedeemVerificationKey -> ByteString -> RedeemSignature Raw -> Bool Source #
Verify raw
ByteString
redeemKeyGen :: MonadRandom m => m ( RedeemVerificationKey , RedeemSigningKey ) Source #
Generate a key pair. It's recommended to run it with
runSecureRandom
from
Cardano.Crypto.Random
because the OpenSSL generator is probably safer
than the default IO generator.
redeemDeterministicKeyGen :: ByteString -> Maybe ( RedeemVerificationKey , RedeemSigningKey ) Source #
Create key pair deterministically from 32 bytes
data CompactRedeemVerificationKey Source #