summary refs log tree commit diff
path: root/crypto/src/math/ec/ScaleYPointMap.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2014-03-13 22:54:23 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2014-03-13 22:54:23 +0700
commit104b98cc2797c4613151b95dc87218eca7f32c98 (patch)
treef0e6d13b80c03fbcea305195071b63c85534249f /crypto/src/math/ec/ScaleYPointMap.cs
parentFix bug in DoFinal introduced by last change (diff)
downloadBouncyCastle.NET-ed25519-104b98cc2797c4613151b95dc87218eca7f32c98.tar.xz
Port GLV implementation from Java
Diffstat (limited to 'crypto/src/math/ec/ScaleYPointMap.cs')
-rw-r--r--crypto/src/math/ec/ScaleYPointMap.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/crypto/src/math/ec/ScaleYPointMap.cs b/crypto/src/math/ec/ScaleYPointMap.cs
new file mode 100644

index 000000000..1c4795b70 --- /dev/null +++ b/crypto/src/math/ec/ScaleYPointMap.cs
@@ -0,0 +1,20 @@ +using System; + +namespace Org.BouncyCastle.Math.EC +{ + public class ScaleYPointMap + : ECPointMap + { + protected readonly ECFieldElement scale; + + public ScaleYPointMap(ECFieldElement scale) + { + this.scale = scale; + } + + public virtual ECPoint Map(ECPoint p) + { + return p.ScaleY(scale); + } + } +}