secp256k1 0.4.1
secp256k1: ^0.4.1 copied to clipboard
Pure secp256k1 signature algorithm implement for dart language which uses pure dart and basic types to represent all matters
0.4.1 #
- Fix
verifyto combine points through the infinity-aware_pointAdd, so malformed signatures (e.g.e == 0, oru1*G == -(u2*Q)) returnfalseinstead of throwing from the raw affine helpers. isOnCurvetakes the curve constantbas an optional parameter (defaulting to the secp256k1 value) instead of always using the global.
0.4.0 #
- SECURITY (critical): replace private-key and nonce generation. The old
getPrivKeyByRandproduced low-entropy, structured keys, andsignreused it for the ECDSA nonce — allowing key recovery. Keys are now sampled uniformly fromRandom.secure(), and the nonce is derived deterministically per RFC 6979 (HMAC-SHA256). - SECURITY:
signnormalizes to low-S (BIP-62). - SECURITY:
verifyand the uncompressed public-key parser reject points that are not on the curve. - Fix
inverseMulti: use exactBigInt.modInverseinstead of a double-precision quotient that lost precision for 256-bit values. getPointByBignow uses a Montgomery ladder (constant-shape point operations).- Add
cryptodependency; allow Dart 3.
0.3.0 #
- implement null safety (from @andrebianchessi)
- require dart sdk>=2.12.0
0.2.2 #
- add == operator
- optimize codes
0.2.1 #
- Fix PrivateKey.generate()
0.2.0 #
- Rewrite the interface in OOP
0.1.1 #
- Add simple docstring
- Fix prefix of compressed public key hex
0.1.0 #
- Pass a basic test
- Initial version, created by Stagehand