com.entrust.toolkit.security.crypto.ec insteadpublic class GFpElement extends java.lang.Object implements FieldElement
FieldElement interface for the
elements over GF(p).| Constructor and Description |
|---|
GFpElement(java.math.BigInteger number,
Field field)
Deprecated.
This is the public constructor that takes the number and the field as
arguments.
|
| Modifier and Type | Method and Description |
|---|---|
FieldElement |
add(FieldElement element)
Deprecated.
Returns the field element that is the result of adding
this to the given summand element. |
boolean |
equals(java.lang.Object object)
Deprecated.
Returns true if and only if
this and the given value are
the same. |
FieldElement |
exponentiate(java.math.BigInteger a)
Deprecated.
Exponentiates this with the given value.
|
java.math.BigInteger |
getBigInteger()
Deprecated.
Returns the field element as a BigInteger.
|
Field |
getField()
Deprecated.
Returns the field which is contained in a field
element.
|
FieldElement |
multiplicativeInverse()
Deprecated.
Returns the multiplicative inverse element of
this. |
FieldElement |
multiply(FieldElement element)
Deprecated.
Returns the field element that is the result of multiplying
element to this. |
FieldElement |
subtract(FieldElement element)
Deprecated.
Returns the field element that is the result of subtracting
element from this. |
ASN1Object |
toASN1Object()
Deprecated.
Returns the ASN1 encoding of this element.
|
java.lang.String |
toString()
Deprecated.
Returns the string representation.
|
public GFpElement(java.math.BigInteger number,
Field field)
throws java.lang.IllegalArgumentException
number - a BigInteger objectfield - a Field object
Precondition:
field must be an object of subclass GFp.
java.lang.IllegalArgumentException - If the precondition is not satisfied.public Field getField()
getField in interface FieldElementpublic java.math.BigInteger getBigInteger()
getBigInteger in interface FieldElementpublic FieldElement add(FieldElement element) throws java.lang.IllegalArgumentException
this to the given summand element.add in interface FieldElementelement - a FieldElement of subclass GFpElement.
Precondition:
element must be of subclass GFpElement and must contain the same field asthis.
GFpElement.java.lang.IllegalArgumentException - If the precondition is not satisfied.public FieldElement subtract(FieldElement element) throws java.lang.IllegalArgumentException
element from this.subtract in interface FieldElementelement - a FieldElement of subclass GFpElement.
Precondition:
element must be of subclass GFpElement and must contain the same field as this.
this - element as a GFpElement object.java.lang.IllegalArgumentException - If the precondition is not satisfied.public FieldElement multiplicativeInverse() throws java.lang.ArithmeticException
this.multiplicativeInverse in interface FieldElementthis as
GFpElement object.java.lang.ArithmeticException - if this value equals zero and thus no inverse exists.public FieldElement multiply(FieldElement element) throws java.lang.IllegalArgumentException
element to this.multiply in interface FieldElementelement - a FieldElement of subclass GFpElement.
Precondition:
element must be of subclass GFpElement and must contain the same field asthis.
this times the input parameter
element as a GFpElement object.java.lang.IllegalArgumentException - If the precondition is not satisfied.public FieldElement exponentiate(java.math.BigInteger a)
exponentiate in interface FieldElementa - the exponentthis power to the element
as GFpElement object.public ASN1Object toASN1Object()
toASN1Object in interface FieldElementpublic boolean equals(java.lang.Object object)
this and the given value are
the same.equals in interface FieldElementequals in class java.lang.Objectobject - the reference field element with which to comparethis and the given value are linked
to the same field and contain the same number in that field.public java.lang.String toString()
toString in interface FieldElementtoString in class java.lang.Object