📄 class_montgomery_representation.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"><title>Crypto++: MontgomeryRepresentation Class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"><link href="tabs.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.5.2 --><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="classes.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="classes.html"><span>Alphabetical List</span></a></li> <li><a href="annotated.html"><span>Class List</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><h1>MontgomeryRepresentation Class Reference</h1><!-- doxytag: class="MontgomeryRepresentation" --><!-- doxytag: inherits="ModularArithmetic" --><code>#include <<a class="el" href="modarith_8h-source.html">modarith.h</a>></code><p><p>Inheritance diagram for MontgomeryRepresentation:<p><center><img src="class_montgomery_representation.png" usemap="#MontgomeryRepresentation_map" border="0" alt=""></center><map name="MontgomeryRepresentation_map"><area href="class_modular_arithmetic.html" alt="ModularArithmetic" shape="rect" coords="0,112,166,136"><area href="class_abstract_ring.html" alt="AbstractRing< Integer >" shape="rect" coords="0,56,166,80"><area href="class_abstract_group.html" alt="AbstractGroup< Integer >" shape="rect" coords="0,0,166,24"></map><a href="class_montgomery_representation-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>do modular arithmetics in Montgomery representation for increased speed <p><dl class="note" compact><dt><b>Note:</b></dt><dd>the Montgomery representation represents each congruence class [a] as a*rn, where r is a convenient power of 2 </dd></dl><p><p>Definition at line <a class="el" href="modarith_8h-source.html#l00122">122</a> of file <a class="el" href="modarith_8h-source.html">modarith.h</a>.<table border="0" cellpadding="0" cellspacing="0"><tr><td></td></tr><tr><td colspan="2"><br><h2>Public Types</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="872afa5efebf43e4744156dcdfac3ca3"></a><!-- doxytag: member="MontgomeryRepresentation::RandomizationParameter" ref="872afa5efebf43e4744156dcdfac3ca3" args="" -->typedef int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#872afa5efebf43e4744156dcdfac3ca3">RandomizationParameter</a></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="17f2266382639dde45d028e630e07296"></a><!-- doxytag: member="MontgomeryRepresentation::Element" ref="17f2266382639dde45d028e630e07296" args="" -->typedef <a class="el" href="class_integer.html">Integer</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#17f2266382639dde45d028e630e07296">Element</a></td></tr><tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c65a390ac18c44b685a189047a4d3292"></a><!-- doxytag: member="MontgomeryRepresentation::MontgomeryRepresentation" ref="c65a390ac18c44b685a189047a4d3292" args="(const Integer &modulus)" --> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_montgomery_representation.html#c65a390ac18c44b685a189047a4d3292">MontgomeryRepresentation</a> (const <a class="el" href="class_integer.html">Integer</a> &modulus)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4591893e6fb0e05f4d2585cddcc15201"></a><!-- doxytag: member="MontgomeryRepresentation::Clone" ref="4591893e6fb0e05f4d2585cddcc15201" args="() const" -->virtual <a class="el" href="class_modular_arithmetic.html">ModularArithmetic</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_montgomery_representation.html#4591893e6fb0e05f4d2585cddcc15201">Clone</a> () const</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5e2e1914f195a03be80c58d62be84f5e"></a><!-- doxytag: member="MontgomeryRepresentation::IsMontgomeryRepresentation" ref="5e2e1914f195a03be80c58d62be84f5e" args="() const" -->bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_montgomery_representation.html#5e2e1914f195a03be80c58d62be84f5e">IsMontgomeryRepresentation</a> () const</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c0a6608ef5bac036beb44d8cbd5eac52"></a><!-- doxytag: member="MontgomeryRepresentation::ConvertIn" ref="c0a6608ef5bac036beb44d8cbd5eac52" args="(const Integer &a) const " --><a class="el" href="class_integer.html">Integer</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_montgomery_representation.html#c0a6608ef5bac036beb44d8cbd5eac52">ConvertIn</a> (const <a class="el" href="class_integer.html">Integer</a> &a) const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d0037be677cdac1fa22375a8619abc77"></a><!-- doxytag: member="MontgomeryRepresentation::ConvertOut" ref="d0037be677cdac1fa22375a8619abc77" args="(const Integer &a) const " --><a class="el" href="class_integer.html">Integer</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_montgomery_representation.html#d0037be677cdac1fa22375a8619abc77">ConvertOut</a> (const <a class="el" href="class_integer.html">Integer</a> &a) const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ebab2112b22e0af65d4d0048166ca432"></a><!-- doxytag: member="MontgomeryRepresentation::MultiplicativeIdentity" ref="ebab2112b22e0af65d4d0048166ca432" args="() const" -->const <a class="el" href="class_integer.html">Integer</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="class_montgomery_representation.html#ebab2112b22e0af65d4d0048166ca432">MultiplicativeIdentity</a> () const</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="793d265b8165135e2e972bf333ac5a49"></a><!-- doxytag: member="MontgomeryRepresentation::Multiply" ref="793d265b8165135e2e972bf333ac5a49" args="(const Integer &a, const Integer &b) const" -->const <a class="el" href="class_integer.html">Integer</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="class_montgomery_representation.html#793d265b8165135e2e972bf333ac5a49">Multiply</a> (const <a class="el" href="class_integer.html">Integer</a> &a, const <a class="el" href="class_integer.html">Integer</a> &b) const</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1d472135bd5a92ef38f242e73420e0ad"></a><!-- doxytag: member="MontgomeryRepresentation::Square" ref="1d472135bd5a92ef38f242e73420e0ad" args="(const Integer &a) const " -->const <a class="el" href="class_integer.html">Integer</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="class_montgomery_representation.html#1d472135bd5a92ef38f242e73420e0ad">Square</a> (const <a class="el" href="class_integer.html">Integer</a> &a) const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="67f4a4b470ba6663de934692e73b60ca"></a><!-- doxytag: member="MontgomeryRepresentation::MultiplicativeInverse" ref="67f4a4b470ba6663de934692e73b60ca" args="(const Integer &a) const " -->const <a class="el" href="class_integer.html">Integer</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="class_montgomery_representation.html#67f4a4b470ba6663de934692e73b60ca">MultiplicativeInverse</a> (const <a class="el" href="class_integer.html">Integer</a> &a) const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cd3a38b45b2e1c3d1dd9e1bb43d500fe"></a><!-- doxytag: member="MontgomeryRepresentation::CascadeExponentiate" ref="cd3a38b45b2e1c3d1dd9e1bb43d500fe" args="(const Integer &x, const Integer &e1, const Integer &y, const Integer &e2) const " --><a class="el" href="class_integer.html">Integer</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_montgomery_representation.html#cd3a38b45b2e1c3d1dd9e1bb43d500fe">CascadeExponentiate</a> (const <a class="el" href="class_integer.html">Integer</a> &x, const <a class="el" href="class_integer.html">Integer</a> &e1, const <a class="el" href="class_integer.html">Integer</a> &y, const <a class="el" href="class_integer.html">Integer</a> &e2) const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="031b2e547e3c748947e295e6e44b404c"></a><!-- doxytag: member="MontgomeryRepresentation::SimultaneousExponentiate" ref="031b2e547e3c748947e295e6e44b404c" args="(Element *results, const Element &base, const Integer *exponents, unsigned int exponentsCount) const " -->void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_montgomery_representation.html#031b2e547e3c748947e295e6e44b404c">SimultaneousExponentiate</a> (<a class="el" href="class_integer.html">Element</a> *results, const <a class="el" href="class_integer.html">Element</a> &base, const <a class="el" href="class_integer.html">Integer</a> *exponents, unsigned int exponentsCount) const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ba88499eea9ee645c04cab392bbbd977"></a><!-- doxytag: member="MontgomeryRepresentation::DEREncode" ref="ba88499eea9ee645c04cab392bbbd977" args="(BufferedTransformation &bt) const " -->void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#ba88499eea9ee645c04cab392bbbd977">DEREncode</a> (<a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> &bt) const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="27dc1aa752d09041ed66391dff7086cc"></a><!-- doxytag: member="MontgomeryRepresentation::DEREncodeElement" ref="27dc1aa752d09041ed66391dff7086cc" args="(BufferedTransformation &out, const Element &a) const " -->void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#27dc1aa752d09041ed66391dff7086cc">DEREncodeElement</a> (<a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> &out, const <a class="el" href="class_integer.html">Element</a> &a) const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="55824c8d8099d73bb5f4f851560bb606"></a><!-- doxytag: member="MontgomeryRepresentation::BERDecodeElement" ref="55824c8d8099d73bb5f4f851560bb606" args="(BufferedTransformation &in, Element &a) const" -->void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#55824c8d8099d73bb5f4f851560bb606">BERDecodeElement</a> (<a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> &in, <a class="el" href="class_integer.html">Element</a> &a) const</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="71a51e5b665bf7fb89af2ccba19f0043"></a><!-- doxytag: member="MontgomeryRepresentation::GetModulus" ref="71a51e5b665bf7fb89af2ccba19f0043" args="() const" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -