andrecalabrese (OP)
Newbie
Offline
Activity: 13
Merit: 1
|
|
April 12, 2020, 07:55:23 AM |
|
I have a technical question.
A wallet is protected by a password, which encrypts the key.
Is it possible to "merge" two encrypted wallets into one and have a completely new database, if they are encrypted with the same password?
Is there any paper on how the encryption works?
|
|
|
|
|
|
Bitcoin mining is now a specialized and very risky industry, just like gold mining. Amateur miners are unlikely to make much money, and may even lose money. Bitcoin is much more than just mining, though!
|
|
|
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
|
|
|
|
HeRetiK
Legendary
Offline
Activity: 2884
Merit: 2061
|
|
April 12, 2020, 08:42:52 AM |
|
I have a technical question.
A wallet is protected by a password, which encrypts the key.
Is it possible to "merge" two encrypted wallets into one and have a completely new database, if they are encrypted with the same password?
Is there any paper on how the encryption works?
Two different encrypted wallets will be encrypted using two different keys, even if they have the same password. As you mentioned yourself, the key is encrypted using the password. Accordingly the wallet itself is not encrypted using the password but the randomly generated key that is encrypted using said password. Bitcoin Core's wallet.dat uses standard ciphers and hashing algorithms. See here for reference: https://en.bitcoin.it/wiki/Wallet_encryptionInformation on AES-256 and SHA-512 itself is widely available. It is not possible to "merge" AES-256 encrypted data without decrypting it first, even if they are encrypted using the same key.
|
|
|
|
pooya87
Legendary
Offline
Activity: 3402
Merit: 10433
|
|
April 12, 2020, 09:32:00 AM |
|
what is it exactly that you are trying to do? there is a good chance that there is a more logical and better way of achieving that. for instance wallets usually support "importing" keys which is the option you should use if you want to "merge" another wallet into a wallet you have if the software allowed that. but a still better way is to "sweep" the keys into the wallet that you have which means sending the coins from the secondary wallet keys to the primary wallet.
|
..JAMBLER.io.. | │ | | Create Your Bitcoin Mixing Business Now for F R E E | | │ | ▄█████████████████████████████ █████████████████████████ ████▀████████████████████ ███▀███▀██▄█▀███▀▀▀██████ ██▀█████▄█▄██████████████ ██▄▄████▀▄▄▄▀▀▀▀▀▄▄██████ █████▄▄▄████████▄██▀▄████ █████▀█▄█▄████▄██▀█▄█████ ███████▀▄█▀█▄██▀█▄███████ █████████▄█▀▄█▀▄█████████ █████████████████████████ █████████████████████████ ▀█████████████████████████████ | | ████▄ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████▀ | ▄█████████████████████████████ ████████▀▀█████▀▀████████ █████▀█████████████▀█████ █████████████████████████ ███████████████▄█████████ █████████████████████████ █████████████████████████ █████████████████████████ ███████████████▀█████████ █████████████████████████ █████▄█████████████▄█████ ████████▄▄█████▄▄████████ ▀█████████████████████████████ | █████████████████████████████████████████████████ . INVEST BITCOIN . █████████████████████████████████████████████████ | ████▄ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████▀ |
|
|
|
koch44
Jr. Member
Offline
Activity: 54
Merit: 11
|
I have a technical question.
A wallet is protected by a password, which encrypts the key.
Is it possible to "merge" two encrypted wallets into one and have a completely new database, if they are encrypted with the same password?
Is there any paper on how the encryption works?
First you would need to know if the DB is same version, otherwise you would need to convert it yourself. This is possible in blockchain.com wallets (to have multiple xpriv) but as someone said above, it would probably mean you would break backward compatibility and would have your own custom bitcoin core version not readable by other versions.
|
BTC Python developer of various tools. Contact me for programming help (python/cuda)
|
|
|
R.I.U. iol
Newbie
Offline
Activity: 15
Merit: 2
|
|
April 14, 2020, 04:39:31 PM |
|
I don't know if this helps, but you can: export the private keys from both wallets then create a new wallet import both private keys into the new wallet your new wallet will have all the addresses of the two old wallets
|
|
|
|
nc50lc
Legendary
Offline
Activity: 2366
Merit: 5429
Self-proclaimed Genius
|
|
April 16, 2020, 07:32:13 AM |
|
You'd lose HD wallet feature, which force you to backup wallet.dat file regularly. OP apparently trying to merge multiple wallet.dat without losing any features or advantage each wallet.dat have.
He will only need to backup once after he imported the keys or dumpwallet file. After that, the 'new backup' can still generate the new/future addresses/keys as long as the hdseed is the same. Old backups however wont contain the imported prv keys. I don't know if this helps, but you can: export the private keys from both wallets
Better use dumpwallet on wallet1, then importwallet the dump file to wallet2. That's doable within a minute if you're fast, minus the rescan.
|
..JAMBLER.io.. | │ | | Create Your Bitcoin Mixing Business Now for F R E E | | │ | ▄█████████████████████████████ █████████████████████████ ████▀████████████████████ ███▀███▀██▄█▀███▀▀▀██████ ██▀█████▄█▄██████████████ ██▄▄████▀▄▄▄▀▀▀▀▀▄▄██████ █████▄▄▄████████▄██▀▄████ █████▀█▄█▄████▄██▀█▄█████ ███████▀▄█▀█▄██▀█▄███████ █████████▄█▀▄█▀▄█████████ █████████████████████████ █████████████████████████ ▀█████████████████████████████ | | ████▄ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████▀ | ▄█████████████████████████████ ████████▀▀█████▀▀████████ █████▀█████████████▀█████ █████████████████████████ ███████████████▄█████████ █████████████████████████ █████████████████████████ █████████████████████████ ███████████████▀█████████ █████████████████████████ █████▄█████████████▄█████ ████████▄▄█████▄▄████████ ▀█████████████████████████████ | █████████████████████████████████████████████████ . INVEST BITCOIN . █████████████████████████████████████████████████ | ████▄ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████▀ |
|
|
|
HCP
Legendary
Offline
Activity: 2086
Merit: 4315
<insert witty quote here>
|
|
April 16, 2020, 11:08:15 PM |
|
I have a technical question.
A wallet is protected by a password, which encrypts the key.
Is it possible to "merge" two encrypted wallets into one and have a completely new database, if they are encrypted with the same password?
Is there any paper on how the encryption works?
Which wallet application are you referring to? As not all wallets use the same encryption methods/standards. Are both wallets from the same app? I suspect this is an " XY problem. What are you actually wanting to achieve by merging two wallets together? What is your specific scenario/reason for wanting to "merge" 2 wallets?
|
..JAMBLER.io.. | │ | | Create Your Bitcoin Mixing Business Now for F R E E | | │ | ▄█████████████████████████████ █████████████████████████ ████▀████████████████████ ███▀███▀██▄█▀███▀▀▀██████ ██▀█████▄█▄██████████████ ██▄▄████▀▄▄▄▀▀▀▀▀▄▄██████ █████▄▄▄████████▄██▀▄████ █████▀█▄█▄████▄██▀█▄█████ ███████▀▄█▀█▄██▀█▄███████ █████████▄█▀▄█▀▄█████████ █████████████████████████ █████████████████████████ ▀█████████████████████████████ | | ████▄ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████▀ | ▄█████████████████████████████ ████████▀▀█████▀▀████████ █████▀█████████████▀█████ █████████████████████████ ███████████████▄█████████ █████████████████████████ █████████████████████████ █████████████████████████ ███████████████▀█████████ █████████████████████████ █████▄█████████████▄█████ ████████▄▄█████▄▄████████ ▀█████████████████████████████ | █████████████████████████████████████████████████ . INVEST BITCOIN . █████████████████████████████████████████████████ | ████▄ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████▀ |
|
|
|
keychainX
Member
Offline
Activity: 372
Merit: 53
Telegram @keychainX
|
|
April 26, 2020, 12:00:23 AM |
|
I have a technical question.
A wallet is protected by a password, which encrypts the key.
Is it possible to "merge" two encrypted wallets into one and have a completely new database, if they are encrypted with the same password?
Is there any paper on how the encryption works?
No you cannot, as there is no wallet that can have multiple passwords for different private keys. All wallets even those with imported keys share the same password, therefor render it impossible to "merge" two different wallets with different passwords into one. If you need info on password encryption for bitcoin core you could always dive in here; (google AES-256-CBC and SHA-512) https://en.bitcoin.it/wiki/Wallet_encryption/KX
|
|
|
|
cryptoworld99
Member
Offline
Activity: 84
Merit: 22
|
|
May 04, 2020, 02:04:11 AM |
|
Yes, its possible. bitcoin-cli createwallet "testwallet" This should make a folder called "testwallet" in your bitcoin dir delete the wallet.dat file there and upload your encrypted wallet.dat file there to spend funds from what wallet.dat file you do this bitcoin-cli loadwallet testwallet bitcoin-cli -rpcwallet=testwallet sendtoaddress (address) (amount) Easy as that, repeat step 1 as many times as you like with as many wallet.dat files. Learn more here: https://bitcoincore.org/en/doc/0.17.0/rpc/wallet/createwallet/Good luck PM me if you need any help.
|
|
|
|
ranochigo
Legendary
Offline
Activity: 2940
Merit: 4127
|
|
May 04, 2020, 02:42:29 AM |
|
-snip-
You're sweeping the funds from one wallet file to another. OP wants to merge two of his wallet.dat such that the addresses from both wallet.dat is in one wallet.dat only.
|
..JAMBLER.io.. | │ | | Create Your Bitcoin Mixing Business Now for F R E E | | │ | ▄█████████████████████████████ █████████████████████████ ████▀████████████████████ ███▀███▀██▄█▀███▀▀▀██████ ██▀█████▄█▄██████████████ ██▄▄████▀▄▄▄▀▀▀▀▀▄▄██████ █████▄▄▄████████▄██▀▄████ █████▀█▄█▄████▄██▀█▄█████ ███████▀▄█▀█▄██▀█▄███████ █████████▄█▀▄█▀▄█████████ █████████████████████████ █████████████████████████ ▀█████████████████████████████ | | ████▄ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████▀ | ▄█████████████████████████████ ████████▀▀█████▀▀████████ █████▀█████████████▀█████ █████████████████████████ ███████████████▄█████████ █████████████████████████ █████████████████████████ █████████████████████████ ███████████████▀█████████ █████████████████████████ █████▄█████████████▄█████ ████████▄▄█████▄▄████████ ▀█████████████████████████████ | █████████████████████████████████████████████████ . INVEST BITCOIN . █████████████████████████████████████████████████ | ████▄ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████▀ |
|
|
|
cryptoworld99
Member
Offline
Activity: 84
Merit: 22
|
|
May 04, 2020, 04:30:11 AM |
|
-snip-
You're sweeping the funds from one wallet file to another. OP wants to merge two of his wallet.dat such that the addresses from both wallet.dat is in one wallet.dat only. -snip-
You're sweeping the funds from one wallet file to another. OP wants to merge two of his wallet.dat such that the addresses from both wallet.dat is in one wallet.dat only. Hmmmm. Try this: Re-run bitcoind/Bitcoin-Qt, giving the -wallet=/path/to/wallet option. dumpwallet the private keys to a file Shutdown. concatenate the files together. Re-run and importwallet the combined file.
|
|
|
|
|