public class GF2nONBElement extends GF2nElement
GF2nField,
GF2nElementmDegree, mField| Constructor and Description |
|---|
GF2nONBElement(GF2nONBElement gf2n)
Copy constructor.
|
GF2nONBElement(GF2nONBField gf2n,
java.math.BigInteger val)
Construct the element of the field gf2n with the specified
value val.
|
GF2nONBElement(GF2nONBField gf2n,
byte[] e)
Construct a new GF2nONBElement from its encoding.
|
GF2nONBElement(GF2nONBField gf2n,
java.security.SecureRandom rand)
Construct a random element over the field gf2n, using the
specified source of randomness.
|
| Modifier and Type | Method and Description |
|---|---|
GFElement |
add(GFElement addend)
Compute the sum of this element and addend.
|
void |
addToThis(GFElement addend)
Compute this + addend (overwrite this).
|
java.lang.Object |
clone()
Create a new GF2nONBElement by cloning this GF2nPolynomialElement.
|
boolean |
equals(java.lang.Object other)
Compare this element with another object.
|
int |
hashCode() |
GF2nElement |
increase()
returns this element + 1.
|
void |
increaseThis()
increases this element.
|
GFElement |
invert()
Compute the multiplicative inverse of this element.
|
void |
invertThis()
Multiplicatively invert of this element (overwrite this).
|
boolean |
isOne()
Checks whether this element is one.
|
boolean |
isZero()
Checks whether this element is zero.
|
GFElement |
multiply(GFElement factor)
Compute the product of this element and factor.
|
void |
multiplyThisBy(GFElement factor)
Compute this * factor (overwrite this).
|
static GF2nONBElement |
ONE(GF2nONBField gf2n)
Create the one element.
|
GF2nElement |
solveQuadraticEquation()
Solves a quadratic equation.
|
GF2nElement |
square()
returns this element to the power of 2.
|
GF2nElement |
squareRoot()
returns the root ofthis element.
|
void |
squareRootThis()
square roots this element.
|
void |
squareThis()
squares this element.
|
boolean |
testRightmostBit()
Returns whether the highest bit of the bit representation is set
|
byte[] |
toByteArray()
Returns this element as byte array.
|
java.math.BigInteger |
toFlexiBigInt()
Returns this element as FlexiBigInt.
|
java.lang.String |
toString()
Returns a String representation of this element.
|
java.lang.String |
toString(int radix)
Returns a String representation of this element.
|
int |
trace()
Returns the trace of this element.
|
static GF2nONBElement |
ZERO(GF2nONBField gf2n)
Create the zero element.
|
convert, getField, subtract, subtractFromThispublic GF2nONBElement(GF2nONBField gf2n, java.security.SecureRandom rand)
gf2n - the fieldrand - the source of randomnesspublic GF2nONBElement(GF2nONBField gf2n, byte[] e)
gf2n - the fielde - the encoded elementpublic GF2nONBElement(GF2nONBField gf2n, java.math.BigInteger val)
gf2n - the fieldval - the value represented by a BigIntegerpublic GF2nONBElement(GF2nONBElement gf2n)
gf2n - the fieldpublic java.lang.Object clone()
clone in interface GFElementclone in class GF2nElementpublic static GF2nONBElement ZERO(GF2nONBField gf2n)
gf2n - the finite fieldpublic static GF2nONBElement ONE(GF2nONBField gf2n)
gf2n - the finite fieldpublic boolean isZero()
public boolean isOne()
public boolean equals(java.lang.Object other)
public int hashCode()
public boolean testRightmostBit()
testRightmostBit in class GF2nElementpublic GFElement add(GFElement addend) throws java.lang.RuntimeException
addend - the addendjava.lang.RuntimeExceptionpublic void addToThis(GFElement addend) throws java.lang.RuntimeException
addend - the addendjava.lang.RuntimeExceptionpublic GF2nElement increase()
increase in class GF2nElementpublic void increaseThis()
increaseThis in class GF2nElementpublic GFElement multiply(GFElement factor) throws java.lang.RuntimeException
factor - the factorjava.lang.RuntimeExceptionpublic void multiplyThisBy(GFElement factor) throws java.lang.RuntimeException
factor - the factorjava.lang.RuntimeExceptionpublic GF2nElement square()
square in class GF2nElementpublic void squareThis()
squareThis in class GF2nElementpublic GFElement invert() throws java.lang.ArithmeticException
java.lang.ArithmeticException - if this is the zero element.public void invertThis()
throws java.lang.ArithmeticException
java.lang.ArithmeticException - if this is the zero element.public GF2nElement squareRoot()
squareRoot in class GF2nElementpublic void squareRootThis()
squareRootThis in class GF2nElementpublic int trace()
trace in class GF2nElementpublic GF2nElement solveQuadraticEquation() throws java.lang.RuntimeException
solveQuadraticEquation in class GF2nElementjava.lang.RuntimeExceptionpublic java.lang.String toString()
public java.lang.String toString(int radix)
radix - specifies the radix of the String representationpublic java.math.BigInteger toFlexiBigInt()
public byte[] toByteArray()