/usr/share/doc/libghc-cryptonite-doc/html/Crypto-PubKey-DH.html is in libghc-cryptonite-doc 0.20-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Crypto.PubKey.DH</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="file:///usr/share/javascript/mathjax/MathJax.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Crypto-PubKey-DH.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Crypto-PubKey-DH.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">cryptonite-0.20: Cryptography Primitives sink</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>License</th><td>BSD-style</td></tr><tr><th>Maintainer</th><td>Vincent Hanquez <vincent@snarc.org></td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Portability</th><td>Good</td></tr><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Crypto.PubKey.DH</p></div><div id="description"><p class="caption">Description</p><div class="doc empty"> </div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:Params">Params</a> = <a href="#v:Params">Params</a> {<ul class="subs"><li><a href="#v:params_p">params_p</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a></li><li><a href="#v:params_g">params_g</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a></li><li><a href="#v:params_bits">params_bits</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a></li></ul>}</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:PublicNumber">PublicNumber</a> = <a href="#v:PublicNumber">PublicNumber</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a></li><li class="src short"><span class="keyword">newtype</span> <a href="#t:PrivateNumber">PrivateNumber</a> = <a href="#v:PrivateNumber">PrivateNumber</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a></li><li class="src short"><span class="keyword">newtype</span> <a href="#t:SharedKey">SharedKey</a> = <a href="#v:SharedKey">SharedKey</a> <a href="file:///usr/share/doc/libghc-memory-doc/html/Data-ByteArray.html#t:ScrubbedBytes">ScrubbedBytes</a></li><li class="src short"><a href="#v:generateParams">generateParams</a> :: <a href="Crypto-Random-Types.html#t:MonadRandom">MonadRandom</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a> -> m <a href="Crypto-PubKey-DH.html#t:Params">Params</a></li><li class="src short"><a href="#v:generatePrivate">generatePrivate</a> :: <a href="Crypto-Random-Types.html#t:MonadRandom">MonadRandom</a> m => <a href="Crypto-PubKey-DH.html#t:Params">Params</a> -> m <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a></li><li class="src short"><a href="#v:calculatePublic">calculatePublic</a> :: <a href="Crypto-PubKey-DH.html#t:Params">Params</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a></li><li class="src short"><a href="#v:generatePublic">generatePublic</a> :: <a href="Crypto-PubKey-DH.html#t:Params">Params</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a></li><li class="src short"><a href="#v:getShared">getShared</a> :: <a href="Crypto-PubKey-DH.html#t:Params">Params</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="Crypto-PubKey-DH.html#t:SharedKey">SharedKey</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Params" class="def">Params</a> <a href="src/Crypto-PubKey-DH.html#Params" class="link">Source</a> <a href="#t:Params" class="selflink">#</a></p><div class="doc"><p>Represent Diffie Hellman parameters namely P (prime), and G (generator).</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:Params" class="def">Params</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:params_p" class="def">params_p</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a></dfn><div class="doc empty"> </div></li><li><dfn class="src"><a id="v:params_g" class="def">params_g</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a></dfn><div class="doc empty"> </div></li><li><dfn class="src"><a id="v:params_bits" class="def">params_bits</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a></dfn><div class="doc empty"> </div></li></ul></div></td></tr></table></div><div class="subs instances"><p id="control.i:Params" class="caption collapser" onclick="toggleSection('i:Params')">Instances</p><div id="section.i:Params" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Params:Eq:1" class="instance expander" onclick="toggleSection('i:id:Params:Eq:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> <a href="Crypto-PubKey-DH.html#t:Params">Params</a></span> <a href="src/Crypto-PubKey-DH.html#line-36" class="link">Source</a> <a href="#t:Params" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Params:Eq:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Crypto-PubKey-DH.html#t:Params">Params</a> -> <a href="Crypto-PubKey-DH.html#t:Params">Params</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Crypto-PubKey-DH.html#t:Params">Params</a> -> <a href="Crypto-PubKey-DH.html#t:Params">Params</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Params:Data:2" class="instance expander" onclick="toggleSection('i:id:Params:Data:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:Data">Data</a> <a href="Crypto-PubKey-DH.html#t:Params">Params</a></span> <a href="src/Crypto-PubKey-DH.html#line-36" class="link">Source</a> <a href="#t:Params" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Params:Data:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:gfoldl">gfoldl</a> :: (<span class="keyword">forall</span> d b. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:Data">Data</a> d => c (d -> b) -> d -> c b) -> (<span class="keyword">forall</span> g. g -> c g) -> <a href="Crypto-PubKey-DH.html#t:Params">Params</a> -> c <a href="Crypto-PubKey-DH.html#t:Params">Params</a> <a href="#v:gfoldl" class="selflink">#</a></p><p class="src"><a href="#v:gunfold">gunfold</a> :: (<span class="keyword">forall</span> b r. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:Data">Data</a> b => c (b -> r) -> c r) -> (<span class="keyword">forall</span> r. r -> c r) -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:Constr">Constr</a> -> c <a href="Crypto-PubKey-DH.html#t:Params">Params</a> <a href="#v:gunfold" class="selflink">#</a></p><p class="src"><a href="#v:toConstr">toConstr</a> :: <a href="Crypto-PubKey-DH.html#t:Params">Params</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:Constr">Constr</a> <a href="#v:toConstr" class="selflink">#</a></p><p class="src"><a href="#v:dataTypeOf">dataTypeOf</a> :: <a href="Crypto-PubKey-DH.html#t:Params">Params</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:DataType">DataType</a> <a href="#v:dataTypeOf" class="selflink">#</a></p><p class="src"><a href="#v:dataCast1">dataCast1</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a>) t => (<span class="keyword">forall</span> d. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:Data">Data</a> d => c (t d)) -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (c <a href="Crypto-PubKey-DH.html#t:Params">Params</a>) <a href="#v:dataCast1" class="selflink">#</a></p><p class="src"><a href="#v:dataCast2">dataCast2</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a>) t => (<span class="keyword">forall</span> d e. (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:Data">Data</a> d, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:Data">Data</a> e) => c (t d e)) -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (c <a href="Crypto-PubKey-DH.html#t:Params">Params</a>) <a href="#v:dataCast2" class="selflink">#</a></p><p class="src"><a href="#v:gmapT">gmapT</a> :: (<span class="keyword">forall</span> b. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:Data">Data</a> b => b -> b) -> <a href="Crypto-PubKey-DH.html#t:Params">Params</a> -> <a href="Crypto-PubKey-DH.html#t:Params">Params</a> <a href="#v:gmapT" class="selflink">#</a></p><p class="src"><a href="#v:gmapQl">gmapQl</a> :: (r -> r' -> r) -> r -> (<span class="keyword">forall</span> d. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:Data">Data</a> d => d -> r') -> <a href="Crypto-PubKey-DH.html#t:Params">Params</a> -> r <a href="#v:gmapQl" class="selflink">#</a></p><p class="src"><a href="#v:gmapQr">gmapQr</a> :: (r' -> r -> r) -> r -> (<span class="keyword">forall</span> d. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:Data">Data</a> d => d -> r') -> <a href="Crypto-PubKey-DH.html#t:Params">Params</a> -> r <a href="#v:gmapQr" class="selflink">#</a></p><p class="src"><a href="#v:gmapQ">gmapQ</a> :: (<span class="keyword">forall</span> d. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:Data">Data</a> d => d -> u) -> <a href="Crypto-PubKey-DH.html#t:Params">Params</a> -> [u] <a href="#v:gmapQ" class="selflink">#</a></p><p class="src"><a href="#v:gmapQi">gmapQi</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -> (<span class="keyword">forall</span> d. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:Data">Data</a> d => d -> u) -> <a href="Crypto-PubKey-DH.html#t:Params">Params</a> -> u <a href="#v:gmapQi" class="selflink">#</a></p><p class="src"><a href="#v:gmapM">gmapM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m => (<span class="keyword">forall</span> d. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:Data">Data</a> d => d -> m d) -> <a href="Crypto-PubKey-DH.html#t:Params">Params</a> -> m <a href="Crypto-PubKey-DH.html#t:Params">Params</a> <a href="#v:gmapM" class="selflink">#</a></p><p class="src"><a href="#v:gmapMp">gmapMp</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:MonadPlus">MonadPlus</a> m => (<span class="keyword">forall</span> d. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:Data">Data</a> d => d -> m d) -> <a href="Crypto-PubKey-DH.html#t:Params">Params</a> -> m <a href="Crypto-PubKey-DH.html#t:Params">Params</a> <a href="#v:gmapMp" class="selflink">#</a></p><p class="src"><a href="#v:gmapMo">gmapMo</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:MonadPlus">MonadPlus</a> m => (<span class="keyword">forall</span> d. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:Data">Data</a> d => d -> m d) -> <a href="Crypto-PubKey-DH.html#t:Params">Params</a> -> m <a href="Crypto-PubKey-DH.html#t:Params">Params</a> <a href="#v:gmapMo" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Params:Read:3" class="instance expander" onclick="toggleSection('i:id:Params:Read:3')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Read.html#t:Read">Read</a> <a href="Crypto-PubKey-DH.html#t:Params">Params</a></span> <a href="src/Crypto-PubKey-DH.html#line-36" class="link">Source</a> <a href="#t:Params" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Params:Read:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readsPrec">readsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> <a href="Crypto-PubKey-DH.html#t:Params">Params</a> <a href="#v:readsPrec" class="selflink">#</a></p><p class="src"><a href="#v:readList">readList</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> [<a href="Crypto-PubKey-DH.html#t:Params">Params</a>] <a href="#v:readList" class="selflink">#</a></p><p class="src"><a href="#v:readPrec">readPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> <a href="Crypto-PubKey-DH.html#t:Params">Params</a> <a href="#v:readPrec" class="selflink">#</a></p><p class="src"><a href="#v:readListPrec">readListPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> [<a href="Crypto-PubKey-DH.html#t:Params">Params</a>] <a href="#v:readListPrec" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Params:Show:4" class="instance expander" onclick="toggleSection('i:id:Params:Show:4')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:Show">Show</a> <a href="Crypto-PubKey-DH.html#t:Params">Params</a></span> <a href="src/Crypto-PubKey-DH.html#line-36" class="link">Source</a> <a href="#t:Params" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Params:Show:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -> <a href="Crypto-PubKey-DH.html#t:Params">Params</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="Crypto-PubKey-DH.html#t:Params">Params</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Crypto-PubKey-DH.html#t:Params">Params</a>] -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a id="t:PublicNumber" class="def">PublicNumber</a> <a href="src/Crypto-PubKey-DH.html#PublicNumber" class="link">Source</a> <a href="#t:PublicNumber" class="selflink">#</a></p><div class="doc"><p>Represent Diffie Hellman public number Y.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:PublicNumber" class="def">PublicNumber</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:PublicNumber" class="caption collapser" onclick="toggleSection('i:PublicNumber')">Instances</p><div id="section.i:PublicNumber" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:PublicNumber:Enum:1" class="instance expander" onclick="toggleSection('i:id:PublicNumber:Enum:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Enum">Enum</a> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a></span> <a href="src/Crypto-PubKey-DH.html#line-40" class="link">Source</a> <a href="#t:PublicNumber" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:PublicNumber:Enum:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:succ">succ</a> :: <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> <a href="#v:succ" class="selflink">#</a></p><p class="src"><a href="#v:pred">pred</a> :: <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> <a href="#v:pred" class="selflink">#</a></p><p class="src"><a href="#v:toEnum">toEnum</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> <a href="#v:toEnum" class="selflink">#</a></p><p class="src"><a href="#v:fromEnum">fromEnum</a> :: <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> <a href="#v:fromEnum" class="selflink">#</a></p><p class="src"><a href="#v:enumFrom">enumFrom</a> :: <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> [<a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a>] <a href="#v:enumFrom" class="selflink">#</a></p><p class="src"><a href="#v:enumFromThen">enumFromThen</a> :: <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> [<a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a>] <a href="#v:enumFromThen" class="selflink">#</a></p><p class="src"><a href="#v:enumFromTo">enumFromTo</a> :: <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> [<a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a>] <a href="#v:enumFromTo" class="selflink">#</a></p><p class="src"><a href="#v:enumFromThenTo">enumFromThenTo</a> :: <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> [<a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a>] <a href="#v:enumFromThenTo" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:PublicNumber:Eq:2" class="instance expander" onclick="toggleSection('i:id:PublicNumber:Eq:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a></span> <a href="src/Crypto-PubKey-DH.html#line-40" class="link">Source</a> <a href="#t:PublicNumber" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:PublicNumber:Eq:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:PublicNumber:Num:3" class="instance expander" onclick="toggleSection('i:id:PublicNumber:Num:3')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Num">Num</a> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a></span> <a href="src/Crypto-PubKey-DH.html#line-40" class="link">Source</a> <a href="#t:PublicNumber" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:PublicNumber:Num:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-43-">(+)</a> :: <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> <a href="#v:-43-" class="selflink">#</a></p><p class="src"><a href="#v:-45-">(-)</a> :: <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> <a href="#v:-45-" class="selflink">#</a></p><p class="src"><a href="#v:-42-">(*)</a> :: <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> <a href="#v:-42-" class="selflink">#</a></p><p class="src"><a href="#v:negate">negate</a> :: <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> <a href="#v:negate" class="selflink">#</a></p><p class="src"><a href="#v:abs">abs</a> :: <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> <a href="#v:abs" class="selflink">#</a></p><p class="src"><a href="#v:signum">signum</a> :: <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> <a href="#v:signum" class="selflink">#</a></p><p class="src"><a href="#v:fromInteger">fromInteger</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> <a href="#v:fromInteger" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:PublicNumber:Ord:4" class="instance expander" onclick="toggleSection('i:id:PublicNumber:Ord:4')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ord">Ord</a> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a></span> <a href="src/Crypto-PubKey-DH.html#line-40" class="link">Source</a> <a href="#t:PublicNumber" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:PublicNumber:Ord:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:compare">compare</a> :: <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ordering">Ordering</a> <a href="#v:compare" class="selflink">#</a></p><p class="src"><a href="#v:-60-">(<)</a> :: <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-60-" class="selflink">#</a></p><p class="src"><a href="#v:-60--61-">(<=)</a> :: <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-60--61-" class="selflink">#</a></p><p class="src"><a href="#v:-62-">(>)</a> :: <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-62-" class="selflink">#</a></p><p class="src"><a href="#v:-62--61-">(>=)</a> :: <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-62--61-" class="selflink">#</a></p><p class="src"><a href="#v:max">max</a> :: <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> <a href="#v:max" class="selflink">#</a></p><p class="src"><a href="#v:min">min</a> :: <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> <a href="#v:min" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:PublicNumber:Read:5" class="instance expander" onclick="toggleSection('i:id:PublicNumber:Read:5')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Read.html#t:Read">Read</a> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a></span> <a href="src/Crypto-PubKey-DH.html#line-40" class="link">Source</a> <a href="#t:PublicNumber" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:PublicNumber:Read:5" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readsPrec">readsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> <a href="#v:readsPrec" class="selflink">#</a></p><p class="src"><a href="#v:readList">readList</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> [<a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a>] <a href="#v:readList" class="selflink">#</a></p><p class="src"><a href="#v:readPrec">readPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> <a href="#v:readPrec" class="selflink">#</a></p><p class="src"><a href="#v:readListPrec">readListPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> [<a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a>] <a href="#v:readListPrec" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:PublicNumber:Real:6" class="instance expander" onclick="toggleSection('i:id:PublicNumber:Real:6')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Real">Real</a> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a></span> <a href="src/Crypto-PubKey-DH.html#line-40" class="link">Source</a> <a href="#t:PublicNumber" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:PublicNumber:Real:6" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:toRational">toRational</a> :: <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Rational">Rational</a> <a href="#v:toRational" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:PublicNumber:Show:7" class="instance expander" onclick="toggleSection('i:id:PublicNumber:Show:7')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:Show">Show</a> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a></span> <a href="src/Crypto-PubKey-DH.html#line-40" class="link">Source</a> <a href="#t:PublicNumber" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:PublicNumber:Show:7" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a>] -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a id="t:PrivateNumber" class="def">PrivateNumber</a> <a href="src/Crypto-PubKey-DH.html#PrivateNumber" class="link">Source</a> <a href="#t:PrivateNumber" class="selflink">#</a></p><div class="doc"><p>Represent Diffie Hellman private number X.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:PrivateNumber" class="def">PrivateNumber</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:PrivateNumber" class="caption collapser" onclick="toggleSection('i:PrivateNumber')">Instances</p><div id="section.i:PrivateNumber" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:PrivateNumber:Enum:1" class="instance expander" onclick="toggleSection('i:id:PrivateNumber:Enum:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Enum">Enum</a> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a></span> <a href="src/Crypto-PubKey-DH.html#line-44" class="link">Source</a> <a href="#t:PrivateNumber" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:PrivateNumber:Enum:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:succ">succ</a> :: <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> <a href="#v:succ" class="selflink">#</a></p><p class="src"><a href="#v:pred">pred</a> :: <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> <a href="#v:pred" class="selflink">#</a></p><p class="src"><a href="#v:toEnum">toEnum</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> <a href="#v:toEnum" class="selflink">#</a></p><p class="src"><a href="#v:fromEnum">fromEnum</a> :: <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> <a href="#v:fromEnum" class="selflink">#</a></p><p class="src"><a href="#v:enumFrom">enumFrom</a> :: <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> [<a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a>] <a href="#v:enumFrom" class="selflink">#</a></p><p class="src"><a href="#v:enumFromThen">enumFromThen</a> :: <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> [<a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a>] <a href="#v:enumFromThen" class="selflink">#</a></p><p class="src"><a href="#v:enumFromTo">enumFromTo</a> :: <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> [<a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a>] <a href="#v:enumFromTo" class="selflink">#</a></p><p class="src"><a href="#v:enumFromThenTo">enumFromThenTo</a> :: <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> [<a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a>] <a href="#v:enumFromThenTo" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:PrivateNumber:Eq:2" class="instance expander" onclick="toggleSection('i:id:PrivateNumber:Eq:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a></span> <a href="src/Crypto-PubKey-DH.html#line-44" class="link">Source</a> <a href="#t:PrivateNumber" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:PrivateNumber:Eq:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:PrivateNumber:Num:3" class="instance expander" onclick="toggleSection('i:id:PrivateNumber:Num:3')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Num">Num</a> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a></span> <a href="src/Crypto-PubKey-DH.html#line-44" class="link">Source</a> <a href="#t:PrivateNumber" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:PrivateNumber:Num:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-43-">(+)</a> :: <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> <a href="#v:-43-" class="selflink">#</a></p><p class="src"><a href="#v:-45-">(-)</a> :: <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> <a href="#v:-45-" class="selflink">#</a></p><p class="src"><a href="#v:-42-">(*)</a> :: <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> <a href="#v:-42-" class="selflink">#</a></p><p class="src"><a href="#v:negate">negate</a> :: <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> <a href="#v:negate" class="selflink">#</a></p><p class="src"><a href="#v:abs">abs</a> :: <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> <a href="#v:abs" class="selflink">#</a></p><p class="src"><a href="#v:signum">signum</a> :: <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> <a href="#v:signum" class="selflink">#</a></p><p class="src"><a href="#v:fromInteger">fromInteger</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> <a href="#v:fromInteger" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:PrivateNumber:Ord:4" class="instance expander" onclick="toggleSection('i:id:PrivateNumber:Ord:4')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ord">Ord</a> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a></span> <a href="src/Crypto-PubKey-DH.html#line-44" class="link">Source</a> <a href="#t:PrivateNumber" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:PrivateNumber:Ord:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:compare">compare</a> :: <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ordering">Ordering</a> <a href="#v:compare" class="selflink">#</a></p><p class="src"><a href="#v:-60-">(<)</a> :: <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-60-" class="selflink">#</a></p><p class="src"><a href="#v:-60--61-">(<=)</a> :: <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-60--61-" class="selflink">#</a></p><p class="src"><a href="#v:-62-">(>)</a> :: <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-62-" class="selflink">#</a></p><p class="src"><a href="#v:-62--61-">(>=)</a> :: <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-62--61-" class="selflink">#</a></p><p class="src"><a href="#v:max">max</a> :: <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> <a href="#v:max" class="selflink">#</a></p><p class="src"><a href="#v:min">min</a> :: <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> <a href="#v:min" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:PrivateNumber:Read:5" class="instance expander" onclick="toggleSection('i:id:PrivateNumber:Read:5')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Read.html#t:Read">Read</a> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a></span> <a href="src/Crypto-PubKey-DH.html#line-44" class="link">Source</a> <a href="#t:PrivateNumber" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:PrivateNumber:Read:5" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readsPrec">readsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> <a href="#v:readsPrec" class="selflink">#</a></p><p class="src"><a href="#v:readList">readList</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> [<a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a>] <a href="#v:readList" class="selflink">#</a></p><p class="src"><a href="#v:readPrec">readPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> <a href="#v:readPrec" class="selflink">#</a></p><p class="src"><a href="#v:readListPrec">readListPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> [<a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a>] <a href="#v:readListPrec" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:PrivateNumber:Real:6" class="instance expander" onclick="toggleSection('i:id:PrivateNumber:Real:6')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Real">Real</a> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a></span> <a href="src/Crypto-PubKey-DH.html#line-44" class="link">Source</a> <a href="#t:PrivateNumber" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:PrivateNumber:Real:6" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:toRational">toRational</a> :: <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Rational">Rational</a> <a href="#v:toRational" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:PrivateNumber:Show:7" class="instance expander" onclick="toggleSection('i:id:PrivateNumber:Show:7')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:Show">Show</a> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a></span> <a href="src/Crypto-PubKey-DH.html#line-44" class="link">Source</a> <a href="#t:PrivateNumber" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:PrivateNumber:Show:7" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a>] -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a id="t:SharedKey" class="def">SharedKey</a> <a href="src/Crypto-PubKey-DH.html#SharedKey" class="link">Source</a> <a href="#t:SharedKey" class="selflink">#</a></p><div class="doc"><p>Represent Diffie Hellman shared secret.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:SharedKey" class="def">SharedKey</a> <a href="file:///usr/share/doc/libghc-memory-doc/html/Data-ByteArray.html#t:ScrubbedBytes">ScrubbedBytes</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:SharedKey" class="caption collapser" onclick="toggleSection('i:SharedKey')">Instances</p><div id="section.i:SharedKey" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SharedKey:Eq:1" class="instance expander" onclick="toggleSection('i:id:SharedKey:Eq:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> <a href="Crypto-PubKey-DH.html#t:SharedKey">SharedKey</a></span> <a href="src/Crypto-PubKey-DH.html#line-48" class="link">Source</a> <a href="#t:SharedKey" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:SharedKey:Eq:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Crypto-PubKey-DH.html#t:SharedKey">SharedKey</a> -> <a href="Crypto-PubKey-DH.html#t:SharedKey">SharedKey</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Crypto-PubKey-DH.html#t:SharedKey">SharedKey</a> -> <a href="Crypto-PubKey-DH.html#t:SharedKey">SharedKey</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SharedKey:Show:2" class="instance expander" onclick="toggleSection('i:id:SharedKey:Show:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:Show">Show</a> <a href="Crypto-PubKey-DH.html#t:SharedKey">SharedKey</a></span> <a href="src/Crypto-PubKey-DH.html#line-48" class="link">Source</a> <a href="#t:SharedKey" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:SharedKey:Show:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -> <a href="Crypto-PubKey-DH.html#t:SharedKey">SharedKey</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="Crypto-PubKey-DH.html#t:SharedKey">SharedKey</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Crypto-PubKey-DH.html#t:SharedKey">SharedKey</a>] -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SharedKey:ByteArrayAccess:3" class="instance expander" onclick="toggleSection('i:id:SharedKey:ByteArrayAccess:3')"></span> <a href="file:///usr/share/doc/libghc-memory-doc/html/Data-ByteArray.html#t:ByteArrayAccess">ByteArrayAccess</a> <a href="Crypto-PubKey-DH.html#t:SharedKey">SharedKey</a></span> <a href="src/Crypto-PubKey-DH.html#line-48" class="link">Source</a> <a href="#t:SharedKey" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:SharedKey:ByteArrayAccess:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:length">length</a> :: <a href="Crypto-PubKey-DH.html#t:SharedKey">SharedKey</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> <a href="#v:length" class="selflink">#</a></p><p class="src"><a href="#v:withByteArray">withByteArray</a> :: <a href="Crypto-PubKey-DH.html#t:SharedKey">SharedKey</a> -> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Foreign-Ptr.html#t:Ptr">Ptr</a> p -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a) -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a <a href="#v:withByteArray" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:generateParams" class="def">generateParams</a> <a href="src/Crypto-PubKey-DH.html#generateParams" class="link">Source</a> <a href="#v:generateParams" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Crypto-Random-Types.html#t:MonadRandom">MonadRandom</a> m</td><td class="doc empty"> </td></tr><tr><td class="src">=> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>number of bits</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc"><p>generator</p></td></tr><tr><td class="src">-> m <a href="Crypto-PubKey-DH.html#t:Params">Params</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>generate params from a specific generator (2 or 5 are common values)
we generate a safe prime (a prime number of the form 2p+1 where p is also prime)</p></div></div><div class="top"><p class="src"><a id="v:generatePrivate" class="def">generatePrivate</a> :: <a href="Crypto-Random-Types.html#t:MonadRandom">MonadRandom</a> m => <a href="Crypto-PubKey-DH.html#t:Params">Params</a> -> m <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> <a href="src/Crypto-PubKey-DH.html#generatePrivate" class="link">Source</a> <a href="#v:generatePrivate" class="selflink">#</a></p><div class="doc"><p>generate a private number with no specific property
this number is usually called X in DH text.</p></div></div><div class="top"><p class="src"><a id="v:calculatePublic" class="def">calculatePublic</a> :: <a href="Crypto-PubKey-DH.html#t:Params">Params</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> <a href="src/Crypto-PubKey-DH.html#calculatePublic" class="link">Source</a> <a href="#v:calculatePublic" class="selflink">#</a></p><div class="doc"><p>calculate the public number from the parameters and the private key
this number is usually called Y in DH text.</p></div></div><div class="top"><p class="src"><a id="v:generatePublic" class="def">generatePublic</a> :: <a href="Crypto-PubKey-DH.html#t:Params">Params</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> <a href="src/Crypto-PubKey-DH.html#generatePublic" class="link">Source</a> <a href="#v:generatePublic" class="selflink">#</a></p><div class="doc"><p>calculate the public number from the parameters and the private key
this number is usually called Y in DH text.</p><p>DEPRECATED use calculatePublic</p></div></div><div class="top"><p class="src"><a id="v:getShared" class="def">getShared</a> :: <a href="Crypto-PubKey-DH.html#t:Params">Params</a> -> <a href="Crypto-PubKey-DH.html#t:PrivateNumber">PrivateNumber</a> -> <a href="Crypto-PubKey-DH.html#t:PublicNumber">PublicNumber</a> -> <a href="Crypto-PubKey-DH.html#t:SharedKey">SharedKey</a> <a href="src/Crypto-PubKey-DH.html#getShared" class="link">Source</a> <a href="#v:getShared" class="selflink">#</a></p><div class="doc"><p>generate a shared key using our private number and the other party public number</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.2</p></div></body></html>
|