Bouncy Castle Cryptography Library 1.37

org.bouncycastle.math.ec.test
Class ECPointTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.bouncycastle.math.ec.test.ECPointTest
All Implemented Interfaces:
junit.framework.Test

public class ECPointTest
extends junit.framework.TestCase

Test class for ECPoint. All literature values are taken from "Guide to elliptic curve cryptography", Darrel Hankerson, Alfred J. Menezes, Scott Vanstone, 2004, Springer-Verlag New York, Inc.


Nested Class Summary
static class ECPointTest.F2m
          Nested class containing sample literature values for F2m.
static class ECPointTest.Fp
          Nested class containing sample literature values for Fp.
 
Constructor Summary
ECPointTest()
           
 
Method Summary
 void setUp()
           
static junit.framework.Test suite()
           
 void testAdd()
          Calls implTestAdd() for Fp and F2m.
 void testAddSubtractMultiplySimple()
          Calls implTestAddSubtract() for literature values, both for Fp and F2m.
 void testAddSubtractMultiplyTwiceEncoding()
          Calls implTestAddSubtract(), implTestMultiply and implTestEncoding for the standard elliptic curves as given in SECNamedCurves.
 void testAllPoints()
          Calls implTestAllPoints() for the small literature curves, both for Fp and F2m.
 void testPointCreationConsistency()
          Tests, if inconsistent points can be created, i.e. points with exactly one null coordinate (not permitted).
 void testTwice()
          Calls implTestTwice() for Fp and F2m.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ECPointTest

public ECPointTest()
Method Detail

setUp

public void setUp()
Overrides:
setUp in class junit.framework.TestCase

testPointCreationConsistency

public void testPointCreationConsistency()
Tests, if inconsistent points can be created, i.e. points with exactly one null coordinate (not permitted).


testAdd

public void testAdd()
Calls implTestAdd() for Fp and F2m.


testTwice

public void testTwice()
Calls implTestTwice() for Fp and F2m.


testAllPoints

public void testAllPoints()
Calls implTestAllPoints() for the small literature curves, both for Fp and F2m.


testAddSubtractMultiplySimple

public void testAddSubtractMultiplySimple()
Calls implTestAddSubtract() for literature values, both for Fp and F2m.


testAddSubtractMultiplyTwiceEncoding

public void testAddSubtractMultiplyTwiceEncoding()
Calls implTestAddSubtract(), implTestMultiply and implTestEncoding for the standard elliptic curves as given in SECNamedCurves.


suite

public static junit.framework.Test suite()

Bouncy Castle Cryptography Library 1.37