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

public sealed Class IntegerPolynomialModBinP

extends IntegerPolynomial
permits Curve25519OrderField, Curve448OrderField
Class Inheritance
Known Direct Subclasses
sun.security.util.math.intpoly.IntegerPolynomialModBinP.Curve25519OrderField, sun.security.util.math.intpoly.IntegerPolynomialModBinP.Curve448OrderField
Imports
java.math.BigInteger

The field of integers modulo a binomial prime. This is a general-purpose field implementation, that is much slower than more specialized classes like IntegerPolynomial25519. It is suitable when only a small number of arithmetic operations are required in some field. For example, this class can be used for operations on scalars/exponents in signature operations. This class may only be used for primes of the form 2^a + b.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
IntegerPolynomialModBinP.Curve25519OrderField

The field of integers modulo the order of the Curve25519 subgroup

public static class
IntegerPolynomialModBinP.Curve448OrderField

The field of integers modulo the order of the Curve448 subgroup

Field Summary

Modifier and TypeField and Description
private final int
private final int
private final int
private final long[]
private final int
Inherited from sun.security.util.math.intpoly.IntegerPolynomial:
bitsPerLimbnumLimbsTWO

Constructor Summary

AccessConstructor and Description
public
IntegerPolynomialModBinP(int bitsPerLimb, int numLimbs, int power, BigInteger subtrahend)

Method Summary

Modifier and TypeMethod and Description
private void
carryReduce(long[] c, long[] r)

protected void
finalCarryReduceLast(long[] limbs)

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

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.

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

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

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

Allow more general (and slower) input conversion that takes a large value and reduces it.

private void
modReduceInBits(long[] limbs, int index, int bits, long x)

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

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

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

private void
multOnly(long[] a, long[] b, long[] c)

Multiply a and b, and store the result in c.

protected void
reduce(long[] a)

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

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

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

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

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

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

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

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

Field Detail

bitOffsetback to summary
private final int bitOffset
limbMaskback to summary
private final int limbMask
powerback to summary
private final int power
reduceLimbsback to summary
private final long[] reduceLimbs
rightBitOffsetback to summary
private final int rightBitOffset

Constructor Detail

IntegerPolynomialModBinPback to summary
public IntegerPolynomialModBinP(int bitsPerLimb, int numLimbs, int power, BigInteger subtrahend)

Method Detail

carryReduceback to summary
private void carryReduce(long[] c, long[] r)
finalCarryReduceLastback to summary
protected void finalCarryReduceLast(long[] limbs)

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

Doc from sun.security.util.math.intpoly.IntegerPolynomial.finalCarryReduceLast.

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.

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

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

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

Allow more general (and slower) input conversion that takes a large value and reduces it.

Annotations
@Override
modReduceInBitsback to summary
private void modReduceInBits(long[] limbs, int index, int bits, long x)
multback to summary
protected void mult(long[] a, long[] b, long[] r)

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

Doc from sun.security.util.math.intpoly.IntegerPolynomial.mult.

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.

Annotations
@Override
multOnlyback to summary
private void multOnly(long[] a, long[] b, long[] c)

Multiply a and b, and store the result in c. Requires that a.length == b.length == numLimbs and c.length >= 2 * numLimbs - 1. It is allowed for a and b to be the same array.

reduceback to summary
protected void reduce(long[] a)

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

Doc from sun.security.util.math.intpoly.IntegerPolynomial.reduce.

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

Annotations
@Override
reduceInback to summary
protected void reduceIn(long[] c, long v, int i)

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

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

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

Doc from sun.security.util.math.intpoly.IntegerPolynomial.square.

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.

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

public final Class IntegerPolynomialModBinP.Curve25519OrderField

extends IntegerPolynomialModBinP
Class Inheritance

The field of integers modulo the order of the Curve25519 subgroup

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from sun.security.util.math.intpoly.IntegerPolynomialModBinP:
finalCarryReduceLastgetElementmultreducereduceInsquare

Constructor Detail

Curve25519OrderFieldback to summary
public Curve25519OrderField()
sun.security.util.math.intpoly back to summary

public final Class IntegerPolynomialModBinP.Curve448OrderField

extends IntegerPolynomialModBinP
Class Inheritance

The field of integers modulo the order of the Curve448 subgroup

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from sun.security.util.math.intpoly.IntegerPolynomialModBinP:
finalCarryReduceLastgetElementmultreducereduceInsquare

Constructor Detail

Curve448OrderFieldback to summary
public Curve448OrderField()