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
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
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 signatures, pubkeypk, and note textt, how do I verifys?The current best way is to construct a new signed note
n = t || \n || s.to_bytes(), and then runt.verify(pk). This is unnecessarily complicated though. It'd be nice if there were a function likeI can make a PR if you think it's a good idea