APIdia Launch Partner
Top Description Inners Fields Constructors Methods
sun.security.util.math.intpoly

public abstract sealed Class IntegerPolynomial

extends Object
implements IntegerFieldModuloP
permits IntegerPolynomial1305, IntegerPolynomial25519, IntegerPolynomial448, IntegerPolynomialP256, MontgomeryIntegerPolynomialP256, IntegerPolynomialP384, IntegerPolynomialP521, IntegerPolynomialModBinP, P256OrderField, P384OrderField, P521OrderField, Curve25519OrderField, Curve448OrderField
Class Inheritance
All Implemented Interfaces
sun.security.util.math.IntegerFieldModuloP
Known Direct Subclasses
sun.security.util.math.intpoly.IntegerPolynomial1305, sun.security.util.math.intpoly.IntegerPolynomial25519, sun.security.util.math.intpoly.IntegerPolynomialModBinP, sun.security.util.math.intpoly.MontgomeryIntegerPolynomialP256, sun.security.util.math.intpoly.Curve25519OrderField, sun.security.util.math.intpoly.Curve448OrderField, sun.security.util.math.intpoly.IntegerPolynomial448, sun.security.util.math.intpoly.IntegerPolynomialP256, sun.security.util.math.intpoly.IntegerPolynomialP384, sun.security.util.math.intpoly.IntegerPolynomialP521, sun.security.util.math.intpoly.P256OrderField, sun.security.util.math.intpoly.P384OrderField, sun.security.util.math.intpoly.P521OrderField
Imports
sun.security.util.math.*, java.math.BigInteger, java.nio.ByteBuffer, .ByteOrder, java.util.Arrays, jdk.internal.vm.annotation.ForceInline, .IntrinsicCandidate

A large number polynomial representation using sparse limbs of signed long (64-bit) values. Limb values will always fit within a long, so inputs to multiplication must be less than 32 bits. The following element operations are branch-free for all subclasses: fixed mutable add additiveInverse multiply square subtract conditionalSwapWith setValue (may branch on high-order byte parameter only) setSum setDifference setProduct setSquare addModPowerTwo asByteArray All other operations may branch in some subclasses.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private abstract class
pack-priv class
pack-priv static class
protected class

Field Summary

Modifier and TypeField and Description
protected final int
private final int
private final int
private final BigInteger
protected final int
private final long[]
protected static final BigInteger

Constructor Summary

AccessConstructor and Description
pack-priv
IntegerPolynomial(int bitsPerLimb, int numLimbs, int maxAddsMul, BigInteger modulus)

Method Summary

Modifier and TypeMethod and Description
protected void
addLimbs(long[] a, long[] b, long[] dst)

Add two IntegerPolynomial representations (a and b) and store the result in an IntegerPolynomialRepresentation (dst).

protected void
addLimbsModPowerTwo(long[] limbs, long[] other, byte[] result)

Add the reduced number corresponding to limbs and other, and store the low-order bytes of the sum in result.

protected void
carry(long[] limbs, int start, int end)

protected void
carry(long[] limbs)

protected long
carryOut(long[] limbs, int index)

Carry out of the specified position and return the carry value.

protected long
carryValue(long x)

protected static void
conditionalAssign(int set, long[] a, long[] b)

Branch-free conditional assignment of b to a.

protected static void
conditionalSwap(int swap, long[] a, long[] b)

Branch-free conditional swap of a and b.

protected void
decode(long[] v, byte[] dst, int offset, int length)

Decode the value in v and store it in dst.

protected void
encode(ByteBuffer buf, int length, byte highByte, long[] result)

This version of encode takes a ByteBuffer that is properly ordered, and may extract larger values (e.g. long) from the ByteBuffer for better performance.

protected void
encode(byte[] v, int offset, int length, byte highByte, long[] result)

protected void
encodeSmall(ByteBuffer buf, int length, byte highByte, long[] result)

protected BigInteger
evaluate(long[] limbs)

protected abstract void
finalCarryReduceLast(long[] limbs)

Carry out of the last limb and reduce back in. This method will be called as part of the "finalReduce" operation that puts the representation into a fully-reduced form.

protected void
finalReduce(long[] limbs)

Convert reduced limbs into a number between 0 and MODULUS-1.

public IntegerPolynomial.ImmutableElement
get0()

Implements sun.security.util.math.IntegerFieldModuloP.get0.

Get the additive identity element 0

public IntegerPolynomial.ImmutableElement
get1()

Implements sun.security.util.math.IntegerFieldModuloP.get1.

Get the multiplicative identity element 1

public IntegerPolynomial.ImmutableElement
getElement(BigInteger v)

Implements sun.security.util.math.IntegerFieldModuloP.getElement.

Get the field element equivalent to the supplied BigInteger value.

public IntegerPolynomial.ImmutableElement
getElement(byte[] v, int offset, int length, byte highByte)

Implements sun.security.util.math.IntegerFieldModuloP.getElement.

Get a field element from a little-endian unsigned integer stored at the specified position in an array.

public int
protected int
public BigInteger
getSize()

Implements sun.security.util.math.IntegerFieldModuloP.getSize.

Get the size of the field as a BigInteger.

public SmallValue
getSmallValue(int value)

Implements sun.security.util.math.IntegerFieldModuloP.getSmallValue.

Get a "small" value according to this implementation.

protected void
limbsToByteArray(long[] limbs, byte[] result)

Stores the reduced, little-endian value of limbs in result.

protected abstract void
mult(long[] a, long[] b, long[] r)

Multiply two IntegerPolynomial representations (a and b) and store the result in an IntegerPolynomial representation (r).

protected void
multByInt(long[] a, long b)

Multiply an IntegerPolynomial representation (a) with a long (b) and store the result in an IntegerPolynomial representation in a.

protected void
postEncodeCarry(long[] v)

protected abstract void
reduce(long[] a)

Reduce an IntegerPolynomial representation (a) and store the result in a.

private void
reduceHigh(long[] limbs)

protected abstract void
reduceIn(long[] c, long v, int i)

private void
setLimbsValue(BigInteger v, long[] limbs)

protected void
private long[]
protected abstract void
square(long[] a, long[] r)

Multiply an IntegerPolynomial representation (a) with itself and store the result in an IntegerPolynomialRepresentation (r).

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bitsPerLimbback to summary
protected final int bitsPerLimb
maxAddsAddback to summary
private final int maxAddsAdd
maxAddsMulback to summary
private final int maxAddsMul
modulusback to summary
private final BigInteger modulus
numLimbsback to summary
protected final int numLimbs
posModLimbsback to summary
private final long[] posModLimbs
TWOback to summary
protected static final BigInteger TWO

Constructor Detail

IntegerPolynomialback to summary
pack-priv IntegerPolynomial(int bitsPerLimb, int numLimbs, int maxAddsMul, BigInteger modulus)

Method Detail

addLimbsback to summary
protected void addLimbs(long[] a, long[] b, long[] dst)

Add two IntegerPolynomial representations (a and b) and store the result in an IntegerPolynomialRepresentation (dst). Requires that a.length == b.length == dst.length. It is allowed for a and dst to be the same array.

addLimbsModPowerTwoback to summary
protected void addLimbsModPowerTwo(long[] limbs, long[] other, byte[] result)

Add the reduced number corresponding to limbs and other, and store the low-order bytes of the sum in result. Requires that limbs.length==other.length. The result array may have any length.

carryback to summary
protected void carry(long[] limbs, int start, int end)
carryback to summary
protected void carry(long[] limbs)
carryOutback to summary
protected long carryOut(long[] limbs, int index)

Carry out of the specified position and return the carry value.

carryValueback to summary
protected long carryValue(long x)
conditionalAssignback to summary
protected static void conditionalAssign(int set, long[] a, long[] b)

Branch-free conditional assignment of b to a. Requires that set is 0 or 1, and that a.length == b.length. If set==0, then the values of a and b will be unchanged. If set==1, then the values of b will be assigned to a. The behavior is undefined if swap has any value other than 0 or 1.

Annotations
@ForceInline
@IntrinsicCandidate
conditionalSwapback to summary
protected static void conditionalSwap(int swap, long[] a, long[] b)

Branch-free conditional swap of a and b. Requires that swap is 0 or 1, and that a.length == b.length. If swap==0, then the values of a and b will be unchanged. If swap==1, then the values of a and b will be swapped. The behavior is undefined if swap has any value other than 0 or 1.

