I currently use the Monero GUI v0.13.0.4 with my Ledger Nano S and I'm confused by a few things:

What is saved in the .keys file generated when I create my wallet using the Ledger?

I would assume that the private view key is what's saved, but then why am I asked to export the private view key (using the Ledger) every time I open the GUI?

  • 1
    I suggest reading this answer in full: monero.stackexchange.com/a/9902/7493 – jtgrassie Nov 5 '18 at 15:39
  • @jtgrassie - That technically does not answer why the private view key has to be exported every time / session. I left an answer in this thread. – dEBRUYNE Nov 6 '18 at 15:48
  • @dEBRUYNE - fair enough, though it points out it's optional and why it's exported (to scan the transactions on the host rather than the device), but your answer below is certainly more specific to this q. – jtgrassie Nov 6 '18 at 16:37

Let us first answer your main question, namely:

Why do I have to export the private view key every time I use my Ledger?

The private view key, if exported to the client (i.e. the Monero software), is stored in RAM until, if I recall correctly, the session ends. A session ending can be defined as the user closing the CLI/GUI with the Ledger Monero wallet, stopping the Ledger Monero app, and unplugging his Ledger device. Therefore, upon reopening the Ledger Monero wallet, the user again has to choose whether to export the private view key or not. Whilst the current design may be perceived as slightly inconvenient, it provides greater flexibility to the user. For instance, a user could let the device perform the wallet scan / refresh if he suspects the system is (currently) unsafe (and thus privacy would be compromised in case of an exported private view key). Note that, as far as I know, it would technically be feasible to permanently export the private view key. The current design, however, does not allow this.

What is saved in the .keys file generated when I create my wallet using the Ledger?

The .keys file stores some settings related to the Ledger Monero wallet. For instance, if a specific transaction priority level is customly set by the user, it will be stored in the .keys file.

P.S. Whether to export the private view key or not is predominantly a matter of personal preference, as is explained here:

The Ledger will ask whether you want to export the private view key or not. First and foremost, your funds cannot be compromised with merely the private view key. Exporting the private view key enables the client (on the computer - Monero v0.13.0.4) to scan blocks looking for transactions that belong to your wallet / address. If this option is not utilized, the device (Ledger) will scan blocks, which will be significantly slower. There is, however, one caveat. That is, if your system gets compromised, the adversary will potentially be able to compromise your private view key as well, which is detrimental to privacy. This is virtually impossible when the private view key is not exported.

  • I do understand the purpose of the view key, perhaps I am just confused by the wallet files created then. There are 3 files generated upon wallet creation: <wallet-name>, <wallet-name>.address.txt and <wallet-name>.keys. I would think that <wallet-name> (not the .keys file) stores settings related to the wallet? Do you know of any resources that outline what the .keys file is supposed to store? – sonar Nov 6 '18 at 16:13
  • Note that I added that part for visibility purposes. <wallet-name> (the wallet cache) stores the wallet refresh progress and anything related to transactions you have received and/or sent (e.g. the recipient addresses are stored in the wallet cache as well as private transaction keys of your performed transactions). I am not aware of any such resources unfortunately. P.S. If my answer sufficiently answered your question, please mark it as such. – dEBRUYNE Nov 6 '18 at 16:38

The Ledger wallet device does not have the ability to scan the entire blockchain, as it's small and limited in computation and memory. Instead, it authorizes the computer/smartphone it's connected to to act as a proxy and process the blockchain and send the relevant information on new transactions to the device. Without the view key the proxy would not know which transactions to send to the device and so the device will just assume that it never has any transaction history at all, and thus no value.

An air-gaped computer with a downloaded copy of the blockchain would work more securely, but at the cost of being non-transportable, and thus unusable. Ledger allows for a compromise of this security while retaining usability.

Everything has a trade-off.

Edit: Upon reviewing the linked document, I've learned that the exposure of the view key is optional. You can have the improved privacy but at the cost of taking more time to synchronize your balance. (The device is rather short on computation and memory so I suspect that this would take a significant amount of time. I don't have the specifics at hand and so will only leave this as suspicion.)

So I think the device is likely a good option in that you have selective security models available and can choose between the trade-offs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.