signed_note: No easy way to verify a single signature against note text
Open
- Dominant language
- Rust
- Stars
- 58
- Forks
- 14
- Avg merge
- 4d 43m
- Merged PRs (30d)
- 11
Description
I have a service that accepts signatures from witnesses. The signatures are over a note text `t`. The service must reject invalid signatures as they come in. So given a signature `s`, pubkey `pk`, and note text `t`, how do I verify `s`?
The current best way is to construct a new signed note `n = t || \n || s.to_bytes()`, and then run `t.verify(pk)`. This is unnecessarily complicated though. It'd be nice if there were a function like
```rust
fn verify_note_text(note_text: &[u8], sig: &NoteSignature, v: &impl Verifier) -> Result<()> { ... }
```
I can make a PR if you think it's a good idea
Contributor guide
Assessment
This issue has not been assessed yet.