<!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/xhtml;charset=UTF-8"/> <title>Crypto++: XTR_DH Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.6.1 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> </div> <div class="contents"> <h1>XTR_DH Class Reference</h1><!-- doxytag: class="XTR_DH" --><!-- doxytag: inherits="SimpleKeyAgreementDomain,CryptoParameters" --> <p>XTR-DH with key validation. <a href="#_details">More...</a></p> <p><code>#include <<a class="el" href="xtrcrypt_8h_source.html">xtrcrypt.h</a>></code></p> <div class="dynheader"> Inheritance diagram for XTR_DH:</div> <div class="dynsection"> <div class="center"> <img src="class_x_t_r___d_h.gif" usemap="#XTR_DH_map" alt=""/> <map id="XTR_DH_map" name="XTR_DH_map"> <area href="class_simple_key_agreement_domain.html" alt="SimpleKeyAgreementDomain" shape="rect" coords="0,224,174,248"/> <area href="class_crypto_parameters.html" alt="CryptoParameters" shape="rect" coords="184,224,358,248"/> <area href="class_key_agreement_algorithm.html" alt="KeyAgreementAlgorithm" shape="rect" coords="0,168,174,192"/> <area href="class_generatable_crypto_material.html" alt="GeneratableCryptoMaterial" shape="rect" coords="184,168,358,192"/> <area href="class_asymmetric_algorithm.html" alt="AsymmetricAlgorithm" shape="rect" coords="0,112,174,136"/> <area href="class_crypto_material.html" alt="CryptoMaterial" shape="rect" coords="184,112,358,136"/> <area href="class_algorithm.html" alt="Algorithm" shape="rect" coords="0,56,174,80"/> <area href="class_name_value_pairs.html" alt="NameValuePairs" shape="rect" coords="184,56,358,80"/> <area href="class_clonable.html" alt="Clonable" shape="rect" coords="0,0,174,24"/> </map> </div> </div> <p><a href="class_x_t_r___d_h-members.html">List of all members.</a></p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac569da5583dcd3fc1f10795cfda8c123"></a><!-- doxytag: member="XTR_DH::XTR_DH" ref="ac569da5583dcd3fc1f10795cfda8c123" args="(const Integer &p, const Integer &q, const GFP2Element &g)" --> </td><td class="memItemRight" valign="bottom"><b>XTR_DH</b> (const <a class="el" href="class_integer.html">Integer</a> &p, const <a class="el" href="class_integer.html">Integer</a> &q, const <a class="el" href="class_g_f_p2_element.html">GFP2Element</a> &g)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a867f652dfc05dde7b6a1866a777e990b"></a><!-- doxytag: member="XTR_DH::XTR_DH" ref="a867f652dfc05dde7b6a1866a777e990b" args="(RandomNumberGenerator &rng, unsigned int pbits, unsigned int qbits)" --> </td><td class="memItemRight" valign="bottom"><b>XTR_DH</b> (<a class="el" href="class_random_number_generator.html">RandomNumberGenerator</a> &rng, unsigned int pbits, unsigned int qbits)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab55db82b3af6c9b3e1263a757ba01a30"></a><!-- doxytag: member="XTR_DH::XTR_DH" ref="ab55db82b3af6c9b3e1263a757ba01a30" args="(BufferedTransformation &domainParams)" --> </td><td class="memItemRight" valign="bottom"><b>XTR_DH</b> (<a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> &domainParams)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9690ce0b86739e06adeb8de130fede01"></a><!-- doxytag: member="XTR_DH::DEREncode" ref="a9690ce0b86739e06adeb8de130fede01" args="(BufferedTransformation &domainParams) const " --> void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_x_t_r___d_h.html#a9690ce0b86739e06adeb8de130fede01">DEREncode</a> (<a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> &domainParams) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">for backwards compatibility, calls <a class="el" href="class_key_agreement_algorithm.html#aeef052b9f5db7aa72d451c272e578e47" title="returns a const reference to the crypto material used by this object">GetMaterial()</a>.Save(bt) <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_x_t_r___d_h.html#ae2fb85f2b1cbfd4fb7c45de61df0ba4b">Validate</a> (<a class="el" href="class_random_number_generator.html">RandomNumberGenerator</a> &rng, unsigned int level) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">check this object for errors <a href="#ae2fb85f2b1cbfd4fb7c45de61df0ba4b"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa27f618e7ee5c615d5288db47f254b1c"></a><!-- doxytag: member="XTR_DH::GetVoidValue" ref="aa27f618e7ee5c615d5288db47f254b1c" args="(const char *name, const std::type_info &valueType, void *pValue) const " --> bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_x_t_r___d_h.html#aa27f618e7ee5c615d5288db47f254b1c">GetVoidValue</a> (const char *name, const std::type_info &valueType, void *pValue) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">to be implemented by derived classes, users should use one of the above functions instead <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_x_t_r___d_h.html#af2456cb49f5b36edaaef3c0cae25a775">AssignFrom</a> (const <a class="el" href="class_name_value_pairs.html">NameValuePairs</a> &source)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">assign values from source to this object <a href="#af2456cb49f5b36edaaef3c0cae25a775"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac8961d7753053e451e951ad8ba808582"></a><!-- doxytag: member="XTR_DH::AccessCryptoParameters" ref="ac8961d7753053e451e951ad8ba808582" args="()" --> <a class="el" href="class_crypto_parameters.html">CryptoParameters</a> & </td><td class="memItemRight" valign="bottom"><b>AccessCryptoParameters</b> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abc1e1ffa5ef284a2eb001487d8d83283"></a><!-- doxytag: member="XTR_DH::AgreedValueLength" ref="abc1e1ffa5ef284a2eb001487d8d83283" args="() const " --> unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_x_t_r___d_h.html#abc1e1ffa5ef284a2eb001487d8d83283">AgreedValueLength</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">return length of agreed value produced <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a58f718388a09fc5b254ea50492517dbd"></a><!-- doxytag: member="XTR_DH::PrivateKeyLength" ref="a58f718388a09fc5b254ea50492517dbd" args="() const " --> unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_x_t_r___d_h.html#a58f718388a09fc5b254ea50492517dbd">PrivateKeyLength</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">return length of private keys in this domain <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a00ff72c1d7f0b3f8b6d2e21b90214c17"></a><!-- doxytag: member="XTR_DH::PublicKeyLength" ref="a00ff72c1d7f0b3f8b6d2e21b90214c17" args="() const " --> unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_x_t_r___d_h.html#a00ff72c1d7f0b3f8b6d2e21b90214c17">PublicKeyLength</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">return length of public keys in this domain <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_x_t_r___d_h.html#af9546b08d1b46a84675cfded8f1176f2">GeneratePrivateKey</a> (<a class="el" href="class_random_number_generator.html">RandomNumberGenerator</a> &rng, byte *privateKey) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">generate private key <a href="#af9546b08d1b46a84675cfded8f1176f2"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_x_t_r___d_h.html#a9b2d088f034d458abccc7fea30a22412">GeneratePublicKey</a> (<a class="el" href="class_random_number_generator.html">RandomNumberGenerator</a> &rng, const byte *privateKey, byte *publicKey) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">generate public key <a href="#a9b2d088f034d458abccc7fea30a22412"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_x_t_r___d_h.html#a6947d070cbdba7b811cc79a33a3c6632">Agree</a> (byte *agreedValue, const byte *privateKey, const byte *otherPublicKey, bool validateOtherPublicKey=true) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">derive agreed value from your private key and couterparty's public key, return false in case of failure <a href="#a6947d070cbdba7b811cc79a33a3c6632"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7931e3c950c698635a4c03142a51c914"></a><!-- doxytag: member="XTR_DH::GetModulus" ref="a7931e3c950c698635a4c03142a51c914" args="() const " --> const <a class="el" href="class_integer.html">Integer</a> & </td><td class="memItemRight" valign="bottom"><b>GetModulus</b> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7736a6f4a26d2a3c9a13d5face69442a"></a><!-- doxytag: member="XTR_DH::GetSubgroupOrder" ref="a7736a6f4a26d2a3c9a13d5face69442a" args="() const " --> const <a class="el" href="class_integer.html">Integer</a> & </td><td class="memItemRight" valign="bottom"><b>GetSubgroupOrder</b> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a63812656167e27d1bb936ad923efe2f1"></a><!-- doxytag: member="XTR_DH::GetSubgroupGenerator" ref="a63812656167e27d1bb936ad923efe2f1" args="() const " --> const <a class="el" href="class_g_f_p2_element.html">GFP2Element</a> & </td><td class="memItemRight" valign="bottom"><b>GetSubgroupGenerator</b> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ade9c4eff843a1c2fd08e82b3a2a1fc43"></a><!-- doxytag: member="XTR_DH::SetModulus" ref="ade9c4eff843a1c2fd08e82b3a2a1fc43" args="(const Integer &p)" --> void </td><td class="memItemRight" valign="bottom"><b>SetModulus</b> (const <a class="el" href="class_integer.html">Integer</a> &p)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a74093256e7be4e3f10d512b2edbfdbbd"></a><!-- doxytag: member="XTR_DH::SetSubgroupOrder" ref="a74093256e7be4e3f10d512b2edbfdbbd" args="(const Integer &q)" --> void </td><td class="memItemRight" valign="bottom"><b>SetSubgroupOrder</b> (const <a class="el" href="class_integer.html">Integer</a> &q)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af009d4699f4c7c427c799c5967eae47d"></a><!-- doxytag: member="XTR_DH::SetSubgroupGenerator" ref="af009d4699f4c7c427c799c5967eae47d" args="(const GFP2Element &g)" --> void </td><td class="memItemRight" valign="bottom"><b>SetSubgroupGenerator</b> (const <a class="el" href="class_g_f_p2_element.html">GFP2Element</a> &g)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_simple_key_agreement_domain.html#a75629cd8157dca667c6aff0562ca59af">GenerateKeyPair</a> (<a class="el" href="class_random_number_generator.html">RandomNumberGenerator</a> &rng, byte *privateKey, byte *publicKey) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">generate private/public key pair <a href="#a75629cd8157dca667c6aff0562ca59af"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab9c52198ff0dd877243c9520d96beaaa"></a><!-- doxytag: member="XTR_DH::AccessMaterial" ref="ab9c52198ff0dd877243c9520d96beaaa" args="()" --> <a class="el" href="class_crypto_material.html">CryptoMaterial</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="class_key_agreement_algorithm.html#ab9c52198ff0dd877243c9520d96beaaa">AccessMaterial</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">returns a reference to the crypto material used by this object <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aeef052b9f5db7aa72d451c272e578e47"></a><!-- doxytag: member="XTR_DH::GetMaterial" ref="aeef052b9f5db7aa72d451c272e578e47" args="() const " --> const <a class="el" href="class_crypto_material.html">CryptoMaterial</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="class_key_agreement_algorithm.html#aeef052b9f5db7aa72d451c272e578e47">GetMaterial</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">returns a const reference to the crypto material used by this object <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad3641afd3786b1fbd50a55c3c69a2389"></a><!-- doxytag: member="XTR_DH::GetCryptoParameters" ref="ad3641afd3786b1fbd50a55c3c69a2389" args="() const " --> virtual const <a class="el" href="class_crypto_parameters.html">CryptoParameters</a> & </td><td class="memItemRight" valign="bottom"><b>GetCryptoParameters</b> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a522dbfcd5c1a46bf1be301cec26d6534"></a><!-- doxytag: member="XTR_DH::BERDecode" ref="a522dbfcd5c1a46bf1be301cec26d6534" args="(BufferedTransformation &bt)" --> void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_asymmetric_algorithm.html#a522dbfcd5c1a46bf1be301cec26d6534">BERDecode</a> (<a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> &bt)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">for backwards compatibility, calls <a class="el" href="class_asymmetric_algorithm.html#ad99d55413166b69a0a12e10d111926c8" title="returns a reference to the crypto material used by this object">AccessMaterial()</a>.Load(bt) <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acd21c6715add4884fa043eaf51655039"></a><!-- doxytag: member="XTR_DH::AlgorithmName" ref="acd21c6715add4884fa043eaf51655039" args="() const " --> virtual std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="class_algorithm.html#acd21c6715add4884fa043eaf51655039">AlgorithmName</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">returns name of this algorithm, not universally implemented yet <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a24b43349a71e1f98508eeb10b31a0a62"></a><!-- doxytag: member="XTR_DH::Clone" ref="a24b43349a71e1f98508eeb10b31a0a62" args="() const " --> virtual <a class="el" href="class_clonable.html">Clonable</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_clonable.html#a24b43349a71e1f98508eeb10b31a0a62">Clone</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">this is not implemented by most classes yet <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_generatable_crypto_material.html#abe368b52db1ca7079b690f2d6e605f7a">GenerateRandom</a> (<a class="el" href="class_random_number_generator.html">RandomNumberGenerator</a> &rng, const <a class="el" href="class_name_value_pairs.html">NameValuePairs</a> &params=<a class="el" href="cryptlib_8h.html#ad3205973dd1afa14090a683154c1109c">g_nullNameValuePairs</a>)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">generate a random key or crypto parameters <a href="#abe368b52db1ca7079b690f2d6e605f7a"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a38d492343c32e530a5c2781b5797f755"></a><!-- doxytag: member="XTR_DH::GenerateRandomWithKeySize" ref="a38d492343c32e530a5c2781b5797f755" args="(RandomNumberGenerator &rng, unsigned int keySize)" --> void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_generatable_crypto_material.html#a38d492343c32e530a5c2781b5797f755">GenerateRandomWithKeySize</a> (<a class="el" href="class_random_number_generator.html">RandomNumberGenerator</a> &rng, unsigned int keySize)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">calls the above function with a <a class="el" href="class_name_value_pairs.html" title="interface for retrieving values given their names">NameValuePairs</a> object that just specifies "KeySize" <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6843c1d4563fbb0208deb22624e12cce"></a><!-- doxytag: member="XTR_DH::ThrowIfInvalid" ref="a6843c1d4563fbb0208deb22624e12cce" args="(RandomNumberGenerator &rng, unsigned int level) const " --> virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_crypto_material.html#a6843c1d4563fbb0208deb22624e12cce">ThrowIfInvalid</a> (<a class="el" href="class_random_number_generator.html">RandomNumberGenerator</a> &rng, unsigned int level) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">throws <a class="el" href="class_crypto_material_1_1_invalid_material.html" title="exception thrown when invalid crypto material is detected">InvalidMaterial</a> if this object fails <a class="el" href="class_crypto_material.html#aaa7d67d0c12712de0e33713c73f5b718" title="check this object for errors">Validate()</a> test <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a690c7ce3e765a502b29b47a08c1a4e7b"></a><!-- doxytag: member="XTR_DH::Save" ref="a690c7ce3e765a502b29b47a08c1a4e7b" args="(BufferedTransformation &bt) const " --> virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_crypto_material.html#a690c7ce3e765a502b29b47a08c1a4e7b">Save</a> (<a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> &bt) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">save key into a <a class="el" href="class_buffered_transformation.html" title="interface for buffered transformations">BufferedTransformation</a> <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_crypto_material.html#ae7a94de4c3d3822070db5babbdf8b113">Load</a> (<a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> &bt)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">load key from a <a class="el" href="class_buffered_transformation.html" title="interface for buffered transformations">BufferedTransformation</a> <a href="#ae7a94de4c3d3822070db5babbdf8b113"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_crypto_material.html#a64ab4ff4adfcfc2da59706ac32895b50">SupportsPrecomputation</a> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_crypto_material.html#a39e512d2ea70d0e967db98c19994a7fd">Precompute</a> (unsigned int n)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">do precomputation <a href="#a39e512d2ea70d0e967db98c19994a7fd"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2911ebd9a28efa43dab71e5c12e2c90d"></a><!-- doxytag: member="XTR_DH::LoadPrecomputation" ref="a2911ebd9a28efa43dab71e5c12e2c90d" args="(BufferedTransformation &storedPrecomputation)" --> virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_crypto_material.html#a2911ebd9a28efa43dab71e5c12e2c90d">LoadPrecomputation</a> (<a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> &storedPrecomputation)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">retrieve previously saved precomputation <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a839d0f7f3e256b625caf6fd792925ad4"></a><!-- doxytag: member="XTR_DH::SavePrecomputation" ref="a839d0f7f3e256b625caf6fd792925ad4" args="(BufferedTransformation &storedPrecomputation) const " --> virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_crypto_material.html#a839d0f7f3e256b625caf6fd792925ad4">SavePrecomputation</a> (<a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> &storedPrecomputation) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">save precomputation for later use <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4229d3e3b7c91496cbd944c53336152d"></a><!-- doxytag: member="XTR_DH::DoQuickSanityCheck" ref="a4229d3e3b7c91496cbd944c53336152d" args="() const " --> void </td><td class="memItemRight" valign="bottom"><b>DoQuickSanityCheck</b> () const </td></tr> <tr><td class="memTemplParams" colspan="2"><a class="anchor" id="ab7afe4b5e1ced5cc8fa6f695bd7bd98c"></a><!-- doxytag: member="XTR_DH::GetThisObject" ref="ab7afe4b5e1ced5cc8fa6f695bd7bd98c" args="(T &object) const " --> template<class T > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_name_value_pairs.html#ab7afe4b5e1ced5cc8fa6f695bd7bd98c">GetThisObject</a> (T &object) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">get a copy of this object or a subobject of it <br/></td></tr> <tr><td class="memTemplParams" colspan="2"><a class="anchor" id="a01c64a1e0a5f667898b4c1968a853c0f"></a><!-- doxytag: member="XTR_DH::GetThisPointer" ref="a01c64a1e0a5f667898b4c1968a853c0f" args="(T *&p) const " --> template<class T > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_name_value_pairs.html#a01c64a1e0a5f667898b4c1968a853c0f">GetThisPointer</a> (T *&p) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">get a pointer to this object, as a pointer to T <br/></td></tr> <tr><td class="memTemplParams" colspan="2"><a class="anchor" id="a96686e9f8d6ce3ab870e516fb72b608e"></a><!-- doxytag: member="XTR_DH::GetValue" ref="a96686e9f8d6ce3ab870e516fb72b608e" args="(const char *name, T &value) const " --> template<class T > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_name_value_pairs.html#a96686e9f8d6ce3ab870e516fb72b608e">GetValue</a> (const char *name, T &value) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">get a named value, returns true if the name exists <br/></td></tr> <tr><td class="memTemplParams" colspan="2"><a class="anchor" id="a943b2009297783f1c35bae46efc3b5f7"></a><!-- doxytag: member="XTR_DH::GetValueWithDefault" ref="a943b2009297783f1c35bae46efc3b5f7" args="(const char *name, T defaultValue) const " --> template<class T > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">T </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_name_value_pairs.html#a943b2009297783f1c35bae46efc3b5f7">GetValueWithDefault</a> (const char *name, T defaultValue) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">get a named value, returns the default if the name doesn't exist <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0db4ff40763578fb2013b18590f44037"></a><!-- doxytag: member="XTR_DH::GetValueNames" ref="a0db4ff40763578fb2013b18590f44037" args="() const " --> std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="class_name_value_pairs.html#a0db4ff40763578fb2013b18590f44037">GetValueNames</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">get a list of value names that can be retrieved <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_name_value_pairs.html#a39b6daefcabcdd07f5ae482a075e1728">GetIntValue</a> (const char *name, int &value) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">get a named value with type int <a href="#a39b6daefcabcdd07f5ae482a075e1728"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac269314685b737912d3499f4a9399618"></a><!-- doxytag: member="XTR_DH::GetIntValueWithDefault" ref="ac269314685b737912d3499f4a9399618" args="(const char *name, int defaultValue) const " --> int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_name_value_pairs.html#ac269314685b737912d3499f4a9399618">GetIntValueWithDefault</a> (const char *name, int defaultValue) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">get a named value with type int, with default <br/></td></tr> <tr><td class="memTemplParams" colspan="2"><a class="anchor" id="ac66048d3bc2a741712486d02e1f75d78"></a><!-- doxytag: member="XTR_DH::GetRequiredParameter" ref="ac66048d3bc2a741712486d02e1f75d78" args="(const char *className, const char *name, T &value) const " --> template<class T > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>GetRequiredParameter</b> (const char *className, const char *name, T &value) const </td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1e6596c87ad9c2bb7f2a4d7b2194b949"></a><!-- doxytag: member="XTR_DH::GetRequiredIntParameter" ref="a1e6596c87ad9c2bb7f2a4d7b2194b949" args="(const char *className, const char *name, int &value) const " --> void </td><td class="memItemRight" valign="bottom"><b>GetRequiredIntParameter</b> (const char *className, const char *name, int &value) const </td></tr> <tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa50a73b1705adb00ace9463b59696fb7"></a><!-- doxytag: member="XTR_DH::ThrowIfTypeMismatch" ref="aa50a73b1705adb00ace9463b59696fb7" args="(const char *name, const std::type_info &stored, const std::type_info &retrieving)" --> static void __cdecl </td><td class="memItemRight" valign="bottom"><a class="el" href="class_name_value_pairs.html#aa50a73b1705adb00ace9463b59696fb7">ThrowIfTypeMismatch</a> (const char *name, const std::type_info &stored, const std::type_info &retrieving)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">used by derived classes to check for type mismatch <br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>XTR-DH with key validation. </p> <p>Definition at line <a class="el" href="xtrcrypt_8h_source.html#l00014">14</a> of file <a class="el" href="xtrcrypt_8h_source.html">xtrcrypt.h</a>.</p> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="ae2fb85f2b1cbfd4fb7c45de61df0ba4b"></a><!-- doxytag: member="XTR_DH::Validate" ref="ae2fb85f2b1cbfd4fb7c45de61df0ba4b" args="(RandomNumberGenerator &rng, unsigned int level) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool XTR_DH::Validate </td> <td>(</td> <td class="paramtype"><a class="el" href="class_random_number_generator.html">RandomNumberGenerator</a> & </td> <td class="paramname"> <em>rng</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">unsigned int </td> <td class="paramname"> <em>level</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>check this object for errors </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>level</em> </td><td>denotes the level of thoroughness: 0 - using this object won't cause a crash or exception (rng is ignored) 1 - this object will probably function (encrypt, sign, etc.) correctly (but may not check for weak keys and such) 2 - make sure this object will function correctly, and do reasonable security checks 3 - do checks that may take a long time </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>true if the tests pass </dd></dl> <p>Implements <a class="el" href="class_crypto_material.html#aaa7d67d0c12712de0e33713c73f5b718">CryptoMaterial</a>.</p> <p>Definition at line <a class="el" href="xtrcrypt_8cpp_source.html#l00041">41</a> of file <a class="el" href="xtrcrypt_8cpp_source.html">xtrcrypt.cpp</a>.</p> <p>References <a class="el" href="integer_8cpp_source.html#l02879">Integer::One()</a>.</p> </div> </div> <a class="anchor" id="af2456cb49f5b36edaaef3c0cae25a775"></a><!-- doxytag: member="XTR_DH::AssignFrom" ref="af2456cb49f5b36edaaef3c0cae25a775" args="(const NameValuePairs &source)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void XTR_DH::AssignFrom </td> <td>(</td> <td class="paramtype">const <a class="el" href="class_name_value_pairs.html">NameValuePairs</a> & </td> <td class="paramname"> <em>source</em></td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>assign values from source to this object </p> <dl class="note"><dt><b>Note:</b></dt><dd>This function can be used to create a public key from a private key. </dd></dl> <p>Implements <a class="el" href="class_crypto_material.html#a20181c1b39a74a9fe91385b025b773c6">CryptoMaterial</a>.</p> <p>Definition at line <a class="el" href="xtrcrypt_8cpp_source.html#l00068">68</a> of file <a class="el" href="xtrcrypt_8cpp_source.html">xtrcrypt.cpp</a>.</p> </div> </div> <a class="anchor" id="af9546b08d1b46a84675cfded8f1176f2"></a><!-- doxytag: member="XTR_DH::GeneratePrivateKey" ref="af9546b08d1b46a84675cfded8f1176f2" args="(RandomNumberGenerator &rng, byte *privateKey) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void XTR_DH::GeneratePrivateKey </td> <td>(</td> <td class="paramtype"><a class="el" href="class_random_number_generator.html">RandomNumberGenerator</a> & </td> <td class="paramname"> <em>rng</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">byte * </td> <td class="paramname"> <em>privateKey</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>generate private key </p> <dl class="pre"><dt><b>Precondition:</b></dt><dd>size of privateKey == <a class="el" href="class_x_t_r___d_h.html#a58f718388a09fc5b254ea50492517dbd" title="return length of private keys in this domain">PrivateKeyLength()</a> </dd></dl> <p>Implements <a class="el" href="class_simple_key_agreement_domain.html#aee7a4929f8a1a77acd04e12fbcd0a0b1">SimpleKeyAgreementDomain</a>.</p> <p>Definition at line <a class="el" href="xtrcrypt_8cpp_source.html#l00077">77</a> of file <a class="el" href="xtrcrypt_8cpp_source.html">xtrcrypt.cpp</a>.</p> <p>References <a class="el" href="integer_8cpp_source.html#l03124">Integer::Encode()</a>, <a class="el" href="xtrcrypt_8h_source.html#l00030">PrivateKeyLength()</a>, and <a class="el" href="integer_8cpp_source.html#l02874">Integer::Zero()</a>.</p> </div> </div> <a class="anchor" id="a9b2d088f034d458abccc7fea30a22412"></a><!-- doxytag: member="XTR_DH::GeneratePublicKey" ref="a9b2d088f034d458abccc7fea30a22412" args="(RandomNumberGenerator &rng, const byte *privateKey, byte *publicKey) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void XTR_DH::GeneratePublicKey </td> <td>(</td> <td class="paramtype"><a class="el" href="class_random_number_generator.html">RandomNumberGenerator</a> & </td> <td class="paramname"> <em>rng</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const byte * </td> <td class="paramname"> <em>privateKey</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">byte * </td> <td class="paramname"> <em>publicKey</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>generate public key </p> <dl class="pre"><dt><b>Precondition:</b></dt><dd>size of publicKey == <a class="el" href="class_x_t_r___d_h.html#a00ff72c1d7f0b3f8b6d2e21b90214c17" title="return length of public keys in this domain">PublicKeyLength()</a> </dd></dl> <p>Implements <a class="el" href="class_simple_key_agreement_domain.html#a56d0957a43c48f3e6431868f564f574f">SimpleKeyAgreementDomain</a>.</p> <p>Definition at line <a class="el" href="xtrcrypt_8cpp_source.html#l00083">83</a> of file <a class="el" href="xtrcrypt_8cpp_source.html">xtrcrypt.cpp</a>.</p> <p>References <a class="el" href="xtrcrypt_8h_source.html#l00030">PrivateKeyLength()</a>, and <a class="el" href="xtrcrypt_8h_source.html#l00031">PublicKeyLength()</a>.</p> </div> </div> <a class="anchor" id="a6947d070cbdba7b811cc79a33a3c6632"></a><!-- doxytag: member="XTR_DH::Agree" ref="a6947d070cbdba7b811cc79a33a3c6632" args="(byte *agreedValue, const byte *privateKey, const byte *otherPublicKey, bool validateOtherPublicKey=true) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool XTR_DH::Agree </td> <td>(</td> <td class="paramtype">byte * </td> <td class="paramname"> <em>agreedValue</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const byte * </td> <td class="paramname"> <em>privateKey</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const byte * </td> <td class="paramname"> <em>otherPublicKey</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"> <em>validateOtherPublicKey</em> = <code>true</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>derive agreed value from your private key and couterparty's public key, return false in case of failure </p> <dl class="note"><dt><b>Note:</b></dt><dd>If you have previously validated the public key, use validateOtherPublicKey=false to save time. </dd></dl> <dl class="pre"><dt><b>Precondition:</b></dt><dd>size of agreedValue == <a class="el" href="class_x_t_r___d_h.html#abc1e1ffa5ef284a2eb001487d8d83283" title="return length of agreed value produced">AgreedValueLength()</a> </dd> <dd> length of privateKey == <a class="el" href="class_x_t_r___d_h.html#a58f718388a09fc5b254ea50492517dbd" title="return length of private keys in this domain">PrivateKeyLength()</a> </dd> <dd> length of otherPublicKey == <a class="el" href="class_x_t_r___d_h.html#a00ff72c1d7f0b3f8b6d2e21b90214c17" title="return length of public keys in this domain">PublicKeyLength()</a> </dd></dl> <p>Implements <a class="el" href="class_simple_key_agreement_domain.html#a732339ca730408cca7b1191fc32eb39e">SimpleKeyAgreementDomain</a>.</p> <p>Definition at line <a class="el" href="xtrcrypt_8cpp_source.html#l00090">90</a> of file <a class="el" href="xtrcrypt_8cpp_source.html">xtrcrypt.cpp</a>.</p> <p>References <a class="el" href="xtrcrypt_8h_source.html#l00029">AgreedValueLength()</a>, <a class="el" href="xtrcrypt_8h_source.html#l00030">PrivateKeyLength()</a>, and <a class="el" href="xtrcrypt_8h_source.html#l00031">PublicKeyLength()</a>.</p> </div> </div> <a class="anchor" id="a75629cd8157dca667c6aff0562ca59af"></a><!-- doxytag: member="XTR_DH::GenerateKeyPair" ref="a75629cd8157dca667c6aff0562ca59af" args="(RandomNumberGenerator &rng, byte *privateKey, byte *publicKey) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void SimpleKeyAgreementDomain::GenerateKeyPair </td> <td>(</td> <td class="paramtype"><a class="el" href="class_random_number_generator.html">RandomNumberGenerator</a> & </td> <td class="paramname"> <em>rng</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">byte * </td> <td class="paramname"> <em>privateKey</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">byte * </td> <td class="paramname"> <em>publicKey</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td> const<code> [virtual, inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p>generate private/public key pair </p> <dl class="note"><dt><b>Note:</b></dt><dd>equivalent to calling <a class="el" href="class_simple_key_agreement_domain.html#aee7a4929f8a1a77acd04e12fbcd0a0b1" title="generate private key">GeneratePrivateKey()</a> and then <a class="el" href="class_simple_key_agreement_domain.html#a56d0957a43c48f3e6431868f564f574f" title="generate public key">GeneratePublicKey()</a> </dd></dl> <p>Definition at line <a class="el" href="cryptlib_8cpp_source.html#l00801">801</a> of file <a class="el" href="cryptlib_8cpp_source.html">cryptlib.cpp</a>.</p> <p>References <a class="el" href="class_simple_key_agreement_domain.html#aee7a4929f8a1a77acd04e12fbcd0a0b1">SimpleKeyAgreementDomain::GeneratePrivateKey()</a>, and <a class="el" href="class_simple_key_agreement_domain.html#a56d0957a43c48f3e6431868f564f574f">SimpleKeyAgreementDomain::GeneratePublicKey()</a>.</p> </div> </div> <a class="anchor" id="abe368b52db1ca7079b690f2d6e605f7a"></a><!-- doxytag: member="XTR_DH::GenerateRandom" ref="abe368b52db1ca7079b690f2d6e605f7a" args="(RandomNumberGenerator &rng, const NameValuePairs &params=g_nullNameValuePairs)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void GeneratableCryptoMaterial::GenerateRandom </td> <td>(</td> <td class="paramtype"><a class="el" href="class_random_number_generator.html">RandomNumberGenerator</a> & </td> <td class="paramname"> <em>rng</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="class_name_value_pairs.html">NameValuePairs</a> & </td> <td class="paramname"> <em>params</em> = <code><a class="el" href="cryptlib_8h.html#ad3205973dd1afa14090a683154c1109c">g_nullNameValuePairs</a></code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [inline, virtual, inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p>generate a random key or crypto parameters </p> <dl><dt><b>Exceptions:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>KeyingErr</em> </td><td>if algorithm parameters are invalid, or if a key can't be generated (e.g., if this is a public key object) </td></tr> </table> </dd> </dl> <p>Reimplemented in <a class="el" href="class_d_l___group_parameters___e_c.html#a519a33d073fe5bf2f278a0de75a404ab">DL_GroupParameters_EC< EC ></a>, <a class="el" href="class_invertible_e_s_i_g_n_function.html#a241b733193f9f420f188ca6f57d49c27">InvertibleESIGNFunction</a>, <a class="el" href="class_d_l___group_parameters___integer_based.html#a8c9a79c493a215ca37408bb7ddfb5533">DL_GroupParameters_IntegerBased</a>, <a class="el" href="class_d_l___group_parameters___d_s_a.html#ac83d3668c342b3a1fb367ed7785e27a3">DL_GroupParameters_DSA</a>, <a class="el" href="class_invertible_l_u_c_function.html#af846ecc0f5e8d17267544920bc39f233">InvertibleLUCFunction</a>, <a class="el" href="class_d_l___private_key_impl.html#ab80a3771a5ef623677775f7c5dddb1e0">DL_PrivateKeyImpl< GP ></a>, <a class="el" href="class_invertible_rabin_function.html#a571737380b956b4add10c855484af670">InvertibleRabinFunction</a>, <a class="el" href="class_invertible_r_s_a_function.html#a369c37b8f01c8b64f22baa28811ff72f">InvertibleRSAFunction</a>, <a class="el" href="class_invertible_r_w_function.html#a8953bb59727e0ae2d79071874a793c48">InvertibleRWFunction</a>, and <a class="el" href="class_d_l___private_key_impl.html#ab80a3771a5ef623677775f7c5dddb1e0">DL_PrivateKeyImpl< DL_GroupParameters_EC< EC > ></a>.</p> <p>Definition at line <a class="el" href="cryptlib_8h_source.html#l01120">1120</a> of file <a class="el" href="cryptlib_8h_source.html">cryptlib.h</a>.</p> <p>Referenced by <a class="el" href="cryptlib_8cpp_source.html#l00651">GeneratableCryptoMaterial::GenerateRandomWithKeySize()</a>.</p> </div> </div> <a class="anchor" id="ae7a94de4c3d3822070db5babbdf8b113"></a><!-- doxytag: member="XTR_DH::Load" ref="ae7a94de4c3d3822070db5babbdf8b113" args="(BufferedTransformation &bt)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void CryptoMaterial::Load </td> <td>(</td> <td class="paramtype"><a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> & </td> <td class="paramname"> <em>bt</em></td> <td> ) </td> <td><code> [inline, virtual, inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p>load key from a <a class="el" href="class_buffered_transformation.html" title="interface for buffered transformations">BufferedTransformation</a> </p> <dl><dt><b>Exceptions:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>KeyingErr</em> </td><td>if decode fails </td></tr> </table> </dd> </dl> <dl class="note"><dt><b>Note:</b></dt><dd>Generally does not check that the key is valid. Call ValidateKey() or ThrowIfInvalidKey() to check that. </dd></dl> <p>Reimplemented in <a class="el" href="class_invertible_r_s_a_function.html#ad8a540a6369b9043d082b0dc38b99d4b">InvertibleRSAFunction</a>.</p> <p>Definition at line <a class="el" href="cryptlib_8h_source.html#l01085">1085</a> of file <a class="el" href="cryptlib_8h_source.html">cryptlib.h</a>.</p> </div> </div> <a class="anchor" id="a64ab4ff4adfcfc2da59706ac32895b50"></a><!-- doxytag: member="XTR_DH::SupportsPrecomputation" ref="a64ab4ff4adfcfc2da59706ac32895b50" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual bool CryptoMaterial::SupportsPrecomputation </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td> const<code> [inline, virtual, inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <dl class="return"><dt><b>Returns:</b></dt><dd>whether this object supports precomputation </dd></dl> <p>Reimplemented in <a class="el" href="class_d_l___group_parameters.html#a42a423fd9d31e77a1d36e7da66da12bb">DL_GroupParameters< T ></a>, <a class="el" href="class_d_l___private_key_impl.html#ae8e4b6e0d700c92852a0c3edbb9afaee">DL_PrivateKeyImpl< GP ></a>, <a class="el" href="class_d_l___public_key_impl.html#a16711647065fe1c20f118460646ccc38">DL_PublicKeyImpl< GP ></a>, <a class="el" href="class_d_l___group_parameters.html#a42a423fd9d31e77a1d36e7da66da12bb">DL_GroupParameters< Integer ></a>, <a class="el" href="class_d_l___group_parameters.html#a42a423fd9d31e77a1d36e7da66da12bb">DL_GroupParameters< typenameEcPrecomputation< EC >::Element ></a>, <a class="el" href="class_d_l___private_key_impl.html#ae8e4b6e0d700c92852a0c3edbb9afaee">DL_PrivateKeyImpl< DL_GroupParameters_EC< EC > ></a>, and <a class="el" href="class_d_l___public_key_impl.html#a16711647065fe1c20f118460646ccc38">DL_PublicKeyImpl< DL_GroupParameters_EC< EC > ></a>.</p> <p>Definition at line <a class="el" href="cryptlib_8h_source.html#l01089">1089</a> of file <a class="el" href="cryptlib_8h_source.html">cryptlib.h</a>.</p> </div> </div> <a class="anchor" id="a39e512d2ea70d0e967db98c19994a7fd"></a><!-- doxytag: member="XTR_DH::Precompute" ref="a39e512d2ea70d0e967db98c19994a7fd" args="(unsigned int n)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void CryptoMaterial::Precompute </td> <td>(</td> <td class="paramtype">unsigned int </td> <td class="paramname"> <em>n</em></td> <td> ) </td> <td><code> [inline, virtual, inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p>do precomputation </p> <p>The exact semantics of <a class="el" href="class_crypto_material.html#a39e512d2ea70d0e967db98c19994a7fd" title="do precomputation">Precompute()</a> is varies, but typically it means calculate a table of n objects that can be used later to speed up computation. </p> <p>Reimplemented in <a class="el" href="class_d_l___group_parameters.html#a5f04ae8b4d0b9410a046af1607fbbb6f">DL_GroupParameters< T ></a>, <a class="el" href="class_d_l___private_key_impl.html#ac1876a3d292e192186070869be896ded">DL_PrivateKeyImpl< GP ></a>, <a class="el" href="class_d_l___public_key_impl.html#a95e25f6632ec2621289d10abc557b17b">DL_PublicKeyImpl< GP ></a>, <a class="el" href="class_d_l___group_parameters.html#a5f04ae8b4d0b9410a046af1607fbbb6f">DL_GroupParameters< Integer ></a>, <a class="el" href="class_d_l___group_parameters.html#a5f04ae8b4d0b9410a046af1607fbbb6f">DL_GroupParameters< typenameEcPrecomputation< EC >::Element ></a>, <a class="el" href="class_d_l___private_key_impl.html#ac1876a3d292e192186070869be896ded">DL_PrivateKeyImpl< DL_GroupParameters_EC< EC > ></a>, and <a class="el" href="class_d_l___public_key_impl.html#a95e25f6632ec2621289d10abc557b17b">DL_PublicKeyImpl< DL_GroupParameters_EC< EC > ></a>.</p> <p>Definition at line <a class="el" href="cryptlib_8h_source.html#l01094">1094</a> of file <a class="el" href="cryptlib_8h_source.html">cryptlib.h</a>.</p> </div> </div> <a class="anchor" id="a39b6daefcabcdd07f5ae482a075e1728"></a><!-- doxytag: member="XTR_DH::GetIntValue" ref="a39b6daefcabcdd07f5ae482a075e1728" args="(const char *name, int &value) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool NameValuePairs::GetIntValue </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int & </td> <td class="paramname"> <em>value</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td> const<code> [inline, inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p>get a named value with type int </p> <p>used to ensure we don't accidentally try to get an unsigned int or some other type when we mean int (which is the most common case) </p> <p>Definition at line <a class="el" href="cryptlib_8h_source.html#l00282">282</a> of file <a class="el" href="cryptlib_8h_source.html">cryptlib.h</a>.</p> <p>Referenced by <a class="el" href="rw_8cpp_source.html#l00088">InvertibleRWFunction::GenerateRandom()</a>, <a class="el" href="rsa_8cpp_source.html#l00104">InvertibleRSAFunction::GenerateRandom()</a>, <a class="el" href="rabin_8cpp_source.html#l00075">InvertibleRabinFunction::GenerateRandom()</a>, <a class="el" href="luc_8cpp_source.html#l00107">InvertibleLUCFunction::GenerateRandom()</a>, <a class="el" href="gfpcrypt_8cpp_source.html#l00163">DL_GroupParameters_IntegerBased::GenerateRandom()</a>, <a class="el" href="gfpcrypt_8cpp_source.html#l00026">DL_GroupParameters_DSA::GenerateRandom()</a>, and <a class="el" href="esign_8cpp_source.html#l00075">InvertibleESIGNFunction::GenerateRandom()</a>.</p> </div> </div> <hr/>The documentation for this class was generated from the following files:<ul> <li><a class="el" href="xtrcrypt_8h_source.html">xtrcrypt.h</a></li> <li><a class="el" href="xtrcrypt_8cpp_source.html">xtrcrypt.cpp</a></li> </ul> </div> <hr size="1"/><address style="text-align: right;"><small>Generated on 9 Dec 2009 for Crypto++ by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address> </body> </html>