public void TestXOnlyMultiplyScalar(BigInteger k, BigInteger inputX, BigInteger expectedX)
        {
            var curve25519Algebra = new XOnlyMontgomeryCurveAlgebra(CurveParameters.Curve25519);

            var point = curve25519Algebra.MultiplyScalar(inputX, k);

            Assert.AreEqual(point, expectedX);
        }
Пример #2
0
        public void TestMultiplyScalar(int k, int x, int expectedX)
        {
            var algebra = new XOnlyMontgomeryCurveAlgebra(curveParameters);

            var p      = new BigInteger(x);
            var result = algebra.MultiplyScalar(p, k);

            Assert.AreEqual(new BigInteger(expectedX), result);
        }