HORIZON HASKELLDocslts/ghc-9.14.x3e2d5682026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 3e2d568 · 2026-10-11

Modulecrypton-2.1.7Haskell2010

Crypto.PubKey.Curve25519

Curve25519 support

  • 3 types
  • 6 values
  • Packagecrypton-2.1.7
  • Exports9
  • LanguageHaskell2010
  • LicenceBSD-3-Clause AND MIT AND ISC
  • SourceCurve25519.hs
newtypenewtype PublicKey
#

A Curve25519 public key

Instances4Eq, Show, NFData, ByteArrayAccess
newtypenewtype DhSecret
#

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

Instances4Eq, Show, NFData, ByteArrayAccess

Smart constructors

3 declarations

Methods

3 declarations
valuedh :: PublicKey -> SecretKey -> DhSecret
#

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.

valuetoPublic :: SecretKey -> PublicKey
#

Create a public key from a secret key The base point does not go in: where the assembly is built there is a table for this, and it is four to five times less work than multiplying the point 9 the general way.