APIdia Launch Partner
Top Inners Fields Constructors Methods
sun.security.ec

public Class ECOperations

extends Object
Class Inheritance
Imports
sun.security.ec.point.*, sun.security.util.CurveDB, .KnownOIDs, .ArrayUtil, sun.security.util.math.*, sun.security.util.math.intpoly.*, java.math.BigInteger, java.security.ProviderException, java.security.spec.ECFieldFp, .ECParameterSpec, .ECPoint, .EllipticCurve, java.util.Map, .Optional

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class
pack-priv static interface
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv final ImmutableIntegerModuloP
b

pack-priv static final Map<BigInteger, IntegerFieldModuloP>
pack-priv final SmallValue
pack-priv final ProjectivePoint.Immutable
pack-priv final SmallValue
private final IntegerFieldModuloP
pack-priv static final Map<BigInteger, IntegerFieldModuloP>
pack-priv final SmallValue
pack-priv final SmallValue

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static boolean
allZero(byte[] arr)

public boolean
public static Optional<ECOperations>
public IntegerFieldModuloP
protected ProjectivePoint.Immutable
public IntegerFieldModuloP
public boolean
public MutablePoint

Returns:

the product
multiply
(AffinePoint
the point
affineP
,
byte[]
the scalar as a little-endian array
s
)

Multiply an affine point by a scalar and return the result as a mutable point.

public MutablePoint

Returns:

the product
multiply
(ECPoint
the point
ecPoint
,
byte[]
the scalar as a little-endian array
s
)

Multiply an affine ecpoint point by a scalar and return the result as a mutable point.

pack-priv byte[]
seedToScalar(byte[] seedBytes)

private void
public void
setSum(MutablePoint
first point and result
p
,
MutablePoint
second point to add
p2
)

Adds second Mutable (Projective) point to first.

private void
private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bback to summary
pack-priv final ImmutableIntegerModuloP b
fieldsback to summary
pack-priv static final Map<BigInteger, IntegerFieldModuloP> fields
fourback to summary
pack-priv final SmallValue four
neutralback to summary
pack-priv final ProjectivePoint.Immutable neutral
oneback to summary
pack-priv final SmallValue one
orderFieldback to summary
private final IntegerFieldModuloP orderField
orderFieldsback to summary
pack-priv static final Map<BigInteger, IntegerFieldModuloP> orderFields
threeback to summary
pack-priv final SmallValue three
twoback to summary
pack-priv final SmallValue two

Constructor Detail

ECOperationsback to summary
public ECOperations(IntegerModuloP b, IntegerFieldModuloP orderField)

Method Detail

allZeroback to summary
public static boolean allZero(byte[] arr)
checkOrderback to summary
public boolean checkOrder(ECPoint point)
forParametersback to summary
public static Optional<ECOperations> forParameters(ECParameterSpec params)
getFieldback to summary
public IntegerFieldModuloP getField()
getNeutralback to summary
protected ProjectivePoint.Immutable getNeutral()
getOrderFieldback to summary
public IntegerFieldModuloP getOrderField()
isNeutralback to summary
public boolean isNeutral(Point p)
multiplyback to summary
public MutablePoint multiply(AffinePoint affineP, byte[] s)

Multiply an affine point by a scalar and return the result as a mutable point.

Parameters
affineP:AffinePoint

the point

s:byte[]

the scalar as a little-endian array

Returns:MutablePoint

the product

multiplyback to summary
public MutablePoint multiply(ECPoint ecPoint, byte[] s)

Multiply an affine ecpoint point by a scalar and return the result as a mutable point.

Parameters
ecPoint:ECPoint

the point

s:byte[]

the scalar as a little-endian array

Returns:MutablePoint

the product

seedToScalarback to summary
pack-priv byte[] seedToScalar(byte[] seedBytes) throws IntermediateValueException
setDoubleback to summary
private void setDouble(ProjectivePoint.Mutable p, MutableIntegerModuloP t0, MutableIntegerModuloP t1, MutableIntegerModuloP t2, MutableIntegerModuloP t3, MutableIntegerModuloP t4)
setSumback to summary
public void setSum(MutablePoint p, MutablePoint p2)

Adds second Mutable (Projective) point to first. Used by ECDSAOperations. This method constructs new temporaries each time it is called. For better efficiency, the (private) method that reuses temporaries should be used if more than one sum will be computed.

Parameters
p:MutablePoint

first point and result

p2:MutablePoint

second point to add

setSumback to summary
private void setSum(ProjectivePoint.Mutable p, AffinePoint p2, MutableIntegerModuloP t0, MutableIntegerModuloP t1, MutableIntegerModuloP t2, MutableIntegerModuloP t3, MutableIntegerModuloP t4)
setSumback to summary
private void setSum(ProjectivePoint.Mutable p, ProjectivePoint.Mutable p2, MutableIntegerModuloP t0, MutableIntegerModuloP t1, MutableIntegerModuloP t2, MutableIntegerModuloP t3, MutableIntegerModuloP t4)
sun.security.ec back to summary

pack-priv final Class ECOperations.DefaultMultiplier

extends Object
implements PointMultiplier
Class Inheritance
All Implemented Interfaces
sun.security.ec.ECOperations.PointMultiplier

Field Summary

Modifier and TypeField and Description
private final ECOperations
private final ProjectivePoint.Immutable[]

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private void
public ProjectivePoint.Mutable
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ecOpsback to summary
private final ECOperations ecOps
pointMultiplesback to summary
private final ProjectivePoint.Immutable[] pointMultiples

Constructor Detail

DefaultMultiplierback to summary
pack-priv DefaultMultiplier(ECOperations ecOps, AffinePoint affineP)

Method Detail

double4back to summary
private void double4(ProjectivePoint.Mutable p, MutableIntegerModuloP t0, MutableIntegerModuloP t1, MutableIntegerModuloP t2, MutableIntegerModuloP t3, MutableIntegerModuloP t4)
pointMultiplyback to summary
public ProjectivePoint.Mutable pointMultiply(byte[] s)

Implements sun.security.ec.ECOperations.PointMultiplier.pointMultiply.

Annotations
@Override
sun.security.ec back to summary

pack-priv Class ECOperations.IntermediateValueException

extends Exception
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
pack-priv

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.lang.Exception.serialVersionUID.

Constructor Detail

IntermediateValueExceptionback to summary
pack-priv IntermediateValueException()
sun.security.ec back to summary

pack-priv sealed Interface ECOperations.PointMultiplier

permits DefaultMultiplier, Secp256R1GeneratorMontgomeryMultiplier
Known Direct Implementers
sun.security.ec.ECOperations.DefaultMultiplier, sun.security.ec.ECOperations.Secp256R1GeneratorMontgomeryMultiplier

Method Summary

Modifier and TypeMethod and Description
private static void
public ProjectivePoint.Mutable
pointMultiply(byte[] scalar)

Method Detail

lookupback to summary
private static void lookup(ProjectivePoint.Immutable[] ips, int index, ProjectivePoint.Mutable result)
pointMultiplyback to summary
public ProjectivePoint.Mutable pointMultiply(byte[] scalar)
sun.security.ec back to summary

pack-priv final Class ECOperations.Secp256R1GeneratorMontgomeryMultiplier

extends Object
implements PointMultiplier
Class Inheritance
  • java.lang.Object
  • sun.security.ec.ECOperations.Secp256R1GeneratorMontgomeryMultiplier
All Implemented Interfaces
sun.security.ec.ECOperations.PointMultiplier

Field Summary

Modifier and TypeField and Description
private final BigInteger[]
public static final AffinePoint
public static final ECOperations.PointMultiplier
private final ImmutableIntegerModuloP
private final ProjectivePoint.Immutable[][]
private static final ECOperations
private final ImmutableIntegerModuloP

Constructor Summary

AccessConstructor and Description
private
private

Method Summary

Modifier and TypeMethod and Description
private static int
bit(byte[] k, int i)

public ProjectivePoint.Mutable
protected void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

baseback to summary
private final BigInteger[] base
generatorback to summary
public static final AffinePoint generator
multiplierback to summary
public static final ECOperations.PointMultiplier multiplier
oneback to summary
private final ImmutableIntegerModuloP one
pointsback to summary
private final ProjectivePoint.Immutable[][] points
secp256r1Opsback to summary
private static final ECOperations secp256r1Ops
zeroback to summary
private final ImmutableIntegerModuloP zero

Constructor Detail

Secp256R1GeneratorMontgomeryMultiplierback to summary
private Secp256R1GeneratorMontgomeryMultiplier()
Secp256R1GeneratorMontgomeryMultiplierback to summary
private Secp256R1GeneratorMontgomeryMultiplier(IntegerFieldModuloP field, ECOperations.PointMultiplier smallTableMultiplier)

Method Detail

bitback to summary
private static int bit(byte[] k, int i)
pointMultiplyback to summary
public ProjectivePoint.Mutable pointMultiply(byte[] s)

Implements sun.security.ec.ECOperations.PointMultiplier.pointMultiply.

verifyTablesback to summary
protected void verifyTables(ECOperations.PointMultiplier multiplier)