Skip to content

Use k256 AEAD for ohttp - #227

Closed
DanGould wants to merge 1 commit into
payjoin:masterfrom
DanGould:k256-hpke
Closed

DanGould wants to merge 1 commit into
payjoin:masterfrom
DanGould:k256-hpke

Conversation

@DanGould

Copy link
Copy Markdown
Member

secp256k1 is the bitcoin curve. re-use it for encryption to pull in fewer cryptographic dependencies and comply with BIP77 spec.

@DanGould

DanGould commented Mar 28, 2024 •

Copy link
Copy Markdown
Member Author

This failed because error: package sec1 v0.7.3 cannot be built because it requires rustc 1.65 or newer, while the currently active rustc version is 1.63.0 sec1 is only a dependency of the x25519 feature and could be overridden

@DanGould

Copy link
Copy Markdown
Member Author

I did some more digging to try to get hpke working with the secp256k1 curve from elliptic_curves' k256 crate. There are definitely some hurdles with regard to MSRV since the minnimum elliptic_curves that supports all of hpke's feature curves is 0.13, and 0.13 has MSRV 1.65. There's no easy way out of that other than dropping some of the features on a fork. And if we're maintaining a fork, why not do so with rust-bitcoin cryptographic dependencies instead?

It's time to weigh in on a decision to write a new crate bound to the secp256k1 crate or not. The rust-hpke and ohttp relay crate it depends on make extensive use of the elliptic_curves ecosystem crates because they all share a common interface. The scope of difficulty of a replacement with a dependency with a completely different interface needs to be assessed before that is attempted.

@DanGould DanGould added this to the Payjoin V2 beta milestone Jun 17, 2024
@DanGould

DanGould commented Sep 4, 2024

Copy link
Copy Markdown
Member Author

replaced by #354

@DanGould DanGould closed this Sep 4, 2024
DanGould added a commit that referenced this pull request Sep 5, 2024
- Depend on bitcoin-ohttp which in turn depends on bitcoin-hpke and
libsecp256k1 C bindings

supersedes #227
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant