public final class ECDSAMultiplySimultaneouslyAndCompareHelper extends Object
Constructor and Description |
---|
ECDSAMultiplySimultaneouslyAndCompareHelper(EllipticCurve curve)
Create new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
multiplyAndCompare(BigInteger k,
BigInteger l,
BigInteger r)
Perform simultaneous multiplication to compute
k * g + l * q
and check if the x coordinate of result equals r modulo the
curve order. |
void |
precomputeFirstPoint(ECPoint q)
Compute precomputation data for the first base point.
|
void |
precomputeSecondPoint(ECPoint q)
Compute precomputation data for the second base point.
|
public ECDSAMultiplySimultaneouslyAndCompareHelper(EllipticCurve curve)
curve
- the curvepublic boolean multiplyAndCompare(BigInteger k, BigInteger l, BigInteger r)
k * g + l * q
and check if the x coordinate of result equals r
modulo the
curve order.k
- scalar for the generatorl
- scalar for the second generatorr
- expected x coordinater
public void precomputeFirstPoint(ECPoint q)
multiplyAndCompare(BigInteger, BigInteger, BigInteger)
for the
first time.q
- second pointpublic void precomputeSecondPoint(ECPoint q)
multiplyAndCompare(BigInteger, BigInteger, BigInteger)
for the
first time.q
- second pointCopyright © 2011–2022 Stiftung SIC. All rights reserved.