libplanet icon indicating copy to clipboard operation
libplanet copied to clipboard

`PublicKey.Verify()` method should fail on high-S signatures

Open tkiapril opened this issue 2 years ago • 1 comments

At the moment, PublicKey.Verify() method is agnostic of whether the signature is on the high-S side of the ECDSA curve, or on the low-S side. However, according to BIP-146, only the low-S signature should be used (as there can be two signatures (high-S and low-S) for a given message.) As such, this method should fail to verify the message whenever the high-S signature is used.

For reference:

  • Discussion on Discord: https://discord.com/channels/928926944937013338/970554437733073027/1086185911986954280
  • #2957, which was an attempt to match the current behavior of PublicKey.Verify()

tkiapril avatar Mar 17 '23 07:03 tkiapril

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

stale[bot] avatar May 22 '23 00:05 stale[bot]