This file is indexed.

/usr/share/doc/libghc-hsopenssl-doc/html/OpenSSL-DSA.html is in libghc-hsopenssl-doc 0.11.1.1-2.

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
 9
10
11
12
13
14
<!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>OpenSSL.DSA</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_OpenSSL-DSA.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/OpenSSL-DSA.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">HsOpenSSL-0.11.1.1: Partial OpenSSL binding for Haskell</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">OpenSSL.DSA</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Type</a></li><li><a href="#g:2">Key and parameter generation</a></li><li><a href="#g:3">Signing and verification</a></li><li><a href="#g:4">Extracting fields of DSA objects</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>The Digital Signature Algorithm (FIPS 186-2).
   See <a href="http://www.openssl.org/docs/crypto/dsa.html">http://www.openssl.org/docs/crypto/dsa.html</a></p></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">class</span> <a href="#t:DSAKey">DSAKey</a> k <span class="keyword">where</span><ul class="subs"><li><a href="#v:dsaSize">dsaSize</a> :: k -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:dsaP">dsaP</a> :: k -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a></li><li><a href="#v:dsaQ">dsaQ</a> :: k -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a></li><li><a href="#v:dsaG">dsaG</a> :: k -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a></li><li><a href="#v:dsaPublic">dsaPublic</a> :: k -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a></li><li><a href="#v:withDSAPtr">withDSAPtr</a> :: k -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Foreign-Ptr.html#t:Ptr">Ptr</a> <a href="OpenSSL-DSA.html#t:DSA">DSA</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> a</li><li><a href="#v:peekDSAPtr">peekDSAPtr</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Foreign-Ptr.html#t:Ptr">Ptr</a> <a href="OpenSSL-DSA.html#t:DSA">DSA</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> k)</li><li><a href="#v:absorbDSAPtr">absorbDSAPtr</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Foreign-Ptr.html#t:Ptr">Ptr</a> <a href="OpenSSL-DSA.html#t:DSA">DSA</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> k)</li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:DSAPubKey">DSAPubKey</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:DSAKeyPair">DSAKeyPair</a></li><li class="src short"><a href="#v:generateDSAParameters">generateDSAParameters</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>)</li><li class="src short"><a href="#v:generateDSAKey">generateDSAKey</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="OpenSSL-DSA.html#t:DSAKeyPair">DSAKeyPair</a></li><li class="src short"><a href="#v:generateDSAParametersAndKey">generateDSAParametersAndKey</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="OpenSSL-DSA.html#t:DSAKeyPair">DSAKeyPair</a></li><li class="src short"><a href="#v:signDigestedDataWithDSA">signDigestedDataWithDSA</a> :: <a href="OpenSSL-DSA.html#t:DSAKeyPair">DSAKeyPair</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>)</li><li class="src short"><a href="#v:verifyDigestedDataWithDSA">verifyDigestedDataWithDSA</a> :: <a href="OpenSSL-DSA.html#t:DSAKey">DSAKey</a> k =&gt; k -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:dsaPrivate">dsaPrivate</a> :: <a href="OpenSSL-DSA.html#t:DSAKeyPair">DSAKeyPair</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a></li><li class="src short"><a href="#v:dsaPubKeyToTuple">dsaPubKeyToTuple</a> :: <a href="OpenSSL-DSA.html#t:DSAKeyPair">DSAKeyPair</a> -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>)</li><li class="src short"><a href="#v:dsaKeyPairToTuple">dsaKeyPairToTuple</a> :: <a href="OpenSSL-DSA.html#t:DSAKeyPair">DSAKeyPair</a> -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>)</li><li class="src short"><a href="#v:tupleToDSAPubKey">tupleToDSAPubKey</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>) -&gt; <a href="OpenSSL-DSA.html#t:DSAPubKey">DSAPubKey</a></li><li class="src short"><a href="#v:tupleToDSAKeyPair">tupleToDSAKeyPair</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>) -&gt; <a href="OpenSSL-DSA.html#t:DSAKeyPair">DSAKeyPair</a></li></ul></div><div id="interface"><h1 id="g:1">Type</h1><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:DSAKey" class="def">DSAKey</a> k <span class="keyword">where</span> <a href="src/OpenSSL-DSA.html#DSAKey" class="link">Source</a></p><div class="doc"><p><code><code><a href="OpenSSL-DSA.html#t:DSAKey">DSAKey</a></code> a</code> is either <code><a href="OpenSSL-DSA.html#t:DSAPubKey">DSAPubKey</a></code> or <code><a href="OpenSSL-DSA.html#t:DSAKeyPair">DSAKeyPair</a></code>.</p></div><div class="subs minimal"><p class="caption">Minimal complete definition</p><p class="src"><a href="OpenSSL-DSA.html#v:withDSAPtr">withDSAPtr</a>, <a href="OpenSSL-DSA.html#v:peekDSAPtr">peekDSAPtr</a>, <a href="OpenSSL-DSA.html#v:absorbDSAPtr">absorbDSAPtr</a></p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:dsaSize" class="def">dsaSize</a> :: k -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> <a href="src/OpenSSL-DSA.html#dsaSize" class="link">Source</a></p><div class="doc"><p>Return the length of key.</p></div><p class="src"><a name="v:dsaP" class="def">dsaP</a> :: k -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a> <a href="src/OpenSSL-DSA.html#dsaP" class="link">Source</a></p><div class="doc"><p>Return the public prime number of the key.</p></div><p class="src"><a name="v:dsaQ" class="def">dsaQ</a> :: k -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a> <a href="src/OpenSSL-DSA.html#dsaQ" class="link">Source</a></p><div class="doc"><p>Return the public 160-bit subprime, <code>q | p - 1</code> of the key.</p></div><p class="src"><a name="v:dsaG" class="def">dsaG</a> :: k -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a> <a href="src/OpenSSL-DSA.html#dsaG" class="link">Source</a></p><div class="doc"><p>Return the public generator of subgroup of the key.</p></div><p class="src"><a name="v:dsaPublic" class="def">dsaPublic</a> :: k -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a> <a href="src/OpenSSL-DSA.html#dsaPublic" class="link">Source</a></p><div class="doc"><p>Return the public key <code>y = g^x</code>.</p></div><p class="src"><a name="v:withDSAPtr" class="def">withDSAPtr</a> :: k -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Foreign-Ptr.html#t:Ptr">Ptr</a> <a href="OpenSSL-DSA.html#t:DSA">DSA</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> a <a href="src/OpenSSL-DSA.html#withDSAPtr" class="link">Source</a></p><p class="src"><a name="v:peekDSAPtr" class="def">peekDSAPtr</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Foreign-Ptr.html#t:Ptr">Ptr</a> <a href="OpenSSL-DSA.html#t:DSA">DSA</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> k) <a href="src/OpenSSL-DSA.html#peekDSAPtr" class="link">Source</a></p><p class="src"><a name="v:absorbDSAPtr" class="def">absorbDSAPtr</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Foreign-Ptr.html#t:Ptr">Ptr</a> <a href="OpenSSL-DSA.html#t:DSA">DSA</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> k) <a href="src/OpenSSL-DSA.html#absorbDSAPtr" class="link">Source</a></p></div><div class="subs instances"><p id="control.i:DSAKey" class="caption collapser" onclick="toggleSection('i:DSAKey')">Instances</p><div id="section.i:DSAKey" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="OpenSSL-DSA.html#t:DSAKey">DSAKey</a> <a href="OpenSSL-DSA.html#t:DSAKeyPair">DSAKeyPair</a></span> <a href="src/OpenSSL-DSA.html#line-97" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="OpenSSL-DSA.html#t:DSAKey">DSAKey</a> <a href="OpenSSL-DSA.html#t:DSAPubKey">DSAPubKey</a></span> <a href="src/OpenSSL-DSA.html#line-91" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:DSAPubKey" class="def">DSAPubKey</a> <a href="src/OpenSSL-DSA.html#DSAPubKey" class="link">Source</a></p><div class="doc"><p>The type of a DSA public key, includes parameters p, q, g and public.</p></div><div class="subs instances"><p id="control.i:DSAPubKey" class="caption collapser" onclick="toggleSection('i:DSAPubKey')">Instances</p><div id="section.i:DSAPubKey" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a> <a href="OpenSSL-DSA.html#t:DSAPubKey">DSAPubKey</a></span> <a href="src/OpenSSL-DSA.html#line-307" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Ord.html#t:Ord">Ord</a> <a href="OpenSSL-DSA.html#t:DSAPubKey">DSAPubKey</a></span> <a href="src/OpenSSL-DSA.html#line-322" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a> <a href="OpenSSL-DSA.html#t:DSAPubKey">DSAPubKey</a></span> <a href="src/OpenSSL-DSA.html#line-348" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="OpenSSL-DSA.html#t:DSAKey">DSAKey</a> <a href="OpenSSL-DSA.html#t:DSAPubKey">DSAPubKey</a></span> <a href="src/OpenSSL-DSA.html#line-91" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="OpenSSL-EVP-PKey.html#t:PublicKey">PublicKey</a> <a href="OpenSSL-DSA.html#t:DSAPubKey">DSAPubKey</a></span> <a href="src/OpenSSL-EVP-PKey.html#line-210" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:DSAKeyPair" class="def">DSAKeyPair</a> <a href="src/OpenSSL-DSA.html#DSAKeyPair" class="link">Source</a></p><div class="doc"><p>The type of a DSA keypair, includes parameters p, q, g, public and private.</p></div><div class="subs instances"><p id="control.i:DSAKeyPair" class="caption collapser" onclick="toggleSection('i:DSAKeyPair')">Instances</p><div id="section.i:DSAKeyPair" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a> <a href="OpenSSL-DSA.html#t:DSAKeyPair">DSAKeyPair</a></span> <a href="src/OpenSSL-DSA.html#line-314" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Ord.html#t:Ord">Ord</a> <a href="OpenSSL-DSA.html#t:DSAKeyPair">DSAKeyPair</a></span> <a href="src/OpenSSL-DSA.html#line-334" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a> <a href="OpenSSL-DSA.html#t:DSAKeyPair">DSAKeyPair</a></span> <a href="src/OpenSSL-DSA.html#line-358" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="OpenSSL-DSA.html#t:DSAKey">DSAKey</a> <a href="OpenSSL-DSA.html#t:DSAKeyPair">DSAKeyPair</a></span> <a href="src/OpenSSL-DSA.html#line-97" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="OpenSSL-EVP-PKey.html#t:KeyPair">KeyPair</a> <a href="OpenSSL-DSA.html#t:DSAKeyPair">DSAKeyPair</a></span> <a href="src/OpenSSL-EVP-PKey.html#line-217" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="OpenSSL-EVP-PKey.html#t:PublicKey">PublicKey</a> <a href="OpenSSL-DSA.html#t:DSAKeyPair">DSAKeyPair</a></span> <a href="src/OpenSSL-EVP-PKey.html#line-218" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h1 id="g:2">Key and parameter generation</h1><div class="top"><p class="src"><a name="v:generateDSAParameters" class="def">generateDSAParameters</a> <a href="src/OpenSSL-DSA.html#generateDSAParameters" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>The number of bits in the generated prime: 512 &lt;= x &lt;= 1024</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a></td><td class="doc"><p>optional seed, its length must be 20 bytes</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>)</td><td class="doc"><p>(iteration count, generator count, p, q, g)</p></td></tr></table></div><div class="doc"><p>Generate DSA parameters (*not* a key, but required for a key). This is a
   compute intensive operation. See FIPS 186-2, app 2. This agrees with the
   test vectors given in FIP 186-2, app 5</p></div></div><div class="top"><p class="src"><a name="v:generateDSAKey" class="def">generateDSAKey</a> <a href="src/OpenSSL-DSA.html#generateDSAKey" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a></td><td class="doc"><p>p</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a></td><td class="doc"><p>q</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a></td><td class="doc"><p>g</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="OpenSSL-DSA.html#t:DSAKeyPair">DSAKeyPair</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Generate a new DSA keypair, given valid parameters</p></div></div><div class="top"><p class="src"><a name="v:generateDSAParametersAndKey" class="def">generateDSAParametersAndKey</a> <a href="src/OpenSSL-DSA.html#generateDSAParametersAndKey" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>The number of bits in the generated prime: 512 &lt;= x &lt;= 1024</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a></td><td class="doc"><p>optional seed, its length must be 20 bytes</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="OpenSSL-DSA.html#t:DSAKeyPair">DSAKeyPair</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>A utility function to generate both the parameters and the key pair at the
   same time. Saves serialising and deserialising the parameters too</p></div></div><h1 id="g:3">Signing and verification</h1><div class="top"><p class="src"><a name="v:signDigestedDataWithDSA" class="def">signDigestedDataWithDSA</a> :: <a href="OpenSSL-DSA.html#t:DSAKeyPair">DSAKeyPair</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>) <a href="src/OpenSSL-DSA.html#signDigestedDataWithDSA" class="link">Source</a></p><div class="doc"><p>Sign pre-digested data. The DSA specs call for SHA1 to be used so, if you
   use anything else, YMMV. Returns a pair of Integers which, together, are
   the signature</p></div></div><div class="top"><p class="src"><a name="v:verifyDigestedDataWithDSA" class="def">verifyDigestedDataWithDSA</a> :: <a href="OpenSSL-DSA.html#t:DSAKey">DSAKey</a> k =&gt; k -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/OpenSSL-DSA.html#verifyDigestedDataWithDSA" class="link">Source</a></p><div class="doc"><p>Verify pre-digested data given a signature.</p></div></div><h1 id="g:4">Extracting fields of DSA objects</h1><div class="top"><p class="src"><a name="v:dsaPrivate" class="def">dsaPrivate</a> :: <a href="OpenSSL-DSA.html#t:DSAKeyPair">DSAKeyPair</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a> <a href="src/OpenSSL-DSA.html#dsaPrivate" class="link">Source</a></p><div class="doc"><p>Return the private key <code>x</code>.</p></div></div><div class="top"><p class="src"><a name="v:dsaPubKeyToTuple" class="def">dsaPubKeyToTuple</a> :: <a href="OpenSSL-DSA.html#t:DSAKeyPair">DSAKeyPair</a> -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>) <a href="src/OpenSSL-DSA.html#dsaPubKeyToTuple" class="link">Source</a></p><div class="doc"><p>Convert a DSAPubKey object to a tuple of its members in the
   order p, q, g, and public.</p></div></div><div class="top"><p class="src"><a name="v:dsaKeyPairToTuple" class="def">dsaKeyPairToTuple</a> :: <a href="OpenSSL-DSA.html#t:DSAKeyPair">DSAKeyPair</a> -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>) <a href="src/OpenSSL-DSA.html#dsaKeyPairToTuple" class="link">Source</a></p><div class="doc"><p>Convert a DSAKeyPair object to a tuple of its members in the
   order p, q, g, public and private.</p></div></div><div class="top"><p class="src"><a name="v:tupleToDSAPubKey" class="def">tupleToDSAPubKey</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>) -&gt; <a href="OpenSSL-DSA.html#t:DSAPubKey">DSAPubKey</a> <a href="src/OpenSSL-DSA.html#tupleToDSAPubKey" class="link">Source</a></p><div class="doc"><p>Convert a tuple of members (in the same format as from
   <code><a href="OpenSSL-DSA.html#v:dsaPubKeyToTuple">dsaPubKeyToTuple</a></code>) into a DSAPubKey object</p></div></div><div class="top"><p class="src"><a name="v:tupleToDSAKeyPair" class="def">tupleToDSAKeyPair</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a>) -&gt; <a href="OpenSSL-DSA.html#t:DSAKeyPair">DSAKeyPair</a> <a href="src/OpenSSL-DSA.html#tupleToDSAKeyPair" class="link">Source</a></p><div class="doc"><p>Convert a tuple of members (in the same format as from
   <code><a href="OpenSSL-DSA.html#v:dsaPubKeyToTuple">dsaPubKeyToTuple</a></code>) into a DSAPubKey object</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>