Skip to content

Conversation

@shinghim
Copy link
Contributor

The initial naming of ElligatorSwiftParty wasn't very descriptive, so it will be deprecated in favor of a more descriptive Party enum. I updated shared_secret and shared_secret_with_hasher to accept the new Party enum as well - I'm not sure if there's a better way to do it, but changing it to an impl Into<Party> should preserve backwards compatibility

Fixes #741

@shinghim shinghim force-pushed the 741-elligator branch 2 times, most recently from 8337acc to c83c5a7 Compare October 15, 2024 02:39
src/ellswift.rs Outdated
}

#[allow(deprecated)]
#[allow(dead_code)] // We aren't using this anymore in this library, but users might be using it
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In c83c5a7:

How can users be using this if it's a private method?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what i was thinking - removed this bit

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not resolved. Now this is dead code and is causing a local CI failure for me.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In 3b7d393

@apoelstra
Copy link
Member

Also, we should consider backporting this to the version used by rust-bitcoin 0.32.

@tcharding
Copy link
Member

This PR is doing two things, one of which is not in the title so is obfuscated. Please either do two separate PRs or describe the whole change set (probably still requires two patches).

@shinghim shinghim marked this pull request as draft October 16, 2024 01:49
@shinghim shinghim force-pushed the 741-elligator branch 2 times, most recently from 86fe99a to e04237b Compare October 16, 2024 02:13
@shinghim shinghim changed the title Deprecate ElligatorSwiftParty in favor of Party Create Party enum and deprecate ElligatorSwiftParty in favor of it Oct 16, 2024
@shinghim shinghim force-pushed the 741-elligator branch 3 times, most recently from d9d378e to e30f8f8 Compare October 16, 2024 02:22
Introducing this enum as a replacement for ElligatorSwiftParty. Party is
more descriptive and should cause less confusion than
ElligatorSwiftParty
@shinghim shinghim marked this pull request as ready for review October 16, 2024 02:53
@shinghim
Copy link
Contributor Author

@tcharding done

Copy link
Member

@tcharding tcharding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK bf2c35c

@tcharding
Copy link
Member

The deprecation stuff is particularly nice, well thought out.

@apoelstra
Copy link
Member

apoelstra commented Oct 17, 2024

3b7d393 is still in the PR. lemme check why clippy is running locally on this commit even though it's not the tip..

Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 3b7d393; successfully ran local tests

Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 3b7d393; successfully ran local tests

Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK bf2c35c; successfully ran local tests

@apoelstra
Copy link
Member

Lol, there we go, I got it.

I had been sorting commits alphabetically instead of topologically when deciding what the "tip" was.

@apoelstra apoelstra merged commit 36be55f into rust-bitcoin:master Oct 17, 2024
30 checks passed
apoelstra added a commit that referenced this pull request Oct 18, 2024
f12bde6 Deprecate `ElligatorSwiftParty` in favor of `Party` (Shing Him Ng)
33fda15 Create `Party` enum (Shing Him Ng)

Pull request description:

  Also, we should consider backporting this to the version used by rust-bitcoin 0.32.

  _Originally posted by apoelstra in #752 (comment)

  Backport #752 to the [version used by rust-bitcoin 0.32](https://github.com/rust-bitcoin/rust-bitcoin/blob/7af9e33f2b9033cf2701725eba280e14ebda0cf5/bitcoin/Cargo.toml#L35)

ACKs for top commit:
  apoelstra:
    ACK f12bde6; successfully ran local tests

Tree-SHA512: e8184c0df1f19a6512b1168bb1cf49e906de6d7f51ef1f9a4e3977422c36e603c3325fedb1485efa49ea8cb0361b54a293cdfefef10f3370541c8086b2b28bff
@shinghim shinghim deleted the 741-elligator branch October 19, 2024 01:31
chain-forgexcr45 added a commit to chain-forgexcr45/rust-secp256k1 that referenced this pull request Sep 28, 2025
…ate `ElligatorSwiftParty` in favor of it

bf2c35c1a8d391aa1b5a06e94c5c9a14dc69a7fb Deprecate `ElligatorSwiftParty` in favor of `Party` (Shing Him Ng)
3b7d3938873eb62406dd4d52094deeabddb0074f Create `Party` enum (Shing Him Ng)

Pull request description:

  The initial naming of ElligatorSwiftParty wasn't very descriptive, so it will be deprecated in favor of a more descriptive `Party` enum. I updated `shared_secret` and `shared_secret_with_hasher` to accept the new `Party` enum as well - I'm not sure if there's a better way to do it, but changing it to an `impl Into<Party>` should preserve backwards compatibility

  Fixes #741

ACKs for top commit:
  tcharding:
    ACK bf2c35c1a8d391aa1b5a06e94c5c9a14dc69a7fb
  apoelstra:
    ACK bf2c35c1a8d391aa1b5a06e94c5c9a14dc69a7fb; successfully ran local tests

Tree-SHA512: c516b8797b53e8e4167666ee6c93be61f67f2e71d33ba7354d6432199bd1f80680eea030c0c00ee5c0ba23204439d8c63c0efb8fc753f13e4cec189f7eee9a36
william2332-limf added a commit to william2332-limf/rust-secp256k1 that referenced this pull request Oct 2, 2025
…ate `ElligatorSwiftParty` in favor of it

bf2c35c1a8d391aa1b5a06e94c5c9a14dc69a7fb Deprecate `ElligatorSwiftParty` in favor of `Party` (Shing Him Ng)
3b7d3938873eb62406dd4d52094deeabddb0074f Create `Party` enum (Shing Him Ng)

Pull request description:

  The initial naming of ElligatorSwiftParty wasn't very descriptive, so it will be deprecated in favor of a more descriptive `Party` enum. I updated `shared_secret` and `shared_secret_with_hasher` to accept the new `Party` enum as well - I'm not sure if there's a better way to do it, but changing it to an `impl Into<Party>` should preserve backwards compatibility

  Fixes #741

ACKs for top commit:
  tcharding:
    ACK bf2c35c1a8d391aa1b5a06e94c5c9a14dc69a7fb
  apoelstra:
    ACK bf2c35c1a8d391aa1b5a06e94c5c9a14dc69a7fb; successfully ran local tests

Tree-SHA512: c516b8797b53e8e4167666ee6c93be61f67f2e71d33ba7354d6432199bd1f80680eea030c0c00ee5c0ba23204439d8c63c0efb8fc753f13e4cec189f7eee9a36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ElligatorSwift "A/B" enum should have better-named variants

3 participants