diff options
Diffstat (limited to 'crypto/src/math/ec/ECPoint.cs')
-rw-r--r-- | crypto/src/math/ec/ECPoint.cs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/crypto/src/math/ec/ECPoint.cs b/crypto/src/math/ec/ECPoint.cs index 8f0168e27..89bd788ae 100644 --- a/crypto/src/math/ec/ECPoint.cs +++ b/crypto/src/math/ec/ECPoint.cs @@ -66,11 +66,18 @@ namespace Org.BouncyCastle.Math.EC this.m_withCompression = withCompression; } + public ECPoint GetDetachedPoint() + { + return Normalize().Detach(); + } + public virtual ECCurve Curve { get { return m_curve; } } + protected abstract ECPoint Detach(); + protected virtual int CurveCoordinateSystem { get @@ -513,6 +520,11 @@ namespace Org.BouncyCastle.Math.EC { } + protected override ECPoint Detach() + { + return new FpPoint(null, AffineXCoord, AffineYCoord); + } + protected internal override bool CompressionYTilde { get { return this.AffineYCoord.TestBitZero(); } @@ -1174,6 +1186,11 @@ namespace Org.BouncyCastle.Math.EC { } + protected override ECPoint Detach() + { + return new F2mPoint(null, AffineXCoord, AffineYCoord); + } + public override ECFieldElement YCoord { get |