Commit adf1912
committed
fix(crypto): self-verify schnorr signature in signEvent before returning
A key-holder must never emit a signature it has not verified. signEvent now
checks schnorr.verify(sig, eventId, pubkey) and throws on mismatch, catching a
faulty signing path (bad RNG, library regression) before the bad signature
leaves the service worker. This also exercises the previously unused verify
primitive on the hot signing path.
Co-Authored-By: jjohare <github@thedreamlab.uk>1 parent 865b166 commit adf1912
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
83 | 90 | | |
84 | 91 | | |
85 | 92 | | |
| |||
0 commit comments