GF2nPolynomialField, GF2nONBElement, GF2Polynomial
| Modifier and Type | Field and Description |
|---|---|
| private static final int[] | |
| private GF2Polynomial |
| Access | Constructor and Description |
|---|---|
| public | GF2nPolynomialElement(GF2nPolynomialField
the GF2nField to use f, Random the source of randomness rand)Create a new random GF2nPolynomialElement using the given field and source of randomness. |
| public | GF2nPolynomialElement(GF2nPolynomialField
the GF2nPolynomialField to use f, GF2Polynomial the desired value as Bitstring bs)Creates a new GF2nPolynomialElement using the given field and Bitstring. |
| public | GF2nPolynomialElement(GF2nPolynomialField
the GF2nField to use f, byte[] the octet string to assign to this GF2nPolynomialElement os)Creates a new GF2nPolynomialElement using the given field f and byte[] os as value. |
| public | GF2nPolynomialElement(GF2nPolynomialField
the GF2nField to use f, int[] the integer string to assign to this GF2nPolynomialElement is)Creates a new GF2nPolynomialElement using the given field f and int[] is as value. |
| public | GF2nPolynomialElement(GF2nPolynomialElement
the GF2nPolynomialElement to clone other)Creates a new GF2nPolynomialElement by cloning the given GF2nPolynomialElement b. |
| Modifier and Type | Method and Description |
|---|---|
| public GFElement | Returns: this + other (newly created)the addend addend)Implements org. |
| public void | addToThis(GFElement
the addend addend)Implements org. |
| pack-priv void | assignOne()
Implements abstract org. |
| pack-priv void | assignZero()
Implements abstract org. |
| public Object | Returns: a copy of this elementImplements abstract org. Implements org. |
| public boolean | Returns: true if the two objects are equal, false otherwisethe other object other)Overrides java. Implements org. |
| private GF2Polynomial | Returns: the value of this GF2nPolynomialElement in a new BitstringReturns the value of this GF2nPolynomialElement in a new Bitstring. |
| private GF2nPolynomialElement | Returns: a GF2nPolynomialElement representing the half-trace of this GF2nPolynomialElement.Returns the half-trace of this GF2nPolynomialElement. |
| public int | Returns: the hash code of this elementOverrides java. Implements org. |
| public GF2nElement | Returns: this + 'one'Implements abstract org. |
| public void | increaseThis()
Implements abstract org. |
| public GFElement | Returns: this-1 (newly created)Implements org. |
| public GF2nPolynomialElement | Returns: this^(-1)Calculates the multiplicative inverse of this and returns the result in a new GF2nPolynomialElement. |
| public GF2nPolynomialElement | Returns: this^(-1)Calculates the multiplicative inverse of this using the modified almost inverse algorithm and returns the result in a new GF2nPolynomialElement. |
| public GF2nPolynomialElement | Returns: this^(-1)Calculates the multiplicative inverse of this and returns the result in a new GF2nPolynomialElement. |
| public boolean | Returns: true if this equals one (this == 1)Implements org. |
| public boolean | Returns: true if this is the zero elementImplements org. |
| public GFElement | Returns: this * factor (newly created)the factor factor)Implements org. |
| public void | multiplyThisBy(GFElement
the factor factor)Implements org. |
| public static GF2nPolynomialElement | Returns: the one element in the given finite fieldthe finite field f)Create the one element. |
| public GF2nPolynomialElement | Returns: this^k in a new GF2nPolynomialElementthe power k)Calculates this to the power of k and returns the result in a new GF2nPolynomialElement. |
| private void | |
| private void | reducePentanomialBitwise(int[] pc)
Reduce this GF2nPolynomialElement using the pentanomial x^n + x^pc[2] + x^pc[1] + x^pc[0] + 1 as fieldpolynomial. |
| private void | |
| private void | reduceTrinomialBitwise(int tc)
Reduce this GF2nPolynomialElement using the trinomial x^n + x^tc + 1 as fieldpolynomial. |
| public GF2nElement | Returns: a GF2nPolynomialElement representing one z satisfying the equation z2 + z = thisImplements abstract org. |
| public GF2nElement | Returns: this2 (newly created)Implements abstract org. |
| public GF2nPolynomialElement | Returns: this2 (newly created)Squares this GF2nPolynomialElement by shifting left its Bitstring and reducing. |
| public GF2nPolynomialElement | Returns: this2 (newly created)Squares this GF2nPolynomialElement using GF2nField's squaring matrix. |
| public GF2nPolynomialElement | Returns: this2 (newly created)Squares this GF2nPolynomialElement by using precalculated values and reducing. |
| public GF2nElement | Returns: this1/2 (newly created)Implements abstract org. GF2nPolynomialElement.
|
| public void | squareRootThis()
Implements abstract org. |
| public void | squareThis()
Implements abstract org. |
| public void | |
| public void | |
| public void | |
| pack-priv boolean | Returns: true if the indexed bit is setthe index of the bit to test index)Implements abstract org. |
| public boolean | Returns: true if the rightmost bit of this element is setImplements abstract org. |
| public byte[] | Returns: a byte[] representing the value of this GF2nPolynomialElementImplements org. |
| public BigInteger | Returns: a BigInteger representing the value of this GF2nPolynomialElementImplements org. |
| public String | Returns: a String representing this Bitstrings value.Overrides java. Implements org. |
| public String | Returns: a String representing this Bitstrings value.the radix to use (2 or 16, otherwise 2 is used) radix)Implements org. |
| public int | Returns: the trace of this GF2nPolynomialElementImplements abstract org. |
| public static GF2nPolynomialElement | Returns: the zero element in the given finite fieldthe finite field f)Create the zero element. |
| bitMask | back to summary |
|---|---|
| private static final int[] bitMask | |
| polynomial | back to summary |
|---|---|
| private GF2Polynomial polynomial | |
| GF2nPolynomialElement | back to summary |
|---|---|
| public GF2nPolynomialElement(GF2nPolynomialField f, Random rand) Create a new random GF2nPolynomialElement using the given field and source of randomness.
| |
| GF2nPolynomialElement | back to summary |
|---|---|
| public GF2nPolynomialElement(GF2nPolynomialField f, GF2Polynomial bs) Creates a new GF2nPolynomialElement using the given field and Bitstring.
| |
| GF2nPolynomialElement | back to summary |
|---|---|
| public GF2nPolynomialElement(GF2nPolynomialField f, byte[] os) Creates a new GF2nPolynomialElement using the given field f and byte[] os as value. The conversion is done according to 1363.
| |
| GF2nPolynomialElement | back to summary |
|---|---|
| public GF2nPolynomialElement(GF2nPolynomialField f, int[] is) Creates a new GF2nPolynomialElement using the given field f and int[] is as value.
| |
| GF2nPolynomialElement | back to summary |
|---|---|
| public GF2nPolynomialElement(GF2nPolynomialElement other) Creates a new GF2nPolynomialElement by cloning the given GF2nPolynomialElement b.
| |
| add | back to summary |
|---|---|
| public GFElement add(GFElement addend) throws RuntimeException Implements org. Compute the sum of this element and addend. | |
| addToThis | back to summary |
|---|---|
| public void addToThis(GFElement addend) throws RuntimeException Implements org. Compute this + addend (overwrite this).
| |
| assignOne | back to summary |
|---|---|
| pack-priv void assignOne() Implements abstract org. Assigns the value 'one' to this Polynomial. | |
| assignZero | back to summary |
|---|---|
| pack-priv void assignZero() Implements abstract org. Assigns the value 'zero' to this Polynomial. | |
| clone | back to summary |
|---|---|
| public Object clone() Implements abstract org. Implements org. Creates a new GF2nPolynomialElement by cloning this GF2nPolynomialElement.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. Implements org. Compare this element with another object.
| |
| getGF2Polynomial | back to summary |
|---|---|
| private GF2Polynomial getGF2Polynomial() Returns the value of this GF2nPolynomialElement in a new Bitstring.
| |
| halfTrace | back to summary |
|---|---|
| private GF2nPolynomialElement halfTrace() throws RuntimeException Returns the half-trace of this GF2nPolynomialElement.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Implements org. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| increase | back to summary |
|---|---|
| public GF2nElement increase() Implements abstract org. Returns this element + 'one".
| |
| increaseThis | back to summary |
|---|---|
| public void increaseThis() Implements abstract org. Increases this element by 'one'. | |
| invert | back to summary |
|---|---|
| public GFElement invert() throws ArithmeticException Implements org. Compute the multiplicative inverse of this element.
| |
| invertEEA | back to summary |
|---|---|
| public GF2nPolynomialElement invertEEA() throws ArithmeticException Calculates the multiplicative inverse of this and returns the result in a new GF2nPolynomialElement.
| |
| invertMAIA | back to summary |
|---|---|
| public GF2nPolynomialElement invertMAIA() throws ArithmeticException Calculates the multiplicative inverse of this using the modified almost inverse algorithm and returns the result in a new GF2nPolynomialElement.
| |
| invertSquare | back to summary |
|---|---|
| public GF2nPolynomialElement invertSquare() throws ArithmeticException Calculates the multiplicative inverse of this and returns the result in a new GF2nPolynomialElement.
| |
| isOne | back to summary |
|---|---|
| public boolean isOne() Implements org. Tests if the GF2nPolynomialElement has 'one' as value.
| |
| isZero | back to summary |
|---|---|
| public boolean isZero() Implements org. Checks whether this element is zero.
| |
| multiply | back to summary |
|---|---|
| public GFElement multiply(GFElement factor) throws RuntimeException Implements org. Compute the product of this element and factor. | |
| multiplyThisBy | back to summary |
|---|---|
| public void multiplyThisBy(GFElement factor) throws RuntimeException Implements org. Compute this * factor (overwrite this).
| |
| ONE | back to summary |
|---|---|
| public static GF2nPolynomialElement ONE(GF2nPolynomialField f) Create the one element.
| |
| power | back to summary |
|---|---|
| public GF2nPolynomialElement power(int k) Calculates this to the power of k and returns the result in a new GF2nPolynomialElement.
| |
| randomize | back to summary |
|---|---|
| private void randomize(Random rand) Assign a random value to this GF2nPolynomialElement using the specified source of randomness.
| |
| reducePentanomialBitwise | back to summary |
|---|---|
| private void reducePentanomialBitwise(int[] pc) Reduce this GF2nPolynomialElement using the pentanomial x^n + x^pc[2] + x^pc[1] + x^pc[0] + 1 as fieldpolynomial. The coefficients are reduced bit by bit. | |
| reduceThis | back to summary |
|---|---|
| private void reduceThis() Reduces this GF2nPolynomialElement modulo the field-polynomial. | |
| reduceTrinomialBitwise | back to summary |
|---|---|
| private void reduceTrinomialBitwise(int tc) Reduce this GF2nPolynomialElement using the trinomial x^n + x^tc + 1 as fieldpolynomial. The coefficients are reduced bit by bit. | |
| solveQuadraticEquation | back to summary |
|---|---|
| public GF2nElement solveQuadraticEquation() throws RuntimeException Implements abstract org. Solves the quadratic equation z2 + z = this if such a solution exists. This method returns one of the two possible solutions. The other solution is z + 1. Use z.increase() to compute this solution.
| |
| square | back to summary |
|---|---|
| public GF2nElement square() Implements abstract org. This method is used internally to map the square()-calls within GF2nPolynomialElement to one of the possible squaring methods.
| |
| squareBitwise | back to summary |
|---|---|
| public GF2nPolynomialElement squareBitwise() Squares this GF2nPolynomialElement by shifting left its Bitstring and reducing. This is supposed to be the slowest method. Use squarePreCalc or squareMatrix instead.
| |
| squareMatrix | back to summary |
|---|---|
| public GF2nPolynomialElement squareMatrix() Squares this GF2nPolynomialElement using GF2nField's squaring matrix. This is supposed to be fast when using a polynomial (no tri- or pentanomial) as fieldpolynomial. Use squarePreCalc when using a tri- or pentanomial as fieldpolynomial instead.
| |
| squarePreCalc | back to summary |
|---|---|
| public GF2nPolynomialElement squarePreCalc() Squares this GF2nPolynomialElement by using precalculated values and reducing. This is supposed to de fastest when using a trinomial or pentanomial as field polynomial. Use squareMatrix when using a ordinary polynomial as field polynomial.
| |
| squareRoot | back to summary |
|---|---|
| public GF2nElement squareRoot() Implements abstract org. Compute the square root of this element and return the result in a new
| |
| squareRootThis | back to summary |
|---|---|
| public void squareRootThis() Implements abstract org. Compute the square root of this element. | |
| squareThis | back to summary |
|---|---|
| public void squareThis() Implements abstract org. This method is used internally to map the square()-calls within GF2nPolynomialElement to one of the possible squaring methods. | |
| squareThisBitwise | back to summary |
|---|---|
| public void squareThisBitwise() Squares this GF2nPolynomialElement by shifting left its Bitstring and reducing. This is supposed to be the slowest method. Use squarePreCalc or squareMatrix instead. | |
| squareThisMatrix | back to summary |
|---|---|
| public void squareThisMatrix() Squares this GF2nPolynomialElement using GF2nFields squaring matrix. This is supposed to be fast when using a polynomial (no tri- or pentanomial) as fieldpolynomial. Use squarePreCalc when using a tri- or pentanomial as fieldpolynomial instead. | |
| squareThisPreCalc | back to summary |
|---|---|
| public void squareThisPreCalc() Squares this GF2nPolynomialElement by using precalculated values and reducing. This is supposed to de fastest when using a tri- or pentanomial as fieldpolynomial. Use squareMatrix when using a ordinary polynomial as fieldpolynomial. | |
| testBit | back to summary |
|---|---|
| pack-priv boolean testBit(int index) Implements abstract org. Checks whether the indexed bit of the bit representation is set.
| |
| testRightmostBit | back to summary |
|---|---|
| public boolean testRightmostBit() Implements abstract org. Returns whether the rightmost bit of the bit representation is set. This is needed for data conversion according to 1363.
| |
| toByteArray | back to summary |
|---|---|
| public byte[] toByteArray() Implements org. Converts this GF2nPolynomialElement to a byte[] according to 1363.
| |
| toFlexiBigInt | back to summary |
|---|---|
| public BigInteger toFlexiBigInt() Implements org. Converts this GF2nPolynomialElement to an integer according to 1363.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Implements org. Returns a string representing this Bitstrings value using hexadecimal radix in MSB-first order.
| |
| toString | back to summary |
|---|---|
| public String toString(int radix) Implements org. Returns a string representing this Bitstrings value using hexadecimal or binary radix in MSB-first order.
| |
| trace | back to summary |
|---|---|
| public int trace() Implements abstract org. Returns the trace of this GF2nPolynomialElement.
| |
| ZERO | back to summary |
|---|---|
| public static GF2nPolynomialElement ZERO(GF2nPolynomialField f) Create the zero element.
| |