Bitcoin Forum
May 07, 2024, 03:45:39 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Create Mnemonic from existing wallet?  (Read 181 times)
dre1982 (OP)
Sr. Member
****
Offline Offline

Activity: 770
Merit: 284


★Bitvest.io★ Play Plinko or Invest!


View Profile
September 23, 2020, 06:50:57 AM
Merited by mocacinno (1)
 #1

I am wondering if it's possible to create a mnemonic from an existing wallet.

For example, I got some existing paper wallets and want to create a mnemonic  of that. Is that doable? (of course on an off-line computer for the security)



BIG WINNER!
[15.00000000 BTC]


▄████████████████████▄
██████████████████████
██████████▀▀██████████
█████████░░░░█████████
██████████▄▄██████████
███████▀▀████▀▀███████
██████░░░░██░░░░██████
███████▄▄████▄▄███████
████▀▀████▀▀████▀▀████
███░░░░██░░░░██░░░░███
████▄▄████▄▄████▄▄████
██████████████████████
▀████████████████████▀
▄████████████████████▄
██████████████████████
█████▀▀█▀▀▀▀▀▀██▀▀████
█████░░░░░░░░░░░░░▄███
█████░░░░░░░░░░░░▄████
█████░░▄███▄░░░░██████
█████▄▄███▀░░░░▄██████
█████████░░░░░░███████
████████░░░░░░░███████
███████░░░░░░░░███████
███████▄▄▄▄▄▄▄▄███████
██████████████████████
▀████████████████████▀
▄████████████████████▄
███████████████▀▀▀▀▀▀▀
███████████▀▀▄▄█░░░░░█
█████████▀░░█████░░░░█
███████▀░░░░░████▀░░░▀
██████░░░░░░░░▀▄▄█████
█████░▄░░░░░▄██████▀▀█
████░████▄░███████░░░░
███░█████░█████████░░█
███░░░▀█░██████████░░█
███░░░░░░████▀▀██▀░░░░
███░░░░░░███░░░░░░░░░░
▀██░▄▄▄▄░████▄▄██▄░░░░
▄████████████▀▀▀▀▀▀▀██▄
█████████████░█▀▀▀█░███
██████████▀▀░█▀░░░▀█░▀▀
███████▀░▄▄█░█░░░░░█░█▄
████▀░▄▄████░▀█░░░█▀░██
███░▄████▀▀░▄░▀█░█▀░▄░▀
█▀░███▀▀▀░░███░▀█▀░███░
▀░███▀░░░░░████▄░▄████░
░███▀░░░░░░░█████████░░
░███░░░░░░░░░███████░░░
███▀░██░░░░░░▀░▄▄▄░▀░░░
███░██████▄▄░▄█████▄░▄▄
▀██░████████░███████░█▀
▄████████████████████▄
████████▀▀░░░▀▀███████
███▀▀░░░░░▄▄▄░░░░▀▀▀██
██░▀▀▄▄░░░▀▀▀░░░▄▄▀▀██
██░▄▄░░▀▀▄▄░▄▄▀▀░░░░██
██░▀▀░░░░░░█░░░░░██░██
██░░░▄▄░░░░█░██░░░░░██
██░░░▀▀░░░░█░░░░░░░░██
██░░░░░▄▄░░█░░░░░██░██
██▄░░░░▀▀░░█░██░░░░░██
█████▄▄░░░░█░░░░▄▄████
█████████▄▄█▄▄████████
▀████████████████████▀




Rainbot
Daily Quests
Faucet
"Bitcoin: the cutting edge of begging technology." -- Giraffe.BTC
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
BASE16
Member
**
Offline Offline

Activity: 180
Merit: 38


View Profile
September 23, 2020, 06:52:30 AM
 #2

Yes you can do that.  Smiley
mocacinno
Legendary
*
Offline Offline

Activity: 3388
Merit: 4919


https://merel.mobi => buy facemasks with BTC/LTC


View Profile WWW
September 23, 2020, 06:53:58 AM
Merited by dre1982 (2), pooya87 (1)
 #3

I am wondering if it's possible to create a mnemonic from an existing wallet.

For example, I got some existing paper wallets and want to create a mnemonic  of that. Is that doable? (of course on an off-line computer for the security)

A paper wallet usually contains a private key and the public key hash (the address). You can't create a BIP39 mnemonic seedphrase with this data.

