Crypto.PubKey.Ed448

cryptonite-0.13: Cryptography Primitives sink

License | BSD-style
Maintainer | John Galt <jgalt@centromere.net>
Stability | experimental
Portability | unknown
Safe Haskell | None
Language | Haskell2010

Crypto.PubKey.Ed448

Contents

- Smart constructors
- methods

Description

Ed448 support

Synopsis

- data SecretKey
- data PublicKey
- data DhSecret
- dhSecret :: ByteArrayAccess b => b -> CryptoFailable DhSecret
- publicKey :: ByteArrayAccess bs => bs -> CryptoFailable PublicKey
- secretKey :: ByteArrayAccess bs => bs -> CryptoFailable SecretKey
- dh :: PublicKey -> SecretKey -> DhSecret
- toPublic :: SecretKey -> PublicKey

# Documentation

data SecretKey

A Ed448 Secret key

Instances

Eq SecretKey |
Show SecretKey |
NFData SecretKey |
ByteArrayAccess SecretKey |

data PublicKey

A Ed448 public key

Instances

Eq PublicKey |
Show PublicKey |
NFData PublicKey |
ByteArrayAccess PublicKey |

data DhSecret

A Ed448 Diffie Hellman secret related to a public key and a secret key.

Instances

Eq DhSecret |
Show DhSecret |
NFData DhSecret |
ByteArrayAccess DhSecret |

# Smart constructors

dhSecret :: ByteArrayAccess b => b -> CryptoFailable DhSecret

Create a DhSecret from a bytearray object

publicKey :: ByteArrayAccess bs => bs -> CryptoFailable PublicKey

Try to build a public key from a bytearray

secretKey :: ByteArrayAccess bs => bs -> CryptoFailable SecretKey

Try to build a secret key from a bytearray

# methods

dh :: PublicKey -> SecretKey -> DhSecret

Compute the Diffie Hellman secret from a public key and a secret key

toPublic :: SecretKey -> PublicKey

Create a public key from a secret key