3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-01-31 15:22:16 +00:00

ECKey.recoverFromSignature: respect the compressed flag again.

This commit is contained in:
Mike Hearn 2014-04-25 14:48:13 +02:00
parent d2837e8ea9
commit 4504633fd5

View File

@ -869,7 +869,7 @@ public class ECKey implements EncryptableItem, Serializable {
BigInteger srInv = rInv.multiply(sig.s).mod(n);
BigInteger eInvrInv = rInv.multiply(eInv).mod(n);
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). */