public interface Field extends GenericField
FieldElement
,
BinaryField
,
PrimeField
equals, exponentiate, getBaseField, getCardinality, getFieldType, hashCode, invertElements, toElement
getFieldSize
FieldElement negate(GenericFieldElement a)
GenericField
a
, i.e. performs the operation b = -b
.negate
in interface GenericField
a
- the field elementa
FieldElement negateOutOfPlace(GenericFieldElement a)
GenericField
a
, i.e. performs the operation b = -b
,
where a new object holding the result is created.negateOutOfPlace
in interface GenericField
a
- the field elementa
FieldElement add(GenericFieldElement a, GenericFieldElement b)
GenericField
b
to a
, i.e. performs the operation
a += b
.add
in interface GenericField
a
- the first addendb
- the second addenda
and b
FieldElement subtract(GenericFieldElement a, GenericFieldElement b)
GenericField
b
from a
, i.e. performs the operation
a -= b
.subtract
in interface GenericField
a
- the minuendb
- the subtrahenda
and b
FieldElement multiply(GenericFieldElement a, GenericFieldElement b)
GenericField
a
by b
, i.e. performs the operation
a *= b
.multiply
in interface GenericField
a
- the first factorb
- the second factora
and b
FieldElement multiplyOutOfPlace(GenericFieldElement a, GenericFieldElement b)
GenericField
a
by b
, i.e. performs the operation
a *= b
, where a new object holding the result is created.multiplyOutOfPlace
in interface GenericField
a
- the first factorb
- the second factora
and b
FieldElement multiply(GenericFieldElement a, BigInteger n)
GenericField
a
by n
, i.e. performs the operation
a *= n
.multiply
in interface GenericField
a
- the first factorn
- the second factora
and n
FieldElement multiplyOutOfPlace(GenericFieldElement a, BigInteger n)
GenericField
a
by n
, i.e. performs the operation
a *= n
, where a new object holding the result is created.multiplyOutOfPlace
in interface GenericField
a
- the first factorn
- the second factora
and n
FieldElement divide(GenericFieldElement a, GenericFieldElement b)
GenericField
a
by b
, i.e. performs the operation
a /= b
.divide
in interface GenericField
a
- the dividendb
- the divisora
and b
FieldElement invert(GenericFieldElement a)
GenericField
a
, i.e. performs the operation
a = a^(-1)
.invert
in interface GenericField
a
- the field elementa
FieldElement square(GenericFieldElement a)
GenericField
a
, i.e. performs the operation a *= a
.square
in interface GenericField
a
- the field elementa
FieldElement squareOutOfPlace(GenericFieldElement a)
GenericField
a
, i.e. performs the operation a*a
,
where a new object holding the result is created.squareOutOfPlace
in interface GenericField
a
- the field elementa
FieldElement exponentiate(GenericFieldElement a, BigInteger n)
GenericField
a
to the power n
, i.e. performs the
operation a = a^n
.exponentiate
in interface GenericField
a
- the field elementn
- the exponentn
th power of
a
FieldElement exponentiateByPowerOf2(GenericFieldElement a, int n)
GenericField
a
to the power 2n
.exponentiateByPowerOf2
in interface GenericField
a
- the field elementn
- the exponentFieldElement getOne()
GenericField
getOne
in interface GenericField
FieldElement getZero()
GenericField
getZero
in interface GenericField
FieldElement squareRoot(FieldElement a)
a
- the field elementa
FieldElement newElement(BigInteger b)
BigInteger
representation.b
- the BigInteger
FieldElement newElement(byte[] b)
byte[]
.newElement
in interface GenericField
b
- the element encoded as byte[]
in little-endian orderiaik.asn1.SEQUENCE toASN1Object()
byte[] toByteArray(FieldElement a)
byte[]
representation.a
- the field elementbyte[]
Copyright © 2011–2022 Stiftung SIC. All rights reserved.