public class EllipticCurve extends Object
ECField,
ECFieldFp,
ECFieldF2m
| Constructor and Description |
|---|
EllipticCurve(ECField
Creates an elliptic curve with the specified elliptic field
field and the coefficients
a and
b.
|
EllipticCurve(ECField
Creates an elliptic curve with the specified elliptic field
field, the coefficients
a and
b, and the
seed used for curve generation.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object
Compares this elliptic curve for equality with the specified object.
|
BigInteger |
getA()
Returns the first coefficient
a of the elliptic curve.
|
BigInteger |
getB()
Returns the second coefficient
b of the elliptic curve.
|
ECField |
getField()
Returns the finite field
field that this elliptic curve is over.
|
byte[] |
getSeed()
Returns the seeding bytes
seed used during curve generation.
|
int |
hashCode()
Returns a hash code value for this elliptic curve.
|
public EllipticCurve(ECFieldfield, BigInteger a, BigInteger b)
field and the coefficients
a and
b.
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.
NullPointerException - if
field,
a, or
b is null.
IllegalArgumentException - if
a or
b is not null and not in
field.
public EllipticCurve(ECFieldfield, BigInteger a, BigInteger b, byte[] seed)
field, the coefficients
a and
b, and the
seed used for curve generation.
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.
NullPointerException - if
field,
a, or
b is null.
IllegalArgumentException - if
a or
b is not null and not in
field.
public ECFieldgetField()
field that this elliptic curve is over.
field that this curve is over.
public BigIntegergetA()
a of the elliptic curve.
a.
public BigIntegergetB()
b of the elliptic curve.
b.
public byte[] getSeed()
seed used during curve generation. May be null if not specified.
seed. A new array is returned each time this method is called.
public boolean equals(Objectobj)
equals in class
Object
obj - the object to be compared.
obj is an instance of EllipticCurve and the field, A, and B match, false otherwise.
Object.hashCode() ,
HashMap
public int hashCode()
hashCode in class
Object
(field.hashCode() << 6) + (a.hashCode() << 4) + (b.hashCode() << 2)
Object.equals(java.lang.Object) ,
System.identityHashCode(java.lang.Object)