-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do real secp256k1 point->curve checking
* This is a breaking change, as it requires the JS environment to have BigInt (all supported versions of JavaScript engines appear to). * This check may prevent loss of funds by eliminating a category of unspendable addresses from being created. * Performance is almost as fast as tiny-secp256k1 39-42us vs 33-35us. * Added `isXOnlyPoint` to types, expecting it to be used for Taproot.
- Loading branch information
1 parent
24e4d6f
commit bf1a94a
Showing
6 changed files
with
224 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,4 +40,4 @@ | |
"result": "71ae15bad52efcecf4c9f672bfbded68a4adb8258f1b95f0d06aefdb5ebd14e9" | ||
} | ||
] | ||
} | ||
} |
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,58 @@ | ||
{ | ||
"isPoint": [ | ||
{ | ||
"hex": "0400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", | ||
"expected": false | ||
}, | ||
{ | ||
"hex": "04ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", | ||
"expected": false | ||
}, | ||
{ | ||
"hex": "044289801366bcee6172b771cf5a7f13aaecd237a0b9a1ff9d769cabc2e6b70a34cec320a0565fb7caf11b1ca2f445f9b7b012dda5718b3cface369ee3a034ded6", | ||
"expected": true | ||
}, | ||
{ | ||
"hex": "044289801366bcee6172b771cf5a7f13aaecd237a0b9a1ff9d769cabc2e6b70a34cec320a0565fb7caf11b1ca2f445f9b7b012dda5718b3cface369ee3a034ded0", | ||
"expected": false | ||
}, | ||
{ | ||
"hex": "04ff", | ||
"expected": false | ||
} | ||
], | ||
"isXOnlyPoint": [ | ||
{ | ||
"hex": "ff", | ||
"expected": false | ||
}, | ||
{ | ||
"hex": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179800", | ||
"expected": false | ||
}, | ||
{ | ||
"hex": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", | ||
"expected": true | ||
}, | ||
{ | ||
"hex": "fffffffffffffffffffffffffffffffffffffffffffffffffffffffeeffffc2e", | ||
"expected": true | ||
}, | ||
{ | ||
"hex": "f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9", | ||
"expected": true | ||
}, | ||
{ | ||
"hex": "0000000000000000000000000000000000000000000000000000000000000001", | ||
"expected": true | ||
}, | ||
{ | ||
"hex": "0000000000000000000000000000000000000000000000000000000000000000", | ||
"expected": false | ||
}, | ||
{ | ||
"hex": "fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f", | ||
"expected": false | ||
} | ||
] | ||
} |
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