public void TestGenerate(BigInteger k, BigInteger expectedX)
        {
            var curve25519Algebra = new CurveGroupAlgebra(CurveParameters.Curve25519);

            var point = curve25519Algebra.GenerateElement(k);

            Assert.AreEqual(point.X, expectedX);
        }
Exemple #2
0
        public void TestCurvePoint(BigInteger k, BigInteger expectedX, BigInteger expectedY)
        {
            var p256Algebra = new CurveGroupAlgebra(CurveParameters.NISTP256);

            var point         = p256Algebra.GenerateElement(k);
            var expectedPoint = new CurvePoint(expectedX, expectedY);

            Assert.AreEqual(point, expectedPoint);
        }