<oembed><type>rich</type><version>1.0</version><author_name>npub1j0js72tmnxzmrtd6j0j5wcvfuhsqwgqxdwkpmw28rmmuy22y3wzsdw9k8n</author_name><author_url>https://nostr.ae/npub1j0js72tmnxzmrtd6j0j5wcvfuhsqwgqxdwkpmw28rmmuy22y3wzsdw9k8n</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2022-05-09&#xA;📝 Original message:&#xA;( a formatted version of this message is here:&#xA;https://gitlab.com/lightning-signer/docs/-/wikis/Blind%20Signing%20Considered%20Harmful&#xA;)&#xA;&#xA;# Introduction&#xA;&#xA;This post discusses blind signers.  Blind signers do not put the user in&#xA;control of their funds and are subject to a long list of exploits.&#xA;&#xA;This post also (re-)introduces the open-source [Validating Lightning&#xA;Signer](https://gitlab.com/lightning-signer/docs/-/blob/master/README.md)&#xA;Project.&#xA;&#xA;# Background&#xA;&#xA;A **Signer** is a component that performs cryptographic operations,&#xA;separately from a wallet. A Bitcoin hardware wallet is an example of a&#xA;Signer, where private keys are controlled on a hardened device. There is&#xA;currently no complete solution for a hardware signer for the Lightning&#xA;network.&#xA;&#xA;A **Blind Signer** is a signer that does not perform validation. There are&#xA;several Lightning wallets and node implementations that as of today support&#xA;only blind signing. I believe these configurations are insecure.&#xA;&#xA;A **Validating Signer** performs a comprehensive set of policy checks to&#xA;ensure that the keys are not misused. For example, a validating Bitcoin&#xA;hardware wallet checks the destination, amount and change outputs in&#xA;collaboration with the user.&#xA;&#xA;A layer-2 validating signer is significantly more complex, because of the&#xA;complexity of the Lightning protocol.&#xA;&#xA;**While a Blind Signer is a technical step on the road to the higher&#xA;security of a Validating Signer, by itself it actually reduces security if&#xA;deployed in production. This is because it presents two points of attack -&#xA;at the node and at the signer.**&#xA;&#xA;# The VLS Project&#xA;&#xA;The [Validating Lightning Signer](&#xA;https://gitlab.com/lightning-signer/docs/-/blob/master/README.md) project&#xA;aims to close the gap for securing the Lightning ecosystem. It is an&#xA;open-source Rust library and reference implementation. The project is&#xA;approaching Beta, which is the point where the main goal will be met: funds&#xA;are safe even if the node is completely compromised.&#xA;&#xA;The task is relatively complex because of the complexity of the Lightning&#xA;protocol. There are more than [50 policies](&#xA;https://gitlab.com/lightning-signer/docs/-/blob/master/policy-controls.md)&#xA;that must be enforced, and many of them require stateful inspection of the&#xA;protocol.&#xA;&#xA;Both servers and consumer devices are targeted, the latter via a Rust&#xA;`no_std` compilation mode.&#xA;&#xA;# Signing Configurations&#xA;&#xA;Here are some of the potential configurations of a Lightning node:&#xA;&#xA;* Monolithic node&#xA;* Node with a separate Blind Signer&#xA;* Node with a separate Validating Signer - the signer ensures that the&#xA;Lightning state machine ran correctly and funds are not at risk&#xA;&#xA;# The (In)security of Blind Signing&#xA;&#xA;![blind-signing-diagram-1.svg](uploads/78db1bd2b59228492e09ea272c873cf3/blind-signing-diagram-1.svg)&#xA;&#xA;* The monolithic case has one point of attack - at the node.&#xA;* The blind signing case has **two points of attack** - at the node and at&#xA;the Signer. A blind signer will perform any signing operation the node&#xA;requests, so **a compromised node will still result in loss of funds**. And&#xA;obviously, a compromised signer will also result in loss of funds. This is&#xA;worse than a monolithic node because funds can be lost if **either** is&#xA;compromised.&#xA;* The validated signing case has just one point of attack with a small&#xA;attack surface&#xA;&#xA;# Wallets with Blind Signers Must Trust the Node Operator&#xA;&#xA;Blind signing wallets where the node is run by an LSP (Lightning Service&#xA;Provider) are not self-custodial because the LSP can unilaterally control&#xA;the funds. The LSP merely has to provide the Signer with a transaction that&#xA;sends the funds to the LSP or another destination.&#xA;&#xA;# Examples of Blind Signing Exploits&#xA;&#xA;A compromised node can unilaterally submit transactions to be signed by the&#xA;blind Signer.  The following can result in the funds being stolen:&#xA;&#xA;* The node submits a mutual closing transaction which sends funds to the&#xA;attacker&#39;s address&#xA;* The node asks the blind signer to sign a revoked transaction which will&#xA;cause loss of all funds when published&#xA;* And many more ...&#xA;&#xA;A compromised node can also lose funds when it doesn&#39;t follow the Lightning&#xA;protocol. Some potential exploits include:&#xA;&#xA;* The node fails to validate the counter-party&#39;s revocation, and the&#xA;counter-party broadcasts an old commitment transaction that sends most of&#xA;the funds to the counter-party&#xA;* The node fails to claim input HTLCs when routing payments, leading to the&#xA;gradual loss of all funds&#xA;* And many more ...&#xA;&#xA;# Validating Signers&#xA;&#xA;In the Validating Signer case, a compromise of the Lightning node will not&#xA;result in the loss of funds. The security of such a setup is only dependent&#xA;on the security of the Signer. The Signer can be hardened as needed for the&#xA;specific use case.&#xA;&#xA;Some of the validation rules that a validated Signer can implement include:&#xA;&#xA;- Don&#39;t sign a revoked commitment transaction&#xA;- Don&#39;t revoke a signed commitment transaction&#xA;- Don&#39;t close a channel to an unapproved destination&#xA;- Routed payments must have at least as much input as output value&#xA;- Payments must claim at least as much from the input as was claimed from&#xA;us on the output&#xA;- And many more ...&#xA;&#xA;# Conclusion&#xA;&#xA;Blind signers reduce the security of Lightning nodes and are subject to&#xA;[many exploits](&#xA;https://gitlab.com/lightning-signer/docs/-/wikis/Potential-Exploits).&#xA;&#xA;Validating signers improve security by reducing the attack surface. The VLS&#xA;project aims to provide a library and reference implementation for&#xA;enterprise servers and consumer devices.&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20220509/95d3c85d/attachment.html&gt;</html></oembed>