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

feat(identity): make secp256k1::SecretKey::sign infallible #3850

Merged
merged 7 commits into from
May 12, 2023

Conversation

thomaseizinger
Copy link
Contributor

Description

Previously, this function would return an error in case the provided digest is not of 32 bytes long. As per our spec, we hash all messages with SHA256 before signing, thus this error can never happen in practice.

This brings us one step closer to an infallible Keypair::sign which is now only fallible due to RSA signing. If we manage to fix that as well, constructors like noise::Config::new will become infallible.

Notes & open questions

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

@thomaseizinger thomaseizinger added this to the v0.52.0 milestone Apr 28, 2023
@thomaseizinger thomaseizinger marked this pull request as draft April 28, 2023 13:43
@mergify

This comment was marked as resolved.

@mergify
Copy link
Contributor

mergify bot commented May 2, 2023

This pull request has merge conflicts. Could you please resolve them @thomaseizinger? 🙏

@thomaseizinger thomaseizinger marked this pull request as ready for review May 2, 2023 11:56
@mergify

This comment was marked as resolved.

@thomaseizinger thomaseizinger requested a review from mxinden May 11, 2023 18:28
@mergify mergify bot merged commit 25958a2 into master May 12, 2023
@mergify mergify bot deleted the feat/infallible-secp256k1-sign branch May 12, 2023 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants