<!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++: InvertibleRWFunction 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>InvertibleRWFunction Class Reference</h1><!-- doxytag: class="InvertibleRWFunction" --><!-- doxytag: inherits="RWFunction,TrapdoorFunctionInverse,PrivateKey" --> <p>_ <a href="#_details">More...</a></p> <p><code>#include <<a class="el" href="rw_8h_source.html">rw.h</a>></code></p> <div class="dynheader"> Inheritance diagram for InvertibleRWFunction:</div> <div class="dynsection"> <div class="center"> <img src="class_invertible_r_w_function.gif" usemap="#InvertibleRWFunction_map" alt=""/> <map id="InvertibleRWFunction_map" name="InvertibleRWFunction_map"> <area href="class_r_w_function.html" alt="RWFunction" shape="rect" coords="116,168,339,192"/> <area href="class_trapdoor_function_inverse.html" alt="TrapdoorFunctionInverse" shape="rect" coords="466,168,689,192"/> <area href="class_private_key.html" alt="PrivateKey" shape="rect" coords="699,168,922,192"/> <area href="class_trapdoor_function.html" alt="TrapdoorFunction" shape="rect" coords="0,112,223,136"/> <area href="class_public_key.html" alt="PublicKey" shape="rect" coords="233,112,456,136"/> <area href="class_randomized_trapdoor_function_inverse.html" alt="RandomizedTrapdoorFunctionInverse" shape="rect" coords="466,112,689,136"/> <area href="class_generatable_crypto_material.html" alt="GeneratableCryptoMaterial" shape="rect" coords="699,112,922,136"/> <area href="class_randomized_trapdoor_function.html" alt="RandomizedTrapdoorFunction" shape="rect" coords="0,56,223,80"/> <area href="class_crypto_material.html" alt="CryptoMaterial" shape="rect" coords="233,56,456,80"/> <area href="class_crypto_material.html" alt="CryptoMaterial" shape="rect" coords="699,56,922,80"/> <area href="class_trapdoor_function_bounds.html" alt="TrapdoorFunctionBounds" shape="rect" coords="0,0,223,24"/> <area href="class_name_value_pairs.html" alt="NameValuePairs" shape="rect" coords="233,0,456,24"/> <area href="class_name_value_pairs.html" alt="NameValuePairs" shape="rect" coords="699,0,922,24"/> </map> </div> </div> <p><a href="class_invertible_r_w_function-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="a6087d4bf788bd6beab89699eb7069b86"></a><!-- doxytag: member="InvertibleRWFunction::Initialize" ref="a6087d4bf788bd6beab89699eb7069b86" args="(const Integer &n, const Integer &p, const Integer &q, const Integer &u)" --> void </td><td class="memItemRight" valign="bottom"><b>Initialize</b> (const <a class="el" href="class_integer.html">Integer</a> &n, 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_integer.html">Integer</a> &u)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6489b68e2d321e3844b85060ba42f90c"></a><!-- doxytag: member="InvertibleRWFunction::Initialize" ref="a6489b68e2d321e3844b85060ba42f90c" args="(RandomNumberGenerator &rng, unsigned int modulusBits)" --> void </td><td class="memItemRight" valign="bottom"><b>Initialize</b> (<a class="el" href="class_random_number_generator.html">RandomNumberGenerator</a> &rng, unsigned int modulusBits)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a85e6ad506b653b4511bfd14d06aa95b5"></a><!-- doxytag: member="InvertibleRWFunction::BERDecode" ref="a85e6ad506b653b4511bfd14d06aa95b5" args="(BufferedTransformation &bt)" --> void </td><td class="memItemRight" valign="bottom"><b>BERDecode</b> (<a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> &bt)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa487d8ccbcb409066776ef48721b037a"></a><!-- doxytag: member="InvertibleRWFunction::DEREncode" ref="aa487d8ccbcb409066776ef48721b037a" args="(BufferedTransformation &bt) const " --> void </td><td class="memItemRight" valign="bottom"><b>DEREncode</b> (<a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> &bt) const </td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae72e7da96f9dc18c80e84bb510aab377"></a><!-- doxytag: member="InvertibleRWFunction::CalculateInverse" ref="ae72e7da96f9dc18c80e84bb510aab377" args="(RandomNumberGenerator &rng, const Integer &x) const " --> <a class="el" href="class_integer.html">Integer</a> </td><td class="memItemRight" valign="bottom"><b>CalculateInverse</b> (<a class="el" href="class_random_number_generator.html">RandomNumberGenerator</a> &rng, const <a class="el" href="class_integer.html">Integer</a> &x) const </td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_invertible_r_w_function.html#a7f5052834d9716bfc3a5585c6addbd46">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="#a7f5052834d9716bfc3a5585c6addbd46"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abd17ed1b135d340abc325046eebef6ac"></a><!-- doxytag: member="InvertibleRWFunction::GetVoidValue" ref="abd17ed1b135d340abc325046eebef6ac" args="(const char *name, const std::type_info &valueType, void *pValue) const " --> bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_invertible_r_w_function.html#abd17ed1b135d340abc325046eebef6ac">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_invertible_r_w_function.html#a56b0314b678c58228671d3c9049f86db">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="#a56b0314b678c58228671d3c9049f86db"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_invertible_r_w_function.html#a8953bb59727e0ae2d79071874a793c48">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> &alg)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a85cd699f52858e360212e9bb9899694e"></a><!-- doxytag: member="InvertibleRWFunction::GetPrime1" ref="a85cd699f52858e360212e9bb9899694e" args="() const " --> const <a class="el" href="class_integer.html">Integer</a> & </td><td class="memItemRight" valign="bottom"><b>GetPrime1</b> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a08536146229e2e82333cd8253901627d"></a><!-- doxytag: member="InvertibleRWFunction::GetPrime2" ref="a08536146229e2e82333cd8253901627d" args="() const " --> const <a class="el" href="class_integer.html">Integer</a> & </td><td class="memItemRight" valign="bottom"><b>GetPrime2</b> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a615d866b246d037b8ac0f883cb41987d"></a><!-- doxytag: member="InvertibleRWFunction::GetMultiplicativeInverseOfPrime2ModPrime1" ref="a615d866b246d037b8ac0f883cb41987d" args="() const " --> const <a class="el" href="class_integer.html">Integer</a> & </td><td class="memItemRight" valign="bottom"><b>GetMultiplicativeInverseOfPrime2ModPrime1</b> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5e390e6bd4701da66947fc2ae65e4598"></a><!-- doxytag: member="InvertibleRWFunction::SetPrime1" ref="a5e390e6bd4701da66947fc2ae65e4598" args="(const Integer &p)" --> void </td><td class="memItemRight" valign="bottom"><b>SetPrime1</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="a370b4bc09e8465fe5c1db848b851653f"></a><!-- doxytag: member="InvertibleRWFunction::SetPrime2" ref="a370b4bc09e8465fe5c1db848b851653f" args="(const Integer &q)" --> void </td><td class="memItemRight" valign="bottom"><b>SetPrime2</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="ada25441d1383a4c1f838cc670b1d0188"></a><!-- doxytag: member="InvertibleRWFunction::SetMultiplicativeInverseOfPrime2ModPrime1" ref="ada25441d1383a4c1f838cc670b1d0188" args="(const Integer &u)" --> void </td><td class="memItemRight" valign="bottom"><b>SetMultiplicativeInverseOfPrime2ModPrime1</b> (const <a class="el" href="class_integer.html">Integer</a> &u)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a614204219fea42197352b8456ef0b7c5"></a><!-- doxytag: member="InvertibleRWFunction::Initialize" ref="a614204219fea42197352b8456ef0b7c5" args="(const Integer &n)" --> void </td><td class="memItemRight" valign="bottom"><b>Initialize</b> (const <a class="el" href="class_integer.html">Integer</a> &n)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acddf9a5cb9d37ab07a1535f644cdac19"></a><!-- doxytag: member="InvertibleRWFunction::ApplyFunction" ref="acddf9a5cb9d37ab07a1535f644cdac19" args="(const Integer &x) const " --> <a class="el" href="class_integer.html">Integer</a> </td><td class="memItemRight" valign="bottom"><b>ApplyFunction</b> (const <a class="el" href="class_integer.html">Integer</a> &x) const </td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7a8dd13af8cb79671317b851dc3abd63"></a><!-- doxytag: member="InvertibleRWFunction::PreimageBound" ref="a7a8dd13af8cb79671317b851dc3abd63" args="() const " --> <a class="el" href="class_integer.html">Integer</a> </td><td class="memItemRight" valign="bottom"><b>PreimageBound</b> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac6ec55a2f047c811f6e49bd59d67b165"></a><!-- doxytag: member="InvertibleRWFunction::ImageBound" ref="ac6ec55a2f047c811f6e49bd59d67b165" args="() const " --> <a class="el" href="class_integer.html">Integer</a> </td><td class="memItemRight" valign="bottom"><b>ImageBound</b> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a72a7b1d2765a6f5811c48702a2eea4f3"></a><!-- doxytag: member="InvertibleRWFunction::GetModulus" ref="a72a7b1d2765a6f5811c48702a2eea4f3" 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="a5df5efb3885c607ca331929be9938546"></a><!-- doxytag: member="InvertibleRWFunction::SetModulus" ref="a5df5efb3885c607ca331929be9938546" args="(const Integer &n)" --> void </td><td class="memItemRight" valign="bottom"><b>SetModulus</b> (const <a class="el" href="class_integer.html">Integer</a> &n)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a132d71605a286f12b5167a0c3f18ffdf"></a><!-- doxytag: member="InvertibleRWFunction::ApplyRandomizedFunction" ref="a132d71605a286f12b5167a0c3f18ffdf" args="(RandomNumberGenerator &rng, const Integer &x) const " --> <a class="el" href="class_integer.html">Integer</a> </td><td class="memItemRight" valign="bottom"><b>ApplyRandomizedFunction</b> (<a class="el" href="class_random_number_generator.html">RandomNumberGenerator</a> &rng, const <a class="el" href="class_integer.html">Integer</a> &x) const </td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afe7fdc08ef27054d7689423600a588af"></a><!-- doxytag: member="InvertibleRWFunction::IsRandomized" ref="afe7fdc08ef27054d7689423600a588af" args="() const " --> bool </td><td class="memItemRight" valign="bottom"><b>IsRandomized</b> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa299b2e21f751ab6bee709ae46193dda"></a><!-- doxytag: member="InvertibleRWFunction::MaxPreimage" ref="aa299b2e21f751ab6bee709ae46193dda" args="() const " --> virtual <a class="el" href="class_integer.html">Integer</a> </td><td class="memItemRight" valign="bottom"><b>MaxPreimage</b> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a462138beee474609295596c97cf96b89"></a><!-- doxytag: member="InvertibleRWFunction::MaxImage" ref="a462138beee474609295596c97cf96b89" args="() const " --> virtual <a class="el" href="class_integer.html">Integer</a> </td><td class="memItemRight" valign="bottom"><b>MaxImage</b> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6843c1d4563fbb0208deb22624e12cce"></a><!-- doxytag: member="InvertibleRWFunction::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="InvertibleRWFunction::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="InvertibleRWFunction::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="InvertibleRWFunction::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="InvertibleRWFunction::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="InvertibleRWFunction::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="InvertibleRWFunction::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="InvertibleRWFunction::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="InvertibleRWFunction::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="InvertibleRWFunction::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="InvertibleRWFunction::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="InvertibleRWFunction::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="InvertibleRWFunction::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 class="memItemLeft" align="right" valign="top"><a class="anchor" id="a676ce8748a1fbdde3cdeaa9d5e2a1c41"></a><!-- doxytag: member="InvertibleRWFunction::CalculateRandomizedInverse" ref="a676ce8748a1fbdde3cdeaa9d5e2a1c41" args="(RandomNumberGenerator &rng, const Integer &x) const " --> <a class="el" href="class_integer.html">Integer</a> </td><td class="memItemRight" valign="bottom"><b>CalculateRandomizedInverse</b> (<a class="el" href="class_random_number_generator.html">RandomNumberGenerator</a> &rng, const <a class="el" href="class_integer.html">Integer</a> &x) const </td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4813fed647aae710c3ab8aea54d391ee"></a><!-- doxytag: member="InvertibleRWFunction::IsRandomized" ref="a4813fed647aae710c3ab8aea54d391ee" args="() const " --> bool </td><td class="memItemRight" valign="bottom"><b>IsRandomized</b> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a38d492343c32e530a5c2781b5797f755"></a><!-- doxytag: member="InvertibleRWFunction::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 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="InvertibleRWFunction::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> <tr><td colspan="2"><h2>Protected Attributes</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab4a121ce0a3f24d29b88b08ed8fa275e"></a><!-- doxytag: member="InvertibleRWFunction::m_p" ref="ab4a121ce0a3f24d29b88b08ed8fa275e" args="" --> <a class="el" href="class_integer.html">Integer</a> </td><td class="memItemRight" valign="bottom"><b>m_p</b></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a42013f81c5212a7d2072d2382018ae8d"></a><!-- doxytag: member="InvertibleRWFunction::m_q" ref="a42013f81c5212a7d2072d2382018ae8d" args="" --> <a class="el" href="class_integer.html">Integer</a> </td><td class="memItemRight" valign="bottom"><b>m_q</b></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae2afd7a6cc5342f098a858dde9161581"></a><!-- doxytag: member="InvertibleRWFunction::m_u" ref="ae2afd7a6cc5342f098a858dde9161581" args="" --> <a class="el" href="class_integer.html">Integer</a> </td><td class="memItemRight" valign="bottom"><b>m_u</b></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a21b3158cafdb7121e6305b742ffb340f"></a><!-- doxytag: member="InvertibleRWFunction::m_n" ref="a21b3158cafdb7121e6305b742ffb340f" args="" --> <a class="el" href="class_integer.html">Integer</a> </td><td class="memItemRight" valign="bottom"><b>m_n</b></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>_ </p> <p>Definition at line <a class="el" href="rw_8h_source.html#l00041">41</a> of file <a class="el" href="rw_8h_source.html">rw.h</a>.</p> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a7f5052834d9716bfc3a5585c6addbd46"></a><!-- doxytag: member="InvertibleRWFunction::Validate" ref="a7f5052834d9716bfc3a5585c6addbd46" args="(RandomNumberGenerator &rng, unsigned int level) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool InvertibleRWFunction::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>Reimplemented from <a class="el" href="class_r_w_function.html#a6280452ff21d540667c6b3f08faba0c9">RWFunction</a>.</p> <p>Definition at line <a class="el" href="rw_8cpp_source.html#l00160">160</a> of file <a class="el" href="rw_8cpp_source.html">rw.cpp</a>.</p> <p>References <a class="el" href="integer_8cpp_source.html#l02879">Integer::One()</a>.</p> </div> </div> <a class="anchor" id="a56b0314b678c58228671d3c9049f86db"></a><!-- doxytag: member="InvertibleRWFunction::AssignFrom" ref="a56b0314b678c58228671d3c9049f86db" args="(const NameValuePairs &source)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void InvertibleRWFunction::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>Reimplemented from <a class="el" href="class_r_w_function.html#a99293c55c055b338bd7c783a7b8c0484">RWFunction</a>.</p> <p>Definition at line <a class="el" href="rw_8cpp_source.html#l00185">185</a> of file <a class="el" href="rw_8cpp_source.html">rw.cpp</a>.</p> </div> </div> <a class="anchor" id="a8953bb59727e0ae2d79071874a793c48"></a><!-- doxytag: member="InvertibleRWFunction::GenerateRandom" ref="a8953bb59727e0ae2d79071874a793c48" args="(RandomNumberGenerator &rng, const NameValuePairs &alg)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void InvertibleRWFunction::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>alg</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>parameters: (ModulusSize) </p> <p>Reimplemented from <a class="el" href="class_generatable_crypto_material.html#abe368b52db1ca7079b690f2d6e605f7a">GeneratableCryptoMaterial</a>.</p> <p>Definition at line <a class="el" href="rw_8cpp_source.html#l00088">88</a> of file <a class="el" href="rw_8cpp_source.html">rw.cpp</a>.</p> <p>References <a class="el" href="cryptlib_8h_source.html#l00282">NameValuePairs::GetIntValue()</a>, and <a class="el" href="integer_8cpp_source.html#l03970">Integer::InverseMod()</a>.</p> </div> </div> <a class="anchor" id="ae7a94de4c3d3822070db5babbdf8b113"></a><!-- doxytag: member="InvertibleRWFunction::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="InvertibleRWFunction::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="InvertibleRWFunction::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="InvertibleRWFunction::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">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="rw_8h_source.html">rw.h</a></li> <li><a class="el" href="rw_8cpp_source.html">rw.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>