HsOpenSSL-0.11.4.14: Partial OpenSSL binding for Haskell

Safe HaskellNone
LanguageHaskell2010

OpenSSL.DH

Description

Diffie-Hellman key exchange

Synopsis

Documentation

data DHP Source #

data DH Source #

data DHGen Source #

Constructors

DHGen2 
DHGen5 

Instances

Eq DHGen Source # 

Methods

(==) :: DHGen -> DHGen -> Bool #

(/=) :: DHGen -> DHGen -> Bool #

Ord DHGen Source # 

Methods

compare :: DHGen -> DHGen -> Ordering #

(<) :: DHGen -> DHGen -> Bool #

(<=) :: DHGen -> DHGen -> Bool #

(>) :: DHGen -> DHGen -> Bool #

(>=) :: DHGen -> DHGen -> Bool #

max :: DHGen -> DHGen -> DHGen #

min :: DHGen -> DHGen -> DHGen #

Show DHGen Source # 

Methods

showsPrec :: Int -> DHGen -> ShowS #

show :: DHGen -> String #

showList :: [DHGen] -> ShowS #

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.