




Description 
An interface to RSA public key generator.


Synopsis 




Type



RSA is an opaque object that represents either RSA public key
or public/private keypair.



Generating keypair



RSAGenKeyCallback represents a callback function to get
informed the progress of RSA key generation.
 callback 0 i is called after generating the ith potential
prime number.
 While the number is being tested for primality, callback 1 j is
called after the jth iteration (j = 0, 1, ...).
 When the nth randomly generated prime is rejected as not
suitable for the key, callback 2 n is called.
 When a random p has been found with p1 relatively prime to
e, it is called as callback 3 0.
 The process is then repeated for prime q with callback 3 1.



:: Int  The number of bits of the public modulus
(i.e. key size). Key sizes with n < 1024
should be considered insecure.
 > Int  The public exponent. It is an odd number,
typically 3, 17 or 65537.
 > Maybe RSAGenKeyCallback  A callback function.
 > IO RSA  The generated keypair.
 generateKey generates an RSA keypair.



Exploring keypair



rsaN pubKey returns the public modulus of the key.



rsaE pubKey returns the public exponent of the key.



rsaD privKey returns the private exponent of the key. If
privKey is not really a private key, the result is Nothing.



rsaP privkey returns the secret prime factor p of the key.



rsaQ privkey returns the secret prime factor q of the key.



rsaDMP1 privkey returns d mod (p1) of the key.



rsaDMQ1 privkey returns d mod (q1) of the key.



rsaIQMP privkey returns q^1 mod p of the key.


Produced by Haddock version 2.4.2 