|
20 | 20 | //! [`nolooking`](https://github.com/chaincase-app/nolooking) for LND, or |
21 | 21 | //! [`bitmask-core`](https://github.com/diba-io/bitmask-core) BDK integration. Bring your own |
22 | 22 | //! wallet and http client. |
| 23 | +//! |
| 24 | +//! OHTTP Privacy Warning |
| 25 | +//! Encapsulated requests whether GET or POST—**must not be retried or reused**. |
| 26 | +//! Retransmitting the same ciphertext (including via automatic retries) breaks the unlinkability and privacy guarantees of OHTTP, |
| 27 | +//! as it allows the relay to correlate requests by comparing ciphertexts. |
| 28 | +//! Note: Even fresh requests may be linkable via metadata (e.g. client IP, request timing), |
| 29 | +//! but request reuse makes correlation trivial for the relay. |
23 | 30 |
|
24 | 31 | use bitcoin::hashes::{sha256, Hash}; |
25 | 32 | pub use error::{CreateRequestError, EncapsulationError}; |
@@ -206,11 +213,16 @@ pub struct WithReplyKey { |
206 | 213 | impl State for WithReplyKey {} |
207 | 214 |
|
208 | 215 | impl Sender<WithReplyKey> { |
209 | | - /// Extract serialized V1 Request and Context from a Payjoin Proposal |
| 216 | + /// Extract serialized V1 Request and Context from a Payjoin Proposal. |
210 | 217 | pub fn extract_v1(&self) -> (Request, v1::V1Context) { self.v1.extract_v1() } |
211 | 218 |
|
212 | 219 | /// Extract serialized Request and Context from a Payjoin Proposal. |
213 | 220 | /// |
| 221 | + /// Important: This request must not be retried or reused on failure. |
| 222 | + /// Retransmitting the same ciphertext breaks OHTTP privacy properties. |
| 223 | + /// The specific concern is that the relay can see that a request is being retried, |
| 224 | + /// which leaks that it's all the same request. |
| 225 | + /// |
214 | 226 | /// This method requires the `rs` pubkey to be extracted from the endpoint |
215 | 227 | /// and has no fallback to v1. |
216 | 228 | pub fn extract_v2( |
|
0 commit comments