diff options
| author | Clawd <ai@clawd.bot> | 2026-02-20 18:52:08 -0800 |
|---|---|---|
| committer | Clawd <ai@clawd.bot> | 2026-02-20 18:52:08 -0800 |
| commit | d641f4566f051656bae79e406155c4f7f65ec338 (patch) | |
| tree | 4cd01f3fa4585cf719116a303473e792ea67e82a /go.mod | |
| parent | 84709fd67c02058334519ebee9c110f68b33d9b4 (diff) | |
embed secp256k1: replace btcec with internal pure-go implementation
This removes all external dependencies by embedding the secp256k1-learn
implementation into internal/secp256k1.
Changes:
- Add internal/secp256k1 with field arithmetic, curve ops, keys, schnorr
- Update keys.go to use internal secp256k1 package
- Remove btcec/btcutil dependencies (go.mod is now clean)
- All tests pass
Tradeoffs:
- ~10x slower crypto ops vs btcec (acceptable for nostr use case)
- Not constant-time (documented limitation)
- Zero external dependencies
Refs: code.northwest.io/secp256k1-learn
Diffstat (limited to 'go.mod')
| -rw-r--r-- | go.mod | 8 |
1 files changed, 0 insertions, 8 deletions
| @@ -1,11 +1,3 @@ | |||
| 1 | module code.northwest.io/nostr | 1 | module code.northwest.io/nostr |
| 2 | 2 | ||
| 3 | go 1.25 | 3 | go 1.25 |
| 4 | |||
| 5 | require github.com/btcsuite/btcd/btcec/v2 v2.3.4 | ||
| 6 | |||
| 7 | require ( | ||
| 8 | github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 // indirect | ||
| 9 | github.com/decred/dcrd/crypto/blake256 v1.1.0 // indirect | ||
| 10 | github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect | ||
| 11 | ) | ||
