Bitcoin Forum
April 27, 2024, 05:35:19 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: AES-256-CBC and Private Key  (Read 189 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.
1714239319
Hero Member
*
Offline Offline

Posts: 1714239319

View Profile Personal Message (Offline)

Ignore
1714239319
Reply with quote  #2

1714239319
Report to moderator
Bitcoin addresses contain a checksum, so it is very unlikely that mistyping an address will cause you to lose money.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714239319
Hero Member
*
Offline Offline

Posts: 1714239319

View Profile Personal Message (Offline)

Ignore
1714239319
Reply with quote  #2

1714239319
Report to moderator
1714239319
Hero Member
*
Offline Offline

Posts: 1714239319

View Profile Personal Message (Offline)

Ignore
1714239319
Reply with quote  #2

1714239319
Report to moderator
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3374
Merit: 6541


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!