spake2-0.1.0: Implementation of the SPAKE2 Password-Authenticated Key Exchange algorithm

Safe HaskellNone
LanguageHaskell2010

Crypto.Spake2.Groups

Contents

Description

Each of these implements the Group typeclass.

Synopsis

Documentation

data IntegerGroup Source #

A finite group of integers with respect to multiplication modulo the group order.

Construct with makeIntegerGroup.

Constructors

IntegerGroup 

Instances

Eq IntegerGroup Source # 
Show IntegerGroup Source # 
Group IntegerGroup Source # 
type Element IntegerGroup Source # 
type Scalar IntegerGroup Source # 

makeIntegerGroup :: Integer -> Integer -> Integer -> Maybe IntegerGroup Source #

Construct an IntegerGroup.

Will fail if generator is '1', since having the identity for a generator means the subgroup is the entire group.

TODO: Find other things to check for validity.

For testing only

newtype IntegerAddition Source #

Simple integer addition group.

Do NOT use this for anything cryptographic.

Constructors

IntegerAddition 

Fields

Instances

Eq IntegerAddition Source # 
Ord IntegerAddition Source # 
Show IntegerAddition Source # 
Group IntegerAddition Source # 
type Element IntegerAddition Source # 
type Scalar IntegerAddition Source #