cryptonite-0.27: Cryptography Primitives sink
License BSD-style
Maintainer Vincent Hanquez <vincent@snarc.org>
Stability experimental
Portability unknown
Safe Haskell None
Language Haskell2010

Crypto.PubKey.Curve25519

Description

Curve25519 support

Synopsis

Documentation

Smart constructors

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

Create a DhSecret from a bytearray object

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

Try to build a public key from a bytearray

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

Try to build a secret key from a bytearray

Methods

dh :: PublicKey -> SecretKey -> DhSecret Source #

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

This implementation may return an all-zero value as it does not check for the condition.

toPublic :: SecretKey -> PublicKey Source #

Create a public key from a secret key