Author

Topic: Missing 5 characters of a private key in Hexa format ; please help (Read 611 times)

legendary
Activity: 3472
Merit: 4801
I'm always curious how people lose a part of their private key.

My assumption is that, in the vast majority of these "I need help recovering my password/privateKey/corruptedFile situations, the person asking for help either:

1. Bought this piece of information from a scammer and doesn't want to admit to that fact. The scammer convinced them that all they had to do was figure out how to recover the missing piece and they'd make a HUGE PROFIT! The victim is desperately clinging to hope that they weren't actually scammed, that the promised address and/or bitcoins are actually there, and that with help from us they'll be able to recover at least what they spent.

OR

2. Is a scammer that created a fake piece of information, and is trying to use the BitcoinTalk conversation to convince victims that they gave it a real try and just didn't have the expertise to recover the bitcoins. In that case, they're hoping that they can get a victim to buy this fake partial information.

I suppose it's a legitimate request occasionally, but probably not often.
newbie
Activity: 38
Merit: 0
I know it's been a couple years since this was posted but if you know your receiving address for that wallet then running bitcrack or keyhunt would work with a range 18E14A7B6A307F426A94F8114701E7C8E774E7F9A47E2C2035DB29A20630000 to 18E14A7B6A307F426A94F8114701E7C8E774E7F9A47E2C2035DB29A206400000 if that doesn't work then you'll know that part other parts of your private key are wrong.
newbie
Activity: 1
Merit: 0
 Tongue