decodeback to summary
protected void decode(long[] v, byte[] dst, int offset, int length)

Decode the value in v and store it in dst. Requires that v is final reduced. I.e. all limbs in [0, 2^bitsPerLimb) and value in [0, modulus).

encodeback to summary
protected void encode(ByteBuffer buf, int length, byte highByte, long[] result)

This version of encode takes a ByteBuffer that is properly ordered, and may extract larger values (e.g. long) from the ByteBuffer for better performance. The implementation below only extracts bytes from the buffer, but this method may be overridden in field-specific implementations.

encodeback to summary
protected void encode(byte[] v, int offset, int length, byte highByte, long[] result)
encodeSmallback to summary
protected void encodeSmall(ByteBuffer buf, int length, byte highByte, long[] result)
evaluateback to summary
protected BigInteger evaluate(long[] limbs)
finalCarryReduceLastback to summary
protected abstract void finalCarryReduceLast(long[] limbs)

Carry out of the last limb and reduce back in. This method will be called as part of the "finalReduce" operation that puts the representation into a fully-reduced form. It is representation- specific, because representations have different amounts of empty space in the high-order limb. Requires that limbs.length=numLimbs.

finalReduceback to summary
protected void finalReduce(long[] limbs)

Convert reduced limbs into a number between 0 and MODULUS-1. Requires that limbs.length == numLimbs. This method only works if the modulus has at most three terms.

get0back to summary
public IntegerPolynomial.ImmutableElement get0()

Implements sun.security.util.math.IntegerFieldModuloP.get0.

Doc from sun.security.util.math.IntegerFieldModuloP.get0.

Get the additive identity element 0

Annotations
@Override
get1back to summary
public IntegerPolynomial.ImmutableElement get1()

Implements sun.security.util.math.IntegerFieldModuloP.get1.

Doc from sun.security.util.math.IntegerFieldModuloP.get1.

Get the multiplicative identity element 1

Annotations
@Override
getElementback to summary
public IntegerPolynomial.ImmutableElement getElement(BigInteger v)

Implements sun.security.util.math.IntegerFieldModuloP.getElement.

Doc from sun.security.util.math.IntegerFieldModuloP.getElement.

Get the field element equivalent to the supplied BigInteger value. The supplied value may be negative or larger than the modulus that defines the field.

Annotations
@Override
getElementback to summary
public IntegerPolynomial.ImmutableElement getElement(byte[] v, int offset, int length, byte highByte)

Implements sun.security.util.math.IntegerFieldModuloP.getElement.

Doc from sun.security.util.math.IntegerFieldModuloP.getElement.

Get a field element from a little-endian unsigned integer stored at the specified position in an array. The supplied value may be larger than the modulus that defines the field. This method also takes a byte which is interpreted as an additional high-order byte of the number. The array will not be modified.

getMaxAddsback to summary
public int getMaxAdds()
getNumLimbsback to summary
protected int getNumLimbs()
getSizeback to summary
public BigInteger getSize()

Implements sun.security.util.math.IntegerFieldModuloP.getSize.

Doc from sun.security.util.math.IntegerFieldModuloP.getSize.

Get the size of the field as a BigInteger. This size is equal to the prime modulus used to construct the field.

Annotations
@Override
getSmallValueback to summary
public SmallValue getSmallValue(int value)

Implements sun.security.util.math.IntegerFieldModuloP.getSmallValue.

Doc from sun.security.util.math.IntegerFieldModuloP.getSmallValue.

Get a "small" value according to this implementation. This value may be used in optimized forms of some operations to avoid unnecessary calculations. For example, multiplication is much faster when it is known that one of the numbers fits within a single limb. The definition of "small", and the range of accepted values, is implementation-specific.

Annotations
@Override
limbsToByteArrayback to summary
protected void limbsToByteArray(long[] limbs, byte[] result)

Stores the reduced, little-endian value of limbs in result.

multback to summary
protected abstract void mult(long[] a, long[] b, long[] r)

Multiply two IntegerPolynomial representations (a and b) and store the result in an IntegerPolynomial representation (r). Requires that a.length == b.length == r.length == numLimbs. It is allowed for a and r to be the same array.

