Bitcoin Forum
September 28, 2024, 06:19:35 PM *
News: Latest Bitcoin Core release: 27.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: AES-256-CBC and Private Key  (Read 197 times)
khangmartin (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 1


View Profile
September 23, 2019, 07:41:28 PM
 #1

I am at the final stage. I am now working on checking the encryption for the private keys inside the wallet.

      Why does the calculation not work for decrypting private key?


I have the correct private key which was derived from Bitcoin string within Bitcoin2john.py script for wallet.dat.
I have double sha 256 public key for the above address.
I have gotten the unencrypted master key data from the following function in crypter.cpp:

bool DecryptSecret(const CKeyingMaterial& vMasterKey, const std::vector<unsigned char>& vchCiphertext, const uint256& nIV, CKeyingMaterial& vchPlaintext)

        std::string MasterKey (vMasterKey.begin(), vMasterKey.end());

The error I am getting is as follows: Given final block not properly padded. Such issues can arise if a bad key is used during decryption. Any help on this will be greatly appreciated with a small tip of thanks to your address.
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3500
Merit: 6840


Just writing some code


View Profile WWW
September 24, 2019, 03:28:22 AM
 #2

What software are you using to decrypt the key?

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!