cryptonite-0.29: Cryptography Primitives sink
LicenseBSD-style
MaintainerCarlos Rodriguez-Vega <crodveg@yahoo.es>
Stabilityexperimental
Portabilityunknown
Safe HaskellNone
LanguageHaskell2010

Crypto.PubKey.Rabin.Types

Description

 
Synopsis

Documentation

data Error #

Error possible during encryption, decryption or signing.

Constructors

MessageTooLong

the message to encrypt is too long

MessageNotRecognized

the message decrypted doesn't have a OAEP structure

InvalidParameters

some parameters lead to breaking assumptions

Instances

Instances details
Eq Error # 
Instance details

Defined in Crypto.PubKey.Rabin.Types

Methods

(==) :: Error -> Error -> Bool #

(/=) :: Error -> Error -> Bool #

Show Error # 
Instance details

Defined in Crypto.PubKey.Rabin.Types

Methods

showsPrec :: Int -> Error -> ShowS #

show :: Error -> String #

showList :: [Error] -> ShowS #

generatePrimes #

Arguments

:: MonadRandom m 
=> Int

size in bytes

-> PrimeCondition

condition prime p must satisfy

-> PrimeCondition

condition prime q must satisfy

-> m (Integer, Integer)

chosen distinct primes p and q

Generate primes p & q