Bitcoin Forum
April 27, 2024, 07:56:12 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Decipher xprv or seed from keystore when I know the password  (Read 233 times)
pbies (OP)
Full Member
***
Offline Offline

Activity: 244
Merit: 126



View Profile
March 10, 2023, 05:22:05 PM
 #1

I have .json file with keystore.
I know http://iancoleman.io/ but it does not help me as this is the other way around.
I have JSON dump with: keystore = xprv and seed.
I want to decipher xprv and/or seed because I know the password, but I have no tool to do that.

How can I do that?

BTC: bc1qmrexlspd24kevspp42uvjg7sjwm8xcf9w86h5k
I have 9900K and 1080 Ti, gathering funds for new desktop PC for Bitcoin operations - 14900K and RTX 4090
1714204572
Hero Member
*
Offline Offline

Posts: 1714204572

View Profile Personal Message (Offline)

Ignore
1714204572
Reply with quote  #2

1714204572
Report to moderator
According to NIST and ECRYPT II, the cryptographic algorithms used in Bitcoin are expected to be strong until at least 2030. (After that, it will not be too difficult to transition to different algorithms.)
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714204572
Hero Member
*
Offline Offline

Posts: 1714204572

View Profile Personal Message (Offline)

Ignore
1714204572
Reply with quote  #2

1714204572
Report to moderator
FatFork
Legendary
*
Offline Offline

Activity: 1582
Merit: 2584


Top Crypto Casino


View Profile WWW
March 10, 2023, 06:52:01 PM
Merited by pooya87 (2)
 #2

I want to decipher xprv and/or seed because I know the password, but I have no tool to do that.

How can I do that?

If you know the password for your Keystore file, you should be able to access your wallet using a compatible software or wallet. Many wallets support importing Keystore/JSON file, which would allow you to access your funds. You don't need any special tool for that.

What software did you use to create the Kystore/JSON backup file?

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
pbies (OP)
Full Member
***
Offline Offline

Activity: 244
Merit: 126



View Profile
March 10, 2023, 07:04:22 PM
 #3

...

If you know the password for your Keystore file, you should be able to access your wallet using a compatible software or wallet. Many wallets support importing Keystore/JSON file, which would allow you to access your funds. You don't need any special tool for that.

What software did you use to create the Kystore/JSON backup file?


I am asking for code (mostly Python) way.

If the JSON would be whole I could import it, it isn't.

No wallet software is applicable here.

BTC: bc1qmrexlspd24kevspp42uvjg7sjwm8xcf9w86h5k
I have 9900K and 1080 Ti, gathering funds for new desktop PC for Bitcoin operations - 14900K and RTX 4090
litecoin_messiah
Sr. Member
****
Offline Offline

Activity: 355
Merit: 268



View Profile WWW
March 12, 2023, 11:36:12 PM
 #4

Wallet Client? electrum i guess?
pbies (OP)
Full Member
***
Offline Offline

Activity: 244
Merit: 126



View Profile
March 13, 2023, 04:06:56 PM
 #5

Wallet Client? electrum i guess?

I don't know - I have only .json file and password for it.

BTC: bc1qmrexlspd24kevspp42uvjg7sjwm8xcf9w86h5k
I have 9900K and 1080 Ti, gathering funds for new desktop PC for Bitcoin operations - 14900K and RTX 4090
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1498
Merit: 7292


Farewell, Leo


View Profile
March 13, 2023, 04:14:24 PM
Merited by pooya87 (2)
 #6

What do you mean you want to decipher an xprv / seed? If you have the keystore and the password to unlock it, then you can decrypt everything encrypted in it.

I don't know - I have only .json file and password for it.
Something tells me you bought someone else's wallet which supposedly have coins you try to gain access to. If that's the case, it's most certainly a scam.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
FatFork
Legendary
*
Offline Offline

Activity: 1582
Merit: 2584


Top Crypto Casino


View Profile WWW
March 13, 2023, 10:50:23 PM
 #7

Wallet Client? electrum i guess?

I don't know - I have only .json file and password for it.

So how did you manage to get your hands on that JSON file and its password?
Hope you're not trying anything illegal! Wink

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
pbies (OP)
Full Member
***
Offline Offline

Activity: 244
Merit: 126



View Profile
March 14, 2023, 03:44:26 PM
 #8

What do you mean you want to decipher an xprv / seed? If you have the keystore and the password to unlock it, then you can decrypt everything encrypted in it.

I don't know - I have only .json file and password for it.
Something tells me you bought someone else's wallet which supposedly have coins you try to gain access to. If that's the case, it's most certainly a scam.

These are hex numbers. I need at least seed to be converted to text.
Also xprv is in hex format that modern wallets do not accept.

I have no code to decrypt neither and convert them to "readable" format.

BTC: bc1qmrexlspd24kevspp42uvjg7sjwm8xcf9w86h5k
I have 9900K and 1080 Ti, gathering funds for new desktop PC for Bitcoin operations - 14900K and RTX 4090
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1498
Merit: 7292


Farewell, Leo


View Profile
March 14, 2023, 06:23:22 PM
 #9

These are hex numbers.
Which are represented in hex?

I need at least seed to be converted to text.
But seed is supposed to be in hex. Seed phrase is in text.

Also xprv is in hex format that modern wallets do not accept.
It sounds very weird that you have a master private key in hex, as it always comes in base58.

It seems to me your situation is an XY problem.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
pbies (OP)
Full Member
***
Offline Offline

