public final class SexticExtensionFieldElement extends Object
SexticOverQuadraticTowerExtensionField
Modifier and Type | Method and Description |
---|---|
SexticExtensionFieldElement |
add(GenericFieldElement b)
Adds
b to this . |
SexticExtensionFieldElement |
addBase(GenericFieldElement b)
Adds
b to this where b is an element
of the underlying base field. |
SexticExtensionFieldElement |
addOutOfPlace(ExtensionFieldElement b)
Adds two elements and returns a new object holding the result.
|
SexticExtensionFieldElement |
addOutOfPlace(GenericFieldElement b)
Adds two elements and returns a new object holding the result.
|
SexticExtensionFieldElement |
addOutOfPlace(PrimeCharacteristicFieldElement b)
Adds two elements and returns a new object holding the result.
|
SexticExtensionFieldElement |
applyFrobenius(int i)
Compute the
i -th Frobenius of this . |
SexticExtensionFieldElement |
clone()
Clones the value of this field element.
|
SexticExtensionFieldElement |
conjugate()
Conjugate this element.
|
SexticExtensionFieldElement |
conjugate(int i)
Conjugate this element
i times. |
SexticExtensionFieldElement |
divide(GenericFieldElement b)
Divides
this and another field elements. |
SexticExtensionFieldElement |
divideBy2()
Divides
this by 2. |
boolean |
equals(Object obj) |
SexticExtensionFieldElement |
exponentiate(BigInteger n)
Performs exponentiation in-place.
|
SexticExtensionFieldElement |
exponentiate(int n)
Performs exponentiation in-place.
|
SexticExtensionFieldElement |
exponentiateByPowerOf2(int n)
Raise
this to the power of 2^n . |
SexticExtensionFieldElement |
exponentiateOutOfPlace(BigInteger n)
Raises
this to the power n . |
SexticExtensionFieldElement |
exponentiateOutOfPlace(int n)
Raises
this to the power n . |
SexticExtensionFieldElement |
exponentiateUni(BigInteger n)
Computer power of an element in the cyclotomic subgroup.
|
SexticOverQuadraticTowerExtensionField |
getField()
Returns the associated finite field.
|
PrimeFieldElement |
getNorm()
Computes the norm of
this , which is an element of the base
field. |
int |
getQuadraticCharacter()
Implements a quadratic character, which returns -1,0,1 depending on whether
this is a quadratic non-residue, a multiple of the modulus, or
a quadratic residue. |
PrimeCharacteristicFieldElement |
getValue(int index)
Get
index -th subfield element used to represent
this . |
GenericFieldElement[] |
getValues()
Get subfield elements used to represent
this . |
PrimeFieldElement[] |
getValuesRecursive()
Get prime field elements used to represent
this . |
int |
hashCode() |
SexticExtensionFieldElement |
invert()
Sets
this to its inverse. |
boolean |
isOne()
Determines whether
this is one. |
boolean |
isZero()
Determines whether
this is zero. |
SexticExtensionFieldElement |
multiply(BigInteger n)
Multiples
this by n . |
SexticExtensionFieldElement |
multiply(GenericFieldElement b)
Multiplies
this with b which is an element of the
same field. |
SexticExtensionFieldElement |
multiplyBy2()
Multiplies
this with 2. |
SexticExtensionFieldElement |
multiplyBy2OutOfPlace()
Multiplies
this with 2 and returns a new object holding the
result. |
SexticExtensionFieldElement |
multiplyBy3()
Multiplies
this with 3. |
SexticExtensionFieldElement |
multiplyBy3OutOfPlace()
Multiplies
this with 3 and returns a new object holding the
result. |
SexticExtensionFieldElement |
multiplyByAdjointRoot()
Multiply
this by the root used to obtain the extension field. |
SexticExtensionFieldElement |
multiplyByBase(GenericFieldElement b)
Multiplies
this with b which is an element of the
base field. |
PrimeCharacteristicFieldElement |
multiplyByBaseOutOfPlace(GenericFieldElement b)
Multiplies
this with b which is an element of the
base field, where a new object holding the result is created. |
SexticExtensionFieldElement |
multiplyByPowerOf2(int exponent)
Multiplies
this by 2^n . |
SexticExtensionFieldElement |
multiplyByPowerOf2OutOfPlace(int exponent)
Multiplies
this by 2^n and returns a new object
holding the result. |
SexticExtensionFieldElement |
multiplyDenseSparse023(ExtensionFieldElement b)
Multiply
this with a sparsely populated element v0 + v2 * i^2
+ v3 * i^3. |
SexticExtensionFieldElement |
multiplyDenseSparse023(PrimeCharacteristicFieldElement v0,
PrimeCharacteristicFieldElement v2,
PrimeCharacteristicFieldElement v3)
Multiply
this with a sparsely populated element v0 + v2 * i^2
+ v3 * i^3. |
SexticExtensionFieldElement |
multiplyDenseSparse034(ExtensionFieldElement b)
Multiply a sparsely populated
this with a sparsely populated
element v0 + v3 * i^3 + v4 * i^4. |
SexticExtensionFieldElement |
multiplyDenseSparse034(PrimeCharacteristicFieldElement v0,
PrimeCharacteristicFieldElement v3,
PrimeCharacteristicFieldElement v4)
Multiply
this with a sparsely populated element v0 + v3 * i^3
+ v4 * i^4. |
SexticExtensionFieldElement |
multiplyOutOfPlace(BigInteger n)
Multiples
this by n , where a new object holding
the result is created. |
SexticExtensionFieldElement |
multiplyOutOfPlace(GenericFieldElement b)
Multiplies
this with b which is an element of the
same field, where a new object holding the result is created. |
SexticExtensionFieldElement |
multiplySparse023(ExtensionFieldElement b)
Multiply sparsely populated
this with a sparsely populated
element v0 + v2 * i^2 + v3 * i^3. |
SexticExtensionFieldElement |
multiplySparse023(PrimeCharacteristicFieldElement v0,
PrimeCharacteristicFieldElement v2,
PrimeCharacteristicFieldElement v3)
Multiply sparsely populated
this with a sparsely populated
element v0 + v2 * i^2 + v3 * i^3. |
SexticExtensionFieldElement |
multiplySparse034(ExtensionFieldElement b)
Multiply a sparsely populated
this with a sparsely populated
element v0 + v3 * i^3 + v4 * i^4. |
SexticExtensionFieldElement |
multiplySparse034(PrimeCharacteristicFieldElement v0,
PrimeCharacteristicFieldElement v3,
PrimeCharacteristicFieldElement v4)
Multiply a sparsely populated
this with a sparsely populated
element v0 + v3 * i^3 + v4 * i^4. |
SexticExtensionFieldElement |
negate()
Returns the negative of
this . |
SexticExtensionFieldElement |
negateOutOfPlace()
Returns the negative of
this , where a new object holding the
result is created. |
SexticExtensionFieldElement |
square()
Computes the square of
this in-place. |
SexticExtensionFieldElement |
squareOutOfPlace()
Computes the square of
this , where a new object holding the
result is created. |
SexticExtensionFieldElement |
squareRoot()
Computes the square root of
this in-place. |
SexticExtensionFieldElement |
squareRoot(boolean checkSquare)
Computes the square root of
this . |
SexticExtensionFieldElement |
squareUni()
Square element in the cyclotomic subgroup.
|
SexticExtensionFieldElement |
subtract(GenericFieldElement b)
Subtracts
b from this . |
SexticExtensionFieldElement |
subtractOutOfPlace(ExtensionFieldElement b)
Subtract two elements and returns a new object holding the result.
|
SexticExtensionFieldElement |
subtractOutOfPlace(GenericFieldElement b)
Subtracts
b from this which is an element of the
base field, where a new object holding the result is created. |
SexticExtensionFieldElement |
subtractOutOfPlace(PrimeCharacteristicFieldElement b)
Subtracts
b from this and returns a new object
holding the result. |
Object |
toBigIntegers()
Returns the (multi-dimensional)
BigInteger -array representation of
this instance. |
byte[] |
toByteArray()
Returns
byte -array representation of this instance. |
String |
toString() |
public GenericFieldElement[] getValues()
ExtensionFieldElement
this
.this
public PrimeCharacteristicFieldElement getValue(int index)
ExtensionFieldElement
index
-th subfield element used to represent
this
.index
- index of the desired subfield elementindex
-th subfield element used to represent
this
public SexticExtensionFieldElement invert()
GenericFieldElement
this
to its inverse.this
public SexticExtensionFieldElement multiply(GenericFieldElement b)
GenericFieldElement
this
with b
which is an element of the
same field.b
- the second factorthis
and b
public SexticExtensionFieldElement multiplyOutOfPlace(GenericFieldElement b)
GenericFieldElement
this
with b
which is an element of the
same field, where a new object holding the result is created.b
- the second factorthis
and b
public SexticExtensionFieldElement multiply(BigInteger n)
GenericFieldElement
this
by n
.n
- the factorthis
and n
public SexticExtensionFieldElement multiplyOutOfPlace(BigInteger n)
GenericFieldElement
this
by n
, where a new object holding
the result is created.n
- the factorthis
and n
public SexticExtensionFieldElement multiplyByBase(GenericFieldElement b)
GenericFieldElement
this
with b
which is an element of the
base field.b
- the second factorthis
and b
public PrimeCharacteristicFieldElement multiplyByBaseOutOfPlace(GenericFieldElement b)
GenericFieldElement
this
with b
which is an element of the
base field, where a new object holding the result is created.b
- the second factorthis
and b
public SexticExtensionFieldElement square()
GenericFieldElement
this
in-place.this
public SexticExtensionFieldElement squareOutOfPlace()
GenericFieldElement
this
, where a new object holding the
result is created.this
public SexticExtensionFieldElement multiplyBy2()
PrimeCharacteristicFieldElement
this
with 2.this
and 2public SexticExtensionFieldElement multiplyBy2OutOfPlace()
PrimeCharacteristicFieldElement
this
with 2 and returns a new object holding the
result.this
and 2public SexticExtensionFieldElement multiplyBy3()
PrimeCharacteristicFieldElement
this
with 3.this
and 3public SexticExtensionFieldElement multiplyBy3OutOfPlace()
PrimeCharacteristicFieldElement
this
with 3 and returns a new object holding the
result.this
and 3public SexticExtensionFieldElement multiplyByPowerOf2(int exponent)
PrimeCharacteristicFieldElement
this
by 2^n
.exponent
- the exponentthis
and 2^npublic SexticExtensionFieldElement multiplyByPowerOf2OutOfPlace(int exponent)
PrimeCharacteristicFieldElement
this
by 2^n
and returns a new object
holding the result.exponent
- the exponentthis
and 2^npublic SexticExtensionFieldElement negate()
GenericFieldElement
this
. This functions works in-place.this
public SexticExtensionFieldElement negateOutOfPlace()
GenericFieldElement
this
, where a new object holding the
result is created.this
public SexticExtensionFieldElement add(GenericFieldElement b)
GenericFieldElement
b
to this
. This functions works in-place.b
- the second addendthis
and b
public SexticExtensionFieldElement addOutOfPlace(GenericFieldElement b)
PrimeCharacteristicFieldElement
b
- the other valuepublic SexticExtensionFieldElement addOutOfPlace(PrimeCharacteristicFieldElement b)
PrimeCharacteristicFieldElement
b
- the other valuepublic SexticExtensionFieldElement addOutOfPlace(ExtensionFieldElement b)
ExtensionFieldElement
b
- the other valuepublic SexticExtensionFieldElement addBase(GenericFieldElement b)
GenericFieldElement
b
to this
where b
is an element
of the underlying base field.b
- the second addendthis
and b
public SexticExtensionFieldElement subtract(GenericFieldElement b)
GenericFieldElement
b
from this
. This functions works in-place.b
- the subtrahendthis
and b
public SexticExtensionFieldElement subtractOutOfPlace(GenericFieldElement b)
GenericFieldElement
b
from this
which is an element of the
base field, where a new object holding the result is created.b
- the second factorthis
and b
public SexticExtensionFieldElement subtractOutOfPlace(ExtensionFieldElement b)
ExtensionFieldElement
b
- the other valuepublic SexticExtensionFieldElement subtractOutOfPlace(PrimeCharacteristicFieldElement b)
PrimeCharacteristicFieldElement
b
from this
and returns a new object
holding the result.b
- the subtrahendthis
and b
public SexticExtensionFieldElement conjugate()
ExtensionFieldElement
this
public SexticExtensionFieldElement divide(GenericFieldElement b)
ExtensionFieldElement
this
and another field elements.
You have no guarantee that b
remains unchanged.
b
- the divisorthis
and b
public SexticExtensionFieldElement divideBy2()
PrimeCharacteristicFieldElement
this
by 2.this
divided by 2.public SexticExtensionFieldElement squareRoot()
GenericFieldElement
this
in-place.this
or null
if the
square root does not exist.public SexticExtensionFieldElement squareRoot(boolean checkSquare)
PrimeCharacteristicFieldElement
this
.checkSquare
- check if a
is a square. If true
, the
return value is undefined for non-squares.this
public SexticExtensionFieldElement exponentiate(BigInteger n)
n
- the exponentn
th power of this
public SexticExtensionFieldElement exponentiate(int n)
n
- the exponentn
th power of this
public SexticExtensionFieldElement exponentiateOutOfPlace(BigInteger n)
GenericFieldElement
this
to the power n
.n
- the exponentn
th power of this
public SexticExtensionFieldElement exponentiateOutOfPlace(int n)
GenericFieldElement
this
to the power n
.n
- the exponentn
th power of this
public SexticExtensionFieldElement exponentiateByPowerOf2(int n)
GenericFieldElement
this
to the power of 2^n
.n
- the exponentn
-th power of this
.public PrimeFieldElement getNorm()
ExtensionFieldElement
this
, which is an element of the base
field.a
public boolean isOne()
GenericFieldElement
this
is one.this
is the one elementpublic boolean isZero()
GenericFieldElement
this
is zero.this
is the zero elementpublic Object toBigIntegers()
ExtensionFieldElement
BigInteger
-array representation of
this instance.BigInteger
-array representationpublic SexticOverQuadraticTowerExtensionField getField()
GenericFieldElement
public SexticExtensionFieldElement multiplyByAdjointRoot()
ExtensionFieldElement
this
by the root used to obtain the extension field.this
multiplied by the adjoint root.public SexticExtensionFieldElement multiplyDenseSparse023(PrimeCharacteristicFieldElement v0, PrimeCharacteristicFieldElement v2, PrimeCharacteristicFieldElement v3)
this
with a sparsely populated element v0 + v2 * i^2
+ v3 * i^3.v0
- constant coefficientv2
- coefficient of i^2v3
- coefficient of i^3this
multiplied with v0
+ v2
i^2 + v3
i^3.public SexticExtensionFieldElement multiplySparse023(PrimeCharacteristicFieldElement v0, PrimeCharacteristicFieldElement v2, PrimeCharacteristicFieldElement v3)
this
with a sparsely populated
element v0 + v2 * i^2 + v3 * i^3.v0
- constant coefficientv2
- coefficient of i^2v3
- coefficient of i^3this
multiplied with v0
+ v2
i^2 + v3
i^3.public SexticExtensionFieldElement multiplyDenseSparse034(PrimeCharacteristicFieldElement v0, PrimeCharacteristicFieldElement v3, PrimeCharacteristicFieldElement v4)
this
with a sparsely populated element v0 + v3 * i^3
+ v4 * i^4.v0
- constant coefficientv3
- coefficient of i^3v4
- coefficient of i^4this
multiplied with v0
+ v3
i^3 + v4
i^4.public SexticExtensionFieldElement multiplySparse034(PrimeCharacteristicFieldElement v0, PrimeCharacteristicFieldElement v3, PrimeCharacteristicFieldElement v4)
this
with a sparsely populated
element v0 + v3 * i^3 + v4 * i^4.v0
- constant coefficientv3
- coefficient of i^3v4
- coefficient of i^4this
multiplied with v0
+ v3
i^3 + v4
i^4.public SexticExtensionFieldElement multiplyDenseSparse023(ExtensionFieldElement b)
this
with a sparsely populated element v0 + v2 * i^2
+ v3 * i^3.b
- sparsely populated field elementthis
multiplied with b
.public SexticExtensionFieldElement multiplySparse023(ExtensionFieldElement b)
this
with a sparsely populated
element v0 + v2 * i^2 + v3 * i^3.b
- sparsely populated field elementthis
multiplied with b
.public SexticExtensionFieldElement multiplyDenseSparse034(ExtensionFieldElement b)
this
with a sparsely populated
element v0 + v3 * i^3 + v4 * i^4.b
- sparsely populated field elementthis
multiplied with b
.public SexticExtensionFieldElement multiplySparse034(ExtensionFieldElement b)
this
with a sparsely populated
element v0 + v3 * i^3 + v4 * i^4.b
- sparsely populated field elementthis
multiplied with b
.public SexticExtensionFieldElement conjugate(int i)
ExtensionFieldElement
i
times.i
- number of times this
should be conjugatedthis
public SexticExtensionFieldElement applyFrobenius(int i)
ExtensionFieldElement
i
-th Frobenius of this
.i
- number of times the Frobenius map should be appliedi
-times to this
..public SexticExtensionFieldElement squareUni()
this
squaredpublic SexticExtensionFieldElement exponentiateUni(BigInteger n)
n
- exponentthis
to the n
-th powerpublic int getQuadraticCharacter()
PrimeCharacteristicFieldElement
this
is a quadratic non-residue, a multiple of the modulus, or
a quadratic residue.(this/p)
public int hashCode()
hashCode
in interface GenericFieldElement
hashCode
in class Object
public boolean equals(Object obj)
equals
in interface GenericFieldElement
equals
in class Object
public SexticExtensionFieldElement clone()
ExtensionFieldElement
clone
in interface ExtensionFieldElement
clone
in interface GenericFieldElement
clone
in interface PrimeCharacteristicFieldElement
public String toString()
toString
in interface GenericFieldElement
toString
in class Object
public PrimeFieldElement[] getValuesRecursive()
ExtensionFieldElement
this
. This calls
ExtensionFieldElement.getValues()
recursively.
They values are sorted from the coefficients of the lowest power to the the
highest power.getValuesRecursive
in interface ExtensionFieldElement
this
.public byte[] toByteArray()
ExtensionFieldElement
byte
-array representation of this instance.toByteArray
in interface ExtensionFieldElement
toByteArray
in interface GenericFieldElement
byte
-array representationCopyright © 2011–2022 Stiftung SIC. All rights reserved.