Bitcoin Forum
May 04, 2024, 07:13:52 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1] 2 3 4 5 6 7 8 9
1  Bitcoin / Bitcoin Technical Support / Re: Overwritten wallet.dat files on: July 21, 2021, 11:11:37 AM
If you want your funds to be snatched by a stranger and then have them tell you that it's unrecoverable then you should do what most dumber members suggest and seek external help and give it all away.

TRUST NO ONE.

Carefully think yourself if it would be a good idea to take a drive containing 8000 BTC and just handing it over to a stranger.
It doesn't take a rocket scientist to conclude that whoever suggests such a thing won't rank high on the IQ tables and their advice should be professionally tossed aside quickly before something really bad is going to happen.
2  Bitcoin / Development & Technical Discussion / Re: Does more seed words equal better security? on: July 21, 2021, 11:07:29 AM
Would Bitcoin be more secure against extremely powerful computing tech with more words in the dictionary list, a larger number of seed words and perhaps a longer BTC address/privkey? Say a seed had 50 words instead of 12 or 24 and Bitcoin addresses or seeds had at least one more character. Would it be more secure against bruteforcing or high computing power?

You have to specify more secure in terms of YOUR specific mnemonic/address or more secure in terms of ANY address because those are two different things.

Mnemonics exist to make your life easier by using words in stead of digits, and not to make it more secure.
3  Bitcoin / Development & Technical Discussion / Re: How many working hours does it need to code something like bitcoin from scratch? on: July 21, 2021, 05:34:12 AM
350400 Hours
4  Bitcoin / Bitcoin Technical Support / Re: Overwritten wallet.dat files on: July 20, 2021, 03:55:02 PM
If it was found as wallet.dat then what you found was an entry to a location on the disk in a partition table and not the actual wallet.
The actual wallet will be found and recognized by it's header as a .db file this is a Berkeley Binary Tree database file.
So it's a good idea to examine that drive in raw mode on the byte level.  
Look for the actual .db files by header and not for the filenames (like wallet.dat)
5  Bitcoin / Electrum / Re: How to redeem casacius using Electrum wallet on: July 18, 2021, 09:18:57 AM


As others have outlined you're on the right track.  There are some risks to what your proposing if your intention is to keep the coin in a hot wallet.  If your goal is to redeem the entire value of the coin and convert it to fiat you can avoid an additional transaction fee by sweeping the funds directly into your exchange wallet.  To do so, use a bitcoin address you obtain from your exchange to create a watch-only wallet; File>New/Restore>Next> then select "Import bitcoin address or private keys."

After the wallet has been created and you've confirmed the validity of the address you can sweep the funds directly to your exchange; Wallet>Private Keys>Sweep.

I strongly advise against sweeping the coins to any exchange.
6  Bitcoin / Electrum / Re: How to redeem casacius using Electrum wallet on: July 16, 2021, 01:49:22 AM
You can directly import that private key into electrum and then it will show up in electrum immediately so you do not have to sweep it.
Electrum recognizes these coins so they are compatible you can just import them directly and spend them.
The full 32 byte base16 private key is the sha256 hash of your 30 character private minikey.
7  Bitcoin / Bitcoin Technical Support / Re: Old HDD with wallet.dat, several reformatting and heavy use, is all hope lost? on: July 16, 2021, 01:39:12 AM
Thanks for all your replies.

However, there are few other magic bytes you could try such as 62 31 05 00 09 00 00 00 according to https://bitcoin.stackexchange.com/a/41450.
I tried but couldn't find anything. I also tried the other bytes in the linked post. I found some results for "defaultkey" but what follows the string is "site-packages/route.py". I guess it's from some other apps and not what a normal wallet.dat file contains?

Did you try any data recovery tools? Huh Or did you just make an image of the drive and search through the image? Huh
Yes, I first tried some data recovery tools such as disk genius. I couldn't find any file named "wallet.dat" and got thousands of unnamed files which are impractical to go through manually.

