Top Description Fields Constructors Methods
java.security.spec

public Class ECParameterSpec

extends Object
implements AlgorithmParameterSpec
Class Inheritance
All Implemented Interfaces
java.security.spec.AlgorithmParameterSpec
Known Direct Subclasses
sun.security.util.NamedCurve
Imports
java.math.BigInteger

This immutable class specifies the set of domain parameters used with elliptic curve cryptography (ECC).
Author
Valerie Peng
Since
1.5
See Also
AlgorithmParameterSpec

Field Summary

Modifier and TypeField and Description
private final EllipticCurve
private final ECPoint
g

private final int
h

private final BigInteger
n

Constructor Summary

AccessConstructor and Description
public
ECParameterSpec(EllipticCurve
the elliptic curve which this parameter defines.
curve
,
ECPoint
the generator which is also known as the base point.
g
,
BigInteger
the order of the generator g.
n
,
int
the cofactor.
h
)

Creates elliptic curve domain parameters based on the specified values.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the cofactor.
getCofactor
()

Returns the cofactor.

public EllipticCurve

Returns:

the elliptic curve that this parameter defines.
getCurve
()

Returns the elliptic curve that this parameter defines.

public ECPoint

Returns:

the generator which is also known as the base point.
getGenerator
()

Returns the generator which is also known as the base point.

public BigInteger

Returns:

the order of the generator.
getOrder
()

Returns the order of the generator.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

curveback to summary
private final EllipticCurve curve
gback to summary
private final ECPoint g
hback to summary
private final int h
nback to summary
private final BigInteger n

Constructor Detail

ECParameterSpecback to summary
public ECParameterSpec(EllipticCurve curve, ECPoint g, BigInteger n, int h)

Creates elliptic curve domain parameters based on the specified values.

Parameters
curve:EllipticCurve

the elliptic curve which this parameter defines.

g:ECPoint

the generator which is also known as the base point.

n:BigInteger

the order of the generator g.

h:int

the cofactor.

Exceptions
NullPointerException:
if curve, g, or n is null.
IllegalArgumentException:
if n or h is not positive.

Method Detail

getCofactorback to summary
public int getCofactor()

Returns the cofactor.

Returns:int

the cofactor.

getCurveback to summary
public EllipticCurve getCurve()

Returns the elliptic curve that this parameter defines.

Returns:EllipticCurve

the elliptic curve that this parameter defines.

getGeneratorback to summary
public ECPoint getGenerator()

Returns the generator which is also known as the base point.

Returns:ECPoint

the generator which is also known as the base point.

getOrderback to summary
public BigInteger getOrder()

Returns the order of the generator.

Returns:BigInteger

the order of the generator.