ECPointTest (Bouncy Castle Library 1.85 API Specification)
Date: 2026-07-12

org.bouncycastle.math.ec.test

## Class ECPointTest

- java.lang.Object
- - junit.framework.Assert
  - - junit.framework.TestCase
    - - 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

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `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

    Constructors
    Constructor and Description
    `ECPointTest()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `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` | `testExampleFpB0()`
    `void` | `testLargeMInF2m()`
    `void` | `testPointCreationConsistency()` Tests, if inconsistent points can be created, i.e. points with exactly one null coordinate (not permitted).
    `void` | `testThreeTimes()` Calls `implTestThreeTimes()` for `Fp` and `F2m`.
    `void` | `testTwice()` Calls `implTestTwice()` for `Fp` and `F2m`.

    - ### Methods inherited from class junit.framework.TestCase

      `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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, tearDown, toString`

    - ### 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).

    - #### testLargeMInF2m

          public void testLargeMInF2m()

    - #### testAdd

          public void testAdd()

      Calls `implTestAdd()` for `Fp` and `F2m`.

    - #### testTwice

          public void testTwice()

      Calls `implTestTwice()` for `Fp` and `F2m`.

    - #### testThreeTimes

          public void testThreeTimes()

      Calls `implTestThreeTimes()` 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`.

    - #### testExampleFpB0

          public void testExampleFpB0()
                               throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### suite

          public static junit.framework.Test suite()