zcash / zips

Zcash Improvement Proposals
https://zips.z.cash
MIT License
273 stars 156 forks source link

[ZIP 305] Best practices for hardware wallets supporting Sapling and Orchard #346

Open daira opened 6 years ago

daira commented 6 years ago

Document how a hardware wallet (that has a trusted path to the user) should construct or verify transactions in order to protect its user, as far as possible, against attacks from the untrusted computer.

In the general case we have a hardware wallet, an untrusted computer, a delegated prover, a user, and a network connection, something like this:

             network
                ↕
h/w wallet ↔ computer ↔ prover
      ⤡       ⤢
         user

The h/w wallet should not trust the computer or the prover with spend authority, and should not allow a transaction confirmed by the user on the wallet's UI to be malleated while remaining valid. Similarly the computer should not trust the prover with spend authority (this is automatic when the computer is not trusted with that authority), or ability to malleate the intended transaction.

We believe that the Sapling design supports this without requiring the h/w wallet to be able to either prove or verify Spend or Output proofs. A h/w wallet should only need to implement:

str4d commented 6 years ago

TREZOR's transparent transaction workflow is documented here: https://wiki.trezor.io/Developers_guide:Message_Workflows

str4d commented 5 years ago

Extracts from the discussion that led to me posting the above comment: