Refactor signer implementation to use p8k package
Some checks failed
Go / build (push) Has been cancelled
Go / release (push) Has been cancelled

- Replaced all instances of p256k1signer with the new p8k.Signer across various modules, including event creation, policy handling, and database interactions.
- Updated related test cases and benchmarks to ensure compatibility with the new signer interface.
- Bumped version to v0.25.0 to reflect these significant changes and improvements in cryptographic operations.
This commit is contained in:
2025-11-04 20:05:19 +00:00
parent effb3fafc1
commit e0a95ca1cd
70 changed files with 8667 additions and 124 deletions

View File

@@ -25,8 +25,11 @@ type I interface {
// Zero wipes the secret key to prevent memory leaks.
Zero()
// ECDH returns a shared secret derived using Elliptic Curve Diffie-Hellman on
// the I secret and provided pubkey.
// the I secret and provided pubkey. Returns the 32-byte x-coordinate of the shared point.
ECDH(pub []byte) (secret []byte, err error)
// ECDHRaw returns the raw shared secret point (x-coordinate only, 32 bytes) without hashing.
// This is needed for protocols like NIP-44 that do their own key derivation.
ECDHRaw(pub []byte) (sharedX []byte, err error)
}
// Gen is an interface for nostr BIP-340 key generation.