private static ECPoint DecompressKey(BigInteger xBN, bool yBit)
{
var curve = Secp256k1.Curve;
var compEnc = X9IntegerConverter.IntegerToBytes(xBN, 1 + X9IntegerConverter.GetByteLength(curve));
compEnc[0] = (byte) (yBit ? 0x03 : 0x02);
return curve.DecodePoint(compEnc);
}
}