Mount the disk read only in linux and use photorec to copy all files that are found to another harddisk, and then look for files that have .db extension.
If you find any of those use the file <filename> command to examine the exact file type and if its a Berkeley DB Btree then it's most likely your wallet.
Photorec works on RAW data so it will not restore actual filenames like for example wallet.dat.
In stead it will give each file it finds a number, and look at the bytes and try to figure out the filetype from that so it does not matter how many times you formatted the drive if the bytes are still there then you will find it.

See here for more: https://www.cgsecurity.org/wiki/PhotoRec_Step_By_Step
This tutorial suggests to try testdisk first but in your case it is best you start with Photorec directly.
Thank you very much. I tried this software. I looked for .db files and couldn't find anything. Looking for other types of files yields some results. I wonder if I should look for all types and turn on options like "brute force"?


Ok so the best thing you can do is to look for files like jpg and png, these are image files (or mp3 if you are into music etc.) and if it finds any you open them and see if they are from the previous system installation.
If that is the case then you found proof that there is residual data from the former installation still on that disk.
This is likely because when you reinstall the operating system it will usually do a soft format by just wiping the partition table and leaving the old data it'self intact.
If you really wanted to destroy the data it would have be overwritten by manually making a hard/total format which could take a very long time for big disks, or you would have had used the new operating system extensively and filled up the drive to near full capacity thereby also overwriting the old data.
So if you can find any files that belong to the previous installation, then this indicates that you need to do a deeper scan
8  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: Test for free our new futures exchange, and get paid bitcoin! on: July 09, 2021, 06:50:37 AM
I have since made a withdrawal request and it hasn't come through yet.
My withdrawal arrived 2 days ago. Since it's just for testing, that's okay. But on a live site with real Bitcoin, withdrawals should be automated and much faster (otherwise customers get real nervous).

We'll absolutely implement automatic withdrawals before we launch! It will take some time as we have a lot of improvements on the to-do list, but we'll get there.

Did your withRAW succeed ?  Cheesy

Typo is fixed, thanks for letting us know.

Platform is lagging, can't see ongoing P&L, order pool tabs are confusing, no visual trigger entry/exit markers on the chart, does not store and reload settings, gives me the looks and feel of hitBTC the global scam experience.

Ongoing P&L is one of the next items in our to-do list. I think it might be done next week.

How can the tabs be more intuitive? I see you had a bad time testing our exchange and you don't like it, but negative feedback is sometimes as useful as positive ones.

Visual triggers in the chart are a great idea! We'll add to the to-do list.

What do you mean by store and reload settings? Have you tried reordering components and they went back to default positions?

I understand we don't have the best UX in the world right now but please understand that we are in testing mode. We are absolutely not ready for production, and we know that!

Not my key's not my funds this is a disaster in the making.

We are actually working right now on a hybrid non-custodial model in which order matching is centralized but funds remain secure in a smart contract. It will in a way be very similar to a channel. Check out this post that I've made on the Ethereum Research forum: High-frequency trading and the MEV auction debate.

Especially the inability to close a position that is in profit is one of the worst experiences a trader can have.
Total shit platform.

What happened when you tried to close your profitable position? If you found a bug when trying to close your position please let us know!

Regardless of the fact that you really didn't like our platform, your feedback has been helpful, so please share your BTC address here and we'll sending you a tip.



I tried to close the position by simply clicking the close button this didn't work.
It piled up more orders in stead of just closing the damn position.
It also was not possible to close those, and now everything is gone.
You successfully snatched all of my funds.
This wan't a bug this is done on purpose i have seen it many times over the years.
Now we will just have to wait until the first 'Tickspread scammed me' topics pop up all over the net.
And then when the heat get's too big, you will just think up some new name, and build a new platform and repeat the same o'l trick.

 
9  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: Test for free our new futures exchange, and get paid bitcoin! on: July 08, 2021, 03:23:04 PM
Platform is lagging, can't see ongoing P&L, order pool tabs are confusing, no visual trigger entry/exit markers on the chart, does not store and reload settings, gives me the looks and feel of hitBTC the global scam experience.
Not my key's not my funds this is a disaster in the making.
Especially the inability to close a position that is in profit is one of the worst experiences a trader can have.
Total shit platform.
10  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: Test for free our new futures exchange, and get paid bitcoin! on: July 05, 2021, 06:50:14 AM


