Top Constructors Methods
org.bouncycastle.math.ec

public Class ECAlgorithms

extends Object
Class Inheritance
Imports
java.math.BigInteger, org.bouncycastle.math.ec.endo.ECEndomorphism, .EndoUtil, .GLVEndomorphism, org.bouncycastle.math.field.FiniteField, .PolynomialExtensionField, org.bouncycastle.math.raw.Nat

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static ECPoint
pack-priv static ECPoint
private static ECPoint
pack-priv static ECPoint
pack-priv static ECPoint
pack-priv static ECPoint
private static ECPoint
implShamirsTrickWNaf(ECPoint[] preCompP, ECPoint[] preCompNegP, byte[] wnafP, ECPoint[] preCompQ, ECPoint[] preCompNegQ, byte[] wnafQ)

pack-priv static ECPoint
pack-priv static ECPoint
private static ECPoint
implSumOfMultiplies(boolean[] negs, WNafPreCompInfo[] infos, byte[][] wnafs)

pack-priv static ECPoint
public static ECPoint
public static boolean
public static boolean
public static boolean
public static boolean
public static void
montgomeryTrick(ECFieldElement[] zs, int off, int len)

public static void
montgomeryTrick(ECFieldElement[] zs, int off, int len, ECFieldElement scale)

public static ECPoint

Returns:

The result of the point multiplication kP.
referenceMultiply
(ECPoint
The point to multiply.
p
,
BigInteger
The multiplier.
k
)

Simple shift-and-add multiplication.

public static ECPoint
public static ECPoint
public static ECPoint
public static ECPoint
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ECAlgorithmsback to summary
public ECAlgorithms()

Method Detail

cleanPointback to summary
public static ECPoint cleanPoint(ECCurve c, ECPoint p)
implCheckResultback to summary
pack-priv static ECPoint implCheckResult(ECPoint p)
implShamirsTrickFixedPointback to summary
private static ECPoint implShamirsTrickFixedPoint(ECPoint p, BigInteger k, ECPoint q, BigInteger l)
implShamirsTrickJsfback to summary
pack-priv static ECPoint implShamirsTrickJsf(ECPoint P, BigInteger k, ECPoint Q, BigInteger l)
implShamirsTrickWNafback to summary
pack-priv static ECPoint implShamirsTrickWNaf(ECPoint P, BigInteger k, ECPoint Q, BigInteger l)
implShamirsTrickWNafback to summary
pack-priv static ECPoint implShamirsTrickWNaf(ECEndomorphism endomorphism, ECPoint P, BigInteger k, BigInteger l)
implShamirsTrickWNafback to summary
private static ECPoint implShamirsTrickWNaf(ECPoint[] preCompP, ECPoint[] preCompNegP, byte[] wnafP, ECPoint[] preCompQ, ECPoint[] preCompNegQ, byte[] wnafQ)
implSumOfMultipliesback to summary
pack-priv static ECPoint implSumOfMultiplies(ECPoint[] ps, BigInteger[] ks)
implSumOfMultipliesback to summary
pack-priv static ECPoint implSumOfMultiplies(ECEndomorphism endomorphism, ECPoint[] ps, BigInteger[] ks)
implSumOfMultipliesback to summary
private static ECPoint implSumOfMultiplies(boolean[] negs, WNafPreCompInfo[] infos, byte[][] wnafs)
implSumOfMultipliesGLVback to summary
pack-priv static ECPoint implSumOfMultipliesGLV(ECPoint[] ps, BigInteger[] ks, GLVEndomorphism glvEndomorphism)
importPointback to summary
public static ECPoint importPoint(ECCurve c, ECPoint p)
isF2mCurveback to summary
public static boolean isF2mCurve(ECCurve c)
isF2mFieldback to summary
public static boolean isF2mField(FiniteField field)
isFpCurveback to summary
public static boolean isFpCurve(ECCurve c)
isFpFieldback to summary
public static boolean isFpField(FiniteField field)
montgomeryTrickback to summary
public static void montgomeryTrick(ECFieldElement[] zs, int off, int len)
montgomeryTrickback to summary
public static void montgomeryTrick(ECFieldElement[] zs, int off, int len, ECFieldElement scale)
referenceMultiplyback to summary
public static ECPoint referenceMultiply(ECPoint p, BigInteger k)

Simple shift-and-add multiplication. Serves as reference implementation to verify (possibly faster) implementations, and for very small scalars. CAUTION: This implementation is NOT constant-time in any way. It is only intended to be used for diagnostics.

Parameters
p:ECPoint

The point to multiply.

k:BigInteger

The multiplier.

Returns:ECPoint

The result of the point multiplication kP.

shamirsTrickback to summary
public static ECPoint shamirsTrick(ECPoint P, BigInteger k, ECPoint Q, BigInteger l)
sumOfMultipliesback to summary
public static ECPoint sumOfMultiplies(ECPoint[] ps, BigInteger[] ks)
sumOfTwoMultipliesback to summary
public static ECPoint sumOfTwoMultiplies(ECPoint P, BigInteger a, ECPoint Q, BigInteger b)
validatePointback to summary
public static ECPoint validatePoint(ECPoint p)