multByIntback to summary
protected void multByInt(long[] a, long b)

Multiply an IntegerPolynomial representation (a) with a long (b) and store the result in an IntegerPolynomial representation in a. Requires that a.length == numLimbs.

postEncodeCarryback to summary
protected void postEncodeCarry(long[] v)
reduceback to summary
protected abstract void reduce(long[] a)

Reduce an IntegerPolynomial representation (a) and store the result in a. Requires that a.length == numLimbs.

reduceHighback to summary
private void reduceHigh(long[] limbs)
reduceInback to summary
protected abstract void reduceIn(long[] c, long v, int i)
setLimbsValueback to summary
private void setLimbsValue(BigInteger v, long[] limbs)
setLimbsValuePositiveback to summary
protected void setLimbsValuePositive(BigInteger v, long[] limbs)
setPosModLimbsback to summary
private long[] setPosModLimbs()
squareback to summary
protected abstract void square(long[] a, long[] r)

Multiply an IntegerPolynomial representation (a) with itself and store the result in an IntegerPolynomialRepresentation (r). Requires that a.length == r.length == numLimbs. It is allowed for a and r to be the same array.

sun.security.util.math.intpoly back to summary

private abstract Class IntegerPolynomial.Element

extends Object
implements IntegerModuloP
Class Inheritance
All Implemented Interfaces
sun.security.util.math.IntegerModuloP
Known Direct Subclasses
sun.security.util.math.intpoly.IntegerPolynomial.MutableElement, sun.security.util.math.intpoly.IntegerPolynomial.ImmutableElement

Field Summary

Modifier and TypeField and Description
protected long[]
protected int

Constructor Summary

AccessConstructor and Description
public
public
Element(boolean v)

private
Element(long[] limbs, int numAdds)

Method Summary

Modifier and TypeMethod and Description
public IntegerPolynomial.ImmutableElement
add(IntegerModuloP genB)

Implements sun.security.util.math.IntegerModuloP.add.

Add this field element with the supplied element and return the result.

public IntegerPolynomial.ImmutableElement
additiveInverse()

Implements sun.security.util.math.IntegerModuloP.additiveInverse.

Compute the additive inverse of the field element

public void
addModPowerTwo(IntegerModuloP arg, byte[] result)

Implements sun.security.util.math.IntegerModuloP.addModPowerTwo.

Perform an addition modulo a power of two and store the little-endian encoding of the result in the supplied array.

public BigInteger
asBigInteger()

Implements sun.security.util.math.IntegerModuloP.asBigInteger.

Get the canonical value of this element as a BigInteger.

public void
asByteArray(byte[] result)

Implements sun.security.util.math.IntegerModuloP.asByteArray.

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.

protected long[]
cloneLow(long[] limbs)

protected void
copyLow(long[] limbs, long[] out)

public IntegerFieldModuloP
getField()

Implements sun.security.util.math.IntegerModuloP.getField.

Get the field associated with this element.

public long[]
getLimbs()

Implements sun.security.util.math.IntegerModuloP.getLimbs.

Break encapsulation, used for IntrinsicCandidate functions

public IntegerPolynomial.ImmutableElement
multiply(IntegerModuloP genB)

Implements sun.security.util.math.IntegerModuloP.multiply.

Multiply this field element with the supplied element and return the result.

public IntegerPolynomial.MutableElement
mutable()

Implements sun.security.util.math.IntegerModuloP.mutable.

Return this value as a mutable element.

private void
public IntegerPolynomial.ImmutableElement
square()

Overrides default sun.security.util.math.IntegerModuloP.square.

Calculate the square of this element and return the result.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

limbsback to summary
protected long[] limbs
numAddsback to summary
protected int numAdds

Constructor Detail

Elementback to summary
public Element(BigInteger v)
Elementback to summary
public Element(boolean v)
Elementback to summary
private Element(long[] limbs, int numAdds)

Method Detail

addback to summary
public IntegerPolynomial.ImmutableElement add(IntegerModuloP genB)

Implements sun.security.util.math.IntegerModuloP.add.

Doc from sun.security.util.math.IntegerModuloP.add.

Add this field element with the supplied element and return the result.

