message 15/01/2025 hotmoney
address 1BY8GQbBPGYEC58s9ckHmqf9doEX9mCKPR
signature H0J+wKAwGGMiVWHLuwEaZpLePkQAYx0HoTVvEZJu/wx3N6QYbUJMuajlj//yyjD7WLh42Ydlg+/vTJm50Td1LS0=
Can you crack and post the PVK of that signed address??
-----BEGIN BITCOIN SIGNED MESSAGE-----
I also own this address
-----BEGIN SIGNATURE-----
13zb1hQbWVuYdZoAkztVrNrm65aReL2pYD
H8SlTYJ7a/Mp5cra9VzqgDFMGRQUYfA5NLrSCb0GkwbeEDqx8vKWGYWX3YmiqIU8nl6THdprDK/k34y1GQrFFDk=
-----END BITCOIN SIGNED MESSAGE-----
It took 5 minutes in my laptop and less of 1 minute in main computer
That is cheap to do that, Actually I am doing it.
Although I don't know how albert did it, if the address
1BY8GQbBPGYEC58s9ckHmqf9doEX9mCKPR falls within the 67-bit range, it is undoubtedly no longer secure. It is possible to recover the public key from the signature and then recover the private key from the public key.
I tried to recover the public key using the following python script, but it seems to have generated incorrect public key. I think I didn't understand how the 65-byte signature operates. Perhaps albert can explain in detail how to recover the public key from the signature? Thanks a lot.
import base64
import hashlib
from coincurve import PublicKey
message_str = "15/01/2025 hotmoney"
signature_b64 = "H0J+wKAwGGMiVWHLuwEaZpLePkQAYx0HoTVvEZJu/wx3N6QYbUJMuajlj//yyjD7WLh42Ydlg+/vTJm50Td1LS0="
message_bytes = message_str.encode("utf-8")
msg_hash = hashlib.sha256(message_bytes).digest()
signature_raw = base64.b64decode(signature_b64)
r_s = signature_raw[1:65]
v_initial = signature_raw[0]
print("signature (hex):", signature_raw.hex())
print("initial recovery bit (hex) =", v_initial)
print("-" * 100)
possible_vs = [0, 1]
for v in possible_vs:
sig_65 = r_s + bytes([v])
try:
pub = PublicKey.from_signature_and_message(
signature=sig_65,
message=msg_hash,
hasher=None
)
print(f"v = {v} uncompressed pubkey (hex):{pub.format(compressed=False).hex()}")
print(f"v = {v} compressed pubkey (hex): {pub.format(compressed=True).hex()}")
print("-" * 100)
except Exception as e:
print(f"v = {v} error: {e}")
print("-" * 100)