Add an implementation of mutual message exchange 2024-01-mutual-message-exchange
authorMatt Corallo <git@bluematt.me>
Mon, 15 Jan 2024 04:20:55 +0000 (04:20 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 16 Jan 2024 20:01:35 +0000 (20:01 +0000)
commitfe90471435013b28b378d5cb3a64051c7251e290
treeae40b2b5fdd50909704821d7b8d2222ee8ba85f1
parent224008dfe80fb81a426bc2c7de40e8e8394541aa
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](https://github.com/lightning/blips/pull/31).
Cargo.toml
mutual-message-exchange/Cargo.toml [new file with mode: 0644]
mutual-message-exchange/src/chacha20.rs [new symlink]
mutual-message-exchange/src/chacha20poly1305rfc.rs [new symlink]
mutual-message-exchange/src/lib.rs [new file with mode: 0644]
mutual-message-exchange/src/poly1305.rs [new symlink]