Beispiel #1
0
 public void AddPoints()
 {
     additionResult = ellipticCurve.Add(summand1, summand2);
     Form.TextBoxAdditionResult.Text = additionResult.ToString();
     Form.AdditionLogButtonEnabled   = true;
     DrawCurve();
 }
Beispiel #2
0
        public void PointAddTest()
        {
            BigInt xA = new BigInt("489a03c58dcf7fcfc97e99ffef0bb4634", 16);
            BigInt yA = new BigInt("510c6972d795ec0c2b081b81de767f808", 16);
            BigInt xB = new BigInt("417b9d98f934b571bffaed8d2968f6d67", 16);
            BigInt yB = new BigInt("6339a332da64ca233033eace4d6bdafdf", 16);

            Point  a  = new Point(xA, yA);
            Point  b  = new Point(xB, yB);
            Point  r  = curve.Add(a, b);
            BigInt xE = new BigInt("4e429ac21600f83ae575eda41ccbd72c5", 16);
            BigInt yE = new BigInt("14eb50532fc0f26c9e1328bbfe5747322", 16);
            Point  e  = new Point(xE, yE);

            Assert.AreEqual(e, r);
        }