-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There are some footguns in the `SchnorrSignature::sign` method that this PR seeks to mitigate. Firstly, it's not clear in the function docs that the nonce and pubkey are assumed to have been bound by the caller in the challenge. The docs are updated to make this clearer. Secondly, we deprecate the sign method and the utility module's sign method in favour of: - `sign_raw`, which is identical to the current sign method, but with a name that conveys the risk associated with using it. - `sign_message`, which does what many clients might have thought `sign` does, which correctly binds a nonce and public key to the message being signed in the challenge construction. - Matching `verify_*` methods. Tests and docs have been updated to reflect the changes.
- Loading branch information
Showing
5 changed files
with
152 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters