I'm attempting to play around with signature verification in solidity through the use of ecrecover and have gotten to the point of being able to verify the address which was used to sign a particular message. However, the part where I am getting stuck is verifying the validity of the data that was signed, so that I can ensure that a particular piece of data was signed and submitted, and that another incorrect piece of data which was signed by the same person wasn't submitted instead?

up vote 1 down vote accepted

When designing the signature scheme, include in the signed data part enough information to uniquely identify what the user is signing.

  • Thank you! It just clicked and everything works as expected now :) – hextet Feb 8 at 1:22

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.