public interface IntegerModuloP
ImmutableIntegerModuloP,
MutableIntegerModuloP| Modifier and Type | Interface and Description |
|---|---|
static interface |
IntegerModuloP.MultiplicativeInverser |
| Modifier and Type | Method and Description |
|---|---|
ImmutableIntegerModuloP |
add(IntegerModuloP b)
Add this field element with the supplied element and return the result.
|
ImmutableIntegerModuloP |
additiveInverse()
Compute the additive inverse of the field element
|
void |
addModPowerTwo(IntegerModuloP b,
byte[] result)
Perform an addition modulo a power of two and store the little-endian
encoding of the result in the supplied array.
|
default byte[] |
addModPowerTwo(IntegerModuloP b,
int len)
Perform an addition modulo a power of two and return the little-endian
encoding of the result.
|
java.math.BigInteger |
asBigInteger()
Get the canonical value of this element as a BigInteger.
|
void |
asByteArray(byte[] result)
Places the little-endian encoding of this' % 2^(8 * result.length)
into the supplied array, where this' is the canonical integer value
equivalent to this.
|
default byte[] |
asByteArray(int len)
Returns the little-endian encoding of this' % 2^(8 * len), where this'
is the canonical integer value equivalent to this.
|
ImmutableIntegerModuloP |
fixed()
Return this value as a fixed (immutable) element.
|
IntegerFieldModuloP |
getField()
Get the field associated with this element.
|
default ImmutableIntegerModuloP |
multiplicativeInverse()
Compute the multiplicative inverse of this field element.
|
ImmutableIntegerModuloP |
multiply(IntegerModuloP b)
Multiply this field element with the supplied element and return the
result.
|
MutableIntegerModuloP |
mutable()
Return this value as a mutable element.
|
default ImmutableIntegerModuloP |
pow(java.math.BigInteger b)
Calculate the power this^b and return the result.
|
default ImmutableIntegerModuloP |
square()
Calculate the square of this element and return the result.
|
default ImmutableIntegerModuloP |
subtract(IntegerModuloP b)
Subtract the supplied element from this one and return the result.
|
IntegerFieldModuloP getField()
java.math.BigInteger asBigInteger()
ImmutableIntegerModuloP fixed()
MutableIntegerModuloP mutable()
ImmutableIntegerModuloP add(IntegerModuloP b)
b - the sumandImmutableIntegerModuloP additiveInverse()
ImmutableIntegerModuloP multiply(IntegerModuloP b)
b - the multiplicanddefault byte[] addModPowerTwo(IntegerModuloP b, int len)
b - the sumandlen - the length of the desired arrayvoid addModPowerTwo(IntegerModuloP b, byte[] result)
b - the sumandresult - an array which stores the result upon returndefault byte[] asByteArray(int len)
len - the length of the desired arrayvoid asByteArray(byte[] result)
result - an array which stores the result upon returndefault ImmutableIntegerModuloP multiplicativeInverse()
default ImmutableIntegerModuloP subtract(IntegerModuloP b)
b - the subtrahenddefault ImmutableIntegerModuloP square()
default ImmutableIntegerModuloP pow(java.math.BigInteger b)
b - the exponent