<p>Yes, a hardware wallet could be designed for use on the Lighting Network, but no, there's no such thing as eliminating risk of theft.  There is <em>always</em> risk of theft, no matter what you do.</p>

<p>A hardware wallet could be made to sign the transactions needed to construct the smart contracts for lightning channels, and could even be made to communicate with them.  This would keep the private keys out of the memory of the computer running the lightning node, thus reducing the risk...but not eliminating it.</p>

<p>There is always the chance that the protocol used to communicate to with the wallet is vulnerable to exploitation, or even the hardware wallet itself.  Even if the vulnerability didn't compromise the wallet, but merely rendered it inoperable for a time, an attack could be crafted where you end up forfeiting your money in the channel because you are unable to sign transactions.</p>

<p>Our technology is built on layers on top of layers on top of layers on top of layers.  Hardware wallets and tier 2 smart contract networks are no exception.  Anyone who tells you it is risk-free is selling something.</p>

CC BY-SA 3.0
2018-01-11T08:06:33.047Z
Yes of course there's always risk of exploits in protocol or hardware - that's not what I'm talking about. I'm wondering if its theoretically possible to eliminate the threat of theft via kernel hack for an active LN node that routes payments automatically.
B T
CC BY-SA 3.0
2018-01-11T13:32:04.880Z
It's the "eliminate the threat" part that I take issue with.  That's not how security works.  I would never give anyone that promise about any level of the stack.  Threats can be mitigated, not eliminated.
Jestin
CC BY-SA 3.0
2018-01-11T19:48:30.580Z
Ok how would you phrase my question? I'd rather you try to understand what I'm trying to communicate rather than taking issue with my phrasing.
B T
CC BY-SA 3.0
2018-01-11T20:45:59.450Z
I don't think the phrasing is bad, I just think the answer is "no".  You cannot eliminate threats.
Jestin
CC BY-SA 3.0
2018-01-13T21:18:51.350Z
You're not understanding my question. I've updated my title to address pedantic concerns.
B T
CC BY-SA 3.0
2018-01-09T22:35:25.297Z
2018-01-09T22:35:25.297Z
Jestin
<p>I'm wondering if its possible to design a hardware wallet such that it can be used for a Lightning node that routes payments for their channel partners such that their funds can never be stolen even if their main machine has been kernel hacked.</p>

<p>I'm thinking that this is how it might work:</p>

<ol>
<li>The hardware wallet would receive a signed transaction originating from its source channel-partner AND an unsigned transaction (to sign) sending to its destination channel-partner.</li>
<li>The hardware wallet verifies that the sum of the amounts of both transactions sum to greater than 0 (ie verifying that the node isn't losing funds by signing this transaction), verifies that the inputs are valid (using SPV), verifies that both transactions requires the same hash-secret to unlock, and verifies that its only sending to a multi-sig address that requires its private key to unlock</li>
<li>The hardware wallet then signs the unsigned requested transaction and gives it back to the Lightning Client to send</li>
</ol>

<p>It seems like if a hardware wallet did this kind of verification, it would be safe to have a routing Lightning node that interacted with an always-connected hardware wallet with the level of security that a normal hardware wallet has. Is something along these lines possible? </p>

<lightning-network><hardware-wallet><lightning-routing>
Is it possible to design a hardware wallet that can allow operation of a routing Lightning node with the security level of a hardware wallet?
B T
# Is it possible to design a hardware wallet that can allow operation of a routing Lightning node with the security level of a hardware wallet?

(Asked by: username_0 on 2018-01-09)

I'm wondering if its possible to design a hardware wallet such that it can be used for a Lightning node that routes payments for their channel partners such that their funds can never be stolen even if their main machine has been kernel hacked.

I'm thinking that this is how it might work:

1. The hardware wallet would receive a signed transaction originating from its source channel-partner AND an unsigned transaction (to sign) sending to its destination channel-partner.
2. The hardware wallet verifies that the sum of the amounts of both transactions sum to greater than 0 (ie verifying that the node isn't losing funds by signing this transaction), verifies that the inputs are valid (using SPV), verifies that both transactions requires the same hash-secret to unlock, and verifies that its only sending to a multi-sig address that requires its private key to unlock
3. The hardware wallet then signs the unsigned requested transaction and gives it back to the Lightning Client to send

It seems like if a hardware wallet did this kind of verification, it would be safe to have a routing Lightning node that interacted with an always-connected hardware wallet with the level of security that a normal hardware wallet has. Is something along these lines possible?

**Tags:** lightning-network, hardware-wallet, lightning-routing


---

## 1 answers

### Answer by username_1 on 2018-01-09. Score: 5 | Accepted answer

Yes, a hardware wallet could be designed for use on the Lighting Network, but no, there's no such thing as eliminating risk of theft. There is *always* risk of theft, no matter what you do.

A hardware wallet could be made to sign the transactions needed to construct the smart contracts for lightning channels, and could even be made to communicate with them. This would keep the private keys out of the memory of the computer running the lightning node, thus reducing the risk...but not eliminating it.

There is always the chance that the protocol used to communicate to with the wallet is vulnerable to exploitation, or even the hardware wallet itself. Even if the vulnerability didn't compromise the wallet, but merely rendered it inoperable for a time, an attack could be crafted where you end up forfeiting your money in the channel because you are unable to sign transactions.

Our technology is built on layers on top of layers on top of layers on top of layers. Hardware wallets and tier 2 smart contract networks are no exception. Anyone who tells you it is risk-free is selling something.

> **Comments:**
> **username_0**: Yes of course there's always risk of exploits in protocol or hardware - that's not what I'm talking about. I'm wondering if its theoretically possible to eliminate the threat of theft via kernel hack for an active LN node that routes payments automatically.  
> **username_1**: It's the "eliminate the threat" part that I take issue with.  That's not how security works.  I would never give anyone that promise about any level of the stack.  Threats can be mitigated, not eliminated.  
> **username_0**: Ok how would you phrase my question? I'd rather you try to understand what I'm trying to communicate rather than taking issue with my phrasing.  
> **username_1**: I don't think the phrasing is bad, I just think the answer is "no".  You cannot eliminate threats.  
> **username_0**: You're not understanding my question. I've updated my title to address pedantic concerns.  

---

