Does Armory's LMDB file contains the private key too? How can I decrypt it and read the LMDB file?
Opened this issue · 0 comments
Armory creates Wallet file
and lmdb
file when a new wallet is created. I did a super deep disk clean to see if I could recover the wallet file but I was unable to find it. Only file I was able to find that is armory_*****_wallet.lmdb
mainly around 102KiB. I am not sure does it contains anything related to the Wallet file
but I am just trying to read what's in it.
Is the following approach possible ?
I've no idea but it seems to me there's a chance the private keys are in the Lightning Memory-Mapped DataBase (LMDB) file. Probably encrypted using the wallet password.
I have created a wallet from scratch and share my results with it, example lmdb file that is created by the Armory
.
I have followed guide-1, guide-2, and guide-3 to be able to read the file.
my_script:
#!/usr/bin/env python3
import lmdb
import caffe
lmdb_file = "armory_2tG9psLQX_wallet.lmdb"
lmdb_env = lmdb.open(lmdb_file, subdir=False)
lmdb_txn = lmdb_env.begin()
lmdb_cursor = lmdb_txn.cursor()
datum = caffe.proto.caffe_pb2.Datum()
for key, value in lmdb_cursor:
print(key)
print(value)
print("----------------")
for key, value in lmdb_cursor:
print(key.decode('utf-8'))
print(value.decode('utf-8'))`
This only prints out:
b'99AxiN7y'
b'\x00\x00\x00\x00\x00\x00\x02\x00\x01\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00k\x00\x00\x00\x00\x00\x00\x00\n\x00\x00\x00\x00\x00\x00\x00'
b'WalletHeader'
b'\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00'
--------------
99AxiN7y
k
WalletHeader
Since the file size is much larger I am not sure why does it able to print only a single character as a value. Is there any other way to read the lmdb
file in depth or its size does not matter? Seems like 99AxiN7y
is the wallet-id of the original wallet file.
I am sure the file is not corrupted where I have tried with a new armory_***wallet.lmdb
file that is created by the Armory
and similiar result is generated.
=> The real question is if the LMDB file contains the private keys too and can we recover the wallet from it?