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

Signing and verifying a message using ECDSA sometimes fails #1898

Open
4 of 10 tasks
rjwebb opened this issue Nov 22, 2023 · 0 comments
Open
4 of 10 tasks

Signing and verifying a message using ECDSA sometimes fails #1898

rjwebb opened this issue Nov 22, 2023 · 0 comments

Comments

@rjwebb
Copy link

rjwebb commented Nov 22, 2023

  • I'm submitting a ...

    • Bug report
    • Feature request
    • Support request
    • Other
  • What is the current behavior and expected behavior?

Expected behaviour: I should be able to generate a KeyringPair that signs messages using the ECDSA algorithm and verify the signatures against the message + the KeyringPair's public key

Current behaviour: This works most of the time, approx 99/100 times, but sometimes the verification fails.

  • What is the motivation for changing the behavior?

I'm working on a project that relies on being able to sign and verify data from the KeyringPair or from Polkadot wallets so I want to be able to rely on this functionality.

  • Please tell us about your environment:

I'm using @polkadot/keyring, @polkadot/util and @polkadot/util-crypto at the latest version as of writing (12.6.1).

I've created a minimal repository here that reproduces the bug: https://github.com/rjwebb/polkadot-ecdsa-bug-reproduction

  • Version: 12.6.1

  • Environment: Node v18.17.1

    • Node.js
    • Browser
    • Other (limited support for other environments)
  • Language:

    • JavaScript
    • TypeScript (include tsc --version) 5.2.2
    • Other
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

No branches or pull requests

1 participant