cryptonite-0.30: Cryptography Primitives sink

License | BSD-style
Maintainer | Carlos Rodriguez-Vega <crodveg@yahoo.es>
Stability | experimental
Portability | unknown
Safe Haskell | None
Language | Haskell2010

Crypto.PubKey.Rabin.Types

Description

Synopsis

- data Error
  - = MessageTooLong
  - | MessageNotRecognized
  - | InvalidParameters
- generatePrimes :: MonadRandom m => Int -> PrimeCondition -> PrimeCondition -> m (Integer, Integer)

# Documentation

data Error Source #

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

Show Error Source # |
Instance details Defined in Crypto.PubKey.Rabin.Types Methods showsPrec :: Int -> Error -> ShowS Source # show :: Error -> String Source # showList :: [Error] -> ShowS Source #
Eq Error Source # |
Instance details Defined in Crypto.PubKey.Rabin.Types Methods (==) :: Error -> Error -> Bool Source # (/=) :: Error -> Error -> Bool Source #

generatePrimes Source #

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