public abstract class GF2nElement extends Object implements GFElement
GF2nPolynomialElement
,
GF2nONBElement
,
GF2nONBField
Modifier and Type | Field and Description |
---|---|
protected int |
mDegree
holds the extension degree n of this element's corresponding
field.
|
protected GF2nField |
mField
holds a pointer to this element's corresponding field.
|
Constructor and Description |
---|
GF2nElement() |
Modifier and Type | Method and Description |
---|---|
abstract Object |
clone() |
GF2nElement |
convert(GF2nField basis)
Performs a basis transformation of this element to the given GF2nField
basis.
|
GF2nField |
getField()
Returns the field of this element.
|
abstract GF2nElement |
increase()
Returns this element + 1.
|
abstract void |
increaseThis()
Increases this element by one.
|
abstract GF2nElement |
solveQuadraticEquation()
Solves a quadratic equation.
Let z2 + z = this. |
abstract GF2nElement |
square()
Returns this element to the power of 2.
|
abstract GF2nElement |
squareRoot()
Compute the square root of this element and return the result in a new
GF2nElement . |
abstract void |
squareRootThis()
Compute the square root of this element.
|
abstract void |
squareThis()
Squares this element.
|
GFElement |
subtract(GFElement minuend)
Compute the difference of this element and minuend.
|
void |
subtractFromThis(GFElement minuend)
Compute the difference of this element and minuend,
overwriting this element.
|
abstract boolean |
testRightmostBit()
Returns whether the rightmost bit of the bit representation is set.
|
abstract int |
trace()
Returns the trace of this element.
|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
add, addToThis, equals, hashCode, invert, isOne, isZero, multiply, multiplyThisBy, toByteArray, toFlexiBigInt, toString, toString
protected GF2nField mField
protected int mDegree
public abstract Object clone()
public abstract boolean testRightmostBit()
public final GF2nField getField()
public abstract GF2nElement increase()
public abstract void increaseThis()
public final GFElement subtract(GFElement minuend) throws RuntimeException
subtract
in interface GFElement
minuend
- the minuendDifferentFieldsException
- if the elements are of different fields.RuntimeException
public final void subtractFromThis(GFElement minuend)
subtractFromThis
in interface GFElement
minuend
- the minuendDifferentFieldsException
- if the elements are of different fields.public abstract GF2nElement square()
public abstract void squareThis()
public abstract GF2nElement squareRoot()
GF2nElement
.public abstract void squareRootThis()
public final GF2nElement convert(GF2nField basis) throws RuntimeException
basis
- the GF2nField representation to transform this element toDifferentFieldsException
- if this cannot be converted according to
basis.RuntimeException
public abstract int trace()
public abstract GF2nElement solveQuadraticEquation() throws RuntimeException
NoSolutionException
- if z2 + z = this does not have a
solutionRuntimeException
Copyright © 2018 BouncyCastle.org. All rights reserved.