public interface ExtensionField extends PrimeCharacteristicField
FieldElement
,
BinaryField
,
PrimeField
Modifier and Type | Method and Description |
---|---|
ExtensionFieldElement |
add(GenericFieldElement a,
GenericFieldElement b)
Adds
b to a , i.e. |
ExtensionFieldElement |
applyFrobenius(ExtensionFieldElement a,
int i)
Compute the
i -th Frobenius of a . |
ExtensionFieldElement |
conjugate(ExtensionFieldElement b)
Conjugate an element.
|
ExtensionFieldElement |
conjugate(ExtensionFieldElement b,
int i)
Conjugate an element
i times. |
ExtensionFieldElement |
divide(GenericFieldElement a,
GenericFieldElement b)
Divides
a by b , i.e. |
ExtensionFieldElement |
divideBy2(PrimeCharacteristicFieldElement a)
Divides
a by 2. |
ExtensionFieldElement |
exponentiate(GenericFieldElement a,
BigInteger n)
Raises
a to the power n , i.e. |
ExtensionFieldElement |
exponentiateByPowerOf2(GenericFieldElement a,
int n)
Raises
a to the power 2n . |
AbstractPrimeField |
getBaseField()
Returns the base field of this field.
|
int |
getDegree()
Get extension degree of the extension field over its subfield.
|
int |
getDegreeOverBaseField()
Get extension degree of the extension field over the base field.
|
int |
getDepth()
Returns the depth of the tower, i.e., the number of nested fields.
|
PrimeFieldElement |
getNorm(ExtensionFieldElement a)
Computes the norm of an element, which is an element of the base field.
|
ExtensionFieldElement |
getOne()
Returns the one element.
|
ExtensionField |
getSubField()
Returns
null if the subfield equals the base field, and the
subfield otherwise. |
ExtensionFieldElement |
getUniformlyRandomElement()
Get a uniformly random prime field element.
|
ExtensionFieldElement |
getUniformlyRandomNonZeroElement()
Get a uniformly random, non-zero prime field element.
|
ExtensionFieldElement |
getZero()
Returns the zero element.
|
ExtensionFieldElement |
invert(GenericFieldElement a)
Inverts
a , i.e. |
ExtensionFieldElement |
multiply(ExtensionFieldElement a,
PrimeFieldElement b)
Multiply extension field element with a prime field element
|
ExtensionFieldElement |
multiply(GenericFieldElement a,
BigInteger n)
Multiplies
a by n , i.e. |
ExtensionFieldElement |
multiply(GenericFieldElement a,
GenericFieldElement b)
Multiplies
a by b , i.e. |
ExtensionFieldElement |
multiplyByAdjointRoot(ExtensionFieldElement a)
Multiply
a by the root used to obtain the extension field. |
ExtensionFieldElement |
negate(GenericFieldElement a)
Negates
a , i.e. |
ExtensionFieldElement |
newElement(byte[] bytes)
Create new field element from
byte -array representation. |
ExtensionFieldElement |
newElement(Object b)
Creates a new field element from its
BigInteger -array
representation. |
ExtensionFieldElement |
newElementFromBaseField(PrimeFieldElement a)
Converts a field element of the base field into an element of
this . |
ExtensionFieldElement |
newElementFromSubField(PrimeCharacteristicFieldElement a)
Converts a field element of the sub field into an element of
this . |
ExtensionFieldElement |
square(GenericFieldElement a)
Squares
a , i.e. |
ExtensionFieldElement |
squareRoot(ExtensionFieldElement a)
Return the square root (if it exists).
|
ExtensionFieldElement |
squareRoot(ExtensionFieldElement a,
boolean checkSquare)
Return the square root (if it exists).
|
ExtensionFieldElement |
subtract(GenericFieldElement a,
GenericFieldElement b)
Subtracts
b from a , i.e. |
Object |
toBigIntegers(ExtensionFieldElement a)
Converts a field element to its (multi-dimensional)
BigInteger
representation. |
addOutOfPlace, getQuadraticCharacter, multiplyBy2, multiplyBy2OutOfPlace, multiplyBy3, multiplyBy3OutOfPlace, multiplyByPowerOf2, multiplyByPowerOf2OutOfPlace, subtractOutOfPlace, toElement
equals, exponentiate, getCardinality, getFieldType, hashCode, invertElements, multiplyOutOfPlace, multiplyOutOfPlace, negateOutOfPlace, squareOutOfPlace
getFieldSize
int getDepth()
int getDegree()
this
over its subfield.int getDegreeOverBaseField()
this
over its base field.ExtensionFieldElement negate(GenericFieldElement a)
GenericField
a
, i.e. performs the operation b = -b
.negate
in interface GenericField
negate
in interface PrimeCharacteristicField
a
- the field elementa
ExtensionFieldElement add(GenericFieldElement a, GenericFieldElement b)
GenericField
b
to a
, i.e. performs the operation
a += b
.add
in interface GenericField
add
in interface PrimeCharacteristicField
a
- the first addendb
- the second addenda
and b
ExtensionFieldElement subtract(GenericFieldElement a, GenericFieldElement b)
GenericField
b
from a
, i.e. performs the operation
a -= b
.subtract
in interface GenericField
subtract
in interface PrimeCharacteristicField
a
- the minuendb
- the subtrahenda
and b
ExtensionFieldElement multiply(GenericFieldElement a, GenericFieldElement b)
GenericField
a
by b
, i.e. performs the operation
a *= b
.multiply
in interface GenericField
multiply
in interface PrimeCharacteristicField
a
- the first factorb
- the second factora
and b
ExtensionFieldElement multiply(GenericFieldElement a, BigInteger n)
GenericField
a
by n
, i.e. performs the operation
a *= n
.multiply
in interface GenericField
multiply
in interface PrimeCharacteristicField
a
- the first factorn
- the second factora
and n
ExtensionFieldElement multiply(ExtensionFieldElement a, PrimeFieldElement b)
a
- extension field elementb
- prime field elementa
multiplied by the adjoint root.ExtensionFieldElement multiplyByAdjointRoot(ExtensionFieldElement a)
a
by the root used to obtain the extension field.a
- extension field elementa
multiplied by the adjoint root.ExtensionFieldElement divide(GenericFieldElement a, GenericFieldElement b)
GenericField
a
by b
, i.e. performs the operation
a /= b
.divide
in interface GenericField
divide
in interface PrimeCharacteristicField
a
- the dividendb
- the divisora
and b
ExtensionFieldElement divideBy2(PrimeCharacteristicFieldElement a)
PrimeCharacteristicField
a
by 2.divideBy2
in interface PrimeCharacteristicField
a
- the dividenda
and 2.ExtensionFieldElement conjugate(ExtensionFieldElement b)
b
- the element to be conjugatedb
ExtensionFieldElement conjugate(ExtensionFieldElement b, int i)
i
times.b
- the element to be conjugatedi
- number of times the element should be conjugatedb
conjugated i
timesExtensionFieldElement invert(GenericFieldElement a)
GenericField
a
, i.e. performs the operation
a = a^(-1)
.invert
in interface GenericField
invert
in interface PrimeCharacteristicField
a
- the field elementa
ExtensionFieldElement square(GenericFieldElement a)
GenericField
a
, i.e. performs the operation a *= a
.square
in interface GenericField
square
in interface PrimeCharacteristicField
a
- the field elementa
ExtensionFieldElement exponentiate(GenericFieldElement a, BigInteger n)
GenericField
a
to the power n
, i.e. performs the
operation a = a^n
.exponentiate
in interface GenericField
exponentiate
in interface PrimeCharacteristicField
a
- the field elementn
- the exponentn
th power of
a
ExtensionFieldElement applyFrobenius(ExtensionFieldElement a, int i)
i
-th Frobenius of a
.a
- the element on which the Frobenius map should be applied.i
- number of times the Frobenius map should be applied.i
times to a
.ExtensionFieldElement exponentiateByPowerOf2(GenericFieldElement a, int n)
GenericField
a
to the power 2n
.exponentiateByPowerOf2
in interface GenericField
exponentiateByPowerOf2
in interface PrimeCharacteristicField
a
- the field elementn
- the exponentExtensionFieldElement squareRoot(ExtensionFieldElement a)
a
- the field elementa
if it exists, null otherwiseExtensionFieldElement squareRoot(ExtensionFieldElement a, boolean checkSquare)
a
- the field elementcheckSquare
- check if a
is a square. If true
, the
return value is undefined for non-squares.a
if it exists, null otherwisePrimeFieldElement getNorm(ExtensionFieldElement a)
a
- the field elementa
ExtensionFieldElement getOne()
GenericField
getOne
in interface GenericField
getOne
in interface PrimeCharacteristicField
ExtensionFieldElement getZero()
GenericField
getZero
in interface GenericField
getZero
in interface PrimeCharacteristicField
AbstractPrimeField getBaseField()
GenericField
getBaseField
in interface GenericField
ExtensionField getSubField()
null
if the subfield equals the base field, and the
subfield otherwise.null
if the subfield equals the base field, and the
subfield otherwise.ExtensionFieldElement newElement(Object b)
BigInteger
-array
representation. Every component in the canonical representation of the
field's elements corresponds to an array dimension, in ascending order.b
- the BigInteger[]
ExtensionFieldElement newElement(byte[] bytes)
GenericField
byte
-array representation.newElement
in interface GenericField
newElement
in interface PrimeCharacteristicField
bytes
- the byte[]
in little-endian orderObject toBigIntegers(ExtensionFieldElement a)
BigInteger
representation.a
- the field elementBigInteger
representationExtensionFieldElement newElementFromBaseField(PrimeFieldElement a)
this
.a
- a prime field elementa
as element of this
ExtensionFieldElement newElementFromSubField(PrimeCharacteristicFieldElement a)
this
.a
- a sub field elementa
as element of this
ExtensionFieldElement getUniformlyRandomElement()
PrimeCharacteristicField
getUniformlyRandomElement
in interface PrimeCharacteristicField
ExtensionFieldElement getUniformlyRandomNonZeroElement()
PrimeCharacteristicField
getUniformlyRandomNonZeroElement
in interface PrimeCharacteristicField
Copyright © 2011–2022 Stiftung SIC. All rights reserved.