summaryrefslogtreecommitdiff
path: root/ecp.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2019-08-09 17:34:14 -0400
committerJeffrey Walton <noloader@gmail.com>2019-08-09 17:34:14 -0400
commit04b2a20c5da517672173a9102b0d3fbda8b44b42 (patch)
treea4041f2f44be84e8634188d130b292f36bd88124 /ecp.h
parent7ac579119958f230a7e020577db3be58f923a4f0 (diff)
downloadcryptopp-git-04b2a20c5da517672173a9102b0d3fbda8b44b42.tar.gz
Restore ECP ABI (GH #869)
Placing AdditionFunction as an inner class of ECP broke the ABI. We need to maintain the ABI so distros can patch Crypto++ 8.2.
Diffstat (limited to 'ecp.h')
-rw-r--r--ecp.h36
1 files changed, 0 insertions, 36 deletions
diff --git a/ecp.h b/ecp.h
index dc4e86b0..f7c919aa 100644
--- a/ecp.h
+++ b/ecp.h
@@ -106,42 +106,6 @@ public:
bool operator==(const ECP &rhs) const
{return GetField() == rhs.GetField() && m_a == rhs.m_a && m_b == rhs.m_b;}
-protected:
- /// \brief Addition and Double functions
- /// \sa <A HREF="https://eprint.iacr.org/2015/1060.pdf">Complete
- /// addition formulas for prime order elliptic curves</A>
- class AdditionFunction
- {
- public:
- explicit AdditionFunction(const ECP& ecp);
- // Double(P)
- Point operator()(const Point& P) const;
- // Add(P, Q)
- Point operator()(const Point& P, const Point& Q) const;
-
- protected:
- /// \brief Parameters and representation for Addition
- /// \details Addition and Doubling will use different algorithms,
- /// depending on the <tt>A</tt> coefficient and the representation
- /// (Affine or Montgomery with precomputation).
- enum Alpha {
- /// \brief Coefficient A is 0
- A_0=1,
- /// \brief Coefficient A is -3
- A_3=2,
- /// \brief Coefficient A is arbitrary
- A_Star=4,
- /// \brief Representation is Montgomery
- A_Montgomery=8
- };
-
- const ECP& m_ecp;
- Alpha m_alpha;
-
- private:
- AdditionFunction(const AdditionFunction&);
- };
-
private:
clonable_ptr<Field> m_fieldPtr;
FieldElement m_a, m_b;