|
|
|
|
|
Description |
BN - multiprecision integer arithmetics
|
|
Synopsis |
|
|
|
|
Type
|
|
|
BigNum is an opaque object representing a big number.
|
|
|
Allocation
|
|
|
allocaBN f allocates a BigNum and computes f. Then it
frees the BigNum.
|
|
|
withBN n f converts n to a BigNum and computes f. Then it
frees the BigNum.
|
|
|
This is an alias to integerToBN.
|
|
Conversion from/to Integer
|
|
|
This is an alias to bnToInteger.
|
|
|
This is a GHC specific, fast conversion between Integers and OpenSSL
bignums. It returns a malloced BigNum.
|
|
|
Convert a BIGNUM to an Integer
|
|
|
Convert an Integer to an MPI. SEe bnToMPI for the format
|
|
|
Convert an MPI to an Integer. SEe bnToMPI for the format
|
|
Computation
|
|
|
modexp a p m computes a to the p-th power modulo m.
|
|
Random number generation
|
|
randIntegerUptoNMinusOneSuchThat | Source |
|
:: Integer -> Bool | a filter function
| -> Integer | one plus the upper limit
| -> IO Integer | | Return a strongly random number in the range 0 <= x < n where the given
filter function returns true.
|
|
|
prandIntegerUptoNMinusOneSuchThat | Source |
|
:: Integer -> Bool | a filter function
| -> Integer | one plus the upper limit
| -> IO Integer | | Return a random number in the range 0 <= x < n where the given
filter function returns true.
|
|
|
|
Return a strongly random number in the range 0 <= x < n
|
|
|
Return a random number in the range 0 <= x < n
|
|
|
Return a strongly random number in the range 0 < x < n
|
|
|
Return a random number in the range 0 < x < n
|
|
Produced by Haddock version 2.4.2 |