Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

elliptic-curve: fix sec1::EncodedPoint::decompress #309

Merged
merged 1 commit into from
Sep 21, 2020

Conversation

tarcieri
Copy link
Member

This method was previously expecting Decompress and ToEncodedPoint impls on Scalar, rather than AffinePoint.

This updates it to use the correct types.

This method was previously expecting `Decompress` and `ToEncodedPoint`
impls on `Scalar`, rather than `AffinePoint`.

This updates it to use the correct types.
@tarcieri
Copy link
Member Author

This is technically a breaking change as it alters the trait bounds, however the original implementation was buggy, so there's nothing to "break" here.

I would suggest yanking elliptic-curve v0.6.0 and publishing another release with this fix, once it's confirmed it addresses the problem.

@tarcieri tarcieri merged commit 797b7d9 into master Sep 21, 2020
@tarcieri tarcieri deleted the elliptic-curve/fix-encoded-point-decompression branch September 21, 2020 16:02
tarcieri added a commit to RustCrypto/elliptic-curves that referenced this pull request Sep 21, 2020
Add tests that the upstream `sec1::EncodedPoint::decompress` method
works given the trait impls in the respective crates.

The generic upstream implementation was previously broken:

RustCrypto/traits#309

The plan is to release `elliptic-curve` v0.6.1 with the above fix, then
yank the broken v0.6.1 release.
tarcieri added a commit to RustCrypto/elliptic-curves that referenced this pull request Sep 21, 2020
Add tests that the upstream `sec1::EncodedPoint::decompress` method
works given the trait impls in the respective crates.

The generic upstream implementation was previously broken:

RustCrypto/traits#309

The plan is to release `elliptic-curve` v0.6.1 with the above fix, then
yank the broken v0.6.1 release.
tarcieri added a commit to RustCrypto/elliptic-curves that referenced this pull request Sep 21, 2020
Add tests that the upstream `sec1::EncodedPoint::decompress` method works given the trait impls in the respective crates.

The generic upstream implementation was previously broken:

RustCrypto/traits#309

The plan is to release `elliptic-curve` v0.6.1 with the above fix, then yank the broken v0.6.1 release.
@tarcieri tarcieri mentioned this pull request Sep 21, 2020
@tarcieri
Copy link
Member Author

Note: this method now has downstream tests in the k256 and p256 crates: RustCrypto/elliptic-curves#194

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

Successfully merging this pull request may close these issues.

1 participant