Did your withRAW succeed ?  Cheesy
11  Bitcoin / Bitcoin Technical Support / Re: in 2016 I reset my bitcoin core wallet and my bitcoins disapears, on: June 30, 2021, 06:04:12 AM
You don't want to install anything on that drive.
You don't even want to boot up that machine anymore.
Every time you boot up that machine and or install software on it you risk overwriting your old wallet.dat and that will definitely send your coins down the black hole without the possibility of recovery.
I just can't understand why people give the advice to install stuff like recovery software onto that drive it's the worst possible advice you can give someone that is trying to recover their lost funds.
We have seen cases where the user installed easus recovery on top of his old wallet.dat and the act of installing the recovery software overwrite the old wallet data which made it impossible to recover the funds.

A better way to recover your funds is to boot up that machine from a dvd or usb stick and mount the drive read only so that you can be sure that the data is preserved.
Then you can run a recovery software to look for the file.
The problem is usually that the USB stick will be too small to save all the files that the utility finds.
So a better solution is to remove the drive and hook it up to another computer that has enough disk space to save the recovered files.
Also windows is not your friend for this task.
Linux is free and has the best recovery tools available, which are also free so don't think about spending one buck on recovery software because it's no needed at all.
12  Bitcoin / Bitcoin Technical Support / Re: get sha-512 of wallet.dat on: June 24, 2021, 05:49:43 PM
PBKDF2 ? Really ?
Are you sure about that ?

Yes. You said:

That is incorrect.
The keys are stored encrypted with AES-256-CBC and not SHA512.
So you can not extract a sha-512 from a wallet.

But OP is getting wallet.dat password mixed up with private key (ckey) encryption. They are using two different algorithms/concepts.

The AES-256-CBC is a cipher that is used inside the PBKDF2 derivation, along with the SHA512 hash function. You can't just do a KDF without a hash function and a cipher to go with it. It is even referencing number of rounds and nDerivation method inside SetKeyFromPassphrase:

