Safe Haskell | None |
---|---|
Language | Haskell98 |
Diffie-Hellman key exchange
- 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.
getDHLength :: DHP -> IO Int Source
Get DH parameters length (in bits).
checkDHParams :: DHP -> IO Bool Source
Check that DH parameters are coherent.
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.