diff options
| author | Clawd <ai@clawd.bot> | 2026-02-19 21:35:23 -0800 |
|---|---|---|
| committer | Clawd <ai@clawd.bot> | 2026-02-19 21:35:23 -0800 |
| commit | c8ffd26630405809f0f2af7c918b749255c0b499 (patch) | |
| tree | 9d8c1a8133924a14c2dd2fa24fc659306c67ec59 | |
| parent | 3bc54760d888fbb65174a2d319a968dfaae0a5d9 (diff) | |
Update README: mark Schnorr complete, add compat test instructions
| -rw-r--r-- | README.md | 25 |
1 files changed, 20 insertions, 5 deletions
| @@ -26,11 +26,11 @@ Building Schnorr signatures on secp256k1 in Go, from first principles. | |||
| 26 | - [x] **Why it's hard to reverse** — the discrete log problem | 26 | - [x] **Why it's hard to reverse** — the discrete log problem |
| 27 | 27 | ||
| 28 | ### Part 4: Schnorr Signatures (BIP-340) | 28 | ### Part 4: Schnorr Signatures (BIP-340) |
| 29 | - [ ] **X-only public keys** — 32 bytes, implicit even y | 29 | - [x] **X-only public keys** — 32 bytes, implicit even y |
| 30 | - [ ] **The signing algorithm** — nonce, challenge, response | 30 | - [x] **The signing algorithm** — nonce, challenge, response |
| 31 | - [ ] **Why random nonce matters** — reuse = leaked private key | 31 | - [x] **Why random nonce matters** — reuse = leaked private key |
| 32 | - [ ] **The verification equation** — checking without knowing the private key | 32 | - [x] **The verification equation** — checking without knowing the private key |
| 33 | - [ ] **Tagged hashes** — domain separation for security | 33 | - [x] **Tagged hashes** — domain separation for security |
| 34 | 34 | ||
| 35 | ### Part 5: Serialization | 35 | ### Part 5: Serialization |
| 36 | - [x] **Bech32 encoding** — human-readable format (npub, nsec) | 36 | - [x] **Bech32 encoding** — human-readable format (npub, nsec) |
| @@ -58,6 +58,21 @@ This implementation targets: | |||
| 58 | 58 | ||
| 59 | Not implemented: ECDSA (used by legacy Bitcoin, Ethereum) | 59 | Not implemented: ECDSA (used by legacy Bitcoin, Ethereum) |
| 60 | 60 | ||
| 61 | ### Compatibility Tests | ||
| 62 | |||
| 63 | Verified against `btcec/v2` (the library used by most Go Bitcoin/Nostr projects): | ||
| 64 | |||
| 65 | ```bash | ||
| 66 | go get github.com/btcsuite/btcd/btcec/v2 | ||
| 67 | go test -tags=compat ./... | ||
| 68 | ``` | ||
| 69 | |||
| 70 | Tests confirm: | ||
| 71 | - Key derivation produces identical public keys | ||
| 72 | - Signatures created here verify with btcec | ||
| 73 | - Signatures from btcec verify with our code | ||
| 74 | - All 14 official BIP-340 test vectors pass | ||
| 75 | |||
| 61 | --- | 76 | --- |
| 62 | 77 | ||
| 63 | ## Resources | 78 | ## Resources |