Annotations
@Override
additiveInverseback to summary
public IntegerPolynomial.ImmutableElement additiveInverse()

Implements sun.security.util.math.IntegerModuloP.additiveInverse.

Doc from sun.security.util.math.IntegerModuloP.additiveInverse.

Compute the additive inverse of the field element

Annotations
@Override
addModPowerTwoback to summary
public void addModPowerTwo(IntegerModuloP arg, byte[] result)

Implements sun.security.util.math.IntegerModuloP.addModPowerTwo.

Doc from sun.security.util.math.IntegerModuloP.addModPowerTwo.

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.

asBigIntegerback to summary
public BigInteger asBigInteger()

Implements sun.security.util.math.IntegerModuloP.asBigInteger.

Doc from sun.security.util.math.IntegerModuloP.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.

Annotations
@Override
asByteArrayback to summary
public void asByteArray(byte[] result)

Implements sun.security.util.math.IntegerModuloP.asByteArray.

Doc from sun.security.util.math.IntegerModuloP.asByteArray.

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.

cloneLowback to summary
protected long[] cloneLow(long[] limbs)
copyLowback to summary
protected void copyLow(long[] limbs, long[] out)
getFieldback to summary
public IntegerFieldModuloP getField()

Implements sun.security.util.math.IntegerModuloP.getField.

Doc from sun.security.util.math.IntegerModuloP.getField.

Get the field associated with this element.

Annotations
@Override
getLimbsback to summary
public long[] getLimbs()

Implements sun.security.util.math.IntegerModuloP.getLimbs.

Doc from sun.security.util.math.IntegerModuloP.getLimbs.

Break encapsulation, used for IntrinsicCandidate functions

multiplyback to summary
public IntegerPolynomial.ImmutableElement multiply(IntegerModuloP genB)

Implements sun.security.util.math.IntegerModuloP.multiply.

Doc from sun.security.util.math.IntegerModuloP.multiply.

Multiply this field element with the supplied element and return the result.

Annotations
@Override
mutableback to summary
public IntegerPolynomial.MutableElement mutable()

Implements sun.security.util.math.IntegerModuloP.mutable.

Doc from sun.security.util.math.IntegerModuloP.mutable.

Return this value as a mutable element. This method will always copy the underlying representation.

Annotations
@Override
setValueback to summary
private void setValue(BigInteger v)
squareback to summary
public IntegerPolynomial.ImmutableElement square()

Overrides default sun.security.util.math.IntegerModuloP.square.

Doc from sun.security.util.math.IntegerModuloP.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.

Annotations
@Override
sun.security.util.math.intpoly back to summary

pack-priv Class IntegerPolynomial.ImmutableElement

extends Element
implements ImmutableIntegerModuloP
Class Inheritance
All Implemented Interfaces
sun.security.util.math.ImmutableIntegerModuloP, sun.security.util.math.IntegerModuloP

Field Summary

Inherited from sun.security.util.math.intpoly.IntegerPolynomial.Element:
limbsnumAdds

Constructor Summary

AccessConstructor and Description
protected
protected
ImmutableElement(boolean v)

protected
ImmutableElement(long[] limbs, int numAdds)

Method Summary

Modifier and TypeMethod and Description
public IntegerPolynomial.ImmutableElement
fixed()

Implements sun.security.util.math.IntegerModuloP.fixed.

Return this value as a fixed (immutable) element.

Inherited from sun.security.util.math.intpoly.IntegerPolynomial.Element:
addadditiveInverseaddModPowerTwoasBigIntegerasByteArraycloneLowcopyLowgetFieldgetLimbsmultiplymutablesquare

Constructor Detail

ImmutableElementback to summary
protected ImmutableElement(BigInteger v)
ImmutableElementback to summary
protected ImmutableElement(boolean v)
ImmutableElementback to summary
protected ImmutableElement(long[] limbs, int numAdds)

Method Detail

fixedback to summary
public IntegerPolynomial.ImmutableElement fixed()

Implements sun.security.util.math.IntegerModuloP.fixed.

Doc from sun.security.util.math.IntegerModuloP.fixed.

Return this value as a fixed (immutable) element. This method will copy the underlying representation if the object is mutable.

Annotations
@Override
sun.security.util.math.intpoly back to summary

