raaz-0.1.1: The raaz cryptographic library.

Safe Haskell | Safe
Language | Haskell2010

Raaz.Core.DH

Description

This module provides an abstract interface for Diffie Hellman Key Exchange.

Synopsis

- class DH d where
  - type Secret d :: *
  - type PublicToken d :: *
  - type SharedSecret d :: *

# Documentation

class DH d where Source #

The DH (Diffie-Hellman) typeclass provides an interface for key exchanges. `Secret` represents the secret generated by each party & known only to itself. `PublicToken` represents the token generated from the `Secret` which is sent to the other party. `SharedSecret` represents the common secret generated by both parties from the respective public tokens. `publicToken` takes the generator of the group and a secret and generates the public token. `sharedSecret` takes the generator of the group, secret of one party and public token of the other party and generates the shared secret.

Minimal complete definition

publicToken, sharedSecret

Associated Types

type Secret d :: * Source #

type PublicToken d :: * Source #

type SharedSecret d :: * Source #

Methods

publicToken :: d -> Secret d -> PublicToken d Source #

sharedSecret :: d -> Secret d -> PublicToken d -> SharedSecret d Source #