payjoin / rust-payjoin

Supercharged payment batching to save you fees and preserve your privacy
https://payjoindevkit.org
85 stars 37 forks source link

Implement client e2ee using HPKE #355

Closed DanGould closed 1 month ago

DanGould commented 2 months ago

This PR effectively integrates bitcoin-hpke, replacing the custom aead algorithm for point #216 point 4

The biggest review points of this PR are the design of the abstraction layers between payjoin and bitcoin-hpke (and to a lesser extent payjoin to bitcoin-ohttp to bitcoin-hpke).

Some things to consider:

DanGould commented 2 months ago

I've addressed your main concerns, but I'd still like to add that compressed_public_key() accessor to bitcoin-hpke, need to update the lock files, and want to make sure I'm satisfied with the src/v2.rs mod function names and params

DanGould commented 1 month ago

compressed key was tabled for now as non-critical and documented in an bitcoin-hpke repo issue. Otherwise this is ready for review

DanGould commented 1 month ago

Nice catches. Why even have the abstraction if you're not going to use the helpers. DOH!

I haven't smoke tested due to existing payjoin directories not supporting this hpke configuration

since the integration and e2e tests spin up payjoin directories with this configuration, that won't be a problem, would it? We must discuss deploying the new directory. I don't know that anyone is relying on it in production, so "just do it" might be the strategy.

spacebear21 commented 1 month ago

Agreed on shipping the new directory.

DanGould commented 1 month ago

image