Package org.bouncycastle.math.ec
Class ECAlgorithms
java.lang.Object
org.bouncycastle.math.ec.ECAlgorithms
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ECPoint
cleanPoint
(ECCurve c, ECPoint p) static ECPoint
importPoint
(ECCurve c, ECPoint p) static boolean
static boolean
isF2mField
(FiniteField field) static boolean
static boolean
isFpField
(FiniteField field) static void
montgomeryTrick
(ECFieldElement[] zs, int off, int len) static void
montgomeryTrick
(ECFieldElement[] zs, int off, int len, ECFieldElement scale) static ECPoint
Simple shift-and-add multiplication.static ECPoint
shamirsTrick
(ECPoint P, BigInteger k, ECPoint Q, BigInteger l) static ECPoint
sumOfMultiplies
(ECPoint[] ps, BigInteger[] ks) static ECPoint
sumOfTwoMultiplies
(ECPoint P, BigInteger a, ECPoint Q, BigInteger b) static ECPoint
-
Constructor Details
-
ECAlgorithms
public ECAlgorithms()
-
-
Method Details
-
isF2mCurve
-
isF2mField
-
isFpCurve
-
isFpField
-
sumOfMultiplies
-
sumOfTwoMultiplies
-
shamirsTrick
-
importPoint
-
montgomeryTrick
-
montgomeryTrick
-
referenceMultiply
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
- The point to multiply.k
- The multiplier.- Returns:
- The result of the point multiplication
kP
.
-
validatePoint
-
cleanPoint
-