Quote
// This hashes the password (strKeyData, SecureString is the class used to represent a password)
// a number of times to a SHA512 hash *which is then* split in half to get an AES-256-CBC key and IV.
int CCrypter::BytesToKeySHA512AES(const std::vector<unsigned char>& chSalt, const SecureString& strKeyData, int count, unsigned char *key,unsigned char *iv) const
~
// This is the actual KDF function. It checks for the parameters mentioned in the linked thread.
bool CCrypter::SetKeyFromPassphrase(const SecureString& strKeyData, const std::vector<unsigned char>& chSalt, const unsigned int nRounds, const unsigned int nDerivationMethod)
{
    if (nRounds < 1 || chSalt.size() != WALLET_CRYPTO_SALT_SIZE)
        return false;

    int i = 0;
    if (nDerivationMethod == 0)
        i = BytesToKeySHA512AES(chSalt, strKeyData, nRounds, vchKey.data(), vchIV.data());
~snip

Notice how there's only an nDerivationMethod of 0. According to achow's comment in the thread I linked this stands for SHA-512 derivation function.

Quote
/*
 * The rest of this stuff is just using the AES-256-CBC key *generated* from the PBKDF2 function
 * above to encrypt uint256 stuff i.e. private keys
 */
bool CCrypter::SetKey(const CKeyingMaterial& chNewKey, const std::vector<unsigned char>& chNewIV)
bool CCrypter::Encrypt(const CKeyingMaterial& vchPlaintext, std::vector<unsigned char> &vchCiphertext) const
bool CCrypter::Decrypt(const std::vector<unsigned char>& vchCiphertext, CKeyingMaterial& vchPlaintext) const
bool EncryptSecret(const CKeyingMaterial& vMasterKey, const CKeyingMaterial &vchPlaintext, const uint256& nIV, std::vector<unsigned char> &vchCiphertext)
bool DecryptSecret(const CKeyingMaterial& vMasterKey, const std::vector<unsigned char>& vchCiphertext, const uint256& nIV, CKeyingMaterial& vchPlaintext)
bool DecryptKey(const CKeyingMaterial& vMasterKey, const std::vector<unsigned char>& vchCryptedSecret, const CPubKey& vchPubKey, CKey& key)

As you can see, the password has never been encrypted anywhere, that's why it makes no sense to talk about extracting the encrypted password, because there is no encrypted password, only AES keys generated from the password.

Even these are not stored in the file, only a bunch of constant values along with the salt separated by dollar sign $ to make up the bitcoin wallet hash (which I sometimes [wrongly] call PBKDF2 hash)

The password generates the encryption keys, that's also the reason why wallet.dat files have one of the slowest keys/second cracking time, versus regular AES256CBC (in the KDF this function + the hashing is repeated several hundred times!)

It must be my eyes or something.
I just can't see any PBKDF2 anywhere.
Surely i can see openssl's EVP BytesToKey and SHA512 functions but no PBKDF2.
I guess i'm getting old.
13  Bitcoin / Bitcoin Technical Support / Re: Old HDD with wallet.dat, several reformatting and heavy use, is all hope lost? on: June 24, 2021, 05:33:08 PM
Mount the disk read only in linux and use photorec to copy all files that are found to another harddisk, and then look for files that have .db extension.
If you find any of those use the file <filename> command to examine the exact file type and if its a Berkeley DB Btree then it's most likely your wallet.
Photorec works on RAW data so it will not restore actual filenames like for example wallet.dat.
In stead it will give each file it finds a number, and look at the bytes and try to figure out the filetype from that so it does not matter how many times you formatted the drive if the bytes are still there then you will find it.

See here for more: https://www.cgsecurity.org/wiki/PhotoRec_Step_By_Step
This tutorial suggests to try testdisk first but in your case it is best you start with Photorec directly.
14  Bitcoin / Bitcoin Technical Support / Re: get sha-512 of wallet.dat on: June 18, 2021, 03:05:15 PM
You must be referring to the wallet.dat hash of the password (and not the wallet's encrypted private keys, which do use AES-256-CBC), which looks similar to this:

Code:
BTC2014 $ bitcoin $ 64 $ 6a750G4ef1867cff00d941df3d1165c39164b4273aca3c7e57af5adf60183945 $ 16 $ 83c69fe19b89ab31 $ 81501 $ 2 $ 00 $ 2 $ 00

Hashing a password in a wallet.dat is done using PBKDF2, and the SHA512 is merely a hash function used on a chunk of data within the many HMAC functions invoked in the PBKDF2 hash. So, you are not looking for a SHA512 hash, you want the PBKDF2 hash, which looks like the one I quoted above.

This hash can be obtained using the script bitcoin2john.py which is available on Github at https://raw.githubusercontent.com/magnumripper/JohnTheRipper/bleeding-jumbo/run/bitcoin2john.py .


PBKDF2 ? Really ?
Are you sure about that ?

I'm not even gonna argue anymore on this forum.
I will just drop the code that say's it all.

Quote
// Copyright (c) 2009-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include <wallet/crypter.h>

#include <crypto/aes.h>
#include <crypto/sha512.h>
#include <util/system.h>

#include <vector>

int CCrypter::BytesToKeySHA512AES(const std::vector<unsigned char>& chSalt, const SecureString& strKeyData, int count, unsigned char *key,unsigned char *iv) const
{
    // This mimics the behavior of openssl's EVP_BytesToKey with an aes256cbc
    // cipher and sha512 message digest. Because sha512's output size (64b) is
    // greater than the aes256 block size (16b) + aes256 key size (32b),
    // there's no need to process more than once (D_0).

    if(!count || !key || !iv)
        return 0;

    unsigned char buf[CSHA512::OUTPUT_SIZE];
    CSHA512 di;

    di.Write((const unsigned char*)strKeyData.data(), strKeyData.size());
    di.Write(chSalt.data(), chSalt.size());
    di.Finalize(buf);

    for(int i = 0; i != count - 1; i++)
        di.Reset().Write(buf, sizeof(buf)).Finalize(buf);

    memcpy(key, buf, WALLET_CRYPTO_KEY_SIZE);
    memcpy(iv, buf + WALLET_CRYPTO_KEY_SIZE, WALLET_CRYPTO_IV_SIZE);
    memory_cleanse(buf, sizeof(buf));
    return WALLET_CRYPTO_KEY_SIZE;
}

bool CCrypter::SetKeyFromPassphrase(const SecureString& strKeyData, const std::vector<unsigned char>& chSalt, const unsigned int nRounds, const unsigned int nDerivationMethod)
{
    if (nRounds < 1 || chSalt.size() != WALLET_CRYPTO_SALT_SIZE)
        return false;

    int i = 0;
    if (nDerivationMethod == 0)
        i = BytesToKeySHA512AES(chSalt, strKeyData, nRounds, vchKey.data(), vchIV.data());

    if (i != (int)WALLET_CRYPTO_KEY_SIZE)
    {
        memory_cleanse(vchKey.data(), vchKey.size());
        memory_cleanse(vchIV.data(), vchIV.size());
        return false;
    }

    fKeySet = true;
    return true;
}

bool CCrypter::SetKey(const CKeyingMaterial& chNewKey, const std::vector<unsigned char>& chNewIV)
{
    if (chNewKey.size() != WALLET_CRYPTO_KEY_SIZE || chNewIV.size() != WALLET_CRYPTO_IV_SIZE)
        return false;

    memcpy(vchKey.data(), chNewKey.data(), chNewKey.size());
    memcpy(vchIV.data(), chNewIV.data(), chNewIV.size());

    fKeySet = true;
    return true;
}

bool CCrypter::Encrypt(const CKeyingMaterial& vchPlaintext, std::vector<unsigned char> &vchCiphertext) const
{
    if (!fKeySet)
        return false;

    // max ciphertext len for a n bytes of plaintext is
    // n + AES_BLOCKSIZE bytes
    vchCiphertext.resize(vchPlaintext.size() + AES_BLOCKSIZE);

    AES256CBCEncrypt enc(vchKey.data(), vchIV.data(), true);
    size_t nLen = enc.Encrypt(vchPlaintext.data(), vchPlaintext.size(), vchCiphertext.data());
    if(nLen < vchPlaintext.size())
        return false;
    vchCiphertext.resize(nLen);

    return true;
}

bool CCrypter::Decrypt(const std::vector<unsigned char>& vchCiphertext, CKeyingMaterial& vchPlaintext) const
{
    if (!fKeySet)
        return false;

    // plaintext will always be equal to or lesser than length of ciphertext
    int nLen = vchCiphertext.size();

    vchPlaintext.resize(nLen);

    AES256CBCDecrypt dec(vchKey.data(), vchIV.data(), true);
    nLen = dec.Decrypt(vchCiphertext.data(), vchCiphertext.size(), vchPlaintext.data());
    if(nLen == 0)
        return false;
    vchPlaintext.resize(nLen);
    return true;
}

bool EncryptSecret(const CKeyingMaterial& vMasterKey, const CKeyingMaterial &vchPlaintext, const uint256& nIV, std::vector<unsigned char> &vchCiphertext)
{
    CCrypter cKeyCrypter;
    std::vector<unsigned char> chIV(WALLET_CRYPTO_IV_SIZE);
    memcpy(chIV.data(), &nIV, WALLET_CRYPTO_IV_SIZE);
    if(!cKeyCrypter.SetKey(vMasterKey, chIV))
        return false;
    return cKeyCrypter.Encrypt(*((const CKeyingMaterial*)&vchPlaintext), vchCiphertext);
}

bool DecryptSecret(const CKeyingMaterial& vMasterKey, const std::vector<unsigned char>& vchCiphertext, const uint256& nIV, CKeyingMaterial& vchPlaintext)
{
    CCrypter cKeyCrypter;
    std::vector<unsigned char> chIV(WALLET_CRYPTO_IV_SIZE);
    memcpy(chIV.data(), &nIV, WALLET_CRYPTO_IV_SIZE);
    if(!cKeyCrypter.SetKey(vMasterKey, chIV))
        return false;
    return cKeyCrypter.Decrypt(vchCiphertext, vchPlaintext);
}

bool DecryptKey(const CKeyingMaterial& vMasterKey, const std::vector<unsigned char>& vchCryptedSecret, const CPubKey& vchPubKey, CKey& key)
{
    CKeyingMaterial vchSecret;
    if(!DecryptSecret(vMasterKey, vchCryptedSecret, vchPubKey.GetHash(), vchSecret))
        return false;

    if (vchSecret.size() != 32)
        return false;

    key.Set(vchSecret.begin(), vchSecret.end(), vchPubKey.IsCompressed());
    return key.VerifyPubKey(vchPubKey);
}
15  Bitcoin / Bitcoin Technical Support / Re: btcrecover token.txt file on: June 13, 2021, 06:32:08 PM
Hello please also see https://weakpass.com/
16  Bitcoin / Bitcoin Technical Support / Re: get sha-512 of wallet.dat on: June 13, 2021, 06:24:38 PM
That is incorrect.
The keys are stored encrypted with AES-256-CBC and not SHA512.
So you can not extract a sha-512 from a wallet.
17  Alternate cryptocurrencies / Altcoin Discussion / Re: how to see my private key bye decrypted wallet.dat on: June 07, 2021, 05:48:29 PM
If db_dump does not work you can also try
Code:
hexdump 'wallet.dat' -C > wallet.hex

And then open in notepad and use search and find 'mkey' and 'ckey'
If the wallet is not corrupt it should be in there.
18  Bitcoin / Bitcoin Technical Support / Re: Legend with wallet skills required! on: June 07, 2021, 09:26:43 AM
You are in the wrong place.
You won't find the right person on this forum.
Look elsewhere.

I have a few questions:

Where is there a timestamp in a 2010 wallet? position in relation to ... KEY! 036b657921 or 0201010420

I assume the privkey is after 0201010420 ?

Why does a wallet have so many bloody privkeys?

Does the wallet hold coin info like how many, if so what is location ref above.

I have been studying it in hex viewer and isolating/ colouring the repeatable hex values, can see keymeta! information and key! and privkey magic no problem, why wouldn't format be recognised? key things to look for?


You only have to decrypt the mkey.
Then you can use this to decrypt all of the ckey's that are in the wallet.
Use a double sha256(sha256(pubkey)) as the IV to decrypt each ckey.

for more info look in crypter.h and crypter.cpp from core.
19  Bitcoin / Bitcoin Discussion / Re: Oh, market manipulation is finally bad now? on: May 19, 2021, 05:47:57 PM
Well firing all those Falcons isn't exactly environmentally friendly either, is it ?
20  Bitcoin / Bitcoin Technical Support / Re: recover keys from wallet.dat without using pywallet on: May 19, 2021, 09:46:18 AM
Spit out the right key if you don't know the password.

 
Pages: [1] 2 3 4 5 6 7 8 9
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!