HsOpenSSL-0.11.1.1: Partial OpenSSL binding for Haskell

Safe HaskellNone
LanguageHaskell98

OpenSSL.DH

Description

Diffie-Hellman key exchange

Synopsis

Documentation

data DHP Source

data DH Source

data DHGen Source

Constructors

DHGen2 
DHGen5 

Instances

genDHParams :: DHGen -> Int -> IO DHP Source

genDHParams gen n generates n-bit long DH parameters.

getDHLength :: DHP -> IO Int Source

Get DH parameters length (in bits).

checkDHParams :: DHP -> IO Bool Source

Check that DH parameters are coherent.

genDH :: DHP -> IO DH Source

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

getDHParams :: DH -> DHP Source

Get parameters of a key exchange.

getDHPublicKey :: DH -> IO Integer Source

Get the public key.

computeDHKey :: DH -> Integer -> IO ByteString Source

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