(install all import needed (pip install os , pip install codecs , pip install hashlib , pip install base58 , pip install ecdsa )

1.first create file find.txt in new folder
2.create new file named decode.py
3.in decode.py tag this code python
4.go on code and remplace the line taged private key hex here dont dont errase ("")
5.at the end of your private key hex add ***** for preset your 5 chars loss
6.run the code with ( python decode.py ) and just wait the end of your try
7.for succes find pay me at this addresse   bc1qzk2xnjrf2h87h3p2cn344wfc92l0jz7seq886w
8.thanck you at the next time

import os
import codecs
import hashlib
import base58
import ecdsa

def generer_sequences():
    caracteres = "0123456789ABCDEF"
    sequences = [c1 + c2 + c3 + c4 + c5 for c1 in caracteres for c2 in caracteres for c3 in caracteres for c4 in caracteres for c5 in caracteres]
    return sequences

def remplacer_caracteres(chaine_originale, sequence):
    nouvelle_chaine = ""
    index_sequence = 0

    for caractere in chaine_originale:
        if caractere == '*':
            nouvelle_chaine += sequence[index_sequence]
            index_sequence = (index_sequence + 1) % len(sequence)
        else:
            nouvelle_chaine += caractere

    return nouvelle_chaine

def private_key_to_wif(private_key_hex: str) -> str:
    extended_key = "80" + private_key_hex
    first_sha256 = hashlib.sha256(codecs.decode(extended_key, 'hex')).hexdigest()
    second_sha256 = hashlib.sha256(codecs.decode(first_sha256, 'hex')).hexdigest()
    final_key = codecs.decode(extended_key + second_sha256[:8], 'hex')
    return base58.b58encode(final_key).decode('utf-8')

def private_key_to_address(private_key_hex: str) -> str:
    sk = ecdsa.SigningKey.from_string(codecs.decode(private_key_hex, 'hex'), curve=ecdsa.SECP256k1)
    vk = sk.get_verifying_key()
    public_key = b'\x04' + vk.to_string()
    hash160 = hashlib.new('ripemd160')
    hash160.update(hashlib.sha256(public_key).digest())
    hash160 = hash160.digest()
    return base58.b58encode_check(b"\x00" + hash160).decode('utf-8')

# Génération des séquences
sequences = generer_sequences()

# Chaîne d'origine
chaine_originale = "private key hex here"

# Itération sur les séquences
for i, sequence in enumerate(sequences, start=1):
    # Chaîne modifiée
    chaine_modifiee = remplacer_caracteres(chaine_originale, sequence)

    # Vérifier la longueur de la chaîne modifiée
    if len(chaine_modifiee) != 64:
        print(f"Erreur : La chaîne modifiée a une longueur incorrecte ({len(chaine_modifiee)} caractères).")
        break

    # Conversion de la chaîne modifiée en clé privée WIF
    cle_privee_wif = private_key_to_wif(chaine_modifiee)

    # Conversion de la clé privée en adresse Bitcoin
    try:
        adresse_bitcoin = private_key_to_address(chaine_modifiee)

        # Adresse Bitcoin fournie
        adresse_fournie = "1KDUcZh5Z6H1of4Pwoy5ojJtkQxcQBHhnH"

        # Vérification si les adresses sont identiques
        if adresse_bitcoin == adresse_fournie:
            # Enregistrement dans le fichier find.txt
            with open("find.txt", "w") as fichier:
                fichier.write(f"Clé privée WIF   : {cle_privee_wif}\n")
                fichier.write(f"Adresse Bitcoin  : {adresse_bitcoin}\n")
            print("Clé privée WIF et adresse enregistrées dans find.txt")
            break  # Arrête la boucle après avoir trouvé une correspondance
        else:
            print(f"Les adresses ne sont pas identiques pour la séquence {sequence}. (Essai {i})")
    except ecdsa.errors.MalformedPointError as e:
        print(f"Erreur : {e}")
sr. member
Activity: 1190
Merit: 469
I'm always curious how people lose a part of their private key.

usually it's because they wrote it down on paper without backing it up in another way. at the very least they could have wrote it down on 2 different pieces of paper. but it boils down to carelessness.
full member
Activity: 896
Merit: 193
web developer for hire
I don't believe you. You've tried selling wallet file with BTC8.5 for only BTC0.005. You bought it to resell.

Selling 8.5 BTC Wallet.dat from Bitcoin Core
only 0.005 btc
https://www.blockchain.com/btc/address/1KDUcZh5Z6H1of4Pwoy5ojJtkQxcQBHhnH

https://satoshidisk.com/pay/C9qhlp

for who collect and crack wallet bitcoin without password

hi all
i have my private key in Hexa format
help me to recover missing base 16 hexadecimal characters in my privatekey

this is just 1 example
18E14A7B6A307F426A94F8114701E7C8E774E7F9A47E2C2035DB29A2063XXXXX   the last 5 characters

I tried Finder Outer but work failed

is there 1 another solution...python scrypt or others?

if I find the correct privatekey I pay a bounty of 0.5 btc


member
Activity: 72
Merit: 43
an important update for you to recover the address:
Try with fewer characters (not all private keys contain 64 characters, try with 62 or 63)
Or maybe your private key is 59 characters long (i doubt it, the chances are slim but not impossible)

They are formatted as 64 characters with leading zeros.

Finder Outer is your best option, it should finish in a few seconds.

Hope it helps you recover your bitcoins  Grin
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
I just wrote my private key in a txt file ... the last 5 are unknown...
it should be easy to find it with bitcrack but if I don't find it it means that there is probably some error either at the beginning or in the middle of the privatekey ... I think there is no solution
the btc are lost
If you typed the private key instead of copying it, and you managed to forget 5 characters, I'd say it's likely some of the remaining characters are wrong too.
Try to remember what happened: it doesn't make much sense to stop typing at the last 5 characters.
newbie
Activity: 78
Merit: 0
I just wrote my private key in a txt file ... the last 5 are unknown...
it should be easy to find it with bitcrack but if I don't find it it means that there is probably some error either at the beginning or in the middle of the privatekey ... I think there is no solution
the btc are lost
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
maybe there is 1 error with my exadecimal private key
How sure are you it's missing the last 5 characters? How was it stored: did you write it down or use digital storage? I'm always curious how people lose a part of their private key. If you know what went wrong, you might be able to find it back.
newbie
Activity: 78
Merit: 0
i have used the type to AddrBoth for FinderOuter but work failed
i have used bitcrack ....range esausted
maybe there is 1 error with my exadecimal private key
legendary
Activity: 1042
Merit: 2805
Bitcoin and C♯ Enthusiast
I tried Finder Outer but work failed
The only reason why FinderOuter would fail to find a key when recovering Base16 is if you entered a wrong address or used a wrong address type. Try setting the type to AddrBoth to check both compressed and uncompressed public keys and see if that helps. Otherwise you'll have to find the correct address that corresponds to this key.
legendary
Activity: 952
Merit: 1386

18E14A7B6A307F426A94F8114701E7C8E774E7F9A47E2C2035DB29A2063XXXXX   the last 5 characters


It is very easy task, I may prepare a program for that in java if you have only CPU.
But it you have access to GPU, you may easily do this using BitCrack https://github.com/brichard19/BitCrack

Configuration is simple:
--keyspace 18E14A7B6A307F426A94F8114701E7C8E774E7F9A47E2C2035DB29A206300000:18E14A7B6A307F426A94F8114701E7C8E774E7F9A47E2C2035DB29A2063FFFFF

and your address. It will take just a moment.

You know address, right?
If not, you may always test all of them -> create 1 million of private keys and check their balance - it is doable.

Other question is if you know if address is compressed or not - you may always use parameter "--compression both"



I just have one more idea.
You may use my WifSolver (https://github.com/PawelGorny/WifSolver) in END mode.
You only need to convert your hex to WIF.
Example:
Code:
18E14A7B6A307F426A94F8114701E7C8E774E7F9A47E2C2035DB29A206300000 = Kx45GeUBSMPReYQwgXiKhG9FzNXrnCeutJp4yjTd5jyfzDcY3tJP
18E14A7B6A307F426A94F8114701E7C8E774E7F9A47E2C2035DB29A2063FFFFF = Kx45GeUBSMPReYQwgXiKhG9FzNXrnCeutJp4yjTd5netjwhScHJV
As you see, the fixed part is "Kx45GeUBSMPReYQwgXiKhG9FzNXrnCeutJp4yjTd5"
That's what you may use for configuration.
(or for faster processing launch it 4 times with additional "j","k","m" and "n")

But of course BitCrack will be much faster.

member
Activity: 69
Merit: 53
@abadon666999
3 bytes if 5 digits missing its too easy for anyone to bf by CPU and python.
not take more then few minutes or even less.
If you are not good at python or coding you should use next codes.

Code:
#!python3
# ////for bitalktalk.org \\\\

from bit import Key
from bit.format import bytes_to_wif

fixedata = '18E14A7B6A307F426A94F8114701E7C8E774E7F9A47E2C2035DB29A206'
addresstomatch = ''

def compresedbf():
for x in range(0,16777216):
Keyfound = Key.from_hex(fixedata+hex(x)[2:].zfill(6))
if (Keyfound.address==addresstomatch):
with open("win.txt","a") as rf:
rf.write(fixedata+hex(x)[2:].zfill(6) + '\n');
rf.close();
exit("Found private key wrote in win.txt")

def uncompresedbf():
for x in range(0,16777216):
Keyfound = Key(bytes_to_wif(bytes.fromhex(fixedata+hex(x)[2:].zfill(6)),compressed=False))
if (Keyfound.address==addresstomatch):
with open("win.txt","a") as rf:
rf.write(fixedata+hex(x)[2:].zfill(6) + '\n');
rf.close();
exit("Found private key wrote in win.txt")



update your data with address and check it. this single thread its possible to make multiple thread too. but for 3 bytes no need.
for compressed run compresedbf()
for uncompressed run uncompresedbf()
legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
First of all, do you have additional information (either public key/address)? Brute forcing 1 million combination is fast, but far slower when you don't have those information.

I tried Finder Outer but work failed

What exactly do you mean by "work failed"?

is there 1 another solution...python scrypt or others?

If you're willing to write your own script, there are many library to to generate address from private key such as https://github.com/1200wd/bitcoinlib. You'll need to write private key/address on separate file, then check whether the address has balance (e.g. using list mentioned by @LoyceV).
legendary
Activity: 3668
Merit: 6382
Looking for campaign manager? Contact icopress!
If you know the expected address and it's is legacy (1*) one, I can give you - either source code, either exe, either both - for an unoptimized app (that was made for a different purpose, but it does the job) made in c# that will search for you.
The image is for only 2 digits missing, but it works for any reasonable range, I've used this data for quick tests: https://en.bitcoin.it/wiki/Wallet_import_format

legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
Recovering 5 characters HEX has only a million (1,048,576) possibilities. I would create a simple script that creates all possibilities. I think bitcoin-tool can convert all of them into addresses, then all you have to do is find the address you need. If you don't know the address, use this list to check which one is funded.

This works:
Code:
crunch 5 5 0123456789ABCDEF | sed s/^/18E14A7B6A307F426A94F8114701E7C8E774E7F9A47E2C2035DB29A2063/ > list
newbie
Activity: 78
Merit: 0
hi all
i have my private key in Hexa format
help me to recover missing base 16 hexadecimal characters in my privatekey

this is just 1 example
18E14A7B6A307F426A94F8114701E7C8E774E7F9A47E2C2035DB29A2063XXXXX   the last 5 characters

I tried Finder Outer but work failed

is there 1 another solution...python scrypt or others?

if I find the correct privatekey I pay a bounty of 0.5 btc

Jump to: