summaryrefslogtreecommitdiff
path: root/ecp.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2019-06-05 10:52:45 -0400
committerJeffrey Walton <noloader@gmail.com>2019-06-05 10:52:45 -0400
commit17fa3031b37c997f911a599f84ac8c59b6e5dbf5 (patch)
tree240ea7d48bd00bafc4d0426ae1c898477d04c3db /ecp.h
parentd8122cec16ff5d50595d8c74129f4bfd925ffc2c (diff)
downloadcryptopp-git-17fa3031b37c997f911a599f84ac8c59b6e5dbf5.tar.gz
Clear lgtm finding in ECP class
Diffstat (limited to 'ecp.h')
-rw-r--r--ecp.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/ecp.h b/ecp.h
index 834bef0d..f7c919aa 100644
--- a/ecp.h
+++ b/ecp.h
@@ -35,11 +35,15 @@ public:
/// \brief Construct an ECP
ECP() {}
- /// \brief Copy construct an ECP
+ /// \brief Construct an ECP
/// \param ecp the other ECP object
- /// \param convertToMontgomeryRepresentation flag indicating if the curve should be converted to a MontgomeryRepresentation
+ /// \param convertToMontgomeryRepresentation flag indicating if the curve
+ /// should be converted to a MontgomeryRepresentation.
+ /// \details Prior to Crypto++ 8.3 the default value for
+ /// convertToMontgomeryRepresentation was false. it was changed due to
+ /// two audit tools finding, "Signature-compatible with a copy constructor".
/// \sa ModularArithmetic, MontgomeryRepresentation
- ECP(const ECP &ecp, bool convertToMontgomeryRepresentation = false);
+ ECP(const ECP &ecp, bool convertToMontgomeryRepresentation);
/// \brief Construct an ECP
/// \param modulus the prime modulus
@@ -50,14 +54,22 @@ public:
/// \brief Construct an ECP from BER encoded parameters
/// \param bt BufferedTransformation derived object
- /// \details This constructor will decode and extract the the fields fieldID and curve of the sequence ECParameters
+ /// \details This constructor will decode and extract the the fields
+ /// fieldID and curve of the sequence ECParameters
ECP(BufferedTransformation &bt);
- /// \brief Encode the fields fieldID and curve of the sequence ECParameters
+ /// \brief DER Encode
/// \param bt BufferedTransformation derived object
+ /// \details DEREncode encode the fields fieldID and curve of the sequence
+ /// ECParameters
void DEREncode(BufferedTransformation &bt) const;
+ /// \brief Compare two points
+ /// \param P the first point
+ /// \param Q the second point
+ /// \returns true if equal, false otherwise
bool Equal(const Point &P, const Point &Q) const;
+
const Point& Identity() const;
const Point& Inverse(const Point &P) const;
bool InversionIsFast() const {return true;}