public interface GenericField extends ECField
GenericFieldElement,
BinaryField,
PrimeFieldgetFieldSizeGenericFieldElement negate(GenericFieldElement a)
a, i.e. performs the operation b = -b.a - the field elementaGenericFieldElement negateOutOfPlace(GenericFieldElement a)
a, i.e. performs the operation b = -b,
where a new object holding the result is created.a - the field elementaGenericFieldElement add(GenericFieldElement a, GenericFieldElement b)
b to a, i.e. performs the operation
a += b.a - the first addendb - the second addenda and bGenericFieldElement subtract(GenericFieldElement a, GenericFieldElement b)
b from a, i.e. performs the operation
a -= b.a - the minuendb - the subtrahenda and bGenericFieldElement multiply(GenericFieldElement a, GenericFieldElement b)
a by b, i.e. performs the operation
a *= b.a - the first factorb - the second factora and bGenericFieldElement multiplyOutOfPlace(GenericFieldElement a, GenericFieldElement b)
a by b, i.e. performs the operation
a *= b, where a new object holding the result is created.a - the first factorb - the second factora and bGenericFieldElement multiply(GenericFieldElement a, BigInteger n)
a by n, i.e. performs the operation
a *= n.a - the first factorn - the second factora and nGenericFieldElement multiplyOutOfPlace(GenericFieldElement a, BigInteger n)
a by n, i.e. performs the operation
a *= n, where a new object holding the result is created.a - the first factorn - the second factora and nGenericFieldElement divide(GenericFieldElement a, GenericFieldElement b)
a by b, i.e. performs the operation
a /= b.a - the dividendb - the divisora and bGenericFieldElement invert(GenericFieldElement a)
a, i.e. performs the operation
a = a^(-1).a - the field elementaGenericFieldElement[] invertElements(GenericFieldElement[] elements)
elements - the array of field elementsGenericFieldElement square(GenericFieldElement a)
a, i.e. performs the operation a *= a.a - the field elementaGenericFieldElement squareOutOfPlace(GenericFieldElement a)
a, i.e. performs the operation a*a,
where a new object holding the result is created.a - the field elementaGenericFieldElement exponentiate(GenericFieldElement a, BigInteger n)
a to the power n, i.e. performs the
operation a = a^n.a - the field elementn - the exponentnth power of
aGenericFieldElement exponentiate(GenericFieldElement a, int n)
a to the power n, i.e. performs the
operation a = a^n.a - the field elementn - the exponentnth power of
aGenericFieldElement exponentiateByPowerOf2(GenericFieldElement a, int n)
a to the power 2n.a - the field elementn - the exponentGenericFieldElement getOne()
GenericFieldElement getZero()
GenericFieldElement newElement(byte[] bytes)
byte-array representation.bytes - the byte[] in little-endian orderGenericFieldElement toElement(byte[] bytes)
byte-array. Unlike
newElement(byte[]), this method does not assume the
input to be a valid encoding of a field element.bytes - a byte[] in little-endian orderBigInteger getCardinality()
BigInteger holding the cardinalityField getBaseField()
FieldTypes getFieldType()
Copyright © 2011–2022 Stiftung SIC. All rights reserved.