diff options
author | Jack Lloyd <[email protected]> | 2016-12-27 15:48:00 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-09-19 22:30:41 -0400 |
commit | 12c4dfec24e999ab80ff3a45e0b837976d4c390c (patch) | |
tree | 7de91a2b86aec055800b8e046729fcc10a31d6d8 /src/lib/math/ec_gfp | |
parent | 0c6c4e058109791a9f17971ca782dc10af3eb9bc (diff) |
Add API stability annotations.
Defined in build.h, all equal to BOTAN_DLL so ties into existing
system for exporting symbols.
Diffstat (limited to 'src/lib/math/ec_gfp')
-rw-r--r-- | src/lib/math/ec_gfp/curve_gfp.h | 2 | ||||
-rw-r--r-- | src/lib/math/ec_gfp/curve_nistp.h | 20 | ||||
-rw-r--r-- | src/lib/math/ec_gfp/point_gfp.h | 16 |
3 files changed, 19 insertions, 19 deletions
diff --git a/src/lib/math/ec_gfp/curve_gfp.h b/src/lib/math/ec_gfp/curve_gfp.h index f1b4b144a..12c29dec7 100644 --- a/src/lib/math/ec_gfp/curve_gfp.h +++ b/src/lib/math/ec_gfp/curve_gfp.h @@ -50,7 +50,7 @@ class CurveGFp_Repr /** * This class represents an elliptic curve over GF(p) */ -class BOTAN_DLL CurveGFp +class BOTAN_PUBLIC_API(2,0) CurveGFp { public: diff --git a/src/lib/math/ec_gfp/curve_nistp.h b/src/lib/math/ec_gfp/curve_nistp.h index e7af69964..795ca00aa 100644 --- a/src/lib/math/ec_gfp/curve_nistp.h +++ b/src/lib/math/ec_gfp/curve_nistp.h @@ -20,24 +20,24 @@ namespace Botan { * ws is a workspace function which is used as a temporary, * and will be resized as needed. */ -BOTAN_DLL const BigInt& prime_p521(); -BOTAN_DLL void redc_p521(BigInt& x, secure_vector<word>& ws); +BOTAN_PUBLIC_API(2,0) const BigInt& prime_p521(); +BOTAN_PUBLIC_API(2,0) void redc_p521(BigInt& x, secure_vector<word>& ws); #if (BOTAN_MP_WORD_BITS == 32) || (BOTAN_MP_WORD_BITS == 64) #define BOTAN_HAS_NIST_PRIME_REDUCERS_W32 -BOTAN_DLL const BigInt& prime_p384(); -BOTAN_DLL void redc_p384(BigInt& x, secure_vector<word>& ws); +BOTAN_PUBLIC_API(2,0) const BigInt& prime_p384(); +BOTAN_PUBLIC_API(2,0) void redc_p384(BigInt& x, secure_vector<word>& ws); -BOTAN_DLL const BigInt& prime_p256(); -BOTAN_DLL void redc_p256(BigInt& x, secure_vector<word>& ws); +BOTAN_PUBLIC_API(2,0) const BigInt& prime_p256(); +BOTAN_PUBLIC_API(2,0) void redc_p256(BigInt& x, secure_vector<word>& ws); -BOTAN_DLL const BigInt& prime_p224(); -BOTAN_DLL void redc_p224(BigInt& x, secure_vector<word>& ws); +BOTAN_PUBLIC_API(2,0) const BigInt& prime_p224(); +BOTAN_PUBLIC_API(2,0) void redc_p224(BigInt& x, secure_vector<word>& ws); -BOTAN_DLL const BigInt& prime_p192(); -BOTAN_DLL void redc_p192(BigInt& x, secure_vector<word>& ws); +BOTAN_PUBLIC_API(2,0) const BigInt& prime_p192(); +BOTAN_PUBLIC_API(2,0) void redc_p192(BigInt& x, secure_vector<word>& ws); #endif diff --git a/src/lib/math/ec_gfp/point_gfp.h b/src/lib/math/ec_gfp/point_gfp.h index 46ee5449a..bd66ca682 100644 --- a/src/lib/math/ec_gfp/point_gfp.h +++ b/src/lib/math/ec_gfp/point_gfp.h @@ -19,7 +19,7 @@ namespace Botan { * Exception thrown if you try to convert a zero point to an affine * coordinate */ -struct BOTAN_DLL Illegal_Transformation : public Exception +struct BOTAN_PUBLIC_API(2,0) Illegal_Transformation : public Exception { explicit Illegal_Transformation(const std::string& err = "Requested transformation is not possible") : @@ -29,7 +29,7 @@ struct BOTAN_DLL Illegal_Transformation : public Exception /** * Exception thrown if some form of illegal point is decoded */ -struct BOTAN_DLL Illegal_Point : public Exception +struct BOTAN_PUBLIC_API(2,0) Illegal_Point : public Exception { explicit Illegal_Point(const std::string& err = "Malformed ECP point detected") : Exception(err) {} @@ -38,7 +38,7 @@ struct BOTAN_DLL Illegal_Point : public Exception /** * This class represents one point on a curve of GF(p) */ -class BOTAN_DLL PointGFp +class BOTAN_PUBLIC_API(2,0) PointGFp { public: enum Compression_Type { @@ -127,7 +127,7 @@ class BOTAN_DLL PointGFp * @param point the point value * @return scalar*point on the curve */ - friend BOTAN_DLL PointGFp operator*(const BigInt& scalar, const PointGFp& point); + friend BOTAN_PUBLIC_API(2,0) PointGFp operator*(const BigInt& scalar, const PointGFp& point); /** * Multiexponentiation @@ -137,7 +137,7 @@ class BOTAN_DLL PointGFp * @param z2 a scalar * @result (p1 * z1 + p2 * z2) */ - friend BOTAN_DLL PointGFp multi_exponentiate( + friend BOTAN_PUBLIC_API(2,0) PointGFp multi_exponentiate( const PointGFp& p1, const BigInt& z1, const PointGFp& p2, const BigInt& z2); @@ -274,9 +274,9 @@ inline PointGFp operator*(const PointGFp& point, const BigInt& scalar) } // encoding and decoding -secure_vector<uint8_t> BOTAN_DLL EC2OSP(const PointGFp& point, uint8_t format); +secure_vector<uint8_t> BOTAN_PUBLIC_API(2,0) EC2OSP(const PointGFp& point, uint8_t format); -PointGFp BOTAN_DLL OS2ECP(const uint8_t data[], size_t data_len, +PointGFp BOTAN_PUBLIC_API(2,0) OS2ECP(const uint8_t data[], size_t data_len, const CurveGFp& curve); template<typename Alloc> @@ -286,7 +286,7 @@ PointGFp OS2ECP(const std::vector<uint8_t, Alloc>& data, const CurveGFp& curve) /** */ -class BOTAN_DLL Blinded_Point_Multiply +class BOTAN_PUBLIC_API(2,0) Blinded_Point_Multiply { public: Blinded_Point_Multiply(const PointGFp& base, const BigInt& order, size_t h = 0); |