morley-0.6.0: Developer tools for the Michelson Language

Safe HaskellNone
LanguageHaskell2010

Tezos.Crypto.Ed25519

Contents

Description

Ed25519 cryptographic primitives.

Synopsis

Cryptographic primitive types

newtype PublicKey Source #

ED25519 public cryptographic key.

Constructors

PublicKey 
Instances
Eq PublicKey Source # 
Instance details

Defined in Tezos.Crypto.Ed25519

Show PublicKey Source # 
Instance details

Defined in Tezos.Crypto.Ed25519

Arbitrary PublicKey Source # 
Instance details

Defined in Tezos.Crypto.Ed25519

Buildable PublicKey Source # 
Instance details

Defined in Tezos.Crypto.Ed25519

Methods

build :: PublicKey -> Builder #

data SecretKey Source #

ED25519 secret cryptographic key.

Instances
Eq SecretKey Source # 
Instance details

Defined in Tezos.Crypto.Ed25519

Show SecretKey Source # 
Instance details

Defined in Tezos.Crypto.Ed25519

Arbitrary SecretKey Source # 
Instance details

Defined in Tezos.Crypto.Ed25519

Buildable SecretKey Source # 
Instance details

Defined in Tezos.Crypto.Ed25519

Methods

build :: SecretKey -> Builder #

newtype Signature Source #

ED25519 cryptographic signature.

Constructors

Signature 
Instances
Eq Signature Source # 
Instance details

Defined in Tezos.Crypto.Ed25519

Show Signature Source # 
Instance details

Defined in Tezos.Crypto.Ed25519

Arbitrary Signature Source # 
Instance details

Defined in Tezos.Crypto.Ed25519

Buildable Signature Source # 
Instance details

Defined in Tezos.Crypto.Ed25519

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 :: ByteArray ba => PublicKey -> ba Source #

Convert a PublicKey to raw bytes.

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

Convert a Signature to raw bytes.

Formatting and parsing

Signing

sign :: SecretKey -> ByteString -> Signature Source #

Sign a message using the secret key.

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

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