|
Bouncy Castle Cryptography Library 1.86 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.bouncycastle.math.ec.ECAlgorithms
| Constructor Summary | |
ECAlgorithms()
|
|
| Method Summary | |
static ECPoint |
cleanPoint(ECCurve c,
ECPoint p)
|
static ECPoint |
importPoint(ECCurve c,
ECPoint p)
|
static boolean |
isF2mCurve(ECCurve c)
|
static boolean |
isF2mField(FiniteField field)
|
static boolean |
isFpCurve(ECCurve c)
|
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 |
multiply(ECPoint p,
java.math.BigInteger k)
|
static ECPoint |
multiplySecret(ECPoint p,
java.math.BigInteger k)
Multiply a point by a scalar that must not be leaked - a private key, or any value derived from one - without exposing the scalar through control flow or memory-access pattern. |
static ECPoint |
multiplySecret(ECPoint p,
java.math.BigInteger k,
java.math.BigInteger order)
As multiplySecret(ECPoint, BigInteger), with the group order supplied rather than
taken from the curve. |
static ECPoint |
referenceMultiply(ECPoint p,
java.math.BigInteger k)
Simple shift-and-add multiplication. |
static ECPoint |
shamirsTrick(ECPoint P,
java.math.BigInteger k,
ECPoint Q,
java.math.BigInteger l)
|
static ECPoint |
sumOfMultiplies(ECPoint[] ps,
java.math.BigInteger[] ks)
|
static ECPoint |
sumOfTwoMultiplies(ECPoint P,
java.math.BigInteger a,
ECPoint Q,
java.math.BigInteger b)
|
static ECPoint |
sumOfTwoMultipliesSecret(ECPoint P,
java.math.BigInteger a,
ECPoint Q,
java.math.BigInteger b)
|
static ECPoint |
sumOfTwoMultipliesSecret(ECPoint P,
java.math.BigInteger a,
ECPoint Q,
java.math.BigInteger b,
java.math.BigInteger order)
|
static ECPoint |
validatePoint(ECPoint p)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ECAlgorithms()
| Method Detail |
public static boolean isF2mCurve(ECCurve c)
public static boolean isF2mField(FiniteField field)
public static boolean isFpCurve(ECCurve c)
public static boolean isFpField(FiniteField field)
public static ECPoint sumOfMultiplies(ECPoint[] ps,
java.math.BigInteger[] ks)
public static ECPoint sumOfTwoMultiplies(ECPoint P,
java.math.BigInteger a,
ECPoint Q,
java.math.BigInteger b)
public static ECPoint sumOfTwoMultipliesSecret(ECPoint P,
java.math.BigInteger a,
ECPoint Q,
java.math.BigInteger b)
public static ECPoint sumOfTwoMultipliesSecret(ECPoint P,
java.math.BigInteger a,
ECPoint Q,
java.math.BigInteger b,
java.math.BigInteger order)
public static ECPoint shamirsTrick(ECPoint P,
java.math.BigInteger k,
ECPoint Q,
java.math.BigInteger l)
public static ECPoint importPoint(ECCurve c,
ECPoint p)
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 referenceMultiply(ECPoint p,
java.math.BigInteger k)
p - The point to multiply.k - The multiplier.
public static ECPoint multiply(ECPoint p,
java.math.BigInteger k)
public static ECPoint multiplySecret(ECPoint p,
java.math.BigInteger k)
ECPoint.multiply(BigInteger) uses the curve's configured multiplier, which for most
curves is a windowed-NAF implementation whose timing depends on the scalar; it is the right
choice for a public scalar (verification, for instance) but not for a secret one. Use this
method wherever the scalar is secret and the point is supplied by a peer.
The result is the same point ECPoint.multiply(BigInteger) would return; only the
timing profile differs. See ECConstantTimeMultiplier for what is and is not covered.
p - the point to multiply, typically a peer's public key; must lie in the subgroup
whose order is the curve's.k - the secret scalar; must be less than the curve order.
public static ECPoint multiplySecret(ECPoint p,
java.math.BigInteger k,
java.math.BigInteger order)
multiplySecret(ECPoint, BigInteger), with the group order supplied rather than
taken from the curve. Prefer this form wherever the order is to hand - domain parameters
always carry it, whereas ECCurve.getOrder() is null for a curve built without one.
p - the point to multiply, typically a peer's public key; must lie in the subgroup of
order .k - the secret scalar; must be less than .order - the group order; must be odd, as every standard EC group order is.
public static ECPoint validatePoint(ECPoint p)
public static ECPoint cleanPoint(ECCurve c,
ECPoint p)
|
Bouncy Castle Cryptography Library 1.86 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||