diff options
author | lloyd <[email protected]> | 2010-02-25 20:13:25 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-02-25 20:13:25 +0000 |
commit | f39241bf20dc6781be576f17b264ee1a6bf7d58b (patch) | |
tree | 9c1997c15c52c1f5e416625c8182f323a85f2d06 /src/math | |
parent | 679a1a57a19484c4cf2720f9b415b8a8df45b209 (diff) |
create_random_point was not used anywhere, so remove it
Diffstat (limited to 'src/math')
-rw-r--r-- | src/math/gfpmath/point_gfp.cpp | 25 | ||||
-rw-r--r-- | src/math/gfpmath/point_gfp.h | 3 |
2 files changed, 0 insertions, 28 deletions
diff --git a/src/math/gfpmath/point_gfp.cpp b/src/math/gfpmath/point_gfp.cpp index 24aa8d8af..42ad7ef51 100644 --- a/src/math/gfpmath/point_gfp.cpp +++ b/src/math/gfpmath/point_gfp.cpp @@ -425,29 +425,4 @@ PointGFp OS2ECP(const MemoryRegion<byte>& os, const CurveGFp& curve) return result; } -PointGFp create_random_point(RandomNumberGenerator& rng, - const CurveGFp& curve) - { - const BigInt& p = curve.get_p(); - - while(true) - { - BigInt r(rng, p.bits()); - - GFpElement x = GFpElement(p, r); - GFpElement x3 = x * x * x; - - GFpElement ax(curve.get_p(), curve.get_a()); - ax *= x; - - GFpElement bx3(curve.get_p(), curve.get_b()); - bx3 *= x3; - - GFpElement y = ax + bx3; - - if(ressol(y.get_value(), p) > 0) - return PointGFp(curve, x.get_value(), y.get_value()); - } - } - } diff --git a/src/math/gfpmath/point_gfp.h b/src/math/gfpmath/point_gfp.h index e78188759..0741b5e56 100644 --- a/src/math/gfpmath/point_gfp.h +++ b/src/math/gfpmath/point_gfp.h @@ -184,9 +184,6 @@ PointGFp BOTAN_DLL operator-(const PointGFp& lhs); PointGFp BOTAN_DLL operator*(const BigInt& scalar, const PointGFp& point); PointGFp BOTAN_DLL operator*(const PointGFp& point, const BigInt& scalar); -PointGFp BOTAN_DLL create_random_point(RandomNumberGenerator& rng, - const CurveGFp& curve); - // encoding and decoding SecureVector<byte> BOTAN_DLL EC2OSP(const PointGFp& point, byte format); PointGFp BOTAN_DLL OS2ECP(const MemoryRegion<byte>& os, const CurveGFp& curve); |