mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-12 10:15:52 +00:00
ECKey.recoverFromSignature: respect the compressed flag again.
This commit is contained in:
parent
d2837e8ea9
commit
4504633fd5
@ -869,7 +869,7 @@ public class ECKey implements EncryptableItem, Serializable {
|
|||||||
BigInteger srInv = rInv.multiply(sig.s).mod(n);
|
BigInteger srInv = rInv.multiply(sig.s).mod(n);
|
||||||
BigInteger eInvrInv = rInv.multiply(eInv).mod(n);
|
BigInteger eInvrInv = rInv.multiply(eInv).mod(n);
|
||||||
ECPoint.Fp q = (ECPoint.Fp) ECAlgorithms.sumOfTwoMultiplies(CURVE.getG(), eInvrInv, R, srInv);
|
ECPoint.Fp q = (ECPoint.Fp) ECAlgorithms.sumOfTwoMultiplies(CURVE.getG(), eInvrInv, R, srInv);
|
||||||
return ECKey.fromPublicOnly(q.getEncoded(true));
|
return ECKey.fromPublicOnly(q.getEncoded(compressed));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Decompress a compressed public key (x co-ord and low-bit of y-coord). */
|
/** Decompress a compressed public key (x co-ord and low-bit of y-coord). */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user