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 Summary
ConstructorsConstructorDescriptionEllipticCurve(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 Summary
Modifier 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.Methods declared in class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()Answers a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.May cause performance issues, deadlocks and hangs.getClass()Answers the unique instance of java.lang.Class which represents the class of the receiver.final voidnotify()Causes one thread which iswaiting on the receiver to be made ready to run.final voidCauses all threads which arewaiting on the receiver to be made ready to run.toString()Answers a string containing a concise, human-readable description of the receiver.final voidwait()Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated bynotifyornotifyAll).final voidwait(long time) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.final voidwait(long time, int frac) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.
-
Constructor Details
-
EllipticCurve
Creates 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- iffield,a, orbis null.IllegalArgumentException- ifaorbis not null and not infield.
-
EllipticCurve
Creates 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- iffield,a, orbis null.IllegalArgumentException- ifaorbis not null and not infield.
-
-
Method Details
-
getField
Returns the finite fieldfieldthat this elliptic curve is over.- Returns:
- the field
fieldthat this curve is over.
-
getA
Returns the first coefficientaof the elliptic curve.- Returns:
- the first coefficient
a.
-
getB
Returns the second coefficientbof the elliptic curve.- Returns:
- the second coefficient
b.
-
getSeed
public 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
-