aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClawd <ai@clawd.bot>2026-02-20 19:29:03 -0800
committerClawd <ai@clawd.bot>2026-02-20 19:29:03 -0800
commit2ff3bff2cc178e2dcd7c0536a016b2d2800a55af (patch)
tree8b0065fb8919a0a80a3948d8cb449d5a780b8520
parentd641f4566f051656bae79e406155c4f7f65ec338 (diff)
docs: update README for zero-dependency implementation
-rw-r--r--README.md22
1 files changed, 18 insertions, 4 deletions
diff --git a/README.md b/README.md
index 4134431..8d42710 100644
--- a/README.md
+++ b/README.md
@@ -8,15 +8,15 @@ go get code.northwest.io/nostr
8 8
9## Why This Library? 9## Why This Library?
10 10
11**1 dependency.** That's it. 11**Zero dependencies.**
12 12
13Other Nostr libraries pull in 30+ dependencies. This one has exactly one direct dependency: `btcec` for Schnorr signatures (required by the protocol). 13Other Nostr libraries pull in 30+ dependencies. This one has none. The secp256k1 cryptography is implemented in pure Go, embedded in the library.
14 14
15``` 15```
16require github.com/btcsuite/btcd/btcec/v2 v2.3.4 16require (nothing)
17``` 17```
18 18
19No WebSocket libraries, no logging frameworks, no kitchen sink. Just the core protocol. 19No external crypto libraries, no WebSocket libraries, no logging frameworks, no kitchen sink. Just the core protocol.
20 20
21## What's Included 21## What's Included
22 22
@@ -31,6 +31,20 @@ No WebSocket libraries, no logging frameworks, no kitchen sink. Just the core pr
31 31
32This is a minimal core library. It implements NIP-01 and the basics. It doesn't implement every NIP, handle connection pooling, or manage relay discovery. Build that yourself, or don't. 32This is a minimal core library. It implements NIP-01 and the basics. It doesn't implement every NIP, handle connection pooling, or manage relay discovery. Build that yourself, or don't.
33 33
34## Cryptography
35
36This library uses an internal pure-Go implementation of secp256k1 and BIP-340 Schnorr signatures.
37
38**Tradeoffs:**
39
40- ✅ Zero dependencies, fully auditable
41- ✅ Passes all BIP-340 test vectors
42- ✅ Interoperable with btcec/bitcoin implementations
43- ⚠️ **Not constant-time** — uses Go's `math/big`, which has variable-time operations
44- ⚠️ ~10x slower than btcec (still fast enough for typical Nostr usage)
45
46For applications signing thousands of events per second or with strict timing-attack threat models, consider a library backed by btcec or libsecp256k1.
47
34## Usage 48## Usage
35 49
36```go 50```go