<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.15"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>Crypto++: DL_Algorithm_GDSA< T > Class Template Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">Crypto++  <span id="projectnumber">7.0</span> </div> <div id="projectbrief">Free C++ class library of cryptographic schemes</div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.15 --> <script type="text/javascript" src="menudata.js"></script> <script type="text/javascript" src="menu.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(function() { initMenu('',false,false,'search.php','Search'); }); /* @license-end */</script> <div id="main-nav"></div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> | <a href="#pub-static-methods">Static Public Member Functions</a> | <a href="class_d_l___algorithm___g_d_s_a-members.html">List of all members</a> </div> <div class="headertitle"> <div class="title">DL_Algorithm_GDSA< T > Class Template Reference</div> </div> </div><!--header--> <div class="contents"> <p><a class="el" href="struct_g_d_s_a.html" title="DSA signature scheme.">GDSA</a> algorithm. <a href="class_d_l___algorithm___g_d_s_a.html#details">More...</a></p> <div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;"> <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for DL_Algorithm_GDSA< T >:</div> <div id="dynsection-0-summary" class="dynsummary" style="display:block;"> </div> <div id="dynsection-0-content" class="dyncontent" style="display:none;"> <div class="center"> <img src="class_d_l___algorithm___g_d_s_a.png" usemap="#DL_5FAlgorithm_5FGDSA_3C_20T_20_3E_map" alt=""/> <map id="DL_5FAlgorithm_5FGDSA_3C_20T_20_3E_map" name="DL_5FAlgorithm_5FGDSA_3C_20T_20_3E_map"> <area href="class_d_l___elgamal_like_signature_algorithm.html" title="Interface for Elgamal-like signature algorithms." alt="DL_ElgamalLikeSignatureAlgorithm< T >" shape="rect" coords="0,0,240,24"/> <area href="class_d_l___algorithm___d_s_a___r_f_c6979.html" title="DSA signature algorithm based on RFC 6979." alt="DL_Algorithm_DSA_RFC6979< T, H >" shape="rect" coords="0,112,240,136"/> </map> </div></div> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr class="memitem:ab487a0a58eb06bf8133efd360a639075"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_l___algorithm___g_d_s_a.html#ab487a0a58eb06bf8133efd360a639075">Sign</a> (const <a class="el" href="class_d_l___group_parameters.html">DL_GroupParameters</a>< T > &params, const <a class="el" href="class_integer.html">Integer</a> &x, const <a class="el" href="class_integer.html">Integer</a> &k, const <a class="el" href="class_integer.html">Integer</a> &e, <a class="el" href="class_integer.html">Integer</a> &r, <a class="el" href="class_integer.html">Integer</a> &s) const</td></tr> <tr class="memdesc:ab487a0a58eb06bf8133efd360a639075"><td class="mdescLeft"> </td><td class="mdescRight">Sign a message using a private key. <a href="#ab487a0a58eb06bf8133efd360a639075">More...</a><br /></td></tr> <tr class="separator:ab487a0a58eb06bf8133efd360a639075"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:aa88f8827bab1adc8d61a2ba4f87941e7"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_l___algorithm___g_d_s_a.html#aa88f8827bab1adc8d61a2ba4f87941e7">Verify</a> (const <a class="el" href="class_d_l___group_parameters.html">DL_GroupParameters</a>< T > &params, const <a class="el" href="class_d_l___public_key.html">DL_PublicKey</a>< T > &publicKey, const <a class="el" href="class_integer.html">Integer</a> &e, const <a class="el" href="class_integer.html">Integer</a> &r, const <a class="el" href="class_integer.html">Integer</a> &s) const</td></tr> <tr class="memdesc:aa88f8827bab1adc8d61a2ba4f87941e7"><td class="mdescLeft"> </td><td class="mdescRight">Verify a message using a public key. <a href="#aa88f8827bab1adc8d61a2ba4f87941e7">More...</a><br /></td></tr> <tr class="separator:aa88f8827bab1adc8d61a2ba4f87941e7"><td class="memSeparator" colspan="2"> </td></tr> <tr class="inherit_header pub_methods_class_d_l___elgamal_like_signature_algorithm"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_d_l___elgamal_like_signature_algorithm')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="class_d_l___elgamal_like_signature_algorithm.html">DL_ElgamalLikeSignatureAlgorithm< T ></a></td></tr> <tr class="memitem:af5040f7c2b09df00481706dabb3d844d inherit pub_methods_class_d_l___elgamal_like_signature_algorithm"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="class_integer.html">Integer</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_l___elgamal_like_signature_algorithm.html#af5040f7c2b09df00481706dabb3d844d">RecoverPresignature</a> (const <a class="el" href="class_d_l___group_parameters.html">DL_GroupParameters</a>< T > &params, const <a class="el" href="class_d_l___public_key.html">DL_PublicKey</a>< T > &publicKey, const <a class="el" href="class_integer.html">Integer</a> &r, const <a class="el" href="class_integer.html">Integer</a> &s) const</td></tr> <tr class="memdesc:af5040f7c2b09df00481706dabb3d844d inherit pub_methods_class_d_l___elgamal_like_signature_algorithm"><td class="mdescLeft"> </td><td class="mdescRight">Recover a Presignature. <a href="class_d_l___elgamal_like_signature_algorithm.html#af5040f7c2b09df00481706dabb3d844d">More...</a><br /></td></tr> <tr class="separator:af5040f7c2b09df00481706dabb3d844d inherit pub_methods_class_d_l___elgamal_like_signature_algorithm"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ae3b8afddf69e2d1be2e8bda56c4e7c0a inherit pub_methods_class_d_l___elgamal_like_signature_algorithm"><td class="memItemLeft" align="right" valign="top">virtual size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_l___elgamal_like_signature_algorithm.html#ae3b8afddf69e2d1be2e8bda56c4e7c0a">RLen</a> (const <a class="el" href="class_d_l___group_parameters.html">DL_GroupParameters</a>< T > &params) const</td></tr> <tr class="memdesc:ae3b8afddf69e2d1be2e8bda56c4e7c0a inherit pub_methods_class_d_l___elgamal_like_signature_algorithm"><td class="mdescLeft"> </td><td class="mdescRight">Retrieve R length. <a href="class_d_l___elgamal_like_signature_algorithm.html#ae3b8afddf69e2d1be2e8bda56c4e7c0a">More...</a><br /></td></tr> <tr class="separator:ae3b8afddf69e2d1be2e8bda56c4e7c0a inherit pub_methods_class_d_l___elgamal_like_signature_algorithm"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ad2324392a1d7e651c064f70fefcafbc7 inherit pub_methods_class_d_l___elgamal_like_signature_algorithm"><td class="memItemLeft" align="right" valign="top">virtual size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_l___elgamal_like_signature_algorithm.html#ad2324392a1d7e651c064f70fefcafbc7">SLen</a> (const <a class="el" href="class_d_l___group_parameters.html">DL_GroupParameters</a>< T > &params) const</td></tr> <tr class="memdesc:ad2324392a1d7e651c064f70fefcafbc7 inherit pub_methods_class_d_l___elgamal_like_signature_algorithm"><td class="mdescLeft"> </td><td class="mdescRight">Retrieve S length. <a href="class_d_l___elgamal_like_signature_algorithm.html#ad2324392a1d7e651c064f70fefcafbc7">More...</a><br /></td></tr> <tr class="separator:ad2324392a1d7e651c064f70fefcafbc7 inherit pub_methods_class_d_l___elgamal_like_signature_algorithm"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a0e463485352ef3c352acc4d9af2c258d inherit pub_methods_class_d_l___elgamal_like_signature_algorithm"><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_l___elgamal_like_signature_algorithm.html#a0e463485352ef3c352acc4d9af2c258d">IsDeterministic</a> () const</td></tr> <tr class="memdesc:a0e463485352ef3c352acc4d9af2c258d inherit pub_methods_class_d_l___elgamal_like_signature_algorithm"><td class="mdescLeft"> </td><td class="mdescRight">Signature scheme flag. <a href="class_d_l___elgamal_like_signature_algorithm.html#a0e463485352ef3c352acc4d9af2c258d">More...</a><br /></td></tr> <tr class="separator:a0e463485352ef3c352acc4d9af2c258d inherit pub_methods_class_d_l___elgamal_like_signature_algorithm"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a> Static Public Member Functions</h2></td></tr> <tr class="memitem:acf1bf12a5a878065ca83b85b69180eee"><td class="memItemLeft" align="right" valign="top"><a id="acf1bf12a5a878065ca83b85b69180eee"></a> static const char * </td><td class="memItemRight" valign="bottom"><b>StaticAlgorithmName</b> ()</td></tr> <tr class="separator:acf1bf12a5a878065ca83b85b69180eee"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><h3>template<class T><br /> class DL_Algorithm_GDSA< T ></h3> <p><a class="el" href="struct_g_d_s_a.html" title="DSA signature scheme.">GDSA</a> algorithm. </p> <dl class="tparams"><dt>Template Parameters</dt><dd> <table class="tparams"> <tr><td class="paramname">T</td><td>FieldElement type or class </td></tr> </table> </dd> </dl> <p class="definition">Definition at line <a class="el" href="gfpcrypt_8h_source.html#l00194">194</a> of file <a class="el" href="gfpcrypt_8h_source.html">gfpcrypt.h</a>.</p> </div><h2 class="groupheader">Member Function Documentation</h2> <a id="ab487a0a58eb06bf8133efd360a639075"></a> <h2 class="memtitle"><span class="permalink"><a href="#ab487a0a58eb06bf8133efd360a639075">◆ </a></span>Sign()</h2> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class T> </div> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">void <a class="el" href="class_d_l___algorithm___g_d_s_a.html">DL_Algorithm_GDSA</a>< T >::Sign </td> <td>(</td> <td class="paramtype">const <a class="el" href="class_d_l___group_parameters.html">DL_GroupParameters</a>< T > & </td> <td class="paramname"><em>params</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="class_integer.html">Integer</a> & </td> <td class="paramname"><em>privateKey</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="class_integer.html">Integer</a> & </td> <td class="paramname"><em>k</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="class_integer.html">Integer</a> & </td> <td class="paramname"><em>e</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="class_integer.html">Integer</a> & </td> <td class="paramname"><em>r</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="class_integer.html">Integer</a> & </td> <td class="paramname"><em>s</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td> const</td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Sign a message using a private key. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">params</td><td>GroupParameters </td></tr> <tr><td class="paramname">privateKey</td><td>private key </td></tr> <tr><td class="paramname">k</td><td>signing exponent </td></tr> <tr><td class="paramname">e</td><td>encoded message </td></tr> <tr><td class="paramname">r</td><td>r part of signature </td></tr> <tr><td class="paramname">s</td><td>s part of signature </td></tr> </table> </dd> </dl> <p>Implements <a class="el" href="class_d_l___elgamal_like_signature_algorithm.html#a033808f79700a901d7fb183e6dab247a">DL_ElgamalLikeSignatureAlgorithm< T ></a>.</p> <p class="definition">Definition at line <a class="el" href="gfpcrypt_8h_source.html#l00201">201</a> of file <a class="el" href="gfpcrypt_8h_source.html">gfpcrypt.h</a>.</p> </div> </div> <a id="aa88f8827bab1adc8d61a2ba4f87941e7"></a> <h2 class="memtitle"><span class="permalink"><a href="#aa88f8827bab1adc8d61a2ba4f87941e7">◆ </a></span>Verify()</h2> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class T> </div> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">bool <a class="el" href="class_d_l___algorithm___g_d_s_a.html">DL_Algorithm_GDSA</a>< T >::Verify </td> <td>(</td> <td class="paramtype">const <a class="el" href="class_d_l___group_parameters.html">DL_GroupParameters</a>< T > & </td> <td class="paramname"><em>params</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="class_d_l___public_key.html">DL_PublicKey</a>< T > & </td> <td class="paramname"><em>publicKey</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="class_integer.html">Integer</a> & </td> <td class="paramname"><em>e</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="class_integer.html">Integer</a> & </td> <td class="paramname"><em>r</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="class_integer.html">Integer</a> & </td> <td class="paramname"><em>s</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td> const</td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Verify a message using a public key. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">params</td><td>GroupParameters </td></tr> <tr><td class="paramname">publicKey</td><td>public key </td></tr> <tr><td class="paramname">e</td><td>encoded message </td></tr> <tr><td class="paramname">r</td><td>r part of signature </td></tr> <tr><td class="paramname">s</td><td>s part of signature </td></tr> </table> </dd> </dl> <p>Implements <a class="el" href="class_d_l___elgamal_like_signature_algorithm.html#af1f4e4ba20583c45514ece27cf97b8d2">DL_ElgamalLikeSignatureAlgorithm< T ></a>.</p> <p class="definition">Definition at line <a class="el" href="gfpcrypt_8h_source.html#l00210">210</a> of file <a class="el" href="gfpcrypt_8h_source.html">gfpcrypt.h</a>.</p> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="gfpcrypt_8h_source.html">gfpcrypt.h</a></li> </ul> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated on Wed Nov 27 2019 15:04:06 for Crypto++ by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.15 </small></address> </body> </html>