You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: implement BIP340 domain separation with 33-byte prefix
Before BIP340 was finalized, schnorr_fun implemented domain separation
using a 64-byte padded prefix based on early discussions. Now that
BIP340 has standardized domain separation, it recommends using either:
- Pre-hashing with a domain-specific hash function (32 bytes), or
- Prefixing with a 33-byte padded context string
This commit adds Message::new() which implements the BIP340-compliant
33-byte prefix approach and deprecates Message::plain() to guide users
toward the standard. The different prefix lengths (64 vs 33 bytes)
ensure no collision between old and new signatures.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,8 @@
6
6
- Upgrade to bincode v2
7
7
- MSRV 1.63 -> 1.85
8
8
-**BREAKING**: Refactor `CompactProof` in `sigma_fun` to use two type parameters `CompactProof<R, L>` instead of `CompactProof<S: Sigma>` to enable serde support
9
+
- Add `Message::new` for BIP340-compliant domain separation using 33-byte padded prefix
10
+
- Deprecate `Message::plain` which uses non-standard 64-byte prefix
0 commit comments