KO
|
EN
gitlite — search
Search
#python
#java
#python3
#arduino
#golang
#machine-learning
#rust
#html
#flask
#javascript
#seismology
#nodejs
dart-secp256k1
★ 11
Open GitHub ↗
No description available.
Download README (.md)
Explore Similar Repositories
CV
:
my CV using pagedown
typographical-hugo
:
The Hugo port of the Typographical Jekyll theme
land-g7
:
Land for bedrock_server win.
MCSemaWindows
:
MCSema Build Windows download
arena-blog
:
A lightweight template for quickly building blogs using are.na
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
dart-secp256k1
?
Download (.md)
# dart-secp256k1 > **⚠️ Security notice — please upgrade to ≥ 0.4.0 (important)** > > Versions **≤ 0.3.0** generated private keys and ECDSA nonces with a biased, > low-entropy routine. Keys produced by `PrivateKey.generate()` on those > versions are weaker than intended, and because the same routine produced the > signing nonce, a private key can in principle be recovered from a handful of > signatures. > > - If you only imported existing keys (`PrivateKey.fromHex`) and **never signed** > with an affected version, your keys are unchanged. > - If you **generated** a key with this package at ≤ 0.3.0, **or signed** with > any key using ≤ 0.3.0, treat that key as weak: upgrade to ≥ 0.4.0 and rotate > to (move any funds to) a freshly generated key. > > 0.4.0+ samples keys uniformly from `Random.secure()` and derives nonces > deterministically per RFC 6979 (0.4.1 also hardens signature verification). Pure secp256k1 implement for dart language. secp256k1 refers to the parameters of the elliptic curve used in Bitcoin's public-key cryptography, and is defined in Standards for Efficient Cryptography (SEC) (Certicom Research, http://www.secg.org/sec2-v2.pdf). Currently Bitcoin uses secp256k1 with the ECDSA algorithm, though the same curve with the same public/private keys can be used in some other algorithms such as Schnorr. ## Usage A simple usage example: ```dart var pk = PrivateKey.fromHex('c37c299bb7f5ffd8d9329d052983342a8c3234ff3b3fa32a292187341f7146d7'); var pub = pk.publicKey; print(pub.toHex()); print(pub.toCompressedHex()); var messageHash = 'b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9'; var sig = pk.signature(messageHash); print(sig.verify(pub, messageHash)); // true ``` ## Features and bugs WARN: This lib does not not provide deterministic ECDSA signature! Please file feature requests and bugs at the [issue tracker][tracker]. [tracker]: https://github.com/c0mm4nd/dart-secp256k1/issues