pull down to refresh
You made my day just by showing me the nerd sniping verb.
Looking forward to know that you find out in the TG group.
I didn't understand from your message if the wallet file itself is an encrypted H2 database and Sparrow reads from it and decrypts on the fly, or if Sparrow starts and in-memory H2 database when the daemon starts and loads the data from the wallet file into the H2 database on runtime.
reply
I didn't understand from your message if the wallet file itself is an encrypted H2 database and Sparrow reads from it and decrypts on the fly, or if Sparrow starts and in-memory H2 database when the daemon starts and loads the data from the wallet file into the H2 database on runtime.
My educated guess would be it's the former. But that is also a good question!
Are you playing the nerd sniping game as mentioned in the xkcd? lol
Great find! Do update us here
reply
The only reply I got was this (someone linked this message in a reply)
The mv.db file format is from the embedded open source database that Sparrow uses, called H2. You can open it outside Sparrow if you have an H2 client, although if your wallet is encrypted you’ll have to rederive the database password from your wallet password via Argon2. The next version of Sparrow will allow importing this file format (as well as opening it directly).
This doesn't really answer my question but ok.
As a screenscrollshot:
reply
Okay, I got nerdsniped by this, haha
Did some little "reverse engineering" [0]. I tried
fileon the encrypted wallet file but it came up empty handed:$ file wallet.mv.db wallet.mv.db: dataBut afaik, all
filedoes to identify a file is to look at the file signature (also known as magic bytes):-- https://man.archlinux.org/man/core/file/magic.5.en
(ok, apparently only "among other tests")
So why not just look at the magic bytes ourself?
$ hexdump -C -n32 wallet.mv.db 00000000 48 32 65 6e 63 72 79 70 74 0a fa 3e 4a fb 1e 2f |H2encrypt..>J../| 00000010 99 ff 53 50 52 57 31 0a 5c 89 26 f0 23 97 3c 73 |..SPRW1.\.&.#.<s| 00000020Turns out, Sparrow likely uses H2 Database under the hood to store wallets:
This makes sense since Sparrow indeed is written in Java.
The security docs however mention this:
Mhh, that doesn't sound good 🤔
I asked in the TG group. Let's wait for an answer before jumping to conclusions. I also didn't take a close look at the source code yet.
[0] not sure if this already counts as reverse engineering