pack-priv Class IntegerPolynomial.Limb

extends Object
implements SmallValue
Class Inheritance
All Implemented Interfaces
sun.security.util.math.SmallValue

Field Summary

Modifier and TypeField and Description
pack-priv int

Constructor Summary

AccessConstructor and Description
pack-priv
Limb(int value)

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

valueback to summary
pack-priv int value

Constructor Detail

Limbback to summary
pack-priv Limb(int value)
sun.security.util.math.intpoly back to summary

protected Class IntegerPolynomial.MutableElement

extends Element
implements MutableIntegerModuloP
Class Inheritance
All Implemented Interfaces
sun.security.util.math.MutableIntegerModuloP, sun.security.util.math.IntegerModuloP

Field Summary

Inherited from sun.security.util.math.intpoly.IntegerPolynomial.Element:
limbsnumAdds

Constructor Summary

AccessConstructor and Description
protected
MutableElement(long[] limbs, int numAdds)

Method Summary

Modifier and TypeMethod and Description
public void
conditionalSet(IntegerModuloP b, int set)

Implements sun.security.util.math.MutableIntegerModuloP.conditionalSet.

Set this value to the value of b when set has the value 1.

public void
conditionalSwapWith(MutableIntegerModuloP b, int swap)

Implements sun.security.util.math.MutableIntegerModuloP.conditionalSwapWith.

Swap the value of this with the value of b when swap has the value 1.

public IntegerPolynomial.ImmutableElement
fixed()

Implements sun.security.util.math.IntegerModuloP.fixed.

Return this value as a fixed (immutable) element.

public IntegerPolynomial.MutableElement
setAdditiveInverse()

Implements sun.security.util.math.MutableIntegerModuloP.setAdditiveInverse.

Set the value of this element equal to 0 - this.

public IntegerPolynomial.MutableElement
setDifference(IntegerModuloP genB)

Implements sun.security.util.math.MutableIntegerModuloP.setDifference.

Set the value of this element equal to this - b.

public IntegerPolynomial.MutableElement
setProduct(IntegerModuloP genB)

Implements sun.security.util.math.MutableIntegerModuloP.setProduct.

Set the value of this element equal to this * b.

public IntegerPolynomial.MutableElement
setProduct(SmallValue v)

Implements sun.security.util.math.MutableIntegerModuloP.setProduct.

Set the value of this element equal to this * v. The argument is not modified.

public IntegerPolynomial.MutableElement
setSquare()

Implements sun.security.util.math.MutableIntegerModuloP.setSquare.

Set the value of this element equal to this * this.

public IntegerPolynomial.MutableElement
setSum(IntegerModuloP genB)

Implements sun.security.util.math.MutableIntegerModuloP.setSum.

Set the value of this element equal to this + b.

public IntegerPolynomial.MutableElement
setValue(IntegerModuloP v)

Implements sun.security.util.math.MutableIntegerModuloP.setValue.

Set the value of this element equal to the value of the supplied element.

public IntegerPolynomial.MutableElement
setValue(byte[] arr, int offset, int length, byte highByte)

Implements sun.security.util.math.MutableIntegerModuloP.setValue.

Set the value equal to the little-endian unsigned integer stored at the specified position in an array.

public IntegerPolynomial.MutableElement
setValue(ByteBuffer buf, int length, byte highByte)

Implements sun.security.util.math.MutableIntegerModuloP.setValue.

Set the value equal to the little-endian unsigned integer stored in a buffer.

Inherited from sun.security.util.math.intpoly.IntegerPolynomial.Element:
addadditiveInverseaddModPowerTwoasBigIntegerasByteArraycloneLowcopyLowgetFieldgetLimbsmultiplymutablesquare

Constructor Detail

MutableElementback to summary
protected MutableElement(long[] limbs, int numAdds)

Method Detail

conditionalSetback to summary
public void conditionalSet(IntegerModuloP b, int set)

Implements sun.security.util.math.MutableIntegerModuloP.conditionalSet.

Doc from sun.security.util.math.MutableIntegerModuloP.conditionalSet.

Set this value to the value of b when set has the value 1. No change is made to this element when set has the value 0. The result is undefined when set has a value other than 0 or 1. The set parameter is an int (rather than boolean) to allow the implementation to perform the assignment using branch-free integer arithmetic.

