cryptonite-0.27: Cryptography Primitives sink

Crypto.PubKey.ECC.DH

Description

Elliptic curve Diffie Hellman

Synopsis

Documentation

data Curve Source #

Define either a binary curve or a prime curve.

Instances
 Source # Instance detailsDefined in Crypto.PubKey.ECC.Types Methods(==) :: Curve -> Curve -> Bool #(/=) :: Curve -> Curve -> Bool # Source # Instance detailsDefined in Crypto.PubKey.ECC.Types Methodsgfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Curve -> c Curve #gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Curve #dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Curve) #dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Curve) #gmapT :: (forall b. Data b => b -> b) -> Curve -> Curve #gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Curve -> r #gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Curve -> r #gmapQ :: (forall d. Data d => d -> u) -> Curve -> [u] #gmapQi :: Int -> (forall d. Data d => d -> u) -> Curve -> u #gmapM :: Monad m => (forall d. Data d => d -> m d) -> Curve -> m Curve #gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Curve -> m Curve #gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Curve -> m Curve # Source # Instance detailsDefined in Crypto.PubKey.ECC.Types Methods Source # Instance detailsDefined in Crypto.PubKey.ECC.Types MethodsshowsPrec :: Int -> Curve -> ShowS #show :: Curve -> String #showList :: [Curve] -> ShowS #

ECC Public Point

ECC Private Number

newtype SharedKey Source #

Represent Diffie Hellman shared secret.

Constructors

 SharedKey ScrubbedBytes
Instances
 Source # Instance detailsDefined in Crypto.PubKey.DH Methods Source # Instance detailsDefined in Crypto.PubKey.DH MethodsshowList :: [SharedKey] -> ShowS # Source # Instance detailsDefined in Crypto.PubKey.DH Methodsrnf :: SharedKey -> () # Source # Instance detailsDefined in Crypto.PubKey.DH MethodswithByteArray :: SharedKey -> (Ptr p -> IO a) -> IO a #copyByteArrayToPtr :: SharedKey -> Ptr p -> IO () #

Generating a private number d.

Generating a public point Q.

Generating a shared key using our private number and the other party public point.