public class SecP256K1FieldElement extends ECFieldElement
ECFieldElement.F2m, ECFieldElement.Fp| Modifier and Type | Field and Description |
|---|---|
static BigInteger |
Q |
protected int[] |
x |
| Modifier | Constructor and Description |
|---|---|
|
SecP256K1FieldElement() |
|
SecP256K1FieldElement(BigInteger x) |
protected |
SecP256K1FieldElement(int[] x) |
| Modifier and Type | Method and Description |
|---|---|
ECFieldElement |
add(ECFieldElement b) |
ECFieldElement |
addOne() |
ECFieldElement |
divide(ECFieldElement b) |
boolean |
equals(Object other)
Compares this instance with the specified object and indicates if they
are equal.
|
String |
getFieldName() |
int |
getFieldSize() |
int |
hashCode()
Returns an integer hash code for this object.
|
ECFieldElement |
invert() |
boolean |
isOne() |
boolean |
isZero() |
ECFieldElement |
multiply(ECFieldElement b) |
ECFieldElement |
negate() |
ECFieldElement |
sqrt()
return a sqrt root - the routine verifies that the calculation returns the right value - if
none exists it returns null.
|
ECFieldElement |
square() |
ECFieldElement |
subtract(ECFieldElement b) |
boolean |
testBitZero() |
BigInteger |
toBigInteger() |
bitLength, getEncoded, multiplyMinusProduct, multiplyPlusProduct, squareMinusProduct, squarePlusProduct, toStringpublic static final BigInteger Q
protected int[] x
public SecP256K1FieldElement(BigInteger x)
public SecP256K1FieldElement()
protected SecP256K1FieldElement(int[] x)
public boolean isZero()
isZero in class ECFieldElementpublic boolean isOne()
isOne in class ECFieldElementpublic boolean testBitZero()
testBitZero in class ECFieldElementpublic BigInteger toBigInteger()
toBigInteger in class ECFieldElementpublic String getFieldName()
getFieldName in class ECFieldElementpublic int getFieldSize()
getFieldSize in class ECFieldElementpublic ECFieldElement add(ECFieldElement b)
add in class ECFieldElementpublic ECFieldElement addOne()
addOne in class ECFieldElementpublic ECFieldElement subtract(ECFieldElement b)
subtract in class ECFieldElementpublic ECFieldElement multiply(ECFieldElement b)
multiply in class ECFieldElementpublic ECFieldElement divide(ECFieldElement b)
divide in class ECFieldElementpublic ECFieldElement negate()
negate in class ECFieldElementpublic ECFieldElement square()
square in class ECFieldElementpublic ECFieldElement invert()
invert in class ECFieldElementpublic ECFieldElement sqrt()
sqrt in class ECFieldElementpublic boolean equals(Object other)
Objecto must represent the same object
as this instance using a class-specific comparison. The general contract
is that this comparison should be reflexive, symmetric, and transitive.
Also, no object reference other than null is equal to null.
The default implementation returns true only if this ==
o. See Writing a correct
equals method
if you intend implementing your own equals method.
The general contract for the equals and Object.hashCode() methods is that if equals returns true for
any two objects, then hashCode() must return the same value for
these objects. This means that subclasses of Object usually
override either both methods or neither of them.
equals in class Objectother - the object to compare this instance with.true if the specified object is equal to this Object; false otherwise.Object.hashCode()public int hashCode()
ObjectObject.equals(java.lang.Object) returns true must return
the same hash code value. This means that subclasses of Object
usually override both methods or neither method.
Note that hash values must not change over time unless information used in equals comparisons also changes.
See Writing a correct
hashCode method
if you intend implementing your own hashCode method.
hashCode in class ObjectObject.equals(java.lang.Object)