Bitcoin Forum
May 02, 2024, 11:29:36 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: determining if wallet file is encrypted  (Read 103 times)
feh (OP)
Newbie
*
Offline Offline

Activity: 40
Merit: 0


View Profile
January 07, 2018, 05:19:54 PM
 #1

Hello folks.

Is there a way to tell if a wallet is encrypted merely by inspecting the file?
1714692576
Hero Member
*
Offline Offline

Posts: 1714692576

View Profile Personal Message (Offline)

Ignore
1714692576
Reply with quote  #2

1714692576
Report to moderator
1714692576
Hero Member
*
Offline Offline

Posts: 1714692576

View Profile Personal Message (Offline)

Ignore
1714692576
Reply with quote  #2

1714692576
Report to moderator
1714692576
Hero Member
*
Offline Offline

Posts: 1714692576

View Profile Personal Message (Offline)

Ignore
1714692576
Reply with quote  #2

1714692576
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714692576
Hero Member
*
Offline Offline

Posts: 1714692576

View Profile Personal Message (Offline)

Ignore
1714692576
Reply with quote  #2

1714692576
Report to moderator
goatpig
Moderator
Legendary
*
Offline Offline

Activity: 3668
Merit: 1345

Armory Developer


View Profile
January 07, 2018, 05:47:35 PM
 #2

Do you mean by reading the raw content of the file? This is the header unpacking code:

https://github.com/goatpig/BitcoinArmory/blob/master/armoryengine/PyBtcWallet.py#L2034

feh (OP)
Newbie
*
Offline Offline

Activity: 40
Merit: 0


View Profile
January 07, 2018, 10:46:54 PM
 #3

Do you mean by reading the raw content of the file? This is the header unpacking code:

https://github.com/goatpig/BitcoinArmory/blob/master/armoryengine/PyBtcWallet.py#L2034

Is there a way to determine this by just dumping the file, using od (or a similar command line tool)? I'm not familiar w/ python, if that's what that code is written in.
goatpig
Moderator
Legendary
*
Offline Offline

Activity: 3668
Merit: 1345

Armory Developer


View Profile
January 08, 2018, 11:21:09 AM
 #4

It's not that complicated, you want to read the value here:

https://github.com/goatpig/BitcoinArmory/blob/master/armoryengine/PyBtcWallet.py#L2081

If you look at how much stuff is getting read prior, that's some 330 bytes after the start of the file header.

Once you get to that point, you have to look at what's in the KDF entry:

https://github.com/goatpig/BitcoinArmory/blob/master/armoryengine/PyBtcWallet.py#L1535

In your case, you only care to know if it's all 0s (no encryption) or not.

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!