Class EllipticCurve
java.lang.Object
java.security.spec.EllipticCurve
This immutable class holds the necessary values needed to represent
an elliptic curve.
- Since:
- 1.5
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionEllipticCurve(ECField field, BigInteger a, BigInteger b) Creates an elliptic curve with the specified elliptic fieldfieldand the coefficientsaandb.EllipticCurve(ECField field, BigInteger a, BigInteger b, byte[] seed) Creates an elliptic curve with the specified elliptic fieldfield, the coefficientsaandb, and theseedused for curve generation.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanCompares this elliptic curve for equality with the specified object.getA()Returns the first coefficientaof the elliptic curve.getB()Returns the second coefficientbof the elliptic curve.getField()Returns the finite fieldfieldthat this elliptic curve is over.byte[]getSeed()Returns the seeding bytesseedused during curve generation.inthashCode()Returns a hash code value for this elliptic curve.
- 
Constructor Details- 
EllipticCurveCreates an elliptic curve with the specified elliptic fieldfieldand the coefficientsaandb.- Parameters:
- field- the finite field that this elliptic curve is over.
- a- the first coefficient of this elliptic curve.
- b- the second coefficient of this elliptic curve.
- Throws:
- NullPointerException- if- field,- a, or- bis null.
- IllegalArgumentException- if- aor- bis not null and not in- field.
 
- 
EllipticCurveCreates an elliptic curve with the specified elliptic fieldfield, the coefficientsaandb, and theseedused for curve generation.- Parameters:
- field- the finite field that this elliptic curve is over.
- a- the first coefficient of this elliptic curve.
- b- the second coefficient of this elliptic curve.
- seed- the bytes used during curve generation for later validation. Contents of this array are copied to protect against subsequent modification.
- Throws:
- NullPointerException- if- field,- a, or- bis null.
- IllegalArgumentException- if- aor- bis not null and not in- field.
 
 
- 
- 
Method Details- 
getFieldReturns the finite fieldfieldthat this elliptic curve is over.- Returns:
- the field fieldthat this curve is over.
 
- 
getAReturns the first coefficientaof the elliptic curve.- Returns:
- the first coefficient a.
 
- 
getBReturns the second coefficientbof the elliptic curve.- Returns:
- the second coefficient b.
 
- 
getSeedpublic byte[] getSeed()Returns the seeding bytesseedused during curve generation. May be null if not specified.- Returns:
- the seeding bytes seed. A new array is returned each time this method is called.
 
- 
equals
- 
hashCode
 
-