License | BSD-style |
---|---|
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Stability | experimental |
Portability | unknown |
Safe Haskell | None |
Language | Haskell2010 |
Elliptic curve Diffie Hellman
- data Curve
- type PublicPoint = Point
- type PrivateNumber = Integer
- newtype SharedKey = SharedKey Integer
- generatePrivate :: MonadRandom m => Curve -> m PrivateNumber
- calculatePublic :: Curve -> PrivateNumber -> PublicPoint
- getShared :: Curve -> PrivateNumber -> PublicPoint -> SharedKey
Documentation
Define either a binary curve or a prime curve.
type PublicPoint = Point Source
ECC Public Point
type PrivateNumber = Integer Source
ECC Private Number
generatePrivate :: MonadRandom m => Curve -> m PrivateNumber Source
Generating a private number d.
calculatePublic :: Curve -> PrivateNumber -> PublicPoint Source
Generating a public point Q.
getShared :: Curve -> PrivateNumber -> PublicPoint -> SharedKey Source
Generating a shared key using our private number and the other party public point.