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

public final Class IntegerPolynomial25519

extends IntegerPolynomial
Class Inheritance
Imports
java.math.BigInteger

Field Summary

Modifier and TypeField and Description
private static final int
private static final long
private static final long
private static final int
public static final BigInteger
private static final int
public static final IntegerPolynomial25519
Inherited from sun.security.util.math.intpoly.IntegerPolynomial:
bitsPerLimbnumLimbsTWO

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
protected void
carry(long[]
[in|out] the limbs for carry operation.
limbs
,
int
[in] the starting position of carry.
start
,
int
[in] the ending position of carry.
end
)

Overrides sun.security.util.math.intpoly.IntegerPolynomial.carry.

Carry from a range of limb positions.

protected void
carry(long[]
[in|out] the limbs for carry operation.
limbs
)

Overrides sun.security.util.math.intpoly.IntegerPolynomial.carry.

Carry operation for all limb positions.

private static BigInteger
protected void
finalCarryReduceLast(long[]
[in|out] the limbs to fully carry and reduce.
limbs
)

Implements abstract sun.security.util.math.intpoly.IntegerPolynomial.finalCarryReduceLast.

Carry from high order limb and reduce to the lower order limb.

protected void
mult(long[]
[in] the limb operand to multiply.
a
,
long[]
[in] the limb operand to multiply.
b
,
long[]
[out] the product of the limbs operands that is fully reduced.
r
)

Implements abstract sun.security.util.math.intpoly.IntegerPolynomial.mult.

Multiply two limbs using a high/low digit technique that allows for larger limb sizes.

protected void
multByInt(long[]
[in|out] the limbs to multiply a carry operation. 'a' is assumed to be reduced.
a
,
long
[in] the scalar value to be muliplied with the limbs.
b
)

Overrides sun.security.util.math.intpoly.IntegerPolynomial.multByInt.

Multiply limbs by scalar value.

protected void
reduce(long[]
[in|out] the limbs to carry and reduce.
limbs
)

Implements abstract sun.security.util.math.intpoly.IntegerPolynomial.reduce.

Carry in all positions and reduce high order limb.

protected void
reduceIn(long[]
[in|out] the limbs to reduce in.
limbs
,
long
[in] the digit to reduce to the lower limb.
v
,
int
[in] the limbs to reduce from.
i
)

Implements abstract sun.security.util.math.intpoly.IntegerPolynomial.reduceIn.

Reduces digit 'v' at limb position 'i' to a lower limb.

protected void
square(long[]
[in] the limb operand to square.
a
,
long[]
[out] the resulting square of the limb which is fully reduced.
r
)

Implements abstract sun.security.util.math.intpoly.IntegerPolynomial.square.

Takes a single limb and squares it using a high/low digit technique that allows for larger limb sizes.

Inherited from sun.security.util.math.intpoly.IntegerPolynomial:
addLimbsaddLimbsModPowerTwocarryOutcarryValueconditionalAssignconditionalSwapdecodeencodeencodeencodeSmallevaluatefinalReduceget0get1getElementgetElementgetMaxAddsgetNumLimbsgetSizegetSmallValuelimbsToByteArraypostEncodeCarrysetLimbsValuePositive

Field Detail

BITS_PER_LIMBback to summary
private static final int BITS_PER_LIMB
CARRY_ADDback to summary
private static final long CARRY_ADD
LIMB_MASKback to summary
private static final long LIMB_MASK
MAX_ADDSback to summary
private static final int MAX_ADDS
MODULUSback to summary
public static final BigInteger MODULUS
NUM_LIMBSback to summary
private static final int NUM_LIMBS
ONEback to summary
public static final IntegerPolynomial25519 ONE

Constructor Detail

IntegerPolynomial25519back to summary
private IntegerPolynomial25519()

Method Detail

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

Overrides sun.security.util.math.intpoly.IntegerPolynomial.carry.

Carry from a range of limb positions. Override for performance (unnesting).

Parameters
limbs:long[]

[in|out] the limbs for carry operation.

start:int

[in] the starting position of carry.

end:int

[in] the ending position of carry.

Annotations
@Override
carryback to summary
protected void carry(long[] limbs)

Overrides sun.security.util.math.intpoly.IntegerPolynomial.carry.

Carry operation for all limb positions. Override for performance (unroll and unnesting).

Parameters
limbs:long[]

[in|out] the limbs for carry operation.

Annotations
@Override
evaluateModulusback to summary
private static BigInteger evaluateModulus()
finalCarryReduceLastback to summary
protected void finalCarryReduceLast(long[] limbs)

Implements abstract sun.security.util.math.intpoly.IntegerPolynomial.finalCarryReduceLast.

Carry from high order limb and reduce to the lower order limb. Assumed to be called two times to propagate the carries.

Parameters
limbs:long[]

[in|out] the limbs to fully carry and reduce.

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

Implements abstract sun.security.util.math.intpoly.IntegerPolynomial.mult.

Multiply two limbs using a high/low digit technique that allows for larger limb sizes. It is assumed that both limbs have already been reduced.

Parameters
a:long[]

[in] the limb operand to multiply.

b:long[]

[in] the limb operand to multiply.

r:long[]

[out] the product of the limbs operands that is fully reduced.

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

Overrides sun.security.util.math.intpoly.IntegerPolynomial.multByInt.

Multiply limbs by scalar value. Superclass assumes that limb primitive radix > (bits per limb * 2)

Parameters
a:long[]

[in|out] the limbs to multiply a carry operation. 'a' is assumed to be reduced.

b:long

[in] the scalar value to be muliplied with the limbs.

Annotations
@Override
reduceback to summary
protected void reduce(long[] limbs)

Implements abstract sun.security.util.math.intpoly.IntegerPolynomial.reduce.

Carry in all positions and reduce high order limb.

Parameters
limbs:long[]

[in|out] the limbs to carry and reduce.

reduceInback to summary
protected void reduceIn(long[] limbs, long v, int i)

Implements abstract sun.security.util.math.intpoly.IntegerPolynomial.reduceIn.

Reduces digit 'v' at limb position 'i' to a lower limb.

Parameters
limbs:long[]

[in|out] the limbs to reduce in.

v:long

[in] the digit to reduce to the lower limb.

i:int

[in] the limbs to reduce from.

squareback to summary
protected void square(long[] a, long[] r)

Implements abstract sun.security.util.math.intpoly.IntegerPolynomial.square.

Takes a single limb and squares it using a high/low digit technique that allows for larger limb sizes. It is assumed that the limb input has already been reduced.

Parameters
a:long[]

[in] the limb operand to square.

r:long[]

[out] the resulting square of the limb which is fully reduced.