Annotations
@Override
conditionalSwapWithback to summary
public void conditionalSwapWith(MutableIntegerModuloP b, int swap)

Implements sun.security.util.math.MutableIntegerModuloP.conditionalSwapWith.

Doc from sun.security.util.math.MutableIntegerModuloP.conditionalSwapWith.

Swap the value of this with the value of b when swap has the value 1. No change is made to either element when swap has the value 0. The result is undefined when swap has a value other than 0 or 1. The swap parameter is an int (rather than boolean) to allow the implementation to perform the swap using branch-free integer arithmetic.

Annotations
@Override
fixedback to summary
public IntegerPolynomial.ImmutableElement fixed()

Implements sun.security.util.math.IntegerModuloP.fixed.

Doc from sun.security.util.math.IntegerModuloP.fixed.

Return this value as a fixed (immutable) element. This method will copy the underlying representation if the object is mutable.

Annotations
@Override
setAdditiveInverseback to summary
public IntegerPolynomial.MutableElement setAdditiveInverse()

Implements sun.security.util.math.MutableIntegerModuloP.setAdditiveInverse.

Doc from sun.security.util.math.MutableIntegerModuloP.setAdditiveInverse.

Set the value of this element equal to 0 - this.

Annotations
@Override
setDifferenceback to summary
public IntegerPolynomial.MutableElement setDifference(IntegerModuloP genB)

Implements sun.security.util.math.MutableIntegerModuloP.setDifference.

Doc from sun.security.util.math.MutableIntegerModuloP.setDifference.

Set the value of this element equal to this - b. The argument is not modified.

Annotations
@Override
setProductback to summary
public IntegerPolynomial.MutableElement setProduct(IntegerModuloP genB)

Implements sun.security.util.math.MutableIntegerModuloP.setProduct.

Doc from sun.security.util.math.MutableIntegerModuloP.setProduct.

Set the value of this element equal to this * b. The argument is not modified.

Annotations
@Override
setProductback to summary
public IntegerPolynomial.MutableElement setProduct(SmallValue v)

Implements sun.security.util.math.MutableIntegerModuloP.setProduct.

Doc from sun.security.util.math.MutableIntegerModuloP.setProduct.

Set the value of this element equal to this * v. The argument is not modified.

Annotations
@Override
setSquareback to summary
public IntegerPolynomial.MutableElement setSquare()

Implements sun.security.util.math.MutableIntegerModuloP.setSquare.

Doc from sun.security.util.math.MutableIntegerModuloP.setSquare.

Set the value of this element equal to this * this.

Annotations
@Override
setSumback to summary
public IntegerPolynomial.MutableElement setSum(IntegerModuloP genB)

Implements sun.security.util.math.MutableIntegerModuloP.setSum.

Doc from sun.security.util.math.MutableIntegerModuloP.setSum.

Set the value of this element equal to this + b. The argument is not modified.

Annotations
@Override
setValueback to summary
public IntegerPolynomial.MutableElement setValue(IntegerModuloP v)

Implements sun.security.util.math.MutableIntegerModuloP.setValue.

Doc from sun.security.util.math.MutableIntegerModuloP.setValue.

Set the value of this element equal to the value of the supplied element. The argument is not modified.

Annotations
@Override
setValueback to summary
public IntegerPolynomial.MutableElement setValue(byte[] arr, int offset, int length, byte highByte)

Implements sun.security.util.math.MutableIntegerModuloP.setValue.

Doc from sun.security.util.math.MutableIntegerModuloP.setValue.

Set the value equal to the little-endian unsigned integer stored at the specified position in an array. The range of accepted values is implementation-specific. This method also takes a byte which is interpreted as an additional high-order byte of the number.

Annotations
@Override
setValueback to summary
public IntegerPolynomial.MutableElement setValue(ByteBuffer buf, int length, byte highByte)

Implements sun.security.util.math.MutableIntegerModuloP.setValue.

Doc from sun.security.util.math.MutableIntegerModuloP.setValue.

Set the value equal to the little-endian unsigned integer stored in a buffer. The range of accepted values is implementation-specific. This method also takes a byte which is interpreted as an additional high-order byte of the number.

Annotations
@Override