Skip to content

Bump bitcoin-hpke to 0.20.0 & bitcoin-ohttp to 0.7.0 #1817

Description

@DanGould

Disclosure: Claude authored

payjoin 1.0.0 ships against bitcoin-hpke 0.13.0 and bitcoin-ohttp 0.6.0, both
published in September 2024. The new releases back their symmetric crypto with
rust-bitcoin primitives instead of the RustCrypto stack, which removes sha2,
chacha20poly1305 and aes-gcm from payjoin's dependency tree entirely.

blocked by the release of those crates

This issue is the consumer-side bump. The work is version constraints only. no
source changes are needed, and that was verified end to end before the crates were
published.

Changes

  • payjoin/Cargo.toml: bitcoin-hpke 0.13.0 → 0.20.0, bitcoin-ohttp 0.6.0 → 0.7.0
  • payjoin-ffi/Cargo.toml: bitcoin-ohttp 0.6.0 → 0.7.0
  • payjoin-mailroom/Cargo.toml: bitcoin-ohttp 0.6.0 → 0.7.0
  • payjoin-test-utils/Cargo.toml: bitcoin-ohttp 0.6.0 → 0.7.0

Why no source changes

ohttp::Error is wrapped opaquely and the Aead variant that changed is never
destructured. payjoin-test-utils already advertises only ChaCha20Poly1305, which
is the single suite payjoin uses. DHKEM(secp256k1) / HKDF-SHA256 /
ChaCha20Poly1305. AES-GCM was test-only in hpke and advertised-but-unimplementable
in ohttp; 0.7.0 stops advertising it.

Verification already done

Against local builds of both crates, in the nix devShell:

  • cargo build -p payjoin --features v2 clean
  • cargo test -p payjoin --features v2 --lib — 189 passed, 0 failed, including
    core::hpke::test::{message_a_round_trip, message_b_round_trip, test_encrypted_payload_bit_uniformity}, which are the BIP 77 HPKE round-trips

One thing that pass caught and that is already fixed in 0.7.0: bitcoin-ohttp
0.6.0 declared bitcoin-hpke = "0.13.0", so a naive bump resolved both hpke
0.20.0 and 0.13.0 into the tree and ohttp's HPKE half kept dragging in sha2 and
chacha20poly1305. 0.7.0 depends on hpke 0.20, so the lockfile unifies.

Acceptance criteria

  • all four manifests bumped
  • cargo tree shows no sha2, chacha20poly1305 or aes-gcm anywhere in the
    workspace
  • exactly one bitcoin-hpke version resolves
  • ./contrib/lint.sh passes all stages, including the per-feature and
    per-crate runs — the --all-features --all-targets pass alone is the most
    permissive lint and will not catch feature-gated breakage here
  • v2 integration tests pass in CI

Note

MSRV on both new crates is 1.85, matching the workspace. Check the MSRV job rather
than assuming.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockeddependenciesPull requests that update a dependency file

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions