Title: determining if wallet file is encrypted Post by: feh on January 07, 2018, 05:19:54 PM Hello folks.
Is there a way to tell if a wallet is encrypted merely by inspecting the file? Title: Re: determining if wallet file is encrypted Post by: goatpig on January 07, 2018, 05:47:35 PM 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 Title: Re: determining if wallet file is encrypted Post by: feh on January 07, 2018, 10:46:54 PM 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. Title: Re: determining if wallet file is encrypted Post by: goatpig on January 08, 2018, 11:21:09 AM 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. |