The seed phrase goes trough a hash function, such a function is one-way by design.

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
BASE16
Member
**
Offline Offline

Activity: 180
Merit: 38


View Profile
September 23, 2020, 06:57:41 AM
 #4

Of course you can.
You have the private key.
mocacinno
Legendary
*
Offline Offline

Activity: 3388
Merit: 4919


https://merel.mobi => buy facemasks with BTC/LTC


View Profile WWW
September 23, 2020, 06:58:16 AM
 #5

Of course you can.
You have the private key.

Then show me how... I just visited https://iancoleman.io/bip39/ and generated a random seed...
Here's the first address/private key:

1tthHGi8L1dRqC5uDAbQjT6un3QMucEGu => L4XSR8Ufpfg3Fnd68z3E9sTahDnbzmssJc6Dkc6nm9P5xAUbR3Fb

This is the info you'd find on a paper wallet...

Now, by all means... Publish the seed phrase...

Are you willing to make a small bet to make things interesting?

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
dre1982 (OP)
Sr. Member
****
Offline Offline

Activity: 770
Merit: 284


★Bitvest.io★ Play Plinko or Invest!


View Profile
September 23, 2020, 07:04:52 AM
 #6

I am wondering if it's possible to create a mnemonic from an existing wallet.

For example, I got some existing paper wallets and want to create a mnemonic  of that. Is that doable? (of course on an off-line computer for the security)

A paper wallet usually contains a private key and the public key hash (the address). You can't create a BIP39 mnemonic seedphrase with this data.

The seed phrase goes trough a hash function, such a function is one-way by design.

OK good to know. Thanks for the fast information.

Of course you can.
You have the private key.

Then show me how... I just visited https://iancoleman.io/bip39/ and generated a random seed...
Here's the first address/private key:

1tthHGi8L1dRqC5uDAbQjT6un3QMucEGu => L4XSR8Ufpfg3Fnd68z3E9sTahDnbzmssJc6Dkc6nm9P5xAUbR3Fb

This is the info you'd find on a paper wallet...

Now, by all means... Publish the seed phrase...

Are you willing to make a small bet to make things interesting?

I would close the topic but I will let it open because now it's getting interesting.  Grin



BIG WINNER!
[15.00000000 BTC]


▄████████████████████▄
██████████████████████
██████████▀▀██████████
█████████░░░░█████████
██████████▄▄██████████
███████▀▀████▀▀███████
██████░░░░██░░░░██████
███████▄▄████▄▄███████
████▀▀████▀▀████▀▀████
███░░░░██░░░░██░░░░███
████▄▄████▄▄████▄▄████
██████████████████████
▀████████████████████▀
▄████████████████████▄
██████████████████████
█████▀▀█▀▀▀▀▀▀██▀▀████
█████░░░░░░░░░░░░░▄███
█████░░░░░░░░░░░░▄████
█████░░▄███▄░░░░██████
█████▄▄███▀░░░░▄██████
█████████░░░░░░███████
████████░░░░░░░███████
███████░░░░░░░░███████
███████▄▄▄▄▄▄▄▄███████
██████████████████████
▀████████████████████▀
▄████████████████████▄
███████████████▀▀▀▀▀▀▀
███████████▀▀▄▄█░░░░░█
█████████▀░░█████░░░░█
███████▀░░░░░████▀░░░▀
██████░░░░░░░░▀▄▄█████
█████░▄░░░░░▄██████▀▀█
████░████▄░███████░░░░
███░█████░█████████░░█
███░░░▀█░██████████░░█
███░░░░░░████▀▀██▀░░░░
███░░░░░░███░░░░░░░░░░
▀██░▄▄▄▄░████▄▄██▄░░░░
▄████████████▀▀▀▀▀▀▀██▄
█████████████░█▀▀▀█░███
██████████▀▀░█▀░░░▀█░▀▀
███████▀░▄▄█░█░░░░░█░█▄
████▀░▄▄████░▀█░░░█▀░██
███░▄████▀▀░▄░▀█░█▀░▄░▀
█▀░███▀▀▀░░███░▀█▀░███░
▀░███▀░░░░░████▄░▄████░
░███▀░░░░░░░█████████░░
░███░░░░░░░░░███████░░░
███▀░██░░░░░░▀░▄▄▄░▀░░░
███░██████▄▄░▄█████▄░▄▄
▀██░████████░███████░█▀
▄████████████████████▄
████████▀▀░░░▀▀███████
███▀▀░░░░░▄▄▄░░░░▀▀▀██
██░▀▀▄▄░░░▀▀▀░░░▄▄▀▀██
██░▄▄░░▀▀▄▄░▄▄▀▀░░░░██
██░▀▀░░░░░░█░░░░░██░██
██░░░▄▄░░░░█░██░░░░░██
██░░░▀▀░░░░█░░░░░░░░██
██░░░░░▄▄░░█░░░░░██░██
██▄░░░░▀▀░░█░██░░░░░██
█████▄▄░░░░█░░░░▄▄████
█████████▄▄█▄▄████████
▀████████████████████▀




