forked from MystenLabs/sui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
crypto: ser/de update and use nonrecoverable sig for secp256k1/r1 (My…
…stenLabs#7423) ## What Changed - For CLI and SDK, a ECDSA k1 and r1 signature is produced using the nonrecoverable form. This means the signature is 64 bytes instead of 65. - The signature verification in sui also uses the nonrecoverable option. A valid signature should have 64 bytes. - For wallet, since only Ed25519 is supported, the secp256k1 change should not affect. - Also exposes secp256k1_verify and secp256k1_verify_recoverable API in move. - Ser/de of public keys and signatures now uses the most compact serialization with ToFromBytes. ## What Do You Need To Do - If you are using SDK to produce a Secp256k1 signature, no change is needed as long as you are using the latest version. - If you are using something else to produce a signature, your old signature will not be considered valid. You should just need to remove the last byte (65->64 bytes) to make it a valid signature again. Next: - r1 verify and verify_recoverable added in MystenLabs#7773
- Loading branch information
Showing
19 changed files
with
350 additions
and
135 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@mysten/sui.js": minor | ||
--- | ||
|
||
Secp256k1 signs 64-bytes signature [r, s] instead of [r, s, v] with recovery id |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.