Verifying data from air-gapped wallets #60
Unanswered
AndreasGassmann
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Recently I had a discussion with someone regarding the security of air-gapped wallets.
Generally, the benefits are clear (offline, limited ways to interact, etc). However, there is still one concern. How can the user "verify" that no private data is leaked?
I think it is clear that there is no way to be 100% sure that no data has been leaked. Even if the payload can be inspected on an offline machine. But the question is if there is a way to make this harder overall. Let's look at 2 examples of how data could be leaked:
If we take a mnemonic like
else carbon praise kit upgrade arrange treat ankle follow search six escape
(or48244ea63d7eea18b9f0495ab8432726
in hex), we get the following extended public key:xpub6CWtpAaU4gyhFphwb2rHT8dgrqNrsWayLFJDTyat1uZMpKY8re7a2Pxgf9U54tjmrqFTncPusw7eaKiHZycfdssBvhFpMzugXWSsfxhvewc
. Some of the bytes in the extended public key can be set somewhat freely without breaking functionality, like the depth, master key or child number. (I am not sure if it's technically still valid, but it's at least not possible to see that anything is wrong with it from the user side). So we can use those couple bytes to put in a part of our seed, which will give us a new xPubxpub6CBXKvVkFFz4kRBc2ZVnzinVsmQMijPEUXVuLyb1MLbJ4RrDYGXxGFwvKUNTwijiQNo2GfobyZD2i8dJeQXKNk5xTGkyuKJqGBwdt31t7E1
that will still derive the same addresses. (online tool to derive addresses to test: https://bitaps.com/bip32)By abusing the "random" number of an ECDSA signature, a wallet can leak the private key: https://core.ac.uk/download/pdf/301367593.pdf
Is there any research or tools available about ways how this could be prevented? There will be no perfect security, but anything that makes it harder for an attacker is nice.
One potential approach would be to have a second offline device, ideally with a different app from a different vendor, that acts as a "middle man" and verifies the data that is received. For the best results, it might be necessary for this wallet to have access to the seed as well (eg. to detect example 1. by deriving it independently). Most likely the easy answer to this is to use multisig, because that still keeps your funds safe if one of your wallets is compromised. But I think it's still important to look into this for singlesig.
Beta Was this translation helpful? Give feedback.
All reactions