Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Diffie-Hellman key exchange
Synopsis
- data DHP
- data DH
- data DHGen
- genDHParams :: DHGen -> Int -> IO DHP
- getDHLength :: DHP -> IO Int
- checkDHParams :: DHP -> IO Bool
- genDH :: DHP -> IO DH
- getDHParams :: DH -> DHP
- getDHPublicKey :: DH -> IO Integer
- computeDHKey :: DH -> Integer -> IO ByteString
Documentation
genDHParams :: DHGen -> Int -> IO DHP Source #
generates genDHParams
gen nn
-bit long DH parameters.
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.
computeDHKey :: DH -> Integer -> IO ByteString Source #
Compute the shared key using the other party's public key.