ECAlgorithms (Bouncy Castle Library 1.52 API Specification)
Date: 2015-03-01

org.bouncycastle.math.ec

## Class ECAlgorithms

- java.lang.Object
- - org.bouncycastle.math.ec.ECAlgorithms

-     public class ECAlgorithms
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ECAlgorithms()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ECPoint` | `importPoint(ECCurve c, ECPoint p)`
    `static boolean` | `isF2mCurve(ECCurve c)`
    `static boolean` | `isFpCurve(ECCurve c)`
    `static void` | `montgomeryTrick(ECFieldElement[] zs, int off, int len)`
    `static void` | `montgomeryTrick(ECFieldElement[] zs, int off, int len, ECFieldElement scale)`
    `static ECPoint` | `referenceMultiply(ECPoint p, java.math.BigInteger k)` Simple shift-and-add multiplication.
    `static ECPoint` | `shamirsTrick(ECPoint P, java.math.BigInteger k, ECPoint Q, java.math.BigInteger l)`
    `static ECPoint` | `sumOfMultiplies(ECPoint[] ps, java.math.BigInteger[] ks)`
    `static ECPoint` | `sumOfTwoMultiplies(ECPoint P, java.math.BigInteger a, ECPoint Q, java.math.BigInteger b)`
    `static ECPoint` | `validatePoint(ECPoint p)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ECAlgorithms

          public ECAlgorithms()

  - ### Method Detail

    - #### isF2mCurve

          public static boolean isF2mCurve(ECCurve c)

    - #### isFpCurve

          public static boolean isFpCurve(ECCurve c)

    - #### sumOfMultiplies

          public static ECPoint sumOfMultiplies(ECPoint[] ps,
                                java.math.BigInteger[] ks)

    - #### sumOfTwoMultiplies

          public static ECPoint sumOfTwoMultiplies(ECPoint P,
                                   java.math.BigInteger a,
                                   ECPoint Q,
                                   java.math.BigInteger b)

    - #### shamirsTrick

          public static ECPoint shamirsTrick(ECPoint P,
                             java.math.BigInteger k,
                             ECPoint Q,
                             java.math.BigInteger l)

    - #### importPoint

          public static ECPoint importPoint(ECCurve c,
                            ECPoint p)

    - #### montgomeryTrick

          public static void montgomeryTrick(ECFieldElement[] zs,
                             int off,
                             int len)

    - #### montgomeryTrick

          public static void montgomeryTrick(ECFieldElement[] zs,
                             int off,
                             int len,
                             ECFieldElement scale)

    - #### referenceMultiply

          public static ECPoint referenceMultiply(ECPoint p,
                                  java.math.BigInteger k)

      Simple shift-and-add multiplication. Serves as reference implementation to verify (possibly faster) implementations, and for very small scalars.
      Parameters:
        `p` - The point to multiply.
        `k` - The multiplier.
      Returns:
        The result of the point multiplication `kP`.

    - #### validatePoint

          public static ECPoint validatePoint(ECPoint p)