public interface GenericField extends ECField
GenericFieldElement
,
BinaryField
,
PrimeField
getFieldSize
GenericFieldElement negate(GenericFieldElement a)
a
, i.e. performs the operation b = -b
.a
- the field elementa
GenericFieldElement negateOutOfPlace(GenericFieldElement a)
a
, i.e. performs the operation b = -b
,
where a new object holding the result is created.a
- the field elementa
GenericFieldElement add(GenericFieldElement a, GenericFieldElement b)
b
to a
, i.e. performs the operation
a += b
.a
- the first addendb
- the second addenda
and b
GenericFieldElement subtract(GenericFieldElement a, GenericFieldElement b)
b
from a
, i.e. performs the operation
a -= b
.a
- the minuendb
- the subtrahenda
and b
GenericFieldElement multiply(GenericFieldElement a, GenericFieldElement b)
a
by b
, i.e. performs the operation
a *= b
.a
- the first factorb
- the second factora
and b
GenericFieldElement 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 b
GenericFieldElement multiply(GenericFieldElement a, BigInteger n)
a
by n
, i.e. performs the operation
a *= n
.a
- the first factorn
- the second factora
and n
GenericFieldElement 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 n
GenericFieldElement divide(GenericFieldElement a, GenericFieldElement b)
a
by b
, i.e. performs the operation
a /= b
.a
- the dividendb
- the divisora
and b
GenericFieldElement invert(GenericFieldElement a)
a
, i.e. performs the operation
a = a^(-1)
.a
- the field elementa
GenericFieldElement[] invertElements(GenericFieldElement[] elements)
elements
- the array of field elementsGenericFieldElement square(GenericFieldElement a)
a
, i.e. performs the operation a *= a
.a
- the field elementa
GenericFieldElement squareOutOfPlace(GenericFieldElement a)
a
, i.e. performs the operation a*a
,
where a new object holding the result is created.a
- the field elementa
GenericFieldElement exponentiate(GenericFieldElement a, BigInteger n)
a
to the power n
, i.e. performs the
operation a = a^n
.a
- the field elementn
- the exponentn
th power of
a
GenericFieldElement exponentiate(GenericFieldElement a, int n)
a
to the power n
, i.e. performs the
operation a = a^n
.a
- the field elementn
- the exponentn
th power of
a
GenericFieldElement 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.