openid-0.1.0.1: An implementation of the OpenID-2.0 spec.Source codeContentsIndex
Codec.Encryption.DH
Contents
Diffie-Hellman key exchange
Synopsis
data DHParams = DHParams {
dhPrivateKey :: [Word8]
dhPublicKey :: [Word8]
dhGenerator :: Generator
dhModulus :: Modulus
}
data DHParamError
= PNotPrime
| PNotSafePrime
| UnableToCheckGenerator
| NotSuitableGenerator
type Modulus = Integer
type Generator = Int
newDHParams :: Int -> Generator -> IO (Maybe DHParams)
checkDHParams :: DHParams -> IO [DHParamError]
generateKey :: Modulus -> Generator -> IO (Maybe DHParams)
computeKey :: [Word8] -> DHParams -> [Word8]
Diffie-Hellman key exchange
data DHParams Source
Constructors
DHParams
dhPrivateKey :: [Word8]
dhPublicKey :: [Word8]
dhGenerator :: Generator
dhModulus :: Modulus
show/hide Instances
data DHParamError Source
Constructors
PNotPrime
PNotSafePrime
UnableToCheckGenerator
NotSuitableGenerator
show/hide Instances
type Modulus = IntegerSource
type Generator = IntSource
newDHParams :: Int -> Generator -> IO (Maybe DHParams)Source
checkDHParams :: DHParams -> IO [DHParamError]Source
generateKey :: Modulus -> Generator -> IO (Maybe DHParams)Source
computeKey :: [Word8] -> DHParams -> [Word8]Source
Produced by Haddock version 2.4.1