HsOpenSSL-0.10.1.2: (Incomplete) OpenSSL binding for Haskell

OpenSSL.DH

Description

Diffie-Hellman key exchange

Synopsis

Documentation

data DHP

data DH

data DHGen

Constructors

DHGen2 
DHGen5 

Instances

genDHParams :: DHGen -> Int -> IO DHP

genDHParams gen n generates n-bit long DH parameters.

getDHLength :: DHP -> IO Int

Get DH parameters length (in bits).

checkDHParams :: DHP -> IO Bool

Check that DH parameters are coherent.

genDH :: DHP -> IO DH

The first step of a key exchange. Public and private keys are generated.

getDHParams :: DH -> DHP

Get parameters of a key exchange.

getDHPublicKey :: DH -> IO Integer

Get the public key.

computeDHKey :: DH -> Integer -> IO ByteString

Compute the shared key using the other party's public key.