0
Is there any standalone software modules created which allow the user to complete the following: 1. Enter in passphrase 2. Enter a given salt 3. Enter the number of rounds
I am looking for this in order to find the value, and locate the memory location in either Bitcoin src code or Wallet.dat file database. I have found the master key, iv, salt and rounds in wallet.dat file already. Thanks for all the help and I will pass tips to those who point me in the right direction. Thanks again.
What are you trying to do? This sounds like you have some issue for which you think that such a software is the solution. What is the problem that you are actually trying to fix? – Andrew Chow – 2019-09-04T22:17:46.753
I am tracing source code with my passphrase to understand how Bitcoin Core works exactly as far as Encrypt/Decrypt of passphrase. The function EVP_ByteToToken, I do not follow exactly, thus the request. – kmart875 – 2019-09-05T01:01:39.037
Bitcoin Core no longer uses OpenSSL in wallet encryption (or in the vast majority of the software). Whatever OpenSSL functions that were used have been reimplemented in Core to be backwards compatible. It is probably easier for you to read the source code for up-to-date Bitcoin Core rather than older versions that still use OpenSSL. – Andrew Chow – 2019-09-05T02:54:19.047
Thanks. I am using the source code from https://github.com/bitcoin/bitcoin.
– kmart875 – 2019-09-05T03:28:34.013allet encryption uses AES-256-CBC to encrypt only the private keys that are held in a wallet. The keys are encrypted with a master key which is entirely random. This master key is then encrypted with AES-256-CBC with a key derived from the passphrase using SHA512 and OpenSSL's EVP_BytesToKey and a dynamic number of rounds determined by the speed of the machine which does the initial encryption (and is updated based on the speed of a computer which does a subsequent passphrase change). – kmart875 – 2019-09-05T03:28:43.577
Where do you see that information?
EVP_BytesToKeyappears in only one place and it is in a different comment about the function that replaced it. Wherever you are reading that is out of date and you should read the code itself. – Andrew Chow – 2019-09-05T04:32:16.067bool CCrypter::SetKeyFromPassphrase(const SecureString& strKeyData, const std::vector<unsigned char>& chSalt, const unsigned int nRounds, const unsigned int nDerivationMethod, – kmart875 – 2019-09-05T04:51:56.190
Crypter.cpp, when i=0 which is does on encryption and decryption, the if loop occurs as follows: if (nDerivationMethod == 0) i = BytesToKeySHA512AES(chSalt, strKeyData, nRounds, vchKey.data(), vchIV.data()); – kmart875 – 2019-09-05T04:53:25.783