diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2019-08-02 18:41:24 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2019-08-02 18:41:24 +0700 |
commit | d5b186492a09c1aee253998670fc843e6087fe6e (patch) | |
tree | 011ee300b06ce58772a6fe46879c35a0a372d198 /crypto/src/math/ec/ScaleXNegateYPointMap.cs | |
parent | Provide a constant-time zero test (diff) | |
download | BouncyCastle.NET-ed25519-d5b186492a09c1aee253998670fc843e6087fe6e.tar.xz |
Add experimental support for GLV Type A endomorphisms
Diffstat (limited to 'crypto/src/math/ec/ScaleXNegateYPointMap.cs')
-rw-r--r-- | crypto/src/math/ec/ScaleXNegateYPointMap.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/crypto/src/math/ec/ScaleXNegateYPointMap.cs b/crypto/src/math/ec/ScaleXNegateYPointMap.cs new file mode 100644 index 000000000..b0466a633 --- /dev/null +++ b/crypto/src/math/ec/ScaleXNegateYPointMap.cs @@ -0,0 +1,20 @@ +using System; + +namespace Org.BouncyCastle.Math.EC +{ + public class ScaleXNegateYPointMap + : ECPointMap + { + protected readonly ECFieldElement scale; + + public ScaleXNegateYPointMap(ECFieldElement scale) + { + this.scale = scale; + } + + public virtual ECPoint Map(ECPoint p) + { + return p.ScaleXNegateY(scale); + } + } +} |