License | MIT |
---|---|
Maintainer | Joe Leslie-Hurd <[email protected]> |
Stability | provisional |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell98 |
Arithmetic.Montgomery
Description
Documentation
data Parameters Source #
Constructors
Parameters | |
Fields
|
Instances
Show Parameters Source # | |
Defined in Arithmetic.Montgomery Methods showsPrec :: Int -> Parameters -> ShowS # show :: Parameters -> String # showList :: [Parameters] -> ShowS # |
data Montgomery Source #
Constructors
Montgomery | |
Fields |
Instances
Show Montgomery Source # | |
Defined in Arithmetic.Montgomery Methods showsPrec :: Int -> Montgomery -> ShowS # show :: Montgomery -> String # showList :: [Montgomery] -> ShowS # |
customParameters :: Natural -> Natural -> Parameters Source #
alignedParameters :: Natural -> Natural -> Parameters Source #
normalize :: Parameters -> Natural -> Montgomery Source #
normalize1 :: Parameters -> Natural -> Montgomery Source #
toNatural :: Montgomery -> Natural Source #
fromNatural :: Parameters -> Natural -> Montgomery Source #
zero :: Parameters -> Montgomery Source #
one :: Parameters -> Montgomery Source #
two :: Parameters -> Montgomery Source #
add :: Montgomery -> Montgomery -> Montgomery Source #
double :: Montgomery -> Montgomery Source #
negate :: Montgomery -> Montgomery Source #
subtract :: Montgomery -> Montgomery -> Montgomery Source #
multiply :: Montgomery -> Montgomery -> Montgomery Source #
square :: Montgomery -> Montgomery Source #
exp :: Montgomery -> Natural -> Montgomery Source #
exp2 :: Montgomery -> Natural -> Montgomery Source #