0

In Bitcoin we can have a light wallet where we are connected to a full node, by doing this, we have to trust that the full node is feeding correct information, but at least we can store our keys in the light wallet itself.

I've been looking around for a similar solution in lightning and the closest I found are some lightning wallets which host a node in their clouds and an app which controls the node.

Unlike layer 1, keys are not needed in order to perform transactions, which means that you are not only trusting the information the node is providing, also they could perform transactions without your knowledge.

Am I missing something here? Why are those wallets called non-custodial?

I know you can run a full lightning node on you phone like acinq does, but a safe cloud-based solution would lower the barrier of entry for some users

3

Unlike layer 1, keys are not needed in order to perform transactions, which means that you are not only trusting the information the node is providing, also they could perform transactions without your knowledge.

Keys are required in lightning. Multiple, in fact.

The lightning node itself is identified by its public key. You need the private key to perform the secure handshake so that you can have encrypted and authenticated communication with peers. You also need the node's private key to sign any gossip information about your node or channels.

On forming channels, you need the private key for an unspent transaction output on the bitcoin network in order to fund the channel.

On operating channels, each channel has a unique funding key which is used to spend the 2-of-2 P2WSH output. You must have the corresponding private key to sign each commitment transaction and also the closing transaction - this must be done once per commitment.

| improve this answer | |
  • That makes sense. Then if the private key stays in the app controlling the lightning node, it would be safe. But that's not how it's done right? right now, to access the RPC and send transactions you only need the macaroon which leads me to believe that the keys are stored and managed in the lightning node not on the app which controls the node. – Enrique Alcazar Apr 12 '19 at 16:05
  • It doesn't matter which application controls the keys. If you're running the node on a machine which you don't control, you can forego any hope of those keys being private. The private keys must be on your own machine only, and even then, should ideally be on a hardware security module where the private keys can not be exposed through side-channels if any other software on the machine is exploited. We're not at the point where these HSMs are ready yet, but they will be coming. – Mark H Apr 12 '19 at 16:09
  • Then all services that configure the node or control the VPC in which is installed are custodial because right now all the signing is done at the node level, but there are people working on abstracting the signing logic so it can be ran separately and store keys on an HSM. Thanks for the explanation – Enrique Alcazar Apr 12 '19 at 19:59
1

I think you refer to those wallets (which some people refer to as remote controls) which run a lightning node somewhere in the cloud (it could be your own raspiblitz server at home) and provide an app that remotely controls the node. I think it is clear why this would be non custodial (at least if the software is open source and not messing around with your login credentials)

Stepan snigirev with the crypto advance team is currently working on a hardware wallet for lightning. Some code snippets can be found on Stephans gitrepos. The idea is to extract all signing and derivation from the lightning node to a hardware security module. In c Lightning this seems particularly easy as the hsmdaemon already exists as a standalone daemon.

Other than that Mark H is right when stating that private keys are needed almost all the time.

| improve this answer | |
  • The ones I've seen control the VPC themselves, which means that at least those are custodial. HW for lightning sounds like a great idea! – Enrique Alcazar Apr 12 '19 at 19:55

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.