From d641f4566f051656bae79e406155c4f7f65ec338 Mon Sep 17 00:00:00 2001 From: Clawd Date: Fri, 20 Feb 2026 18:52:08 -0800 Subject: 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 --- go.mod | 8 -------- 1 file changed, 8 deletions(-) (limited to 'go.mod') diff --git a/go.mod b/go.mod index e63be4c..5fd9f48 100644 --- a/go.mod +++ b/go.mod @@ -1,11 +1,3 @@ module code.northwest.io/nostr go 1.25 - -require github.com/btcsuite/btcd/btcec/v2 v2.3.4 - -require ( - github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 // indirect - github.com/decred/dcrd/crypto/blake256 v1.1.0 // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect -) -- cgit v1.2.3