License | BSD-style |
---|---|
Maintainer | Carlos Rodriguez-Vega <crodveg@yahoo.es> |
Stability | experimental |
Portability | unknown |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- data Error
- generatePrimes :: MonadRandom m => Int -> PrimeCondition -> PrimeCondition -> m (Integer, Integer)
Documentation
Error possible during encryption, decryption or signing.
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 |
:: 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