diff options
author | Jeffrey Walton <noloader@gmail.com> | 2019-06-05 10:52:45 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2019-06-05 10:52:45 -0400 |
commit | 17fa3031b37c997f911a599f84ac8c59b6e5dbf5 (patch) | |
tree | 240ea7d48bd00bafc4d0426ae1c898477d04c3db /ecp.h | |
parent | d8122cec16ff5d50595d8c74129f4bfd925ffc2c (diff) | |
download | cryptopp-git-17fa3031b37c997f911a599f84ac8c59b6e5dbf5.tar.gz |
Clear lgtm finding in ECP class
Diffstat (limited to 'ecp.h')
-rw-r--r-- | ecp.h | 22 |
1 files changed, 17 insertions, 5 deletions
@@ -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;}
|