Rainbot
Daily Quests
Faucet
BASE16
Member
**
Offline Offline

Activity: 180
Merit: 38


View Profile
September 23, 2020, 07:05:37 AM
 #7

supreme survey thought eternal swap crime employ glory garage artefact slogan decorate desk mention captain range toddler thought amazing grace comfort strategy paper enhance
mocacinno
Legendary
*
Offline Offline

Activity: 3388
Merit: 4919


https://merel.mobi => buy facemasks with BTC/LTC


View Profile WWW
September 23, 2020, 07:13:50 AM
 #8

supreme survey thought eternal swap crime employ glory garage artefact slogan decorate desk mention captain range toddler thought amazing grace comfort strategy paper enhance

well... that's a valid seed... If i use the "default" bip39 legacy derivation path (m/44'/0'/0') the first address is:
1J99qJyhe7BZGzx9L9ppBQ1yfYVzUuPrBp

That's not exactly
1tthHGi8L1dRqC5uDAbQjT6un3QMucEGu

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
September 23, 2020, 07:18:06 AM
Last edit: November 15, 2023, 12:55:03 AM by HCP
Merited by xandry (2), JayJuanGee (1), pooya87 (1), mocacinno (1)
 #9

NOTE: I DO NOT recommend that you do any of this, it is purely for educational purposes



I am wondering if it's possible to create a mnemonic from an existing wallet.

For example, I got some existing paper wallets and want to create a mnemonic  of that.
You would have to create an individual mnemonic for each wallet, you cannot create one mnemonic which will recover ALL of your paper wallets, which kind of defeats the purpose really... as you're still needing to keep a backup of some form for each wallet. The only advantage would be that it would be easier to backup/restore without transcription errors than a long bitcoin private key in WIF format.

Additionally, there is no "standard" way of converting a single private key to a mnemonic... you could use a "method" similar to BIP39, ie. using the 256bits from the private key as the "entropy", calculating the 8 bit checksum, and then break the 264 bits total into 11 bit chunks and then convert those chunks into 24 words from the BIP39 wordlist.

WARNING: if you put those 24 words into a BIP39 wallet, it won't generate your original private key/address... it'll generate something completely different!



As a worked example, we'll cheat and use Ian Coleman's mnemonic code converter to do the "heavy lifting"...

Let's say that our Paper wallet was as follows:
(Compressed) Address: 19zAL47SZ1xBLiZmwiPt4fK9SSoxxCETfi
Private Key: L3Dt4emdX52UJ9R1gSghpR81sEVuXtv3r17iMRrCWQ1c1TLxCy3D

If we put that Private Key into https://www.bitaddress.org/ we can see that the private key in hex is:
Code:
B31CAC51334D7E7E0197A4891B60D5F19481C9C58FE7FE7E3893E0544FD39AD9



Now using IanColeman's Mnemonic Code Converter, we select the "Show Entropy Details" option:



We can then put in our 64 char hex private key in as 256bits of entropy:



And it automatically gives us a 24 word mnemonic:
Code:
reason tornado begin grief subject disease alien virus math swallow cube tobacco elite top bike woman wrist vault ceiling scheme eager truth hidden desert


However, as noted above... this mnemonic does NOT generate our private key/address:



Instead, to go from our mnemonic back to private key, you need to go in reverse using Ian Coleman's tool... paste the 24 words into the BIP39 mnemonic box, click the "show entropy details" box, then copy/paste the 64 char hex from the "entropy" box into the "Enter Private Key" box on the "wallet details" tab of bitaddress.org:



I DO NOT recommend that you do any of this, it is purely for educational purposes




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


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
mocacinno
Legendary
*
Offline Offline

Activity: 3388
Merit: 4919


