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, toElementequals, exponentiate, getCardinality, getFieldType, hashCode, invertElements, multiplyOutOfPlace, multiplyOutOfPlace, negateOutOfPlace, squareOutOfPlacegetFieldSizeint getDepth()
int getDegree()
this over its subfield.int getDegreeOverBaseField()
this over its base field.ExtensionFieldElement negate(GenericFieldElement a)
GenericFielda, i.e. performs the operation b = -b.negate in interface GenericFieldnegate in interface PrimeCharacteristicFielda - the field elementaExtensionFieldElement add(GenericFieldElement a, GenericFieldElement b)
GenericFieldb to a, i.e. performs the operation
a += b.add in interface GenericFieldadd in interface PrimeCharacteristicFielda - the first addendb - the second addenda and bExtensionFieldElement subtract(GenericFieldElement a, GenericFieldElement b)
GenericFieldb from a, i.e. performs the operation
a -= b.subtract in interface GenericFieldsubtract in interface PrimeCharacteristicFielda - the minuendb - the subtrahenda and bExtensionFieldElement multiply(GenericFieldElement a, GenericFieldElement b)
GenericFielda by b, i.e. performs the operation
a *= b.multiply in interface GenericFieldmultiply in interface PrimeCharacteristicFielda - the first factorb - the second factora and bExtensionFieldElement multiply(GenericFieldElement a, BigInteger n)
GenericFielda by n, i.e. performs the operation
a *= n.multiply in interface GenericFieldmultiply in interface PrimeCharacteristicFielda - the first factorn - the second factora and nExtensionFieldElement 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)
GenericFielda by b, i.e. performs the operation
a /= b.divide in interface GenericFielddivide in interface PrimeCharacteristicFielda - the dividendb - the divisora and bExtensionFieldElement divideBy2(PrimeCharacteristicFieldElement a)
PrimeCharacteristicFielda by 2.divideBy2 in interface PrimeCharacteristicFielda - the dividenda and 2.ExtensionFieldElement conjugate(ExtensionFieldElement b)
b - the element to be conjugatedbExtensionFieldElement 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)
GenericFielda, i.e. performs the operation
a = a^(-1).invert in interface GenericFieldinvert in interface PrimeCharacteristicFielda - the field elementaExtensionFieldElement square(GenericFieldElement a)
GenericFielda, i.e. performs the operation a *= a.square in interface GenericFieldsquare in interface PrimeCharacteristicFielda - the field elementaExtensionFieldElement exponentiate(GenericFieldElement a, BigInteger n)
GenericFielda to the power n, i.e. performs the
operation a = a^n.exponentiate in interface GenericFieldexponentiate in interface PrimeCharacteristicFielda - the field elementn - the exponentnth power of
aExtensionFieldElement 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)
GenericFielda to the power 2n.exponentiateByPowerOf2 in interface GenericFieldexponentiateByPowerOf2 in interface PrimeCharacteristicFielda - 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 elementaExtensionFieldElement getOne()
GenericFieldgetOne in interface GenericFieldgetOne in interface PrimeCharacteristicFieldExtensionFieldElement getZero()
GenericFieldgetZero in interface GenericFieldgetZero in interface PrimeCharacteristicFieldAbstractPrimeField getBaseField()
GenericFieldgetBaseField in interface GenericFieldExtensionField 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)
GenericFieldbyte-array representation.newElement in interface GenericFieldnewElement in interface PrimeCharacteristicFieldbytes - 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 thisExtensionFieldElement newElementFromSubField(PrimeCharacteristicFieldElement a)
this.a - a sub field elementa as element of thisExtensionFieldElement getUniformlyRandomElement()
PrimeCharacteristicFieldgetUniformlyRandomElement in interface PrimeCharacteristicFieldExtensionFieldElement getUniformlyRandomNonZeroElement()
PrimeCharacteristicFieldgetUniformlyRandomNonZeroElement in interface PrimeCharacteristicFieldCopyright © 2011–2022 Stiftung SIC. All rights reserved.