Activity: 244
Merit: 126



View Profile
March 14, 2023, 06:42:04 PM
 #10

These are hex numbers.
Which are represented in hex?

I need at least seed to be converted to text.
But seed is supposed to be in hex. Seed phrase is in text.

Also xprv is in hex format that modern wallets do not accept.
It sounds very weird that you have a master private key in hex, as it always comes in base58.

It seems to me your situation is an XY problem.

Both xprv and seed are in hex. I've already told you.
I need xprv and seed to be converted to xprv in base58 format, seed to words.

No, it is not XY problem.

Just need to convert xprv and seed to "readable" values, using given password. Mostly by Python code.
I already said that three times.

BTC: bc1qmrexlspd24kevspp42uvjg7sjwm8xcf9w86h5k
I have 9900K and 1080 Ti, gathering funds for new desktop PC for Bitcoin operations - 14900K and RTX 4090
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1498
Merit: 7292


Farewell, Leo


View Profile
March 14, 2023, 06:54:44 PM
 #11

Both xprv and seed are in hex. I've already told you.
Maybe, but you haven't cleared up what you want to do, and it's difficult to understand what is what from your wording.

I need xprv and seed to be converted to xprv in base58 format, seed to words.
So you want hexadecimally represented xprv to base58 and hexadecimally represented seed to words (AKA, seed phrase).

I don't know python, so I asked ChatGPT. Isn't this what you want basically? (for xprv only)
Code:
import base58
import binascii

def encode_xprv(hex_xprv):
    # Convert hex xprv to bytes
    xprv_bytes = binascii.unhexlify(hex_xprv)
    
    # Add version byte (0x0488ADE4) to the beginning
    version_bytes = bytes.fromhex('0488ADE4')
    xprv_bytes = version_bytes + xprv_bytes
    
    # Add 4-byte checksum to the end
    checksum_bytes = hash256(xprv_bytes)[:4]
    xprv_bytes += checksum_bytes
    
    # Encode the result in base58
    encoded_xprv = base58.b58encode(xprv_bytes).decode('utf-8')
    
    return encoded_xprv

def hash256(data):
    # Compute SHA256 hash of data
    import hashlib
    sha256_hash = hashlib.sha256(data).digest()
    
    # Compute SHA256 hash of SHA256 hash
    sha256_twice = hashlib.sha256(sha256_hash).digest()
    
    return sha256_twice

# Example usage
hex_xprv = "0488ade4000000000000000000d094cde7b1ca97a07c82d73bbd6b018f6b3e6d94c6c122f1b883e2e8fa6e76c261d96e4c4baebf8af4b4d05cfef4b1c2b47fa8f8640eb9a16f4d39473df7"
encoded_xprv = encode_xprv(hex_xprv)
print(encoded_xprv)

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
pbies (OP)
Full Member
***
Offline Offline

Activity: 244
Merit: 126



View Profile
March 14, 2023, 07:04:46 PM
 #12

...

Always please read the first post - it is all explained there.

No, this script does not do what I need.
It does more encode the xprv (not this direction which I need) by sha256 and does not give seed phrase in text.

Please stop trolling.

BTC: bc1qmrexlspd24kevspp42uvjg7sjwm8xcf9w86h5k
I have 9900K and 1080 Ti, gathering funds for new desktop PC for Bitcoin operations - 14900K and RTX 4090
ABCbits
Legendary
*
Offline Offline

Activity: 2856
Merit: 7407


Crypto Swap Exchange


View Profile
March 15, 2023, 12:31:04 PM
Merited by pbies (1)
 #13

--snip--
Both xprv and seed are in hex. I've already told you.
I need xprv and seed to be converted to xprv in base58 format, seed to words.
--snip--

At least from seed (in hex format) to words it should be straightforward. An example,

Code:
>>> from mnemonic import Mnemonic
>>> mnemo = Mnemonic("english")
>>> xprv = '419ff3b824753f296223325a300a694a9641135558eedda79d9cb74f046e1457'
>>> len(xprv)
64
>>> xprv_bytes = bytes.fromhex(xprv)
>>> len(xprv_bytes)
32
>>> mnemo.to_mnemonic(xprv_bytes)
'dose zebra unlock employ fault net mass green focus leopard olympic news goat meadow fever build tank diagram grunt hub utility damage eyebrow view'

Take note it require library from https://github.com/trezor/python-mnemonic. And in case i also misunderstood what you want to achieve, i would suggest you to add expected input/output with some examples to your question.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
pbies (OP)
Full Member
***
Offline Offline

Activity: 244
Merit: 126



View Profile
March 15, 2023, 04:37:20 PM
 #14

Code:
>>> from mnemonic import Mnemonic
>>> mnemo = Mnemonic("english")
>>> xprv = '419ff3b824753f296223325a300a694a9641135558eedda79d9cb74f046e1457'
>>> len(xprv)
64
>>> xprv_bytes = bytes.fromhex(xprv)
>>> len(xprv_bytes)
32
>>> mnemo.to_mnemonic(xprv_bytes)
'dose zebra unlock employ fault net mass green focus leopard olympic news goat meadow fever build tank diagram grunt hub utility damage eyebrow view'

Yes, that works! Thank you!

BTC: bc1qmrexlspd24kevspp42uvjg7sjwm8xcf9w86h5k
I have 9900K and 1080 Ti, gathering funds for new desktop PC for Bitcoin operations - 14900K and RTX 4090
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!