public interface PrimeCharacteristicFieldElement extends GenericFieldElement
| Modifier and Type | Method and Description |
|---|---|
PrimeCharacteristicFieldElement |
add(GenericFieldElement b)
Adds
b to this. |
PrimeCharacteristicFieldElement |
addBase(GenericFieldElement b)
Adds
b to this where b is an element
of the underlying base field. |
PrimeCharacteristicFieldElement |
addOutOfPlace(GenericFieldElement b)
Adds two elements and returns a new object holding the result.
|
PrimeCharacteristicFieldElement |
addOutOfPlace(PrimeCharacteristicFieldElement b)
Adds two elements and returns a new object holding the result.
|
PrimeCharacteristicFieldElement |
clone()
Clones the value of this field element.
|
PrimeCharacteristicFieldElement |
divide(GenericFieldElement b)
Divides
this and another field elements. |
PrimeCharacteristicFieldElement |
divideBy2()
Divides
this by 2. |
PrimeCharacteristicFieldElement |
exponentiate(BigInteger n)
Raises
this to the power n. |
PrimeCharacteristicFieldElement |
exponentiate(int n)
Raises
this to the power n. |
PrimeCharacteristicFieldElement |
exponentiateByPowerOf2(int n)
Raise
this to the power of 2^n. |
int |
getQuadraticCharacter()
Implements a quadratic character, which returns -1,0,1 depending on whether
this is a quadratic non-residue, a multiple of the modulus, or
a quadratic residue. |
PrimeCharacteristicFieldElement |
invert()
Sets
this to its inverse. |
PrimeCharacteristicFieldElement |
multiply(BigInteger b)
Multiples
this by n. |
PrimeCharacteristicFieldElement |
multiply(GenericFieldElement b)
Multiplies
this with b which is an element of the
same field. |
PrimeCharacteristicFieldElement |
multiplyBy2()
Multiplies
this with 2. |
PrimeCharacteristicFieldElement |
multiplyBy2OutOfPlace()
Multiplies
this with 2 and returns a new object holding the
result. |
PrimeCharacteristicFieldElement |
multiplyBy3()
Multiplies
this with 3. |
PrimeCharacteristicFieldElement |
multiplyBy3OutOfPlace()
Multiplies
this with 3 and returns a new object holding the
result. |
PrimeCharacteristicFieldElement |
multiplyByBase(GenericFieldElement b)
Multiplies
this with b which is an element of the
base field. |
PrimeCharacteristicFieldElement |
multiplyByBaseOutOfPlace(GenericFieldElement b)
Multiplies
this with b which is an element of the
base field, where a new object holding the result is created. |
PrimeCharacteristicFieldElement |
multiplyByPowerOf2(int n)
Multiplies
this by 2^n. |
PrimeCharacteristicFieldElement |
multiplyByPowerOf2OutOfPlace(int n)
Multiplies
this by 2^n and returns a new object
holding the result. |
PrimeCharacteristicFieldElement |
multiplyOutOfPlace(BigInteger b)
Multiples
this by n, where a new object holding
the result is created. |
PrimeCharacteristicFieldElement |
multiplyOutOfPlace(GenericFieldElement b)
Multiplies
this with b which is an element of the
same field, where a new object holding the result is created. |
PrimeCharacteristicFieldElement |
negate()
Returns the negative of
this. |
PrimeCharacteristicFieldElement |
negateOutOfPlace()
Returns the negative of
this, where a new object holding the
result is created. |
PrimeCharacteristicFieldElement |
square()
Computes the square of
this in-place. |
PrimeCharacteristicFieldElement |
squareOutOfPlace()
Computes the square of
this, where a new object holding the
result is created. |
PrimeCharacteristicFieldElement |
squareRoot()
Computes the square root of
this in-place. |
PrimeCharacteristicFieldElement |
squareRoot(boolean checkSquare)
Computes the square root of
this. |
PrimeCharacteristicFieldElement |
subtract(GenericFieldElement b)
Subtracts
b from this. |
PrimeCharacteristicFieldElement |
subtractOutOfPlace(GenericFieldElement b)
Subtracts
b from this which is an element of the
base field, where a new object holding the result is created. |
PrimeCharacteristicFieldElement |
subtractOutOfPlace(PrimeCharacteristicFieldElement b)
Subtracts
b from this and returns a new object
holding the result. |
equals, exponentiateOutOfPlace, exponentiateOutOfPlace, getField, hashCode, isOne, isZero, toByteArray, toStringPrimeCharacteristicFieldElement multiplyBy2()
this with 2.this and 2PrimeCharacteristicFieldElement multiplyBy2OutOfPlace()
this with 2 and returns a new object holding the
result.this and 2PrimeCharacteristicFieldElement multiplyBy3()
this with 3.this and 3PrimeCharacteristicFieldElement multiplyBy3OutOfPlace()
this with 3 and returns a new object holding the
result.this and 3PrimeCharacteristicFieldElement multiplyByPowerOf2(int n)
this by 2^n.n - the exponentthis and 2^nPrimeCharacteristicFieldElement multiplyByPowerOf2OutOfPlace(int n)
this by 2^n and returns a new object
holding the result.n - the exponentthis and 2^nPrimeCharacteristicFieldElement divideBy2()
this by 2.this divided by 2.PrimeCharacteristicFieldElement add(GenericFieldElement b)
GenericFieldElementb to this. This functions works in-place.add in interface GenericFieldElementb - the second addendthis and bPrimeCharacteristicFieldElement addOutOfPlace(GenericFieldElement b)
addOutOfPlace in interface GenericFieldElementb - the other valuePrimeCharacteristicFieldElement addOutOfPlace(PrimeCharacteristicFieldElement b)
b - the other valuePrimeCharacteristicFieldElement multiply(GenericFieldElement b)
GenericFieldElementthis with b which is an element of the
same field.multiply in interface GenericFieldElementb - the second factorthis and bPrimeCharacteristicFieldElement multiply(BigInteger b)
GenericFieldElementthis by n.multiply in interface GenericFieldElementb - the factorthis and nPrimeCharacteristicFieldElement multiplyOutOfPlace(GenericFieldElement b)
GenericFieldElementthis with b which is an element of the
same field, where a new object holding the result is created.multiplyOutOfPlace in interface GenericFieldElementb - the second factorthis and bPrimeCharacteristicFieldElement multiplyOutOfPlace(BigInteger b)
GenericFieldElementthis by n, where a new object holding
the result is created.multiplyOutOfPlace in interface GenericFieldElementb - the factorthis and nPrimeCharacteristicFieldElement multiplyByBase(GenericFieldElement b)
GenericFieldElementthis with b which is an element of the
base field.multiplyByBase in interface GenericFieldElementb - the second factorthis and bPrimeCharacteristicFieldElement multiplyByBaseOutOfPlace(GenericFieldElement b)
GenericFieldElementthis with b which is an element of the
base field, where a new object holding the result is created.multiplyByBaseOutOfPlace in interface GenericFieldElementb - the second factorthis and bPrimeCharacteristicFieldElement square()
GenericFieldElementthis in-place.square in interface GenericFieldElementthisPrimeCharacteristicFieldElement squareOutOfPlace()
GenericFieldElementthis, where a new object holding the
result is created.squareOutOfPlace in interface GenericFieldElementthisPrimeCharacteristicFieldElement addBase(GenericFieldElement b)
GenericFieldElementb to this where b is an element
of the underlying base field.addBase in interface GenericFieldElementb - the second addendthis and bPrimeCharacteristicFieldElement exponentiate(BigInteger n)
GenericFieldElementthis to the power n.
Works in-place.exponentiate in interface GenericFieldElementn - the exponentnth power of thisPrimeCharacteristicFieldElement exponentiate(int n)
GenericFieldElementthis to the power n.
Works in-place.exponentiate in interface GenericFieldElementn - the exponentnth power of thisPrimeCharacteristicFieldElement exponentiateByPowerOf2(int n)
GenericFieldElementthis to the power of 2^n.exponentiateByPowerOf2 in interface GenericFieldElementn - the exponentn-th power of this.PrimeCharacteristicFieldElement subtract(GenericFieldElement b)
GenericFieldElementb from this. This functions works in-place.subtract in interface GenericFieldElementb - the subtrahendthis and bPrimeCharacteristicFieldElement subtractOutOfPlace(GenericFieldElement b)
GenericFieldElementb from this which is an element of the
base field, where a new object holding the result is created.subtractOutOfPlace in interface GenericFieldElementb - the second factorthis and bPrimeCharacteristicFieldElement subtractOutOfPlace(PrimeCharacteristicFieldElement b)
b from this and returns a new object
holding the result.b - the subtrahendthis and bPrimeCharacteristicFieldElement negate()
GenericFieldElementthis. This functions works in-place.negate in interface GenericFieldElementthisPrimeCharacteristicFieldElement negateOutOfPlace()
GenericFieldElementthis, where a new object holding the
result is created.negateOutOfPlace in interface GenericFieldElementthisPrimeCharacteristicFieldElement divide(GenericFieldElement b)
GenericFieldElementthis and another field elements.divide in interface GenericFieldElementb - the divisorthis and bPrimeCharacteristicFieldElement invert()
GenericFieldElementthis to its inverse.invert in interface GenericFieldElementthisPrimeCharacteristicFieldElement squareRoot()
GenericFieldElementthis in-place.squareRoot in interface GenericFieldElementthis or null if the
square root does not exist.PrimeCharacteristicFieldElement squareRoot(boolean checkSquare)
this.checkSquare - check if a is a square. If true, the
return value is undefined for non-squares.thisint getQuadraticCharacter()
this is a quadratic non-residue, a multiple of the modulus, or
a quadratic residue.(this/p)PrimeCharacteristicFieldElement clone()
GenericFieldElementclone in interface GenericFieldElementCopyright © 2011–2022 Stiftung SIC. All rights reserved.