ImmutableIntegerModuloP, MutableIntegerModuloP
| Modifier and Type | Class and Description |
|---|---|
| public static interface |
| Modifier and Type | Method and Description |
|---|---|
| public ImmutableIntegerModuloP | Returns: this + bthe sumand b)Add this field element with the supplied element and return the result. |
| public ImmutableIntegerModuloP | Returns: the addditiveInverse (0 - this)Compute the additive inverse of the field element |
| public default byte[] | Returns: a byte array of length len containing the resultthe sumand b, int the length of the desired array len)Perform an addition modulo a power of two and return the little-endian encoding of the result. |
| public void | addModPowerTwo(IntegerModuloP
the sumand b, byte[] an array which stores the result upon return result)Perform an addition modulo a power of two and store the little-endian encoding of the result in the supplied array. |
| public BigInteger | Returns: the value as a BigIntegerGet the canonical value of this element as a BigInteger. |
| public default byte[] | Returns: a byte array of length len containing the resultthe length of the desired array len)Returns the little-endian encoding of this' % 2^(8 * len), where this' is the canonical integer value equivalent to this. |
| public void | asByteArray(byte[]
an array which stores the result upon return 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. |
| public ImmutableIntegerModuloP | Returns: a fixed element with the same valueReturn this value as a fixed (immutable) element. |
| public IntegerFieldModuloP | |
| public long[] | |
| public default ImmutableIntegerModuloP | Returns: the multiplicative inverse (1 / this)Compute the multiplicative inverse of this field element. |
| public ImmutableIntegerModuloP | Returns: this * bthe multiplicand b)Multiply this field element with the supplied element and return the result. |
| public MutableIntegerModuloP | |
| public default ImmutableIntegerModuloP | Returns: the value of this^bthe exponent b)Calculate the power this^b and return the result. |
| public default ImmutableIntegerModuloP | Returns: the product (this * this)Calculate the square of this element and return the result. |
| public default ImmutableIntegerModuloP | Returns: the difference (this - b)the subtrahend b)Subtract the supplied element from this one and return the result. |
| add | back to summary |
|---|---|
| public ImmutableIntegerModuloP add(IntegerModuloP b) Add this field element with the supplied element and return the result.
| |
| additiveInverse | back to summary |
|---|---|
| public ImmutableIntegerModuloP additiveInverse() Compute the additive inverse of the field element
| |
| addModPowerTwo | back to summary |
|---|---|
| public default byte[] addModPowerTwo(IntegerModuloP b, int len) Perform an addition modulo a power of two and return the little-endian encoding of the result. The value is (this' + b') % 2^(8 * len), where this' and b' are the canonical integer values equivalent to this and b.
| |
| addModPowerTwo | back to summary |
|---|---|
| public 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. The value is (this' + b') % 2^(8 * result.length), where this' and b' are the canonical integer values equivalent to this and b.
| |
| asBigInteger | back to summary |
|---|---|
| public BigInteger asBigInteger() Get the canonical value of this element as a BigInteger. This value will always be in the range [0, p), where p is the prime that defines the field. This method performs reduction and other computation to produce the result.
| |
| asByteArray | back to summary |
|---|---|
| public 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.
| |
| asByteArray | back to summary |
|---|---|
| public 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.
| |
| fixed | back to summary |
|---|---|
| public ImmutableIntegerModuloP fixed() Return this value as a fixed (immutable) element. This method will copy the underlying representation if the object is mutable.
| |
| getField | back to summary |
|---|---|
| public IntegerFieldModuloP getField() Get the field associated with this element.
| |
| getLimbs | back to summary |
|---|---|
| public long[] getLimbs() Break encapsulation, used for IntrinsicCandidate functions | |
| multiplicativeInverse | back to summary |
|---|---|
| public default ImmutableIntegerModuloP multiplicativeInverse() Compute the multiplicative inverse of this field element.
| |
| multiply | back to summary |
|---|---|
| public ImmutableIntegerModuloP multiply(IntegerModuloP b) Multiply this field element with the supplied element and return the result.
| |
| mutable | back to summary |
|---|---|
| public MutableIntegerModuloP mutable() Return this value as a mutable element. This method will always copy the underlying representation.
| |
| pow | back to summary |
|---|---|
| public default ImmutableIntegerModuloP pow(BigInteger b) Calculate the power this^b and return the result.
| |
| square | back to summary |
|---|---|
| public default ImmutableIntegerModuloP square() Calculate the square of this element and return the result. This method should be used instead of a.multiply(a) because implementations may include optimizations that only apply to squaring.
| |
| subtract | back to summary |
|---|---|
| public default ImmutableIntegerModuloP subtract(IntegerModuloP b) Subtract the supplied element from this one and return the result.
| |
| Modifier and Type | Class and Description |
|---|---|
| public static class | |
| public static class | |
| public static class |
| Modifier and Type | Method and Description |
|---|---|
| public ImmutableIntegerModuloP | Returns: the multiplicative inverse (1 / imp)Compute the multiplicative inverse of |
| public static IntegerModuloP. |
| inverse | back to summary |
|---|---|
| public ImmutableIntegerModuloP inverse(IntegerModuloP imp) Compute the multiplicative inverse of
| |
| of | back to summary |
|---|---|
| public static IntegerModuloP. | |
| Modifier and Type | Field and Description |
|---|---|
| private final BigInteger |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public ImmutableIntegerModuloP | inverse(IntegerModuloP imp)
Implements sun. Compute the multiplicative inverse of |
| b | back to summary |
|---|---|
| private final BigInteger b | |
| Default | back to summary |
|---|---|
| pack-priv Default(BigInteger b) | |
| inverse | back to summary |
|---|---|
| public ImmutableIntegerModuloP inverse(IntegerModuloP imp) Implements sun. Doc from sun. Compute the multiplicative inverse of
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final IntegerModuloP. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public ImmutableIntegerModuloP | inverse(IntegerModuloP imp)
Implements sun. Compute the multiplicative inverse of |
| instance | back to summary |
|---|---|
| private static final IntegerModuloP. | |
| Secp256R1 | back to summary |
|---|---|
| public Secp256R1() | |
| inverse | back to summary |
|---|---|
| public ImmutableIntegerModuloP inverse(IntegerModuloP imp) Implements sun. Doc from sun. Compute the multiplicative inverse of
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final BigInteger | |
| private static final IntegerModuloP. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public ImmutableIntegerModuloP | inverse(IntegerModuloP imp)
Implements sun. Compute the multiplicative inverse of |
| b | back to summary |
|---|---|
| private static final BigInteger b | |
| instance | back to summary |
|---|---|
| private static final IntegerModuloP. | |
| Secp256R1Field | back to summary |
|---|---|
| public Secp256R1Field() | |
| inverse | back to summary |
|---|---|
| public ImmutableIntegerModuloP inverse(IntegerModuloP imp) Implements sun. Doc from sun. Compute the multiplicative inverse of
| |