{"id":13499168,"url":"https://github.com/lightningnetwork/lightning-onion","last_synced_at":"2025-05-15T07:07:55.222Z","repository":{"id":42382363,"uuid":"49765768","full_name":"lightningnetwork/lightning-onion","owner":"lightningnetwork","description":"Onion Routed Micropayments for the Lightning Network","archived":false,"fork":false,"pushed_at":"2024-08-15T22:54:20.000Z","size":454,"stargazers_count":407,"open_issues_count":10,"forks_count":131,"subscribers_count":51,"default_branch":"master","last_synced_at":"2025-04-15T01:58:53.770Z","etag":null,"topics":["bitcoin","cryptocurrency","cryptography","lightning-network","micropayments","onion-architecture"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lightningnetwork.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-01-16T08:29:23.000Z","updated_at":"2025-04-08T20:36:26.000Z","dependencies_parsed_at":"2024-04-23T19:06:09.093Z","dependency_job_id":"5517090a-e983-453d-8ea6-01258ac0658c","html_url":"https://github.com/lightningnetwork/lightning-onion","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightningnetwork%2Flightning-onion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightningnetwork%2Flightning-onion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightningnetwork%2Flightning-onion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightningnetwork%2Flightning-onion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lightningnetwork","download_url":"https://codeload.github.com/lightningnetwork/lightning-onion/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254292042,"owners_count":22046426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitcoin","cryptocurrency","cryptography","lightning-network","micropayments","onion-architecture"],"created_at":"2024-07-31T22:00:30.394Z","updated_at":"2025-05-15T07:07:50.211Z","avatar_url":"https://github.com/lightningnetwork.png","language":"Go","readme":"# lightning-onion\nThis repository houses an implementation of the [Lightning\nNetwork's](lightning.network) onion routing protocol. The Lightning Network\nuses onion routing to securely, and privately route HTLC's\n(Hash-Time-Locked-Contracts, basically a conditional payment) within the\nnetwork.  (A full specification of the protocol can be found amongst the\nlighting-rfc repository, specifically within\n[BOLT#04](https://github.com/lightningnetwork/lightning-rfc/blob/master/04-onion-routing.md).\n\nThe Lightning Network is composed of a series of \"payment channels\" which are\nessentially tubes of money whose balances can instantaneous be reallocated\nbetween two participants. By linking these payment channels in a pair-wise\nmanner, a network of connect payment channels are created. \n\nWithin the Lightning Network,\n[source-routing](https://en.wikipedia.org/wiki/Source_routing) is utilized in\norder to give nodes _full_ control over the route their payment follows within\nthe network. This level of control is highly desirable as with it, senders are\nable to fully specify: the total number of hops in their routes, the total\ncumulative fee they'll pay to send the payment, and finally the total\nworst-case time-lock period enforced by the conditional payment contract.\n\nIn line with Bitcoin's spirit of decentralization and censorship resistance, we\nemploy an onion routing scheme within the [Lightning\nprotocol](https://github.com/lightningnetwork/lightning-rfc) to prevent the\nability of participants on the network to easily censor payments, as the\nparticipants are not aware of the final destination of any given payment.\nAdditionally, by encoding payment routes within a mix-net like packet, we are\nable to achieve the following security and privacy features: \n\n  * Participants in a route don't know their exact position within the route\n  * Participants within a route don't know the source of the payment, nor the\n    ultimate destination of the payment\n  * Participants within a route aren't aware _exactly_ how many other\n    participants were involved in the payment route\n  * Each new payment route is computationally indistinguishable from any other\n    payment route\n\nOur current onion routing protocol utilizes a message format derived from\n[Sphinx](http://www.cypherpunks.ca/~iang/pubs/Sphinx_Oakland09.pdf). In order\nto cater Sphinx's mix-format to our specification application, we've made the\nfollowing modifications: \n\n  * We've added a MAC over the entire mix-header as we have no use for SURB's\n    (single-use-reply-blocks) in our protocol.\n  * Additionally, the end-to-end payload to the destination has been removed in\n    order to cut down on the packet-size, and also as we don't currently have a\n    use for a large message from payment sender to recipient.\n  * We've dropped usage of LIONESS (as we don't need SURB's), and instead\n    utilize chacha20 uniformly throughout as a stream cipher.\n  * Finally, the mix-header has been extended with a per-hop-payload which\n    provides each hops with exact instructions as to how and where to forward\n    the payment. This includes the amount to forward, the destination chain,\n    and the time-lock value to attach to the outgoing HTLC.\n\n\nFor further information see these resources: \n\n  * [Olaoluwa's original post to the lightning-dev mailing\n    list](http://lists.linuxfoundation.org/pipermail/lightning-dev/2015-December/000384.html). \n  * [Privacy Preserving Decentralized Micropayments](https://scalingbitcoin.org/milan2016/presentations/D1%20-%206%20-%20Olaoluwa%20Osuntokun.pdf) -- presented at Scaling Bitcoin Hong Kong.\n\n\nIn the near future, this repository will be extended to also includes a\napplication specific version of\n[HORNET](https://www.scion-architecture.net/pdf/2015-HORNET.pdf).  \n","funding_links":[],"categories":["Lightning Network Protocol","\u003ca id=\"6e80463404d46f0493cf6e84597e4b5c\"\u003e\u003c/a\u003e工具"],"sub_categories":["Implementations","\u003ca id=\"e99ba5f3de02f68412b13ca718a0afb6\"\u003e\u003c/a\u003eTor\u0026\u0026\u0026Onion\u0026\u0026洋葱"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightningnetwork%2Flightning-onion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flightningnetwork%2Flightning-onion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightningnetwork%2Flightning-onion/lists"}