Skip to content

Commit fe90471

Browse files
committed
Add an implementation of mutual message exchange
This adds a new crate, `mutual-message-exchange` which allows two parties to maintain a list of keys with which they want to exchange messages and exchange one message at the cost of an extra half-round-trip. This is anticipated for use in BOLT12, where extra data can be included in a BOLT12 `Invoice` which allows a mutually-trusting sender to include a message in the onion, while any non-mutually-trusting entities will not learn anything about the recipient (subject to the use of blinded paths). A full write-up of this protocol is available as [bLIP 31](lightning/blips#31).
1 parent 224008d commit fe90471

File tree

6 files changed

+539
-8
lines changed

6 files changed

+539
-8
lines changed

Cargo.toml

+9-8
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22
resolver = "2"
33

44
members = [
5-
"lightning",
6-
"lightning-block-sync",
7-
"lightning-invoice",
8-
"lightning-net-tokio",
9-
"lightning-persister",
10-
"lightning-background-processor",
11-
"lightning-rapid-gossip-sync",
12-
"lightning-custom-message",
5+
"lightning",
6+
"lightning-block-sync",
7+
"lightning-invoice",
8+
"lightning-net-tokio",
9+
"lightning-persister",
10+
"lightning-background-processor",
11+
"lightning-rapid-gossip-sync",
12+
"lightning-custom-message",
13+
"mutual-message-exchange",
1314
]
1415

1516
exclude = [

mutual-message-exchange/Cargo.toml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[package]
2+
name = "mutual-message-exchange"
3+
version = "0.1.0"
4+
authors = ["Matt Corallo"]
5+
license = "MIT OR Apache-2.0"
6+
repository = "https://github.com/lightningdevkit/rust-lightning/"
7+
description = """
8+
An implementation of a trivial mutual authentication scheme where a message can be exchanged iff two parties mutually trust each other (out of individual trusted-keys lists).
9+
"""
10+
edition = "2021"
11+
12+
[package.metadata.docs.rs]
13+
rustdoc-args = ["--cfg", "docsrs"]
14+
15+
[features]
16+
17+
[dependencies]
18+
bitcoin_hashes = { version = "^0.12.0", default-features = false }
19+
secp256k1 = { version = "^0.27.0", default-features = false, features = ["alloc"] }
20+
21+
[dev-dependencies]
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../lightning/src/crypto/chacha20.rs
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../lightning/src/crypto/chacha20poly1305rfc.rs

0 commit comments

Comments
 (0)