https://merel.mobi => buy facemasks with BTC/LTC


View Profile WWW
September 23, 2020, 07:24:34 AM
 #10

Well, aparently i didn't think this one trough completely... Thanks to @HCP and @BASE16

I assumed the OP wanted a way to generate a mnemonic seed that could be used in a bip39 compatible wallet... But yeah, HCP's method would work eventough it would just add additional complexity to restoring instead of simplifying things.

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
BASE16
Member
**
Offline Offline

Activity: 180
Merit: 38


View Profile
September 23, 2020, 07:24:50 AM
Merited by mocacinno (1)
 #11

supreme survey thought eternal swap crime employ glory garage artefact slogan decorate desk mention captain range toddler thought amazing grace comfort strategy paper enhance

well... that's a valid seed... If i use the "default" bip39 legacy derivation path (m/44'/0'/0') the first address is:
1J99qJyhe7BZGzx9L9ppBQ1yfYVzUuPrBp

That's not exactly
1tthHGi8L1dRqC5uDAbQjT6un3QMucEGu

No.
But this is.



mocacinno
Legendary
*
Offline Offline

Activity: 3388
Merit: 4919


https://merel.mobi => buy facemasks with BTC/LTC


View Profile WWW
September 23, 2020, 07:27:25 AM
Last edit: September 23, 2020, 07:50:34 AM by mocacinno
 #12

supreme survey thought eternal swap crime employ glory garage artefact slogan decorate desk mention captain range toddler thought amazing grace comfort strategy paper enhance

well... that's a valid seed... If i use the "default" bip39 legacy derivation path (m/44'/0'/0') the first address is:
1J99qJyhe7BZGzx9L9ppBQ1yfYVzUuPrBp

That's not exactly
1tthHGi8L1dRqC5uDAbQjT6un3QMucEGu

No.
But this is.




I agree... Sorry for the mixup.
For future reference: there is a theoretical way to convert a private key to a mnemonic seed, but it's not a bip39 compatible seed, you'd basically have to convert your private key to hex, use it as entropy for your seed. If you want to use the seed you'd then afterwards look at the entropy from this seed and use said entropy as a private key. This basically makes this method a smart way of "encoding" your private key, but i don't think this is what the op meanth with his question.

So, if the rest is TL;DR; i think this can be summarised as:

Yes, there is a way to convert a private key into a seed phrase... But this seed phrase is only usefull if you find it easyer to nod down 24 words instead of a private key. If you wanted to use the seed to create a wallet, you'd need to convert the seed phrase back to single private key and import this key, resulting in a non-HD wallet

No, there is no way to convert your private key into a bip39 seed phrase that can be imported in a HD wallet (like electrum). Well, the seed phrase is valid, but the derived keys will not match your original key.

Basically, i was focussing on the "no"-part, but in hindsight, the OP never dictated that it had to be a bip39 compatible seed, wich would make BASE16's and HCP's answer more correct than mine... I assumed to much when i read the OP

I'm lucky BASE16 didn't take me up on my offer to make a bet, cause he'd have won given the fact i was making assumptions that were never specified...

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
September 23, 2020, 07:58:18 AM
 #13

Yeah... the important takeaways from this should be that:

1. While you can create a "mnemonic encoding scheme" for a single private key... it will NOT be a BIP39 compatible seed! Restoring from mnemonic to private key will not be possible using a BIP39 compatible wallet

and

2. You cannot create a single mnemonic seed that will restore multiple "random" private keys

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


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18510


View Profile
September 23, 2020, 09:49:47 AM
Last edit: September 23, 2020, 11:19:34 AM by o_e_l_e_o
Merited by HCP (2)
 #14

Yes, there is a way to convert a private key into a seed phrase... But this seed phrase is only usefull if you find it easyer to nod down 24 words instead of a private key.
I wouldn't call it a seed phrase though, in that it is not used to create a seed number for a HD wallet. You can convert any data you like in to a series of words from the BIP39 word list by converting it to binary and splitting in to 11 bit chunks. It is simply encoding the private key in different way.
mocacinno
Legendary
*
Offline Offline

Activity: 3388
Merit: 4919


https://merel.mobi => buy facemasks with BTC/LTC


View Profile WWW
September 23, 2020, 02:07:05 PM
 #15

Yes, there is a way to convert a private key into a seed phrase... But this seed phrase is only usefull if you find it easyer to nod down 24 words instead of a private key.
I wouldn't call it a seed phrase though, in that it is not used to create a seed number for a HD wallet. You can convert any data you like in to a series of words from the BIP39 word list by converting it to binary and splitting in to 11 bit chunks. It is simply encoding the private key in different way.

I guess it depends on the definition of "seed phrase" you want to use. But the definition of the wiki is the following:

Source: https://en.bitcoin.it/wiki/Seed_phrase
Quote
A seed phrase, seed recovery phrase or backup seed phrase is a list of words which store all the information needed to recover Bitcoin funds on-chain.

This defenition doesn't mention bip39, master private keys, stretching, derivation paths, HD wallets,...

So, if you interprete OP's question very strictly, HCP's and BASE16's answer is more correct than mine. Using their workflow, you can indeed generate a seed phrase that "stores all the information needed to recover Bitcoin funds on-chain". It doens't really matter that you can encode and recover about any ascii string using said method, nor does it matter that if you use the seed on a BIP39 compatible wallet, your initial private key will not be derived from said seed.
This being said, above defenition from the wiki is so broad you could basically take a hex encoded private key and use the NATO alphabet to "convert" your private key into a seed phrase of 64 seed words... This would still fall withing the defenition of a seed phrase (i guess).

I didn't pay close attention to the OP's question... IF he would have asked if it was possible to take a single private key and generate a mnemonic that could be used to restore a BIP39 compatible HD wallet in such a way that the initial private key would be derived from the master private key generated from the mnemonic, the answer i gave initially (no) would have been correct.
But in this specific case, i guess i assumed to much and i was wrong.



█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
September 23, 2020, 09:51:15 PM
 #16

I wouldn't call it a seed phrase though, in that it is not used to create a seed number for a HD wallet. You can convert any data you like in to a series of words from the BIP39 word list by converting it to binary and splitting in to 11 bit chunks. It is simply encoding the private key in different way.
I guess it depends on the definition of "seed phrase" you want to use.
That's why I used the term "mnemonic encoding scheme"... I would not regard it as a "seed" phrase either, as there is no "seed"... As o_e_l_e_o stated, it's just an encoding of the private key data.


I didn't pay close attention to the OP's question... IF he would have asked if it was possible to take a single private key and generate a mnemonic that could be used to restore a BIP39 compatible HD wallet in such a way that the initial private key would be derived from the master private key generated from the mnemonic, the answer i gave initially (no) would have been correct.
But in this specific case, i guess i assumed to much and i was wrong.
Also, I get the feeling that the OP was hoping that they could generate a single BIP39 compatible mnemonic that would restore all of their paper wallet private keys... which is impossible. But the question was a big vague in that respect, so don't beat yourself up about it! Wink

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


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
pooya87
Legendary
*
Offline Offline

Activity: 3444
Merit: 10550



View Profile
September 24, 2020, 03:10:53 AM
 #17

So, if you interprete OP's question very strictly, HCP's and BASE16's answer is more correct than mine.

nah, your answer is still the correct one any way that you interpret the question here.
although i myself have explained the same method as @HCP here in the past, it still falls under the category of writing your own code and using your own custom encoding scheme to encode the raw bytes of a private key with your own custom algorithm. you can even use bech32 which has a better recoverability due to its much better error detection algorithm. but none of it will be compatible with any wallets, hence "writing your own code".

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
MrFreeDragon
Sr. Member
****
Offline Offline

Activity: 443
Merit: 350


View Profile
October 22, 2020, 10:26:17 AM
 #18

I am wondering if it's possible to create a mnemonic from an existing wallet.

For example, I got some existing paper wallets and want to create a mnemonic  of that. Is that doable? (of course on an off-line computer for the security)

Suppose we should receive a standard BIP39 HD wallet which uses 2^32 indexes and 2^32 wallets inside every index, so 2^64 wallets in total. Your existing wallet should be one of that 2^64 wallets.

Considering the fact that there are 2^256 private keys in total, but only 2^160 public addresses (due to ripemd160 hash function) we have only 2^160 wallets.

Now we should brute force entropy for our HD wallets, and supposing that different entropy leads us to completely different 2^62 wallets, we need to brute force 2^160/2^64 = 2^96 different entropy. Each try is not just one calculation. Each try is also includes 2048 rounds of HMAC-SHA512 hashes. So it would not be possible in practice. But in theory, it is possible of course.

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!