morley-0.7.0: Developer tools for the Michelson Language

Safe HaskellNone
LanguageHaskell2010

Tezos.Crypto.P256

Contents

Description

P256 cryptographic primitives.

This module is mostly a stub, it doesn't implement actual crypto. TODO (#18) implement crypto properly.

Synopsis

Cryptographic primitive types

newtype PublicKey Source #

P256 public cryptographic key.

Constructors

PublicKey 
Instances
Eq PublicKey Source # 
Instance details

Defined in Tezos.Crypto.P256

Show PublicKey Source # 
Instance details

Defined in Tezos.Crypto.P256

Arbitrary PublicKey Source # 
Instance details

Defined in Tezos.Crypto.P256

Buildable PublicKey Source # 
Instance details

Defined in Tezos.Crypto.P256

Methods

build :: PublicKey -> Builder #

data SecretKey Source #

P256 secret cryptographic key.

Instances
Eq SecretKey Source # 
Instance details

Defined in Tezos.Crypto.P256

Show SecretKey Source # 
Instance details

Defined in Tezos.Crypto.P256

Arbitrary SecretKey Source # 
Instance details

Defined in Tezos.Crypto.P256

newtype Signature Source #

P256 cryptographic signature.

Constructors

Signature 
Instances
Eq Signature Source # 
Instance details

Defined in Tezos.Crypto.P256

Show Signature Source # 
Instance details

Defined in Tezos.Crypto.P256

Arbitrary Signature Source # 
Instance details

Defined in Tezos.Crypto.P256

Buildable Signature Source # 
Instance details

Defined in Tezos.Crypto.P256

Methods

build :: Signature -> Builder #

detSecretKey :: ByteString -> SecretKey Source #

Deterministicaly generate a secret key from seed.

toPublic :: SecretKey -> PublicKey Source #

Create a public key from a secret key.

Raw bytes (no checksums, tags or anything)

publicKeyToBytes :: forall ba. ByteArray ba => PublicKey -> ba Source #

Convert a PublicKey to raw bytes.

TODO (#18): implement properly.

mkPublicKey :: ByteArrayAccess ba => ba -> Either CryptoParseError PublicKey Source #

Make a PublicKey from raw bytes.

TODO (#18): implement properly.

signatureToBytes :: ByteArray ba => Signature -> ba Source #

Convert a PublicKey to raw bytes.

TODO (#18): implement properly.

mkSignature :: ByteArray ba => ba -> Either CryptoParseError Signature Source #

Make a Signature from raw bytes.

TODO (#18): implement properly.

Formatting and parsing

Signing

checkSignature :: PublicKey -> Signature -> ByteString -> Bool Source #

Check that a sequence of bytes has been signed with a given key.