Description
New API Proposal: Add secp256k1
curve
Motivation:
I REALLY think we should add EC Curve secp256k1
.
I can make a PR - if I know Apple will not reject it automatically just because it is a SECG
curve and not a NIST curve?(or due it being "the Bitcoin curve")
If we were to allow SECG
curves (the whole crypto community would love it if we did), then it would make sense to renamed the existing curve using NIST naming to use SECG
naming instead, see Appendix A in RFC4492
Why add support for secp256k1
? Well, Crypto currencies are on the rise (despise crypto winter of 2018/2019), and App Store contains lots of wallets already - a vast share of which are crypto currencies using the secp256k1 (since most coins are ERC20 tokens based on Ethereum, and all coins in top 8 use sec256k1, I approximate 95% of the total market cap of cryptocurrencies rely on secp256k1).
Since there are no native Swift lib for secp256k1, we see lots of unsafe libs, such as my own EllipticCurveKit, hyugit/EllipticCurve, EllipticSwift, all of which, including mine are unsafe.
One of the most popular projects is a wrapper of C library secp256k1, named BitcoinKit, but it does many things, including HD Wallet and is a bit messy.
So in order to protect users of iOS crypto wallets from losing funds due to errors/unsafe code, I think it is important that we add this curve.
Importance:
No we cannot use this curve today, but it is easy to add it I can make a PR.. I've dabbled in Crypto a bit before EllipticCurveKit, PRs into BitcoinKit.