Class ECParameterSpec

java.lang.Object
java.security.spec.ECParameterSpec
All Implemented Interfaces:
AlgorithmParameterSpec
Direct Known Subclasses:
ECNamedCurveSpec

public class ECParameterSpec
extends Object
implements AlgorithmParameterSpec
The parameter specification used with Elliptic Curve Cryptography (ECC).
  • Constructor Details

    • ECParameterSpec

      public ECParameterSpec​(EllipticCurve curve, ECPoint generator, BigInteger order, int cofactor)
      Creates a new ECParameterSpec with the specified elliptic curve, the base point, the order of the generator (or base point) and the co-factor.
      Parameters:
      curve - the elliptic curve.
      generator - the generator (or base point).
      order - the order of the generator.
      cofactor - the co-factor.
      Throws:
      IllegalArgumentException - if order <= zero or cofactor <= zero.
    • ECParameterSpec

      public ECParameterSpec​(EllipticCurve curve, ECPoint generator, BigInteger order, int cofactor, String curveName)
      Creates a new ECParameterSpec with the specified named curve and all of its parameters.
      See Also:
      ECParameterSpec(EllipticCurve, ECPoint, BigInteger, int)
  • Method Details

    • getCofactor

      public int getCofactor()
      Returns the cofactor.
      Returns:
      the cofactor.
    • getCurve

      public EllipticCurve getCurve()
      Returns the elliptic curve.
      Returns:
      the elliptic curve.
    • getGenerator

      public ECPoint getGenerator()
      Returns the generator (or base point).
      Returns:
      the generator (or base point).
    • getOrder

      public BigInteger getOrder()
      Returns the order of the generator.
      Returns:
      the order of the generator.
    • getCurveName

      public String getCurveName()
      Returns the name of the curve if this is a named curve. Returns null if this is not known to be a named curve.