diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-03-13 13:04:05 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-03-13 13:04:05 +0700 |
commit | 2ebe9502a210e5d642664c33c723cdcf3ce5f88c (patch) | |
tree | ca50a4a9433992c74b80ea6c8f7810de5d8cc1e7 /crypto/src/math/ec/ECCurve.cs | |
parent | All subclasses to control the choice of width to use (diff) | |
download | BouncyCastle.NET-ed25519-2ebe9502a210e5d642664c33c723cdcf3ce5f88c.tar.xz |
Add new CreateRawPoint method on ECCurve that includes the Z coords
Diffstat (limited to 'crypto/src/math/ec/ECCurve.cs')
-rw-r--r-- | crypto/src/math/ec/ECCurve.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/crypto/src/math/ec/ECCurve.cs b/crypto/src/math/ec/ECCurve.cs index f8ea8ba3c..a84863ce6 100644 --- a/crypto/src/math/ec/ECCurve.cs +++ b/crypto/src/math/ec/ECCurve.cs @@ -106,6 +106,8 @@ namespace Org.BouncyCastle.Math.EC protected internal abstract ECPoint CreateRawPoint(ECFieldElement x, ECFieldElement y, bool withCompression); + protected internal abstract ECPoint CreateRawPoint(ECFieldElement x, ECFieldElement y, ECFieldElement[] zs, bool withCompression); + protected virtual ECMultiplier CreateDefaultMultiplier() { return new WNafL2RMultiplier(); @@ -459,6 +461,11 @@ namespace Org.BouncyCastle.Math.EC return new FpPoint(this, x, y, withCompression); } + protected internal override ECPoint CreateRawPoint(ECFieldElement x, ECFieldElement y, ECFieldElement[] zs, bool withCompression) + { + return new FpPoint(this, x, y, zs, withCompression); + } + public override ECPoint ImportPoint(ECPoint p) { if (this != p.Curve && this.CoordinateSystem == COORD_JACOBIAN && !p.IsInfinity) @@ -827,6 +834,11 @@ namespace Org.BouncyCastle.Math.EC return new F2mPoint(this, x, y, withCompression); } + protected internal override ECPoint CreateRawPoint(ECFieldElement x, ECFieldElement y, ECFieldElement[] zs, bool withCompression) + { + return new F2mPoint(this, x, y, zs, withCompression); + } + public override ECPoint Infinity { get { return m_infinity; } |